diff --git a/package-lock.json b/package-lock.json index 2b186594c..045101b8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17517,13 +17517,13 @@ }, "packages/fcl": { "name": "@onflow/fcl", - "version": "1.0.2", + "version": "1.0.3-alpha.0", "license": "Apache-2.0", "dependencies": { "@onflow/config": "^1.0.1", "@onflow/interaction": "0.0.11", "@onflow/rlp": "^1.0.1", - "@onflow/sdk": "^1.0.1", + "@onflow/sdk": "^1.0.2-alpha.0", "@onflow/types": "^1.0.1", "@onflow/util-actor": "^1.0.1", "@onflow/util-address": "^1.0.1", @@ -19655,7 +19655,7 @@ "dependencies": { "@improbable-eng/grpc-web": "^0.12.0", "elliptic": "^6.5.4", - "google-protobuf": "^3.11.4" + "google-protobuf": "3.11.4" }, "devDependencies": { "jest": "25.3.0", @@ -20119,6 +20119,11 @@ "node": ">= 8.3" } }, + "packages/protobuf/node_modules/google-protobuf": { + "version": "3.11.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.11.4.tgz", + "integrity": "sha512-lL6b04rDirurUBOgsY2+LalI6Evq8eH5TcNzi7TYQ3BsIWelT0KSOQSBsXuavEkNf+odQU6c0lgz3UsZXeNX9Q==" + }, "packages/protobuf/node_modules/html-encoding-sniffer": { "version": "1.0.2", "dev": true, @@ -20838,16 +20843,16 @@ }, "packages/sdk": { "name": "@onflow/sdk", - "version": "1.0.1", + "version": "1.0.2-alpha.0", "license": "Apache-2.0", "dependencies": { "@onflow/config": "^1.0.1", "@onflow/rlp": "^1.0.1", - "@onflow/transport-http": "^1.1.0", + "@onflow/transport-http": "^1.3.0-alpha.0", "@onflow/util-actor": "^1.0.1", "@onflow/util-address": "^1.0.1", "@onflow/util-invariant": "^1.0.1", - "@onflow/util-logger": "^1.0.1", + "@onflow/util-logger": "^1.0.2-alpha.0", "@onflow/util-template": "^1.0.1", "deepmerge": "^4.2.2", "sha3": "^2.1.4" @@ -25122,7 +25127,7 @@ }, "packages/transport-http": { "name": "@onflow/transport-http", - "version": "1.2.0", + "version": "1.3.0-alpha.0", "license": "Apache-2.0", "dependencies": { "@onflow/util-address": "^1.0.1", @@ -29833,10 +29838,10 @@ }, "packages/util-logger": { "name": "@onflow/util-logger", - "version": "1.0.1", + "version": "1.0.2-alpha.0", "license": "Apache-2.0", "dependencies": { - "@onflow/sdk": "^1.0.1" + "@onflow/sdk": "^1.0.2-alpha.0" }, "devDependencies": { "jest": "25.3.0", @@ -39012,7 +39017,7 @@ "@onflow/config": "^1.0.1", "@onflow/interaction": "0.0.11", "@onflow/rlp": "^1.0.1", - "@onflow/sdk": "^1.0.1", + "@onflow/sdk": "^1.0.2-alpha.0", "@onflow/types": "^1.0.1", "@onflow/util-actor": "^1.0.1", "@onflow/util-address": "^1.0.1", @@ -40394,7 +40399,7 @@ "requires": { "@improbable-eng/grpc-web": "^0.12.0", "elliptic": "^6.5.4", - "google-protobuf": "^3.11.4", + "google-protobuf": "3.11.4", "jest": "25.3.0", "jest-esm-transformer": "1.0.0", "path": "0.12.7", @@ -40732,6 +40737,11 @@ "jest-regex-util": "^25.2.6" } }, + "google-protobuf": { + "version": "3.11.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.11.4.tgz", + "integrity": "sha512-lL6b04rDirurUBOgsY2+LalI6Evq8eH5TcNzi7TYQ3BsIWelT0KSOQSBsXuavEkNf+odQU6c0lgz3UsZXeNX9Q==" + }, "html-encoding-sniffer": { "version": "1.0.2", "dev": true, @@ -41275,11 +41285,11 @@ "requires": { "@onflow/config": "^1.0.1", "@onflow/rlp": "^1.0.1", - "@onflow/transport-http": "^1.1.0", + "@onflow/transport-http": "^1.3.0-alpha.0", "@onflow/util-actor": "^1.0.1", "@onflow/util-address": "^1.0.1", "@onflow/util-invariant": "^1.0.1", - "@onflow/util-logger": "^1.0.1", + "@onflow/util-logger": "^1.0.2-alpha.0", "@onflow/util-template": "^1.0.1", "deepmerge": "^4.2.2", "jest": "^27.0.6", @@ -47156,7 +47166,7 @@ "@onflow/util-logger": { "version": "file:packages/util-logger", "requires": { - "@onflow/sdk": "^1.0.1", + "@onflow/sdk": "^1.0.2-alpha.0", "jest": "25.3.0", "jest-esm-transformer": "1.0.0", "microbundle": "0.12.0-next.8" diff --git a/packages/protobuf/package.json b/packages/protobuf/package.json index 4c3cb14f2..100ace38e 100644 --- a/packages/protobuf/package.json +++ b/packages/protobuf/package.json @@ -31,11 +31,11 @@ "prepublishOnly": "npm test && npm run build", "test": "jest", "build": "webpack --mode=production", - "generate": "protoc --plugin='protoc-gen-ts=./node_modules/.bin/protoc-gen-ts' --js_out='import_style=commonjs,binary:src/generated' --ts_out='service=grpc-web:src/generated' -I ./src/proto ./src/proto/flow/**/*.proto;" + "generate": "protoc --plugin='protoc-gen-ts=../../node_modules/.bin/protoc-gen-ts' --js_out='import_style=commonjs,binary:src/generated' --ts_out='service=grpc-web:src/generated' -I ./src/proto ./src/proto/flow/**/*.proto;" }, "dependencies": { "@improbable-eng/grpc-web": "^0.12.0", "elliptic": "^6.5.4", - "google-protobuf": "^3.11.4" + "google-protobuf": "3.11.4" } } diff --git a/packages/protobuf/src/generated/flow/access/access.ts b/packages/protobuf/src/generated/flow/access/access.ts deleted file mode 100644 index 8f5a87c9c..000000000 --- a/packages/protobuf/src/generated/flow/access/access.ts +++ /dev/null @@ -1,1467 +0,0 @@ -import * as pb_1 from "google-protobuf"; -import * as grpc_1 from "grpc"; -export namespace access { - export class PingRequest extends pb_1.Message { - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { } - } - toObject() { - return {}; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PingRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new PingRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - } - export class PingResponse extends pb_1.Message { - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { } - } - toObject() { - return {}; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PingResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new PingResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - } - export class GetLatestBlockHeaderRequest extends pb_1.Message { - constructor(data?: any[] | { - is_sealed?: boolean; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.is_sealed = data.is_sealed; - } - } - get is_sealed(): boolean | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as boolean | undefined; - } - set is_sealed(value: boolean) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - is_sealed: this.is_sealed - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.is_sealed !== undefined) - writer.writeBool(1, this.is_sealed); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestBlockHeaderRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetLatestBlockHeaderRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.is_sealed = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetBlockHeaderByIDRequest extends pb_1.Message { - constructor(data?: any[] | { - id?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.id = data.id; - } - } - get id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - id: this.id - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.id !== undefined) - writer.writeBytes(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockHeaderByIDRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetBlockHeaderByIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetBlockHeaderByHeightRequest extends pb_1.Message { - constructor(data?: any[] | { - height?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.height = data.height; - } - } - get height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as number | undefined; - } - set height(value: number) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - height: this.height - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.height !== undefined) - writer.writeUint64(1, this.height); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockHeaderByHeightRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetBlockHeaderByHeightRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.height = reader.readUint64(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class BlockHeaderResponse extends pb_1.Message { - constructor(data?: any[] | { - block?: entities.BlockHeader; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block = data.block; - } - } - get block(): entities.BlockHeader | undefined { - return pb_1.Message.getWrapperField(this, entities.BlockHeader, 1) as entities.BlockHeader | undefined; - } - set block(value: entities.BlockHeader) { - pb_1.Message.setWrapperField(this, 1, value); - } - toObject() { - return { - block: this.block && this.block.toObject() - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block !== undefined) - writer.writeMessage(1, this.block, () => this.block.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockHeaderResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new BlockHeaderResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.block, () => message.block = entities.BlockHeader.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetLatestBlockRequest extends pb_1.Message { - constructor(data?: any[] | { - is_sealed?: boolean; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.is_sealed = data.is_sealed; - } - } - get is_sealed(): boolean | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as boolean | undefined; - } - set is_sealed(value: boolean) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - is_sealed: this.is_sealed - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.is_sealed !== undefined) - writer.writeBool(1, this.is_sealed); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetLatestBlockRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetLatestBlockRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.is_sealed = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetBlockByIDRequest extends pb_1.Message { - constructor(data?: any[] | { - id?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.id = data.id; - } - } - get id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - id: this.id - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.id !== undefined) - writer.writeBytes(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockByIDRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetBlockByIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetBlockByHeightRequest extends pb_1.Message { - constructor(data?: any[] | { - height?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.height = data.height; - } - } - get height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as number | undefined; - } - set height(value: number) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - height: this.height - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.height !== undefined) - writer.writeUint64(1, this.height); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockByHeightRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetBlockByHeightRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.height = reader.readUint64(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class BlockResponse extends pb_1.Message { - constructor(data?: any[] | { - block?: entities.Block; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block = data.block; - } - } - get block(): entities.Block | undefined { - return pb_1.Message.getWrapperField(this, entities.Block, 1) as entities.Block | undefined; - } - set block(value: entities.Block) { - pb_1.Message.setWrapperField(this, 1, value); - } - toObject() { - return { - block: this.block && this.block.toObject() - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block !== undefined) - writer.writeMessage(1, this.block, () => this.block.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new BlockResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.block, () => message.block = entities.Block.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetCollectionByIDRequest extends pb_1.Message { - constructor(data?: any[] | { - id?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.id = data.id; - } - } - get id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - id: this.id - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.id !== undefined) - writer.writeBytes(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetCollectionByIDRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetCollectionByIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class CollectionResponse extends pb_1.Message { - constructor(data?: any[] | { - collection?: entities.Collection; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.collection = data.collection; - } - } - get collection(): entities.Collection | undefined { - return pb_1.Message.getWrapperField(this, entities.Collection, 1) as entities.Collection | undefined; - } - set collection(value: entities.Collection) { - pb_1.Message.setWrapperField(this, 1, value); - } - toObject() { - return { - collection: this.collection && this.collection.toObject() - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.collection !== undefined) - writer.writeMessage(1, this.collection, () => this.collection.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CollectionResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new CollectionResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.collection, () => message.collection = entities.Collection.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class SendTransactionRequest extends pb_1.Message { - constructor(data?: any[] | { - transaction?: entities.Transaction; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.transaction = data.transaction; - } - } - get transaction(): entities.Transaction | undefined { - return pb_1.Message.getWrapperField(this, entities.Transaction, 1) as entities.Transaction | undefined; - } - set transaction(value: entities.Transaction) { - pb_1.Message.setWrapperField(this, 1, value); - } - toObject() { - return { - transaction: this.transaction && this.transaction.toObject() - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.transaction !== undefined) - writer.writeMessage(1, this.transaction, () => this.transaction.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SendTransactionRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new SendTransactionRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.transaction, () => message.transaction = entities.Transaction.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class SendTransactionResponse extends pb_1.Message { - constructor(data?: any[] | { - id?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.id = data.id; - } - } - get id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - id: this.id - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.id !== undefined) - writer.writeBytes(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SendTransactionResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new SendTransactionResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetTransactionRequest extends pb_1.Message { - constructor(data?: any[] | { - id?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.id = data.id; - } - } - get id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - id: this.id - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.id !== undefined) - writer.writeBytes(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTransactionRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetTransactionRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class TransactionResponse extends pb_1.Message { - constructor(data?: any[] | { - transaction?: entities.Transaction; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.transaction = data.transaction; - } - } - get transaction(): entities.Transaction | undefined { - return pb_1.Message.getWrapperField(this, entities.Transaction, 1) as entities.Transaction | undefined; - } - set transaction(value: entities.Transaction) { - pb_1.Message.setWrapperField(this, 1, value); - } - toObject() { - return { - transaction: this.transaction && this.transaction.toObject() - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.transaction !== undefined) - writer.writeMessage(1, this.transaction, () => this.transaction.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TransactionResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new TransactionResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.transaction, () => message.transaction = entities.Transaction.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class TransactionResultResponse extends pb_1.Message { - constructor(data?: any[] | { - status?: entities.TransactionStatus; - status_code?: number; - error_message?: string; - events?: entities.Event[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [4], null); - if (!Array.isArray(data) && typeof data == "object") { - this.status = data.status; - this.status_code = data.status_code; - this.error_message = data.error_message; - this.events = data.events; - } - } - get status(): entities.TransactionStatus | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as entities.TransactionStatus | undefined; - } - set status(value: entities.TransactionStatus) { - pb_1.Message.setField(this, 1, value); - } - get status_code(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as number | undefined; - } - set status_code(value: number) { - pb_1.Message.setField(this, 2, value); - } - get error_message(): string | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as string | undefined; - } - set error_message(value: string) { - pb_1.Message.setField(this, 3, value); - } - get events(): entities.Event[] { - return pb_1.Message.getRepeatedWrapperField(this, entities.Event, 4) as entities.Event[]; - } - set events(value: entities.Event[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - toObject() { - return { - status: this.status, - status_code: this.status_code, - error_message: this.error_message, - events: this.events.map((item: entities.Event) => item.toObject()) - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.status !== undefined) - writer.writeEnum(1, this.status); - if (this.status_code !== undefined) - writer.writeUint32(2, this.status_code); - if (this.error_message !== undefined) - writer.writeString(3, this.error_message); - if (this.events !== undefined) - writer.writeRepeatedMessage(4, this.events, (item: entities.Event) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TransactionResultResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new TransactionResultResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.status = reader.readEnum(); - break; - case 2: - message.status_code = reader.readUint32(); - break; - case 3: - message.error_message = reader.readString(); - break; - case 4: - reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 4, entities.Event.deserialize(reader), entities.Event)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetAccountRequest extends pb_1.Message { - constructor(data?: any[] | { - address?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.address = data.address; - } - } - get address(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set address(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - address: this.address - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.address !== undefined) - writer.writeBytes(1, this.address); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAccountRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetAccountRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.address = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetAccountResponse extends pb_1.Message { - constructor(data?: any[] | { - account?: entities.Account; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.account = data.account; - } - } - get account(): entities.Account | undefined { - return pb_1.Message.getWrapperField(this, entities.Account, 1) as entities.Account | undefined; - } - set account(value: entities.Account) { - pb_1.Message.setWrapperField(this, 1, value); - } - toObject() { - return { - account: this.account && this.account.toObject() - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.account !== undefined) - writer.writeMessage(1, this.account, () => this.account.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAccountResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetAccountResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.account, () => message.account = entities.Account.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class ExecuteScriptAtLatestBlockRequest extends pb_1.Message { - constructor(data?: any[] | { - script?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.script = data.script; - } - } - get script(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set script(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - script: this.script - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.script !== undefined) - writer.writeBytes(1, this.script); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExecuteScriptAtLatestBlockRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new ExecuteScriptAtLatestBlockRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.script = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class ExecuteScriptAtBlockIDRequest extends pb_1.Message { - constructor(data?: any[] | { - block_id?: Uint8Array; - script?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block_id = data.block_id; - this.script = data.script; - } - } - get block_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set block_id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get script(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set script(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - block_id: this.block_id, - script: this.script - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block_id !== undefined) - writer.writeBytes(1, this.block_id); - if (this.script !== undefined) - writer.writeBytes(2, this.script); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExecuteScriptAtBlockIDRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new ExecuteScriptAtBlockIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.block_id = reader.readBytes(); - break; - case 2: - message.script = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class ExecuteScriptAtBlockHeightRequest extends pb_1.Message { - constructor(data?: any[] | { - block_height?: number; - script?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block_height = data.block_height; - this.script = data.script; - } - } - get block_height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as number | undefined; - } - set block_height(value: number) { - pb_1.Message.setField(this, 1, value); - } - get script(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set script(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - block_height: this.block_height, - script: this.script - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block_height !== undefined) - writer.writeUint64(1, this.block_height); - if (this.script !== undefined) - writer.writeBytes(2, this.script); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExecuteScriptAtBlockHeightRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new ExecuteScriptAtBlockHeightRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.block_height = reader.readUint64(); - break; - case 2: - message.script = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class ExecuteScriptResponse extends pb_1.Message { - constructor(data?: any[] | { - value?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.value = data.value; - } - } - get value(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set value(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - value: this.value - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.value !== undefined) - writer.writeBytes(1, this.value); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExecuteScriptResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new ExecuteScriptResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.value = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetEventsForHeightRangeRequest extends pb_1.Message { - constructor(data?: any[] | { - type?: string; - start_height?: number; - end_height?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.type = data.type; - this.start_height = data.start_height; - this.end_height = data.end_height; - } - } - get type(): string | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as string | undefined; - } - set type(value: string) { - pb_1.Message.setField(this, 1, value); - } - get start_height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as number | undefined; - } - set start_height(value: number) { - pb_1.Message.setField(this, 2, value); - } - get end_height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as number | undefined; - } - set end_height(value: number) { - pb_1.Message.setField(this, 3, value); - } - toObject() { - return { - type: this.type, - start_height: this.start_height, - end_height: this.end_height - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.type !== undefined) - writer.writeString(1, this.type); - if (this.start_height !== undefined) - writer.writeUint64(2, this.start_height); - if (this.end_height !== undefined) - writer.writeUint64(3, this.end_height); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetEventsForHeightRangeRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetEventsForHeightRangeRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.type = reader.readString(); - break; - case 2: - message.start_height = reader.readUint64(); - break; - case 3: - message.end_height = reader.readUint64(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetEventsForBlockIDsRequest extends pb_1.Message { - constructor(data?: any[] | { - type?: string; - block_ids?: Uint8Array[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [2], null); - if (!Array.isArray(data) && typeof data == "object") { - this.type = data.type; - this.block_ids = data.block_ids; - } - } - get type(): string | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as string | undefined; - } - set type(value: string) { - pb_1.Message.setField(this, 1, value); - } - get block_ids(): Uint8Array[] { - return pb_1.Message.getField(this, 2) as Uint8Array[]; - } - set block_ids(value: Uint8Array[]) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - type: this.type, - block_ids: this.block_ids - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.type !== undefined) - writer.writeString(1, this.type); - if (this.block_ids !== undefined) - writer.writeRepeatedBytes(2, this.block_ids); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetEventsForBlockIDsRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetEventsForBlockIDsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.type = reader.readString(); - break; - case 2: - pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class EventsResponse extends pb_1.Message { - constructor(data?: any[] | { - results?: EventsResponse.Result[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [1], null); - if (!Array.isArray(data) && typeof data == "object") { - this.results = data.results; - } - } - get results(): EventsResponse.Result[] { - return pb_1.Message.getRepeatedWrapperField(this, EventsResponse.Result, 1) as EventsResponse.Result[]; - } - set results(value: EventsResponse.Result[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - toObject() { - return { - results: this.results.map((item: EventsResponse.Result) => item.toObject()) - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.results !== undefined) - writer.writeRepeatedMessage(1, this.results, (item: EventsResponse.Result) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventsResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new EventsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.results, () => pb_1.Message.addToRepeatedWrapperField(message, 1, EventsResponse.Result.deserialize(reader), EventsResponse.Result)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export namespace EventsResponse { - export class Result extends pb_1.Message { - constructor(data?: any[] | { - block_id?: Uint8Array; - block_height?: number; - events?: entities.Event[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [3], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block_id = data.block_id; - this.block_height = data.block_height; - this.events = data.events; - } - } - get block_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set block_id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get block_height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as number | undefined; - } - set block_height(value: number) { - pb_1.Message.setField(this, 2, value); - } - get events(): entities.Event[] { - return pb_1.Message.getRepeatedWrapperField(this, entities.Event, 3) as entities.Event[]; - } - set events(value: entities.Event[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - toObject() { - return { - block_id: this.block_id, - block_height: this.block_height, - events: this.events.map((item: entities.Event) => item.toObject()) - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block_id !== undefined) - writer.writeBytes(1, this.block_id); - if (this.block_height !== undefined) - writer.writeUint64(2, this.block_height); - if (this.events !== undefined) - writer.writeRepeatedMessage(3, this.events, (item: entities.Event) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Result { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Result(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.block_id = reader.readBytes(); - break; - case 2: - message.block_height = reader.readUint64(); - break; - case 3: - reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 3, entities.Event.deserialize(reader), entities.Event)); - break; - default: reader.skipField(); - } - } - return message; - } - } - } - export var AccessAPI = { - Ping: { - path: "/access.AccessAPI/Ping", - requestStream: false, - responseStream: false, - requestType: access.PingRequest, - responseType: access.PingResponse, - requestSerialize: (message: PingRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => PingRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: PingResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => PingResponse.deserialize(new Uint8Array(bytes)) - }, - GetLatestBlockHeader: { - path: "/access.AccessAPI/GetLatestBlockHeader", - requestStream: false, - responseStream: false, - requestType: access.GetLatestBlockHeaderRequest, - responseType: access.BlockHeaderResponse, - requestSerialize: (message: GetLatestBlockHeaderRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetLatestBlockHeaderRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: BlockHeaderResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => BlockHeaderResponse.deserialize(new Uint8Array(bytes)) - }, - GetBlockHeaderByID: { - path: "/access.AccessAPI/GetBlockHeaderByID", - requestStream: false, - responseStream: false, - requestType: access.GetBlockHeaderByIDRequest, - responseType: access.BlockHeaderResponse, - requestSerialize: (message: GetBlockHeaderByIDRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetBlockHeaderByIDRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: BlockHeaderResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => BlockHeaderResponse.deserialize(new Uint8Array(bytes)) - }, - GetBlockHeaderByHeight: { - path: "/access.AccessAPI/GetBlockHeaderByHeight", - requestStream: false, - responseStream: false, - requestType: access.GetBlockHeaderByHeightRequest, - responseType: access.BlockHeaderResponse, - requestSerialize: (message: GetBlockHeaderByHeightRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetBlockHeaderByHeightRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: BlockHeaderResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => BlockHeaderResponse.deserialize(new Uint8Array(bytes)) - }, - GetLatestBlock: { - path: "/access.AccessAPI/GetLatestBlock", - requestStream: false, - responseStream: false, - requestType: access.GetLatestBlockRequest, - responseType: access.BlockResponse, - requestSerialize: (message: GetLatestBlockRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetLatestBlockRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: BlockResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => BlockResponse.deserialize(new Uint8Array(bytes)) - }, - GetBlockByID: { - path: "/access.AccessAPI/GetBlockByID", - requestStream: false, - responseStream: false, - requestType: access.GetBlockByIDRequest, - responseType: access.BlockResponse, - requestSerialize: (message: GetBlockByIDRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetBlockByIDRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: BlockResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => BlockResponse.deserialize(new Uint8Array(bytes)) - }, - GetBlockByHeight: { - path: "/access.AccessAPI/GetBlockByHeight", - requestStream: false, - responseStream: false, - requestType: access.GetBlockByHeightRequest, - responseType: access.BlockResponse, - requestSerialize: (message: GetBlockByHeightRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetBlockByHeightRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: BlockResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => BlockResponse.deserialize(new Uint8Array(bytes)) - }, - GetCollectionByID: { - path: "/access.AccessAPI/GetCollectionByID", - requestStream: false, - responseStream: false, - requestType: access.GetCollectionByIDRequest, - responseType: access.CollectionResponse, - requestSerialize: (message: GetCollectionByIDRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetCollectionByIDRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: CollectionResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => CollectionResponse.deserialize(new Uint8Array(bytes)) - }, - SendTransaction: { - path: "/access.AccessAPI/SendTransaction", - requestStream: false, - responseStream: false, - requestType: access.SendTransactionRequest, - responseType: access.SendTransactionResponse, - requestSerialize: (message: SendTransactionRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => SendTransactionRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: SendTransactionResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => SendTransactionResponse.deserialize(new Uint8Array(bytes)) - }, - GetTransaction: { - path: "/access.AccessAPI/GetTransaction", - requestStream: false, - responseStream: false, - requestType: access.GetTransactionRequest, - responseType: access.TransactionResponse, - requestSerialize: (message: GetTransactionRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetTransactionRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: TransactionResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => TransactionResponse.deserialize(new Uint8Array(bytes)) - }, - GetTransactionResult: { - path: "/access.AccessAPI/GetTransactionResult", - requestStream: false, - responseStream: false, - requestType: access.GetTransactionRequest, - responseType: access.TransactionResultResponse, - requestSerialize: (message: GetTransactionRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetTransactionRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: TransactionResultResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => TransactionResultResponse.deserialize(new Uint8Array(bytes)) - }, - GetAccount: { - path: "/access.AccessAPI/GetAccount", - requestStream: false, - responseStream: false, - requestType: access.GetAccountRequest, - responseType: access.GetAccountResponse, - requestSerialize: (message: GetAccountRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetAccountRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: GetAccountResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => GetAccountResponse.deserialize(new Uint8Array(bytes)) - }, - ExecuteScriptAtLatestBlock: { - path: "/access.AccessAPI/ExecuteScriptAtLatestBlock", - requestStream: false, - responseStream: false, - requestType: access.ExecuteScriptAtLatestBlockRequest, - responseType: access.ExecuteScriptResponse, - requestSerialize: (message: ExecuteScriptAtLatestBlockRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => ExecuteScriptAtLatestBlockRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: ExecuteScriptResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => ExecuteScriptResponse.deserialize(new Uint8Array(bytes)) - }, - ExecuteScriptAtBlockID: { - path: "/access.AccessAPI/ExecuteScriptAtBlockID", - requestStream: false, - responseStream: false, - requestType: access.ExecuteScriptAtBlockIDRequest, - responseType: access.ExecuteScriptResponse, - requestSerialize: (message: ExecuteScriptAtBlockIDRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => ExecuteScriptAtBlockIDRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: ExecuteScriptResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => ExecuteScriptResponse.deserialize(new Uint8Array(bytes)) - }, - ExecuteScriptAtBlockHeight: { - path: "/access.AccessAPI/ExecuteScriptAtBlockHeight", - requestStream: false, - responseStream: false, - requestType: access.ExecuteScriptAtBlockHeightRequest, - responseType: access.ExecuteScriptResponse, - requestSerialize: (message: ExecuteScriptAtBlockHeightRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => ExecuteScriptAtBlockHeightRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: ExecuteScriptResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => ExecuteScriptResponse.deserialize(new Uint8Array(bytes)) - }, - GetEventsForHeightRange: { - path: "/access.AccessAPI/GetEventsForHeightRange", - requestStream: false, - responseStream: false, - requestType: access.GetEventsForHeightRangeRequest, - responseType: access.EventsResponse, - requestSerialize: (message: GetEventsForHeightRangeRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetEventsForHeightRangeRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: EventsResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => EventsResponse.deserialize(new Uint8Array(bytes)) - }, - GetEventsForBlockIDs: { - path: "/access.AccessAPI/GetEventsForBlockIDs", - requestStream: false, - responseStream: false, - requestType: access.GetEventsForBlockIDsRequest, - responseType: access.EventsResponse, - requestSerialize: (message: GetEventsForBlockIDsRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetEventsForBlockIDsRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: EventsResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => EventsResponse.deserialize(new Uint8Array(bytes)) - } - }; - export class AccessAPIClient extends grpc_1.makeGenericClientConstructor(AccessAPI, "AccessAPI", {}) { - constructor(address: string, credentials: grpc_1.ChannelCredentials) { - super(address, credentials) - } - } -} diff --git a/packages/protobuf/src/generated/flow/access/access_pb.d.ts b/packages/protobuf/src/generated/flow/access/access_pb.d.ts index fbc7106f2..227a5f73b 100644 --- a/packages/protobuf/src/generated/flow/access/access_pb.d.ts +++ b/packages/protobuf/src/generated/flow/access/access_pb.d.ts @@ -7,6 +7,7 @@ import * as flow_entities_block_header_pb from "../../flow/entities/block_header import * as flow_entities_block_pb from "../../flow/entities/block_pb"; import * as flow_entities_collection_pb from "../../flow/entities/collection_pb"; import * as flow_entities_event_pb from "../../flow/entities/event_pb"; +import * as flow_entities_execution_result_pb from "../../flow/entities/execution_result_pb"; import * as flow_entities_transaction_pb from "../../flow/entities/transaction_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; @@ -130,6 +131,9 @@ export class GetLatestBlockRequest extends jspb.Message { getIsSealed(): boolean; setIsSealed(value: boolean): void; + getFullBlockResponse(): boolean; + setFullBlockResponse(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetLatestBlockRequest.AsObject; static toObject(includeInstance: boolean, msg: GetLatestBlockRequest): GetLatestBlockRequest.AsObject; @@ -143,6 +147,7 @@ export class GetLatestBlockRequest extends jspb.Message { export namespace GetLatestBlockRequest { export type AsObject = { isSealed: boolean, + fullBlockResponse: boolean, } } @@ -152,6 +157,9 @@ export class GetBlockByIDRequest extends jspb.Message { getId_asB64(): string; setId(value: Uint8Array | string): void; + getFullBlockResponse(): boolean; + setFullBlockResponse(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBlockByIDRequest.AsObject; static toObject(includeInstance: boolean, msg: GetBlockByIDRequest): GetBlockByIDRequest.AsObject; @@ -165,6 +173,7 @@ export class GetBlockByIDRequest extends jspb.Message { export namespace GetBlockByIDRequest { export type AsObject = { id: Uint8Array | string, + fullBlockResponse: boolean, } } @@ -172,6 +181,9 @@ export class GetBlockByHeightRequest extends jspb.Message { getHeight(): number; setHeight(value: number): void; + getFullBlockResponse(): boolean; + setFullBlockResponse(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetBlockByHeightRequest.AsObject; static toObject(includeInstance: boolean, msg: GetBlockByHeightRequest): GetBlockByHeightRequest.AsObject; @@ -185,6 +197,7 @@ export class GetBlockByHeightRequest extends jspb.Message { export namespace GetBlockByHeightRequest { export type AsObject = { height: number, + fullBlockResponse: boolean, } } @@ -320,6 +333,98 @@ export namespace GetTransactionRequest { } } +export class GetTransactionByIndexRequest extends jspb.Message { + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + getIndex(): number; + setIndex(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTransactionByIndexRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTransactionByIndexRequest): GetTransactionByIndexRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTransactionByIndexRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTransactionByIndexRequest; + static deserializeBinaryFromReader(message: GetTransactionByIndexRequest, reader: jspb.BinaryReader): GetTransactionByIndexRequest; +} + +export namespace GetTransactionByIndexRequest { + export type AsObject = { + blockId: Uint8Array | string, + index: number, + } +} + +export class GetTransactionsByBlockIDRequest extends jspb.Message { + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTransactionsByBlockIDRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTransactionsByBlockIDRequest): GetTransactionsByBlockIDRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTransactionsByBlockIDRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTransactionsByBlockIDRequest; + static deserializeBinaryFromReader(message: GetTransactionsByBlockIDRequest, reader: jspb.BinaryReader): GetTransactionsByBlockIDRequest; +} + +export namespace GetTransactionsByBlockIDRequest { + export type AsObject = { + blockId: Uint8Array | string, + } +} + +export class TransactionResultsResponse extends jspb.Message { + clearTransactionResultsList(): void; + getTransactionResultsList(): Array; + setTransactionResultsList(value: Array): void; + addTransactionResults(value?: TransactionResultResponse, index?: number): TransactionResultResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransactionResultsResponse.AsObject; + static toObject(includeInstance: boolean, msg: TransactionResultsResponse): TransactionResultsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransactionResultsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransactionResultsResponse; + static deserializeBinaryFromReader(message: TransactionResultsResponse, reader: jspb.BinaryReader): TransactionResultsResponse; +} + +export namespace TransactionResultsResponse { + export type AsObject = { + transactionResultsList: Array, + } +} + +export class TransactionsResponse extends jspb.Message { + clearTransactionsList(): void; + getTransactionsList(): Array; + setTransactionsList(value: Array): void; + addTransactions(value?: flow_entities_transaction_pb.Transaction, index?: number): flow_entities_transaction_pb.Transaction; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransactionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: TransactionsResponse): TransactionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransactionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransactionsResponse; + static deserializeBinaryFromReader(message: TransactionsResponse, reader: jspb.BinaryReader): TransactionsResponse; +} + +export namespace TransactionsResponse { + export type AsObject = { + transactionsList: Array, + } +} + export class TransactionResponse extends jspb.Message { hasTransaction(): boolean; clearTransaction(): void; @@ -357,6 +462,21 @@ export class TransactionResultResponse extends jspb.Message { setEventsList(value: Array): void; addEvents(value?: flow_entities_event_pb.Event, index?: number): flow_entities_event_pb.Event; + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + getTransactionId(): Uint8Array | string; + getTransactionId_asU8(): Uint8Array; + getTransactionId_asB64(): string; + setTransactionId(value: Uint8Array | string): void; + + getCollectionId(): Uint8Array | string; + getCollectionId_asU8(): Uint8Array; + getCollectionId_asB64(): string; + setCollectionId(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TransactionResultResponse.AsObject; static toObject(includeInstance: boolean, msg: TransactionResultResponse): TransactionResultResponse.AsObject; @@ -373,6 +493,9 @@ export namespace TransactionResultResponse { statusCode: number, errorMessage: string, eventsList: Array, + blockId: Uint8Array | string, + transactionId: Uint8Array | string, + collectionId: Uint8Array | string, } } @@ -764,3 +887,85 @@ export namespace GetNetworkParametersResponse { } } +export class GetLatestProtocolStateSnapshotRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLatestProtocolStateSnapshotRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetLatestProtocolStateSnapshotRequest): GetLatestProtocolStateSnapshotRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetLatestProtocolStateSnapshotRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLatestProtocolStateSnapshotRequest; + static deserializeBinaryFromReader(message: GetLatestProtocolStateSnapshotRequest, reader: jspb.BinaryReader): GetLatestProtocolStateSnapshotRequest; +} + +export namespace GetLatestProtocolStateSnapshotRequest { + export type AsObject = { + } +} + +export class ProtocolStateSnapshotResponse extends jspb.Message { + getSerializedsnapshot(): Uint8Array | string; + getSerializedsnapshot_asU8(): Uint8Array; + getSerializedsnapshot_asB64(): string; + setSerializedsnapshot(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProtocolStateSnapshotResponse.AsObject; + static toObject(includeInstance: boolean, msg: ProtocolStateSnapshotResponse): ProtocolStateSnapshotResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProtocolStateSnapshotResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProtocolStateSnapshotResponse; + static deserializeBinaryFromReader(message: ProtocolStateSnapshotResponse, reader: jspb.BinaryReader): ProtocolStateSnapshotResponse; +} + +export namespace ProtocolStateSnapshotResponse { + export type AsObject = { + serializedsnapshot: Uint8Array | string, + } +} + +export class GetExecutionResultForBlockIDRequest extends jspb.Message { + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetExecutionResultForBlockIDRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetExecutionResultForBlockIDRequest): GetExecutionResultForBlockIDRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetExecutionResultForBlockIDRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetExecutionResultForBlockIDRequest; + static deserializeBinaryFromReader(message: GetExecutionResultForBlockIDRequest, reader: jspb.BinaryReader): GetExecutionResultForBlockIDRequest; +} + +export namespace GetExecutionResultForBlockIDRequest { + export type AsObject = { + blockId: Uint8Array | string, + } +} + +export class ExecutionResultForBlockIDResponse extends jspb.Message { + hasExecutionResult(): boolean; + clearExecutionResult(): void; + getExecutionResult(): flow_entities_execution_result_pb.ExecutionResult | undefined; + setExecutionResult(value?: flow_entities_execution_result_pb.ExecutionResult): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExecutionResultForBlockIDResponse.AsObject; + static toObject(includeInstance: boolean, msg: ExecutionResultForBlockIDResponse): ExecutionResultForBlockIDResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExecutionResultForBlockIDResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExecutionResultForBlockIDResponse; + static deserializeBinaryFromReader(message: ExecutionResultForBlockIDResponse, reader: jspb.BinaryReader): ExecutionResultForBlockIDResponse; +} + +export namespace ExecutionResultForBlockIDResponse { + export type AsObject = { + executionResult?: flow_entities_execution_result_pb.ExecutionResult.AsObject, + } +} + diff --git a/packages/protobuf/src/generated/flow/access/access_pb.js b/packages/protobuf/src/generated/flow/access/access_pb.js index 836ec58ec..e1dce8ea6 100644 --- a/packages/protobuf/src/generated/flow/access/access_pb.js +++ b/packages/protobuf/src/generated/flow/access/access_pb.js @@ -2,15 +2,24 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); var flow_entities_account_pb = require('../../flow/entities/account_pb.js'); goog.object.extend(proto, flow_entities_account_pb); @@ -22,6 +31,8 @@ var flow_entities_collection_pb = require('../../flow/entities/collection_pb.js' goog.object.extend(proto, flow_entities_collection_pb); var flow_entities_event_pb = require('../../flow/entities/event_pb.js'); goog.object.extend(proto, flow_entities_event_pb); +var flow_entities_execution_result_pb = require('../../flow/entities/execution_result_pb.js'); +goog.object.extend(proto, flow_entities_execution_result_pb); var flow_entities_transaction_pb = require('../../flow/entities/transaction_pb.js'); goog.object.extend(proto, flow_entities_transaction_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); @@ -36,6 +47,7 @@ goog.exportSymbol('proto.flow.access.ExecuteScriptAtBlockHeightRequest', null, g goog.exportSymbol('proto.flow.access.ExecuteScriptAtBlockIDRequest', null, global); goog.exportSymbol('proto.flow.access.ExecuteScriptAtLatestBlockRequest', null, global); goog.exportSymbol('proto.flow.access.ExecuteScriptResponse', null, global); +goog.exportSymbol('proto.flow.access.ExecutionResultForBlockIDResponse', null, global); goog.exportSymbol('proto.flow.access.GetAccountAtBlockHeightRequest', null, global); goog.exportSymbol('proto.flow.access.GetAccountAtLatestBlockRequest', null, global); goog.exportSymbol('proto.flow.access.GetAccountRequest', null, global); @@ -47,17 +59,24 @@ goog.exportSymbol('proto.flow.access.GetBlockHeaderByIDRequest', null, global); goog.exportSymbol('proto.flow.access.GetCollectionByIDRequest', null, global); goog.exportSymbol('proto.flow.access.GetEventsForBlockIDsRequest', null, global); goog.exportSymbol('proto.flow.access.GetEventsForHeightRangeRequest', null, global); +goog.exportSymbol('proto.flow.access.GetExecutionResultForBlockIDRequest', null, global); goog.exportSymbol('proto.flow.access.GetLatestBlockHeaderRequest', null, global); goog.exportSymbol('proto.flow.access.GetLatestBlockRequest', null, global); +goog.exportSymbol('proto.flow.access.GetLatestProtocolStateSnapshotRequest', null, global); goog.exportSymbol('proto.flow.access.GetNetworkParametersRequest', null, global); goog.exportSymbol('proto.flow.access.GetNetworkParametersResponse', null, global); +goog.exportSymbol('proto.flow.access.GetTransactionByIndexRequest', null, global); goog.exportSymbol('proto.flow.access.GetTransactionRequest', null, global); +goog.exportSymbol('proto.flow.access.GetTransactionsByBlockIDRequest', null, global); goog.exportSymbol('proto.flow.access.PingRequest', null, global); goog.exportSymbol('proto.flow.access.PingResponse', null, global); +goog.exportSymbol('proto.flow.access.ProtocolStateSnapshotResponse', null, global); goog.exportSymbol('proto.flow.access.SendTransactionRequest', null, global); goog.exportSymbol('proto.flow.access.SendTransactionResponse', null, global); goog.exportSymbol('proto.flow.access.TransactionResponse', null, global); goog.exportSymbol('proto.flow.access.TransactionResultResponse', null, global); +goog.exportSymbol('proto.flow.access.TransactionResultsResponse', null, global); +goog.exportSymbol('proto.flow.access.TransactionsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -373,6 +392,90 @@ if (goog.DEBUG && !COMPILED) { */ proto.flow.access.GetTransactionRequest.displayName = 'proto.flow.access.GetTransactionRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.access.GetTransactionByIndexRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.access.GetTransactionByIndexRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.access.GetTransactionByIndexRequest.displayName = 'proto.flow.access.GetTransactionByIndexRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.access.GetTransactionsByBlockIDRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.access.GetTransactionsByBlockIDRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.access.GetTransactionsByBlockIDRequest.displayName = 'proto.flow.access.GetTransactionsByBlockIDRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.access.TransactionResultsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.TransactionResultsResponse.repeatedFields_, null); +}; +goog.inherits(proto.flow.access.TransactionResultsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.access.TransactionResultsResponse.displayName = 'proto.flow.access.TransactionResultsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.access.TransactionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.TransactionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.flow.access.TransactionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.access.TransactionsResponse.displayName = 'proto.flow.access.TransactionsResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -730,6 +833,90 @@ if (goog.DEBUG && !COMPILED) { */ proto.flow.access.GetNetworkParametersResponse.displayName = 'proto.flow.access.GetNetworkParametersResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.access.GetLatestProtocolStateSnapshotRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.access.GetLatestProtocolStateSnapshotRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.access.GetLatestProtocolStateSnapshotRequest.displayName = 'proto.flow.access.GetLatestProtocolStateSnapshotRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.access.ProtocolStateSnapshotResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.access.ProtocolStateSnapshotResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.access.ProtocolStateSnapshotResponse.displayName = 'proto.flow.access.ProtocolStateSnapshotResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.access.GetExecutionResultForBlockIDRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.access.GetExecutionResultForBlockIDRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.access.GetExecutionResultForBlockIDRequest.displayName = 'proto.flow.access.GetExecutionResultForBlockIDRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.access.ExecutionResultForBlockIDResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.access.ExecutionResultForBlockIDResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.access.ExecutionResultForBlockIDResponse.displayName = 'proto.flow.access.ExecutionResultForBlockIDResponse'; +} @@ -1529,7 +1716,8 @@ proto.flow.access.GetLatestBlockRequest.prototype.toObject = function(opt_includ */ proto.flow.access.GetLatestBlockRequest.toObject = function(includeInstance, msg) { var f, obj = { - isSealed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + isSealed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -1570,6 +1758,10 @@ proto.flow.access.GetLatestBlockRequest.deserializeBinaryFromReader = function(m var value = /** @type {boolean} */ (reader.readBool()); msg.setIsSealed(value); break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullBlockResponse(value); + break; default: reader.skipField(); break; @@ -1606,6 +1798,13 @@ proto.flow.access.GetLatestBlockRequest.serializeBinaryToWriter = function(messa f ); } + f = message.getFullBlockResponse(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; @@ -1627,6 +1826,24 @@ proto.flow.access.GetLatestBlockRequest.prototype.setIsSealed = function(value) }; +/** + * optional bool full_block_response = 2; + * @return {boolean} + */ +proto.flow.access.GetLatestBlockRequest.prototype.getFullBlockResponse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.flow.access.GetLatestBlockRequest} returns this + */ +proto.flow.access.GetLatestBlockRequest.prototype.setFullBlockResponse = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + @@ -1659,7 +1876,8 @@ proto.flow.access.GetBlockByIDRequest.prototype.toObject = function(opt_includeI */ proto.flow.access.GetBlockByIDRequest.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64() + id: msg.getId_asB64(), + fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -1700,6 +1918,10 @@ proto.flow.access.GetBlockByIDRequest.deserializeBinaryFromReader = function(msg var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setId(value); break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullBlockResponse(value); + break; default: reader.skipField(); break; @@ -1736,6 +1958,13 @@ proto.flow.access.GetBlockByIDRequest.serializeBinaryToWriter = function(message f ); } + f = message.getFullBlockResponse(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; @@ -1781,6 +2010,24 @@ proto.flow.access.GetBlockByIDRequest.prototype.setId = function(value) { }; +/** + * optional bool full_block_response = 2; + * @return {boolean} + */ +proto.flow.access.GetBlockByIDRequest.prototype.getFullBlockResponse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.flow.access.GetBlockByIDRequest} returns this + */ +proto.flow.access.GetBlockByIDRequest.prototype.setFullBlockResponse = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + @@ -1813,7 +2060,8 @@ proto.flow.access.GetBlockByHeightRequest.prototype.toObject = function(opt_incl */ proto.flow.access.GetBlockByHeightRequest.toObject = function(includeInstance, msg) { var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0) + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -1854,6 +2102,10 @@ proto.flow.access.GetBlockByHeightRequest.deserializeBinaryFromReader = function var value = /** @type {number} */ (reader.readUint64()); msg.setHeight(value); break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullBlockResponse(value); + break; default: reader.skipField(); break; @@ -1890,6 +2142,13 @@ proto.flow.access.GetBlockByHeightRequest.serializeBinaryToWriter = function(mes f ); } + f = message.getFullBlockResponse(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; @@ -1911,6 +2170,24 @@ proto.flow.access.GetBlockByHeightRequest.prototype.setHeight = function(value) }; +/** + * optional bool full_block_response = 2; + * @return {boolean} + */ +proto.flow.access.GetBlockByHeightRequest.prototype.getFullBlockResponse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.flow.access.GetBlockByHeightRequest} returns this + */ +proto.flow.access.GetBlockByHeightRequest.prototype.setFullBlockResponse = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + @@ -2842,8 +3119,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.TransactionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.TransactionResponse.toObject(opt_includeInstance, this); +proto.flow.access.GetTransactionByIndexRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetTransactionByIndexRequest.toObject(opt_includeInstance, this); }; @@ -2852,13 +3129,14 @@ proto.flow.access.TransactionResponse.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.TransactionResponse} msg The msg instance to transform. + * @param {!proto.flow.access.GetTransactionByIndexRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.TransactionResponse.toObject = function(includeInstance, msg) { +proto.flow.access.GetTransactionByIndexRequest.toObject = function(includeInstance, msg) { var f, obj = { - transaction: (f = msg.getTransaction()) && flow_entities_transaction_pb.Transaction.toObject(includeInstance, f) + blockId: msg.getBlockId_asB64(), + index: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -2872,23 +3150,23 @@ proto.flow.access.TransactionResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.TransactionResponse} + * @return {!proto.flow.access.GetTransactionByIndexRequest} */ -proto.flow.access.TransactionResponse.deserializeBinary = function(bytes) { +proto.flow.access.GetTransactionByIndexRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.TransactionResponse; - return proto.flow.access.TransactionResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.GetTransactionByIndexRequest; + return proto.flow.access.GetTransactionByIndexRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.TransactionResponse} msg The message object to deserialize into. + * @param {!proto.flow.access.GetTransactionByIndexRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.TransactionResponse} + * @return {!proto.flow.access.GetTransactionByIndexRequest} */ -proto.flow.access.TransactionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.GetTransactionByIndexRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2896,9 +3174,12 @@ proto.flow.access.TransactionResponse.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new flow_entities_transaction_pb.Transaction; - reader.readMessage(value,flow_entities_transaction_pb.Transaction.deserializeBinaryFromReader); - msg.setTransaction(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); break; default: reader.skipField(); @@ -2913,9 +3194,9 @@ proto.flow.access.TransactionResponse.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.TransactionResponse.prototype.serializeBinary = function() { +proto.flow.access.GetTransactionByIndexRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.TransactionResponse.serializeBinaryToWriter(this, writer); + proto.flow.access.GetTransactionByIndexRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2923,67 +3204,89 @@ proto.flow.access.TransactionResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.TransactionResponse} message + * @param {!proto.flow.access.GetTransactionByIndexRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.TransactionResponse.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.GetTransactionByIndexRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransaction(); - if (f != null) { - writer.writeMessage( + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - flow_entities_transaction_pb.Transaction.serializeBinaryToWriter + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f ); } }; /** - * optional flow.entities.Transaction transaction = 1; - * @return {?proto.flow.entities.Transaction} + * optional bytes block_id = 1; + * @return {!(string|Uint8Array)} */ -proto.flow.access.TransactionResponse.prototype.getTransaction = function() { - return /** @type{?proto.flow.entities.Transaction} */ ( - jspb.Message.getWrapperField(this, flow_entities_transaction_pb.Transaction, 1)); +proto.flow.access.GetTransactionByIndexRequest.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.flow.entities.Transaction|undefined} value - * @return {!proto.flow.access.TransactionResponse} returns this -*/ -proto.flow.access.TransactionResponse.prototype.setTransaction = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * optional bytes block_id = 1; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} + */ +proto.flow.access.GetTransactionByIndexRequest.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); }; /** - * Clears the message field making it undefined. - * @return {!proto.flow.access.TransactionResponse} returns this + * optional bytes block_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} */ -proto.flow.access.TransactionResponse.prototype.clearTransaction = function() { - return this.setTransaction(undefined); +proto.flow.access.GetTransactionByIndexRequest.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.GetTransactionByIndexRequest} returns this */ -proto.flow.access.TransactionResponse.prototype.hasTransaction = function() { - return jspb.Message.getField(this, 1) != null; +proto.flow.access.GetTransactionByIndexRequest.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * optional uint32 index = 2; + * @return {number} + */ +proto.flow.access.GetTransactionByIndexRequest.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {number} value + * @return {!proto.flow.access.GetTransactionByIndexRequest} returns this */ -proto.flow.access.TransactionResultResponse.repeatedFields_ = [4]; +proto.flow.access.GetTransactionByIndexRequest.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + @@ -3000,8 +3303,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.TransactionResultResponse.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.TransactionResultResponse.toObject(opt_includeInstance, this); +proto.flow.access.GetTransactionsByBlockIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetTransactionsByBlockIDRequest.toObject(opt_includeInstance, this); }; @@ -3010,17 +3313,13 @@ proto.flow.access.TransactionResultResponse.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.TransactionResultResponse} msg The msg instance to transform. + * @param {!proto.flow.access.GetTransactionsByBlockIDRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.TransactionResultResponse.toObject = function(includeInstance, msg) { +proto.flow.access.GetTransactionsByBlockIDRequest.toObject = function(includeInstance, msg) { var f, obj = { - status: jspb.Message.getFieldWithDefault(msg, 1, 0), - statusCode: jspb.Message.getFieldWithDefault(msg, 2, 0), - errorMessage: jspb.Message.getFieldWithDefault(msg, 3, ""), - eventsList: jspb.Message.toObjectList(msg.getEventsList(), - flow_entities_event_pb.Event.toObject, includeInstance) + blockId: msg.getBlockId_asB64() }; if (includeInstance) { @@ -3034,23 +3333,23 @@ proto.flow.access.TransactionResultResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.TransactionResultResponse} + * @return {!proto.flow.access.GetTransactionsByBlockIDRequest} */ -proto.flow.access.TransactionResultResponse.deserializeBinary = function(bytes) { +proto.flow.access.GetTransactionsByBlockIDRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.TransactionResultResponse; - return proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.GetTransactionsByBlockIDRequest; + return proto.flow.access.GetTransactionsByBlockIDRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.TransactionResultResponse} msg The message object to deserialize into. + * @param {!proto.flow.access.GetTransactionsByBlockIDRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.TransactionResultResponse} + * @return {!proto.flow.access.GetTransactionsByBlockIDRequest} */ -proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.GetTransactionsByBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3058,21 +3357,8 @@ proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.flow.entities.TransactionStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setStatusCode(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setErrorMessage(value); - break; - case 4: - var value = new flow_entities_event_pb.Event; - reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader); - msg.addEvents(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); break; default: reader.skipField(); @@ -3087,9 +3373,9 @@ proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.TransactionResultResponse.prototype.serializeBinary = function() { +proto.flow.access.GetTransactionsByBlockIDRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.TransactionResultResponse.serializeBinaryToWriter(this, writer); + proto.flow.access.GetTransactionsByBlockIDRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3097,136 +3383,71 @@ proto.flow.access.TransactionResultResponse.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.TransactionResultResponse} message + * @param {!proto.flow.access.GetTransactionsByBlockIDRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.TransactionResultResponse.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.GetTransactionsByBlockIDRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getStatusCode(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getErrorMessage(); + f = message.getBlockId_asU8(); if (f.length > 0) { - writer.writeString( - 3, + writer.writeBytes( + 1, f ); } - f = message.getEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - flow_entities_event_pb.Event.serializeBinaryToWriter - ); - } -}; - - -/** - * optional flow.entities.TransactionStatus status = 1; - * @return {!proto.flow.entities.TransactionStatus} - */ -proto.flow.access.TransactionResultResponse.prototype.getStatus = function() { - return /** @type {!proto.flow.entities.TransactionStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.flow.entities.TransactionStatus} value - * @return {!proto.flow.access.TransactionResultResponse} returns this - */ -proto.flow.access.TransactionResultResponse.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional uint32 status_code = 2; - * @return {number} - */ -proto.flow.access.TransactionResultResponse.prototype.getStatusCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.flow.access.TransactionResultResponse} returns this + * optional bytes block_id = 1; + * @return {!(string|Uint8Array)} */ -proto.flow.access.TransactionResultResponse.prototype.setStatusCode = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.flow.access.GetTransactionsByBlockIDRequest.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional string error_message = 3; + * optional bytes block_id = 1; + * This is a type-conversion wrapper around `getBlockId()` * @return {string} */ -proto.flow.access.TransactionResultResponse.prototype.getErrorMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.flow.access.GetTransactionsByBlockIDRequest.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); }; /** - * @param {string} value - * @return {!proto.flow.access.TransactionResultResponse} returns this + * optional bytes block_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} */ -proto.flow.access.TransactionResultResponse.prototype.setErrorMessage = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.flow.access.GetTransactionsByBlockIDRequest.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); }; /** - * repeated flow.entities.Event events = 4; - * @return {!Array} + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.GetTransactionsByBlockIDRequest} returns this */ -proto.flow.access.TransactionResultResponse.prototype.getEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.flow.access.TransactionResultResponse} returns this -*/ -proto.flow.access.TransactionResultResponse.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.flow.access.GetTransactionsByBlockIDRequest.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; -/** - * @param {!proto.flow.entities.Event=} opt_value - * @param {number=} opt_index - * @return {!proto.flow.entities.Event} - */ -proto.flow.access.TransactionResultResponse.prototype.addEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.flow.entities.Event, opt_index); -}; - /** - * Clears the list making it empty but non-null. - * @return {!proto.flow.access.TransactionResultResponse} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.flow.access.TransactionResultResponse.prototype.clearEventsList = function() { - return this.setEventsList([]); -}; - - +proto.flow.access.TransactionResultsResponse.repeatedFields_ = [1]; @@ -3243,8 +3464,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.GetAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.GetAccountRequest.toObject(opt_includeInstance, this); +proto.flow.access.TransactionResultsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.TransactionResultsResponse.toObject(opt_includeInstance, this); }; @@ -3253,13 +3474,14 @@ proto.flow.access.GetAccountRequest.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.GetAccountRequest} msg The msg instance to transform. + * @param {!proto.flow.access.TransactionResultsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetAccountRequest.toObject = function(includeInstance, msg) { +proto.flow.access.TransactionResultsResponse.toObject = function(includeInstance, msg) { var f, obj = { - address: msg.getAddress_asB64() + transactionResultsList: jspb.Message.toObjectList(msg.getTransactionResultsList(), + proto.flow.access.TransactionResultResponse.toObject, includeInstance) }; if (includeInstance) { @@ -3273,23 +3495,23 @@ proto.flow.access.GetAccountRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.GetAccountRequest} + * @return {!proto.flow.access.TransactionResultsResponse} */ -proto.flow.access.GetAccountRequest.deserializeBinary = function(bytes) { +proto.flow.access.TransactionResultsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.GetAccountRequest; - return proto.flow.access.GetAccountRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.TransactionResultsResponse; + return proto.flow.access.TransactionResultsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.GetAccountRequest} msg The message object to deserialize into. + * @param {!proto.flow.access.TransactionResultsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.GetAccountRequest} + * @return {!proto.flow.access.TransactionResultsResponse} */ -proto.flow.access.GetAccountRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.TransactionResultsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3297,8 +3519,9 @@ proto.flow.access.GetAccountRequest.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); + var value = new proto.flow.access.TransactionResultResponse; + reader.readMessage(value,proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader); + msg.addTransactionResults(value); break; default: reader.skipField(); @@ -3313,9 +3536,9 @@ proto.flow.access.GetAccountRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.GetAccountRequest.prototype.serializeBinary = function() { +proto.flow.access.TransactionResultsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.GetAccountRequest.serializeBinaryToWriter(this, writer); + proto.flow.access.TransactionResultsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3323,65 +3546,69 @@ proto.flow.access.GetAccountRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.GetAccountRequest} message + * @param {!proto.flow.access.TransactionResultsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetAccountRequest.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.TransactionResultsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress_asU8(); + f = message.getTransactionResultsList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f + f, + proto.flow.access.TransactionResultResponse.serializeBinaryToWriter ); } }; /** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} + * repeated TransactionResultResponse transaction_results = 1; + * @return {!Array} */ -proto.flow.access.GetAccountRequest.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.flow.access.TransactionResultsResponse.prototype.getTransactionResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.flow.access.TransactionResultResponse, 1)); }; /** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.flow.access.GetAccountRequest.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); + * @param {!Array} value + * @return {!proto.flow.access.TransactionResultsResponse} returns this +*/ +proto.flow.access.TransactionResultsResponse.prototype.setTransactionResultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional bytes address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} + * @param {!proto.flow.access.TransactionResultResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.access.TransactionResultResponse} */ -proto.flow.access.GetAccountRequest.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); +proto.flow.access.TransactionResultsResponse.prototype.addTransactionResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.access.TransactionResultResponse, opt_index); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.GetAccountRequest} returns this + * Clears the list making it empty but non-null. + * @return {!proto.flow.access.TransactionResultsResponse} returns this */ -proto.flow.access.GetAccountRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.flow.access.TransactionResultsResponse.prototype.clearTransactionResultsList = function() { + return this.setTransactionResultsList([]); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.access.TransactionsResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3397,8 +3624,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.GetAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.GetAccountResponse.toObject(opt_includeInstance, this); +proto.flow.access.TransactionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.TransactionsResponse.toObject(opt_includeInstance, this); }; @@ -3407,13 +3634,14 @@ proto.flow.access.GetAccountResponse.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.GetAccountResponse} msg The msg instance to transform. + * @param {!proto.flow.access.TransactionsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetAccountResponse.toObject = function(includeInstance, msg) { +proto.flow.access.TransactionsResponse.toObject = function(includeInstance, msg) { var f, obj = { - account: (f = msg.getAccount()) && flow_entities_account_pb.Account.toObject(includeInstance, f) + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + flow_entities_transaction_pb.Transaction.toObject, includeInstance) }; if (includeInstance) { @@ -3427,23 +3655,23 @@ proto.flow.access.GetAccountResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.GetAccountResponse} + * @return {!proto.flow.access.TransactionsResponse} */ -proto.flow.access.GetAccountResponse.deserializeBinary = function(bytes) { +proto.flow.access.TransactionsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.GetAccountResponse; - return proto.flow.access.GetAccountResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.TransactionsResponse; + return proto.flow.access.TransactionsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.GetAccountResponse} msg The message object to deserialize into. + * @param {!proto.flow.access.TransactionsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.GetAccountResponse} + * @return {!proto.flow.access.TransactionsResponse} */ -proto.flow.access.GetAccountResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.TransactionsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3451,9 +3679,9 @@ proto.flow.access.GetAccountResponse.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new flow_entities_account_pb.Account; - reader.readMessage(value,flow_entities_account_pb.Account.deserializeBinaryFromReader); - msg.setAccount(value); + var value = new flow_entities_transaction_pb.Transaction; + reader.readMessage(value,flow_entities_transaction_pb.Transaction.deserializeBinaryFromReader); + msg.addTransactions(value); break; default: reader.skipField(); @@ -3468,9 +3696,9 @@ proto.flow.access.GetAccountResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.GetAccountResponse.prototype.serializeBinary = function() { +proto.flow.access.TransactionsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.GetAccountResponse.serializeBinaryToWriter(this, writer); + proto.flow.access.TransactionsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3478,57 +3706,58 @@ proto.flow.access.GetAccountResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.GetAccountResponse} message + * @param {!proto.flow.access.TransactionsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetAccountResponse.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.TransactionsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( + f = message.getTransactionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - flow_entities_account_pb.Account.serializeBinaryToWriter + flow_entities_transaction_pb.Transaction.serializeBinaryToWriter ); } }; /** - * optional flow.entities.Account account = 1; - * @return {?proto.flow.entities.Account} + * repeated flow.entities.Transaction transactions = 1; + * @return {!Array} */ -proto.flow.access.GetAccountResponse.prototype.getAccount = function() { - return /** @type{?proto.flow.entities.Account} */ ( - jspb.Message.getWrapperField(this, flow_entities_account_pb.Account, 1)); +proto.flow.access.TransactionsResponse.prototype.getTransactionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, flow_entities_transaction_pb.Transaction, 1)); }; /** - * @param {?proto.flow.entities.Account|undefined} value - * @return {!proto.flow.access.GetAccountResponse} returns this + * @param {!Array} value + * @return {!proto.flow.access.TransactionsResponse} returns this */ -proto.flow.access.GetAccountResponse.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.flow.access.TransactionsResponse.prototype.setTransactionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.flow.access.GetAccountResponse} returns this + * @param {!proto.flow.entities.Transaction=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.Transaction} */ -proto.flow.access.GetAccountResponse.prototype.clearAccount = function() { - return this.setAccount(undefined); +proto.flow.access.TransactionsResponse.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.entities.Transaction, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.flow.access.TransactionsResponse} returns this */ -proto.flow.access.GetAccountResponse.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; +proto.flow.access.TransactionsResponse.prototype.clearTransactionsList = function() { + return this.setTransactionsList([]); }; @@ -3548,8 +3777,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.GetAccountAtLatestBlockRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.GetAccountAtLatestBlockRequest.toObject(opt_includeInstance, this); +proto.flow.access.TransactionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.TransactionResponse.toObject(opt_includeInstance, this); }; @@ -3558,13 +3787,13 @@ proto.flow.access.GetAccountAtLatestBlockRequest.prototype.toObject = function(o * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} msg The msg instance to transform. + * @param {!proto.flow.access.TransactionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetAccountAtLatestBlockRequest.toObject = function(includeInstance, msg) { +proto.flow.access.TransactionResponse.toObject = function(includeInstance, msg) { var f, obj = { - address: msg.getAddress_asB64() + transaction: (f = msg.getTransaction()) && flow_entities_transaction_pb.Transaction.toObject(includeInstance, f) }; if (includeInstance) { @@ -3578,23 +3807,23 @@ proto.flow.access.GetAccountAtLatestBlockRequest.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.GetAccountAtLatestBlockRequest} + * @return {!proto.flow.access.TransactionResponse} */ -proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinary = function(bytes) { +proto.flow.access.TransactionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.GetAccountAtLatestBlockRequest; - return proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.TransactionResponse; + return proto.flow.access.TransactionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} msg The message object to deserialize into. + * @param {!proto.flow.access.TransactionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.GetAccountAtLatestBlockRequest} + * @return {!proto.flow.access.TransactionResponse} */ -proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.TransactionResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3602,8 +3831,9 @@ proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); + var value = new flow_entities_transaction_pb.Transaction; + reader.readMessage(value,flow_entities_transaction_pb.Transaction.deserializeBinaryFromReader); + msg.setTransaction(value); break; default: reader.skipField(); @@ -3618,9 +3848,9 @@ proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.GetAccountAtLatestBlockRequest.prototype.serializeBinary = function() { +proto.flow.access.TransactionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.GetAccountAtLatestBlockRequest.serializeBinaryToWriter(this, writer); + proto.flow.access.TransactionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3628,65 +3858,68 @@ proto.flow.access.GetAccountAtLatestBlockRequest.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} message + * @param {!proto.flow.access.TransactionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetAccountAtLatestBlockRequest.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.TransactionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTransaction(); + if (f != null) { + writer.writeMessage( 1, - f + f, + flow_entities_transaction_pb.Transaction.serializeBinaryToWriter ); } }; /** - * optional bytes address = 1; - * @return {!(string|Uint8Array)} + * optional flow.entities.Transaction transaction = 1; + * @return {?proto.flow.entities.Transaction} */ -proto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.flow.access.TransactionResponse.prototype.getTransaction = function() { + return /** @type{?proto.flow.entities.Transaction} */ ( + jspb.Message.getWrapperField(this, flow_entities_transaction_pb.Transaction, 1)); }; /** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` - * @return {string} - */ -proto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); + * @param {?proto.flow.entities.Transaction|undefined} value + * @return {!proto.flow.access.TransactionResponse} returns this +*/ +proto.flow.access.TransactionResponse.prototype.setTransaction = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * optional bytes address = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.flow.access.TransactionResponse} returns this */ -proto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); +proto.flow.access.TransactionResponse.prototype.clearTransaction = function() { + return this.setTransaction(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.GetAccountAtLatestBlockRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.flow.access.GetAccountAtLatestBlockRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.flow.access.TransactionResponse.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 1) != null; }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.access.TransactionResultResponse.repeatedFields_ = [4]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3702,8 +3935,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.AccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.AccountResponse.toObject(opt_includeInstance, this); +proto.flow.access.TransactionResultResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.TransactionResultResponse.toObject(opt_includeInstance, this); }; @@ -3712,13 +3945,20 @@ proto.flow.access.AccountResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.AccountResponse} msg The msg instance to transform. + * @param {!proto.flow.access.TransactionResultResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.AccountResponse.toObject = function(includeInstance, msg) { +proto.flow.access.TransactionResultResponse.toObject = function(includeInstance, msg) { var f, obj = { - account: (f = msg.getAccount()) && flow_entities_account_pb.Account.toObject(includeInstance, f) + status: jspb.Message.getFieldWithDefault(msg, 1, 0), + statusCode: jspb.Message.getFieldWithDefault(msg, 2, 0), + errorMessage: jspb.Message.getFieldWithDefault(msg, 3, ""), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + flow_entities_event_pb.Event.toObject, includeInstance), + blockId: msg.getBlockId_asB64(), + transactionId: msg.getTransactionId_asB64(), + collectionId: msg.getCollectionId_asB64() }; if (includeInstance) { @@ -3732,23 +3972,23 @@ proto.flow.access.AccountResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.AccountResponse} + * @return {!proto.flow.access.TransactionResultResponse} */ -proto.flow.access.AccountResponse.deserializeBinary = function(bytes) { +proto.flow.access.TransactionResultResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.AccountResponse; - return proto.flow.access.AccountResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.TransactionResultResponse; + return proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.AccountResponse} msg The message object to deserialize into. + * @param {!proto.flow.access.TransactionResultResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.AccountResponse} + * @return {!proto.flow.access.TransactionResultResponse} */ -proto.flow.access.AccountResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3756,9 +3996,33 @@ proto.flow.access.AccountResponse.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new flow_entities_account_pb.Account; - reader.readMessage(value,flow_entities_account_pb.Account.deserializeBinaryFromReader); - msg.setAccount(value); + var value = /** @type {!proto.flow.entities.TransactionStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStatusCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + case 4: + var value = new flow_entities_event_pb.Event; + reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTransactionId(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCollectionId(value); break; default: reader.skipField(); @@ -3773,9 +4037,9 @@ proto.flow.access.AccountResponse.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.AccountResponse.prototype.serializeBinary = function() { +proto.flow.access.TransactionResultResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.AccountResponse.serializeBinaryToWriter(this, writer); + proto.flow.access.TransactionResultResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3783,251 +4047,283 @@ proto.flow.access.AccountResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.AccountResponse} message + * @param {!proto.flow.access.TransactionResultResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.AccountResponse.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.TransactionResultResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( 1, + f + ); + } + f = message.getStatusCode(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, f, - flow_entities_account_pb.Account.serializeBinaryToWriter + flow_entities_event_pb.Event.serializeBinaryToWriter + ); + } + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getTransactionId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getCollectionId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f ); } }; /** - * optional flow.entities.Account account = 1; - * @return {?proto.flow.entities.Account} + * optional flow.entities.TransactionStatus status = 1; + * @return {!proto.flow.entities.TransactionStatus} */ -proto.flow.access.AccountResponse.prototype.getAccount = function() { - return /** @type{?proto.flow.entities.Account} */ ( - jspb.Message.getWrapperField(this, flow_entities_account_pb.Account, 1)); +proto.flow.access.TransactionResultResponse.prototype.getStatus = function() { + return /** @type {!proto.flow.entities.TransactionStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {?proto.flow.entities.Account|undefined} value - * @return {!proto.flow.access.AccountResponse} returns this -*/ -proto.flow.access.AccountResponse.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {!proto.flow.entities.TransactionStatus} value + * @return {!proto.flow.access.TransactionResultResponse} returns this + */ +proto.flow.access.TransactionResultResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.flow.access.AccountResponse} returns this + * optional uint32 status_code = 2; + * @return {number} */ -proto.flow.access.AccountResponse.prototype.clearAccount = function() { - return this.setAccount(undefined); +proto.flow.access.TransactionResultResponse.prototype.getStatusCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.flow.access.TransactionResultResponse} returns this */ -proto.flow.access.AccountResponse.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; +proto.flow.access.TransactionResultResponse.prototype.setStatusCode = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; +/** + * optional string error_message = 3; + * @return {string} + */ +proto.flow.access.TransactionResultResponse.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + +/** + * @param {string} value + * @return {!proto.flow.access.TransactionResultResponse} returns this + */ +proto.flow.access.TransactionResultResponse.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * repeated flow.entities.Event events = 4; + * @return {!Array} */ -proto.flow.access.GetAccountAtBlockHeightRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.GetAccountAtBlockHeightRequest.toObject(opt_includeInstance, this); +proto.flow.access.TransactionResultResponse.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 4)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!Array} value + * @return {!proto.flow.access.TransactionResultResponse} returns this +*/ +proto.flow.access.TransactionResultResponse.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.flow.entities.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.Event} */ -proto.flow.access.GetAccountAtBlockHeightRequest.toObject = function(includeInstance, msg) { - var f, obj = { - address: msg.getAddress_asB64(), - blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; +proto.flow.access.TransactionResultResponse.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.flow.entities.Event, opt_index); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.access.TransactionResultResponse} returns this + */ +proto.flow.access.TransactionResultResponse.prototype.clearEventsList = function() { + return this.setEventsList([]); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} + * optional bytes block_id = 5; + * @return {!(string|Uint8Array)} */ -proto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.GetAccountAtBlockHeightRequest; - return proto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinaryFromReader(msg, reader); +proto.flow.access.TransactionResultResponse.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} + * optional bytes block_id = 5; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} */ -proto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBlockHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.flow.access.TransactionResultResponse.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes block_id = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` * @return {!Uint8Array} */ -proto.flow.access.GetAccountAtBlockHeightRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.flow.access.GetAccountAtBlockHeightRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.flow.access.TransactionResultResponse.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.TransactionResultResponse} returns this */ -proto.flow.access.GetAccountAtBlockHeightRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } +proto.flow.access.TransactionResultResponse.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; /** - * optional bytes address = 1; + * optional bytes transaction_id = 6; * @return {!(string|Uint8Array)} */ -proto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.flow.access.TransactionResultResponse.prototype.getTransactionId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * optional bytes address = 1; - * This is a type-conversion wrapper around `getAddress()` + * optional bytes transaction_id = 6; + * This is a type-conversion wrapper around `getTransactionId()` * @return {string} */ -proto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress_asB64 = function() { +proto.flow.access.TransactionResultResponse.prototype.getTransactionId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAddress())); + this.getTransactionId())); }; /** - * optional bytes address = 1; + * optional bytes transaction_id = 6; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAddress()` + * This is a type-conversion wrapper around `getTransactionId()` * @return {!Uint8Array} */ -proto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress_asU8 = function() { +proto.flow.access.TransactionResultResponse.prototype.getTransactionId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAddress())); + this.getTransactionId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} returns this + * @return {!proto.flow.access.TransactionResultResponse} returns this */ -proto.flow.access.GetAccountAtBlockHeightRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.flow.access.TransactionResultResponse.prototype.setTransactionId = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); }; /** - * optional uint64 block_height = 2; - * @return {number} + * optional bytes collection_id = 7; + * @return {!(string|Uint8Array)} */ -proto.flow.access.GetAccountAtBlockHeightRequest.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.flow.access.TransactionResultResponse.prototype.getCollectionId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * @param {number} value - * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} returns this + * optional bytes collection_id = 7; + * This is a type-conversion wrapper around `getCollectionId()` + * @return {string} */ -proto.flow.access.GetAccountAtBlockHeightRequest.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.flow.access.TransactionResultResponse.prototype.getCollectionId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCollectionId())); }; +/** + * optional bytes collection_id = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCollectionId()` + * @return {!Uint8Array} + */ +proto.flow.access.TransactionResultResponse.prototype.getCollectionId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCollectionId())); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.TransactionResultResponse} returns this */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.repeatedFields_ = [2]; +proto.flow.access.TransactionResultResponse.prototype.setCollectionId = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + @@ -4044,8 +4340,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.ExecuteScriptAtLatestBlockRequest.toObject(opt_includeInstance, this); +proto.flow.access.GetAccountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetAccountRequest.toObject(opt_includeInstance, this); }; @@ -4054,14 +4350,13 @@ proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.toObject = functio * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} msg The msg instance to transform. + * @param {!proto.flow.access.GetAccountRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.toObject = function(includeInstance, msg) { +proto.flow.access.GetAccountRequest.toObject = function(includeInstance, msg) { var f, obj = { - script: msg.getScript_asB64(), - argumentsList: msg.getArgumentsList_asB64() + address: msg.getAddress_asB64() }; if (includeInstance) { @@ -4075,23 +4370,23 @@ proto.flow.access.ExecuteScriptAtLatestBlockRequest.toObject = function(includeI /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} + * @return {!proto.flow.access.GetAccountRequest} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinary = function(bytes) { +proto.flow.access.GetAccountRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.ExecuteScriptAtLatestBlockRequest; - return proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.GetAccountRequest; + return proto.flow.access.GetAccountRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} msg The message object to deserialize into. + * @param {!proto.flow.access.GetAccountRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} + * @return {!proto.flow.access.GetAccountRequest} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.GetAccountRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4100,11 +4395,7 @@ proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinaryFromReader switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScript(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addArguments(value); + msg.setAddress(value); break; default: reader.skipField(); @@ -4119,9 +4410,9 @@ proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.serializeBinary = function() { +proto.flow.access.GetAccountRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.ExecuteScriptAtLatestBlockRequest.serializeBinaryToWriter(this, writer); + proto.flow.access.GetAccountRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4129,139 +4420,215 @@ proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.serializeBinary = /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} message + * @param {!proto.flow.access.GetAccountRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.GetAccountRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getScript_asU8(); + f = message.getAddress_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getArgumentsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } }; /** - * optional bytes script = 1; + * optional bytes address = 1; * @return {!(string|Uint8Array)} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript = function() { +proto.flow.access.GetAccountRequest.prototype.getAddress = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes script = 1; - * This is a type-conversion wrapper around `getScript()` + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` * @return {string} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript_asB64 = function() { +proto.flow.access.GetAccountRequest.prototype.getAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScript())); + this.getAddress())); }; /** - * optional bytes script = 1; + * optional bytes address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScript()` + * This is a type-conversion wrapper around `getAddress()` * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript_asU8 = function() { +proto.flow.access.GetAccountRequest.prototype.getAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScript())); + this.getAddress())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this + * @return {!proto.flow.access.GetAccountRequest} returns this */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.setScript = function(value) { +proto.flow.access.GetAccountRequest.prototype.setAddress = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated bytes arguments = 2; - * @return {!(Array|Array)} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +proto.flow.access.GetAccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetAccountResponse.toObject(opt_includeInstance, this); }; /** - * repeated bytes arguments = 2; - * This is a type-conversion wrapper around `getArgumentsList()` - * @return {!Array} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.GetAccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getArgumentsList())); +proto.flow.access.GetAccountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && flow_entities_account_pb.Account.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated bytes arguments = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getArgumentsList()` - * @return {!Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.GetAccountResponse} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getArgumentsList())); +proto.flow.access.GetAccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.GetAccountResponse; + return proto.flow.access.GetAccountResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(Array|Array)} value - * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.GetAccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.GetAccountResponse} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.setArgumentsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.flow.access.GetAccountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new flow_entities_account_pb.Account; + reader.readMessage(value,flow_entities_account_pb.Account.deserializeBinaryFromReader); + msg.setAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.addArguments = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.flow.access.GetAccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.GetAccountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.GetAccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.clearArgumentsList = function() { - return this.setArgumentsList([]); +proto.flow.access.GetAccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + flow_entities_account_pb.Account.serializeBinaryToWriter + ); + } }; +/** + * optional flow.entities.Account account = 1; + * @return {?proto.flow.entities.Account} + */ +proto.flow.access.GetAccountResponse.prototype.getAccount = function() { + return /** @type{?proto.flow.entities.Account} */ ( + jspb.Message.getWrapperField(this, flow_entities_account_pb.Account, 1)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {?proto.flow.entities.Account|undefined} value + * @return {!proto.flow.access.GetAccountResponse} returns this +*/ +proto.flow.access.GetAccountResponse.prototype.setAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.flow.access.GetAccountResponse} returns this */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.repeatedFields_ = [3]; +proto.flow.access.GetAccountResponse.prototype.clearAccount = function() { + return this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.flow.access.GetAccountResponse.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + @@ -4278,8 +4645,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.ExecuteScriptAtBlockIDRequest.toObject(opt_includeInstance, this); +proto.flow.access.GetAccountAtLatestBlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetAccountAtLatestBlockRequest.toObject(opt_includeInstance, this); }; @@ -4288,15 +4655,13 @@ proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} msg The msg instance to transform. + * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.toObject = function(includeInstance, msg) { +proto.flow.access.GetAccountAtLatestBlockRequest.toObject = function(includeInstance, msg) { var f, obj = { - blockId: msg.getBlockId_asB64(), - script: msg.getScript_asB64(), - argumentsList: msg.getArgumentsList_asB64() + address: msg.getAddress_asB64() }; if (includeInstance) { @@ -4310,23 +4675,23 @@ proto.flow.access.ExecuteScriptAtBlockIDRequest.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} + * @return {!proto.flow.access.GetAccountAtLatestBlockRequest} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinary = function(bytes) { +proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.ExecuteScriptAtBlockIDRequest; - return proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.GetAccountAtLatestBlockRequest; + return proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} msg The message object to deserialize into. + * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} + * @return {!proto.flow.access.GetAccountAtLatestBlockRequest} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4335,15 +4700,7 @@ proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader = fu switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockId(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScript(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addArguments(value); + msg.setAddress(value); break; default: reader.skipField(); @@ -4358,9 +4715,9 @@ proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.serializeBinary = function() { +proto.flow.access.GetAccountAtLatestBlockRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.ExecuteScriptAtBlockIDRequest.serializeBinaryToWriter(this, writer); + proto.flow.access.GetAccountAtLatestBlockRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4368,189 +4725,216 @@ proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} message + * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.GetAccountAtLatestBlockRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlockId_asU8(); + f = message.getAddress_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getScript_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getArgumentsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 3, - f - ); - } }; /** - * optional bytes block_id = 1; + * optional bytes address = 1; * @return {!(string|Uint8Array)} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId = function() { +proto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes block_id = 1; - * This is a type-conversion wrapper around `getBlockId()` + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` * @return {string} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId_asB64 = function() { +proto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockId())); + this.getAddress())); }; /** - * optional bytes block_id = 1; + * optional bytes address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockId()` + * This is a type-conversion wrapper around `getAddress()` * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId_asU8 = function() { +proto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockId())); + this.getAddress())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this + * @return {!proto.flow.access.GetAccountAtLatestBlockRequest} returns this */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setBlockId = function(value) { +proto.flow.access.GetAccountAtLatestBlockRequest.prototype.setAddress = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes script = 2; - * @return {!(string|Uint8Array)} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.flow.access.AccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.AccountResponse.toObject(opt_includeInstance, this); }; /** - * optional bytes script = 2; - * This is a type-conversion wrapper around `getScript()` - * @return {string} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.AccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScript())); +proto.flow.access.AccountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && flow_entities_account_pb.Account.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes script = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScript()` - * @return {!Uint8Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.AccountResponse} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScript())); +proto.flow.access.AccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.AccountResponse; + return proto.flow.access.AccountResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.AccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.AccountResponse} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.flow.access.AccountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new flow_entities_account_pb.Account; + reader.readMessage(value,flow_entities_account_pb.Account.deserializeBinaryFromReader); + msg.setAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * repeated bytes arguments = 3; - * @return {!(Array|Array)} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +proto.flow.access.AccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.AccountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * repeated bytes arguments = 3; - * This is a type-conversion wrapper around `getArgumentsList()` - * @return {!Array} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.AccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getArgumentsList())); +proto.flow.access.AccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + flow_entities_account_pb.Account.serializeBinaryToWriter + ); + } }; /** - * repeated bytes arguments = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getArgumentsList()` - * @return {!Array} + * optional flow.entities.Account account = 1; + * @return {?proto.flow.entities.Account} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getArgumentsList())); +proto.flow.access.AccountResponse.prototype.getAccount = function() { + return /** @type{?proto.flow.entities.Account} */ ( + jspb.Message.getWrapperField(this, flow_entities_account_pb.Account, 1)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this - */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setArgumentsList = function(value) { - return jspb.Message.setField(this, 3, value || []); + * @param {?proto.flow.entities.Account|undefined} value + * @return {!proto.flow.access.AccountResponse} returns this +*/ +proto.flow.access.AccountResponse.prototype.setAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this + * Clears the message field making it undefined. + * @return {!proto.flow.access.AccountResponse} returns this */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.addArguments = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.flow.access.AccountResponse.prototype.clearAccount = function() { + return this.setAccount(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.clearArgumentsList = function() { - return this.setArgumentsList([]); +proto.flow.access.AccountResponse.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4566,8 +4950,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.ExecuteScriptAtBlockHeightRequest.toObject(opt_includeInstance, this); +proto.flow.access.GetAccountAtBlockHeightRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetAccountAtBlockHeightRequest.toObject(opt_includeInstance, this); }; @@ -4576,15 +4960,14 @@ proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.toObject = functio * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} msg The msg instance to transform. + * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.toObject = function(includeInstance, msg) { +proto.flow.access.GetAccountAtBlockHeightRequest.toObject = function(includeInstance, msg) { var f, obj = { - blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - script: msg.getScript_asB64(), - argumentsList: msg.getArgumentsList_asB64() + address: msg.getAddress_asB64(), + blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -4598,23 +4981,23 @@ proto.flow.access.ExecuteScriptAtBlockHeightRequest.toObject = function(includeI /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} + * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinary = function(bytes) { +proto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.ExecuteScriptAtBlockHeightRequest; - return proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.GetAccountAtBlockHeightRequest; + return proto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} msg The message object to deserialize into. + * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} + * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4622,16 +5005,12 @@ proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBlockHeight(value); - break; - case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setScript(value); + msg.setAddress(value); break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addArguments(value); + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockHeight(value); break; default: reader.skipField(); @@ -4646,9 +5025,9 @@ proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.serializeBinary = function() { +proto.flow.access.GetAccountAtBlockHeightRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.ExecuteScriptAtBlockHeightRequest.serializeBinaryToWriter(this, writer); + proto.flow.access.GetAccountAtBlockHeightRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4656,30 +5035,23 @@ proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.serializeBinary = /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} message + * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.GetAccountAtBlockHeightRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getScript_asU8(); + f = message.getAddress_asU8(); if (f.length > 0) { writer.writeBytes( - 2, + 1, f ); } - f = message.getArgumentsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 3, + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 2, f ); } @@ -4687,126 +5059,72 @@ proto.flow.access.ExecuteScriptAtBlockHeightRequest.serializeBinaryToWriter = fu /** - * optional uint64 block_height = 1; - * @return {number} + * optional bytes address = 1; + * @return {!(string|Uint8Array)} */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); }; /** - * optional bytes script = 2; - * @return {!(string|Uint8Array)} - */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes script = 2; - * This is a type-conversion wrapper around `getScript()` - * @return {string} - */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getScript())); -}; - - -/** - * optional bytes script = 2; + * optional bytes address = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getScript()` + * This is a type-conversion wrapper around `getAddress()` * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript_asU8 = function() { +proto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getScript())); + this.getAddress())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this - */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setScript = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * repeated bytes arguments = 3; - * @return {!(Array|Array)} - */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * repeated bytes arguments = 3; - * This is a type-conversion wrapper around `getArgumentsList()` - * @return {!Array} + * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} returns this */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getArgumentsList())); +proto.flow.access.GetAccountAtBlockHeightRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * repeated bytes arguments = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getArgumentsList()` - * @return {!Array} + * optional uint64 block_height = 2; + * @return {number} */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getArgumentsList())); +proto.flow.access.GetAccountAtBlockHeightRequest.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this + * @param {number} value + * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} returns this */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setArgumentsList = function(value) { - return jspb.Message.setField(this, 3, value || []); +proto.flow.access.GetAccountAtBlockHeightRequest.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this - */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.addArguments = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - /** - * Clears the list making it empty but non-null. - * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.clearArgumentsList = function() { - return this.setArgumentsList([]); -}; - - +proto.flow.access.ExecuteScriptAtLatestBlockRequest.repeatedFields_ = [2]; @@ -4823,8 +5141,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.ExecuteScriptResponse.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.ExecuteScriptResponse.toObject(opt_includeInstance, this); +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.ExecuteScriptAtLatestBlockRequest.toObject(opt_includeInstance, this); }; @@ -4833,13 +5151,14 @@ proto.flow.access.ExecuteScriptResponse.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.ExecuteScriptResponse} msg The msg instance to transform. + * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptResponse.toObject = function(includeInstance, msg) { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.toObject = function(includeInstance, msg) { var f, obj = { - value: msg.getValue_asB64() + script: msg.getScript_asB64(), + argumentsList: msg.getArgumentsList_asB64() }; if (includeInstance) { @@ -4853,23 +5172,23 @@ proto.flow.access.ExecuteScriptResponse.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.ExecuteScriptResponse} + * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} */ -proto.flow.access.ExecuteScriptResponse.deserializeBinary = function(bytes) { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.ExecuteScriptResponse; - return proto.flow.access.ExecuteScriptResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.ExecuteScriptAtLatestBlockRequest; + return proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.ExecuteScriptResponse} msg The message object to deserialize into. + * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.ExecuteScriptResponse} + * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} */ -proto.flow.access.ExecuteScriptResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4878,7 +5197,11 @@ proto.flow.access.ExecuteScriptResponse.deserializeBinaryFromReader = function(m switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); + msg.setScript(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addArguments(value); break; default: reader.skipField(); @@ -4893,9 +5216,9 @@ proto.flow.access.ExecuteScriptResponse.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptResponse.prototype.serializeBinary = function() { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.ExecuteScriptResponse.serializeBinaryToWriter(this, writer); + proto.flow.access.ExecuteScriptAtLatestBlockRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4903,64 +5226,139 @@ proto.flow.access.ExecuteScriptResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.ExecuteScriptResponse} message + * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.ExecuteScriptResponse.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValue_asU8(); + f = message.getScript_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } + f = message.getArgumentsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } }; /** - * optional bytes value = 1; + * optional bytes script = 1; * @return {!(string|Uint8Array)} */ -proto.flow.access.ExecuteScriptResponse.prototype.getValue = function() { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes value = 1; - * This is a type-conversion wrapper around `getValue()` + * optional bytes script = 1; + * This is a type-conversion wrapper around `getScript()` * @return {string} */ -proto.flow.access.ExecuteScriptResponse.prototype.getValue_asB64 = function() { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); + this.getScript())); }; /** - * optional bytes value = 1; + * optional bytes script = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` + * This is a type-conversion wrapper around `getScript()` * @return {!Uint8Array} */ -proto.flow.access.ExecuteScriptResponse.prototype.getValue_asU8 = function() { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); + this.getScript())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.ExecuteScriptResponse} returns this + * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this */ -proto.flow.access.ExecuteScriptResponse.prototype.setValue = function(value) { +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.setScript = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * repeated bytes arguments = 2; + * @return {!(Array|Array)} + */ +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes arguments = 2; + * This is a type-conversion wrapper around `getArgumentsList()` + * @return {!Array} + */ +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getArgumentsList())); +}; + + +/** + * repeated bytes arguments = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getArgumentsList()` + * @return {!Array} + */ +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getArgumentsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this + */ +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.setArgumentsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this + */ +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.addArguments = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this + */ +proto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.clearArgumentsList = function() { + return this.setArgumentsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.repeatedFields_ = [3]; @@ -4977,8 +5375,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.GetEventsForHeightRangeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.GetEventsForHeightRangeRequest.toObject(opt_includeInstance, this); +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.ExecuteScriptAtBlockIDRequest.toObject(opt_includeInstance, this); }; @@ -4987,15 +5385,15 @@ proto.flow.access.GetEventsForHeightRangeRequest.prototype.toObject = function(o * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.GetEventsForHeightRangeRequest} msg The msg instance to transform. + * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetEventsForHeightRangeRequest.toObject = function(includeInstance, msg) { +proto.flow.access.ExecuteScriptAtBlockIDRequest.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, ""), - startHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - endHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) + blockId: msg.getBlockId_asB64(), + script: msg.getScript_asB64(), + argumentsList: msg.getArgumentsList_asB64() }; if (includeInstance) { @@ -5009,23 +5407,23 @@ proto.flow.access.GetEventsForHeightRangeRequest.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.GetEventsForHeightRangeRequest} + * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} */ -proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinary = function(bytes) { +proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.GetEventsForHeightRangeRequest; - return proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.ExecuteScriptAtBlockIDRequest; + return proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.GetEventsForHeightRangeRequest} msg The message object to deserialize into. + * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.GetEventsForHeightRangeRequest} + * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} */ -proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5033,16 +5431,16 @@ proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setType(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartHeight(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setScript(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndHeight(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addArguments(value); break; default: reader.skipField(); @@ -5057,9 +5455,9 @@ proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.GetEventsForHeightRangeRequest.prototype.serializeBinary = function() { +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.GetEventsForHeightRangeRequest.serializeBinaryToWriter(this, writer); + proto.flow.access.ExecuteScriptAtBlockIDRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5067,29 +5465,29 @@ proto.flow.access.GetEventsForHeightRangeRequest.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.GetEventsForHeightRangeRequest} message + * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetEventsForHeightRangeRequest.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.ExecuteScriptAtBlockIDRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); + f = message.getBlockId_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = message.getStartHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getScript_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); } - f = message.getEndHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getArgumentsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 3, f ); @@ -5098,56 +5496,147 @@ proto.flow.access.GetEventsForHeightRangeRequest.serializeBinaryToWriter = funct /** - * optional string type = 1; + * optional bytes block_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes block_id = 1; + * This is a type-conversion wrapper around `getBlockId()` * @return {string} */ -proto.flow.access.GetEventsForHeightRangeRequest.prototype.getType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); }; /** - * @param {string} value - * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this + * optional bytes block_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} */ -proto.flow.access.GetEventsForHeightRangeRequest.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); }; /** - * optional uint64 start_height = 2; - * @return {number} + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this */ -proto.flow.access.GetEventsForHeightRangeRequest.prototype.getStartHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {number} value - * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this + * optional bytes script = 2; + * @return {!(string|Uint8Array)} */ -proto.flow.access.GetEventsForHeightRangeRequest.prototype.setStartHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional uint64 end_height = 3; - * @return {number} + * optional bytes script = 2; + * This is a type-conversion wrapper around `getScript()` + * @return {string} */ -proto.flow.access.GetEventsForHeightRangeRequest.prototype.getEndHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getScript())); }; /** - * @param {number} value - * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this + * optional bytes script = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getScript()` + * @return {!Uint8Array} */ -proto.flow.access.GetEventsForHeightRangeRequest.prototype.setEndHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getScript())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setScript = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated bytes arguments = 3; + * @return {!(Array|Array)} + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes arguments = 3; + * This is a type-conversion wrapper around `getArgumentsList()` + * @return {!Array} + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getArgumentsList())); +}; + + +/** + * repeated bytes arguments = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getArgumentsList()` + * @return {!Array} + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getArgumentsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setArgumentsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.addArguments = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this + */ +proto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.clearArgumentsList = function() { + return this.setArgumentsList([]); }; @@ -5157,7 +5646,7 @@ proto.flow.access.GetEventsForHeightRangeRequest.prototype.setEndHeight = functi * @private {!Array} * @const */ -proto.flow.access.GetEventsForBlockIDsRequest.repeatedFields_ = [2]; +proto.flow.access.ExecuteScriptAtBlockHeightRequest.repeatedFields_ = [3]; @@ -5174,8 +5663,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.GetEventsForBlockIDsRequest.toObject(opt_includeInstance, this); +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.ExecuteScriptAtBlockHeightRequest.toObject(opt_includeInstance, this); }; @@ -5184,14 +5673,15 @@ proto.flow.access.GetEventsForBlockIDsRequest.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.GetEventsForBlockIDsRequest} msg The msg instance to transform. + * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetEventsForBlockIDsRequest.toObject = function(includeInstance, msg) { +proto.flow.access.ExecuteScriptAtBlockHeightRequest.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, ""), - blockIdsList: msg.getBlockIdsList_asB64() + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + script: msg.getScript_asB64(), + argumentsList: msg.getArgumentsList_asB64() }; if (includeInstance) { @@ -5205,23 +5695,23 @@ proto.flow.access.GetEventsForBlockIDsRequest.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.GetEventsForBlockIDsRequest} + * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} */ -proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinary = function(bytes) { +proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.GetEventsForBlockIDsRequest; - return proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.ExecuteScriptAtBlockHeightRequest; + return proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.GetEventsForBlockIDsRequest} msg The message object to deserialize into. + * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.GetEventsForBlockIDsRequest} + * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} */ -proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5229,12 +5719,16 @@ proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setType(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockHeight(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addBlockIds(value); + msg.setScript(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addArguments(value); break; default: reader.skipField(); @@ -5249,9 +5743,9 @@ proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.serializeBinary = function() { +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.GetEventsForBlockIDsRequest.serializeBinaryToWriter(this, writer); + proto.flow.access.ExecuteScriptAtBlockHeightRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5259,116 +5753,1167 @@ proto.flow.access.GetEventsForBlockIDsRequest.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.GetEventsForBlockIDsRequest} message + * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetEventsForBlockIDsRequest.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.ExecuteScriptAtBlockHeightRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f.length > 0) { - writer.writeString( + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getBlockIdsList_asU8(); + f = message.getScript_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 2, f ); } + f = message.getArgumentsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } }; /** - * optional string type = 1; - * @return {string} + * optional uint64 block_height = 1; + * @return {number} */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.getType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this + * @param {number} value + * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * repeated bytes block_ids = 2; + * optional bytes script = 2; + * @return {!(string|Uint8Array)} + */ +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes script = 2; + * This is a type-conversion wrapper around `getScript()` + * @return {string} + */ +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getScript())); +}; + + +/** + * optional bytes script = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getScript()` + * @return {!Uint8Array} + */ +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getScript())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this + */ +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setScript = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated bytes arguments = 3; * @return {!(Array|Array)} */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); }; /** - * repeated bytes block_ids = 2; - * This is a type-conversion wrapper around `getBlockIdsList()` + * repeated bytes arguments = 3; + * This is a type-conversion wrapper around `getArgumentsList()` * @return {!Array} */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList_asB64 = function() { +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList_asB64 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getBlockIdsList())); + this.getArgumentsList())); }; /** - * repeated bytes block_ids = 2; + * repeated bytes arguments = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockIdsList()` + * This is a type-conversion wrapper around `getArgumentsList()` * @return {!Array} */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList_asU8 = function() { +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList_asU8 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getBlockIdsList())); + this.getArgumentsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this + */ +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setArgumentsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this + */ +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.addArguments = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this + */ +proto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.clearArgumentsList = function() { + return this.setArgumentsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.access.ExecuteScriptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.ExecuteScriptResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.ExecuteScriptResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.ExecuteScriptResponse.toObject = function(includeInstance, msg) { + var f, obj = { + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.ExecuteScriptResponse} + */ +proto.flow.access.ExecuteScriptResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.ExecuteScriptResponse; + return proto.flow.access.ExecuteScriptResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.ExecuteScriptResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.ExecuteScriptResponse} + */ +proto.flow.access.ExecuteScriptResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.access.ExecuteScriptResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.ExecuteScriptResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.ExecuteScriptResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.ExecuteScriptResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes value = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.access.ExecuteScriptResponse.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes value = 1; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.flow.access.ExecuteScriptResponse.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.flow.access.ExecuteScriptResponse.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.ExecuteScriptResponse} returns this + */ +proto.flow.access.ExecuteScriptResponse.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.access.GetEventsForHeightRangeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetEventsForHeightRangeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.GetEventsForHeightRangeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.GetEventsForHeightRangeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + endHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.GetEventsForHeightRangeRequest} + */ +proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.GetEventsForHeightRangeRequest; + return proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.GetEventsForHeightRangeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.GetEventsForHeightRangeRequest} + */ +proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEndHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.access.GetEventsForHeightRangeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.GetEventsForHeightRangeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.GetEventsForHeightRangeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.GetEventsForHeightRangeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getEndHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.flow.access.GetEventsForHeightRangeRequest.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this + */ +proto.flow.access.GetEventsForHeightRangeRequest.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 start_height = 2; + * @return {number} + */ +proto.flow.access.GetEventsForHeightRangeRequest.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this + */ +proto.flow.access.GetEventsForHeightRangeRequest.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 end_height = 3; + * @return {number} + */ +proto.flow.access.GetEventsForHeightRangeRequest.prototype.getEndHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this + */ +proto.flow.access.GetEventsForHeightRangeRequest.prototype.setEndHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.access.GetEventsForBlockIDsRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetEventsForBlockIDsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.GetEventsForBlockIDsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.GetEventsForBlockIDsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + blockIdsList: msg.getBlockIdsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.GetEventsForBlockIDsRequest} + */ +proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.GetEventsForBlockIDsRequest; + return proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.GetEventsForBlockIDsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.GetEventsForBlockIDsRequest} + */ +proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addBlockIds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.GetEventsForBlockIDsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.GetEventsForBlockIDsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.GetEventsForBlockIDsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBlockIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated bytes block_ids = 2; + * @return {!(Array|Array)} + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes block_ids = 2; + * This is a type-conversion wrapper around `getBlockIdsList()` + * @return {!Array} + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getBlockIdsList())); +}; + + +/** + * repeated bytes block_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockIdsList()` + * @return {!Array} + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getBlockIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.setBlockIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.addBlockIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this + */ +proto.flow.access.GetEventsForBlockIDsRequest.prototype.clearBlockIdsList = function() { + return this.setBlockIdsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.access.EventsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.access.EventsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.EventsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.EventsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.EventsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + resultsList: jspb.Message.toObjectList(msg.getResultsList(), + proto.flow.access.EventsResponse.Result.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.EventsResponse} + */ +proto.flow.access.EventsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.EventsResponse; + return proto.flow.access.EventsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.EventsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.EventsResponse} + */ +proto.flow.access.EventsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.flow.access.EventsResponse.Result; + reader.readMessage(value,proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader); + msg.addResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.access.EventsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.EventsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.EventsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.EventsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.flow.access.EventsResponse.Result.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.access.EventsResponse.Result.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.access.EventsResponse.Result.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.EventsResponse.Result.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.EventsResponse.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.EventsResponse.Result.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: msg.getBlockId_asB64(), + blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + flow_entities_event_pb.Event.toObject, includeInstance), + blockTimestamp: (f = msg.getBlockTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.EventsResponse.Result} + */ +proto.flow.access.EventsResponse.Result.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.EventsResponse.Result; + return proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.EventsResponse.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.EventsResponse.Result} + */ +proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockHeight(value); + break; + case 3: + var value = new flow_entities_event_pb.Event; + reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setBlockTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.access.EventsResponse.Result.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.EventsResponse.Result.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.EventsResponse.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.EventsResponse.Result.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + flow_entities_event_pb.Event.serializeBinaryToWriter + ); + } + f = message.getBlockTimestamp(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes block_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.access.EventsResponse.Result.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes block_id = 1; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} + */ +proto.flow.access.EventsResponse.Result.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); +}; + + +/** + * optional bytes block_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} + */ +proto.flow.access.EventsResponse.Result.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.EventsResponse.Result} returns this + */ +proto.flow.access.EventsResponse.Result.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 block_height = 2; + * @return {number} + */ +proto.flow.access.EventsResponse.Result.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.access.EventsResponse.Result} returns this + */ +proto.flow.access.EventsResponse.Result.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated flow.entities.Event events = 3; + * @return {!Array} + */ +proto.flow.access.EventsResponse.Result.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.flow.access.EventsResponse.Result} returns this +*/ +proto.flow.access.EventsResponse.Result.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.flow.entities.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.Event} + */ +proto.flow.access.EventsResponse.Result.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.access.EventsResponse.Result} returns this + */ +proto.flow.access.EventsResponse.Result.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * optional google.protobuf.Timestamp block_timestamp = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.flow.access.EventsResponse.Result.prototype.getBlockTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.flow.access.EventsResponse.Result} returns this +*/ +proto.flow.access.EventsResponse.Result.prototype.setBlockTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.flow.access.EventsResponse.Result} returns this + */ +proto.flow.access.EventsResponse.Result.prototype.clearBlockTimestamp = function() { + return this.setBlockTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.flow.access.EventsResponse.Result.prototype.hasBlockTimestamp = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * @param {!(Array|Array)} value - * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this + * repeated Result results = 1; + * @return {!Array} */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.setBlockIdsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.flow.access.EventsResponse.prototype.getResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.flow.access.EventsResponse.Result, 1)); }; /** - * @param {!(string|Uint8Array)} value + * @param {!Array} value + * @return {!proto.flow.access.EventsResponse} returns this +*/ +proto.flow.access.EventsResponse.prototype.setResultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.flow.access.EventsResponse.Result=} opt_value * @param {number=} opt_index - * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this + * @return {!proto.flow.access.EventsResponse.Result} */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.addBlockIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.flow.access.EventsResponse.prototype.addResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.access.EventsResponse.Result, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this + * @return {!proto.flow.access.EventsResponse} returns this */ -proto.flow.access.GetEventsForBlockIDsRequest.prototype.clearBlockIdsList = function() { - return this.setBlockIdsList([]); +proto.flow.access.EventsResponse.prototype.clearResultsList = function() { + return this.setResultsList([]); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.flow.access.EventsResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5384,8 +6929,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.EventsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.EventsResponse.toObject(opt_includeInstance, this); +proto.flow.access.GetNetworkParametersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetNetworkParametersRequest.toObject(opt_includeInstance, this); }; @@ -5394,14 +6939,13 @@ proto.flow.access.EventsResponse.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.EventsResponse} msg The msg instance to transform. + * @param {!proto.flow.access.GetNetworkParametersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.EventsResponse.toObject = function(includeInstance, msg) { +proto.flow.access.GetNetworkParametersRequest.toObject = function(includeInstance, msg) { var f, obj = { - resultsList: jspb.Message.toObjectList(msg.getResultsList(), - proto.flow.access.EventsResponse.Result.toObject, includeInstance) + }; if (includeInstance) { @@ -5415,34 +6959,29 @@ proto.flow.access.EventsResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.EventsResponse} + * @return {!proto.flow.access.GetNetworkParametersRequest} */ -proto.flow.access.EventsResponse.deserializeBinary = function(bytes) { +proto.flow.access.GetNetworkParametersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.EventsResponse; - return proto.flow.access.EventsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.GetNetworkParametersRequest; + return proto.flow.access.GetNetworkParametersRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.EventsResponse} msg The message object to deserialize into. + * @param {!proto.flow.access.GetNetworkParametersRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.EventsResponse} + * @return {!proto.flow.access.GetNetworkParametersRequest} */ -proto.flow.access.EventsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.GetNetworkParametersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.flow.access.EventsResponse.Result; - reader.readMessage(value,proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader); - msg.addResults(value); - break; default: reader.skipField(); break; @@ -5456,9 +6995,9 @@ proto.flow.access.EventsResponse.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.EventsResponse.prototype.serializeBinary = function() { +proto.flow.access.GetNetworkParametersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.EventsResponse.serializeBinaryToWriter(this, writer); + proto.flow.access.GetNetworkParametersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5466,31 +7005,16 @@ proto.flow.access.EventsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.EventsResponse} message + * @param {!proto.flow.access.GetNetworkParametersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.EventsResponse.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.GetNetworkParametersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getResultsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.flow.access.EventsResponse.Result.serializeBinaryToWriter - ); - } }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.flow.access.EventsResponse.Result.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5506,8 +7030,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.EventsResponse.Result.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.EventsResponse.Result.toObject(opt_includeInstance, this); +proto.flow.access.GetNetworkParametersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetNetworkParametersResponse.toObject(opt_includeInstance, this); }; @@ -5516,17 +7040,13 @@ proto.flow.access.EventsResponse.Result.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.EventsResponse.Result} msg The msg instance to transform. + * @param {!proto.flow.access.GetNetworkParametersResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.EventsResponse.Result.toObject = function(includeInstance, msg) { +proto.flow.access.GetNetworkParametersResponse.toObject = function(includeInstance, msg) { var f, obj = { - blockId: msg.getBlockId_asB64(), - blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - eventsList: jspb.Message.toObjectList(msg.getEventsList(), - flow_entities_event_pb.Event.toObject, includeInstance), - blockTimestamp: (f = msg.getBlockTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + chainId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -5540,23 +7060,23 @@ proto.flow.access.EventsResponse.Result.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.EventsResponse.Result} + * @return {!proto.flow.access.GetNetworkParametersResponse} */ -proto.flow.access.EventsResponse.Result.deserializeBinary = function(bytes) { +proto.flow.access.GetNetworkParametersResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.EventsResponse.Result; - return proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.GetNetworkParametersResponse; + return proto.flow.access.GetNetworkParametersResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.EventsResponse.Result} msg The message object to deserialize into. + * @param {!proto.flow.access.GetNetworkParametersResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.EventsResponse.Result} + * @return {!proto.flow.access.GetNetworkParametersResponse} */ -proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.GetNetworkParametersResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5564,22 +7084,8 @@ proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBlockHeight(value); - break; - case 3: - var value = new flow_entities_event_pb.Event; - reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader); - msg.addEvents(value); - break; - case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setBlockTimestamp(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); break; default: reader.skipField(); @@ -5594,9 +7100,9 @@ proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.EventsResponse.Result.prototype.serializeBinary = function() { +proto.flow.access.GetNetworkParametersResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.EventsResponse.Result.serializeBinaryToWriter(this, writer); + proto.flow.access.GetNetworkParametersResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5604,215 +7110,292 @@ proto.flow.access.EventsResponse.Result.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.EventsResponse.Result} message + * @param {!proto.flow.access.GetNetworkParametersResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.EventsResponse.Result.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.GetNetworkParametersResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlockId_asU8(); + f = message.getChainId(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - flow_entities_event_pb.Event.serializeBinaryToWriter - ); - } - f = message.getBlockTimestamp(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } }; /** - * optional bytes block_id = 1; - * @return {!(string|Uint8Array)} + * optional string chain_id = 1; + * @return {string} */ -proto.flow.access.EventsResponse.Result.prototype.getBlockId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.flow.access.GetNetworkParametersResponse.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes block_id = 1; - * This is a type-conversion wrapper around `getBlockId()` - * @return {string} + * @param {string} value + * @return {!proto.flow.access.GetNetworkParametersResponse} returns this */ -proto.flow.access.EventsResponse.Result.prototype.getBlockId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockId())); +proto.flow.access.GetNetworkParametersResponse.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes block_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockId()` - * @return {!Uint8Array} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.flow.access.EventsResponse.Result.prototype.getBlockId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockId())); +proto.flow.access.GetLatestProtocolStateSnapshotRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetLatestProtocolStateSnapshotRequest.toObject(opt_includeInstance, this); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.flow.access.EventsResponse.Result} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.GetLatestProtocolStateSnapshotRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.EventsResponse.Result.prototype.setBlockId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.flow.access.GetLatestProtocolStateSnapshotRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 block_height = 2; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.GetLatestProtocolStateSnapshotRequest} */ -proto.flow.access.EventsResponse.Result.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.flow.access.GetLatestProtocolStateSnapshotRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.GetLatestProtocolStateSnapshotRequest; + return proto.flow.access.GetLatestProtocolStateSnapshotRequest.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.flow.access.EventsResponse.Result} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.GetLatestProtocolStateSnapshotRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.GetLatestProtocolStateSnapshotRequest} */ -proto.flow.access.EventsResponse.Result.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.flow.access.GetLatestProtocolStateSnapshotRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * repeated flow.entities.Event events = 3; - * @return {!Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.flow.access.EventsResponse.Result.prototype.getEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 3)); +proto.flow.access.GetLatestProtocolStateSnapshotRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.GetLatestProtocolStateSnapshotRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!Array} value - * @return {!proto.flow.access.EventsResponse.Result} returns this -*/ -proto.flow.access.EventsResponse.Result.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.GetLatestProtocolStateSnapshotRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.access.GetLatestProtocolStateSnapshotRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!proto.flow.entities.Event=} opt_value - * @param {number=} opt_index - * @return {!proto.flow.entities.Event} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.flow.access.EventsResponse.Result.prototype.addEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Event, opt_index); +proto.flow.access.ProtocolStateSnapshotResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.ProtocolStateSnapshotResponse.toObject(opt_includeInstance, this); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.flow.access.EventsResponse.Result} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.access.ProtocolStateSnapshotResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.EventsResponse.Result.prototype.clearEventsList = function() { - return this.setEventsList([]); +proto.flow.access.ProtocolStateSnapshotResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serializedsnapshot: msg.getSerializedsnapshot_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional google.protobuf.Timestamp block_timestamp = 4; - * @return {?proto.google.protobuf.Timestamp} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.access.ProtocolStateSnapshotResponse} */ -proto.flow.access.EventsResponse.Result.prototype.getBlockTimestamp = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +proto.flow.access.ProtocolStateSnapshotResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.access.ProtocolStateSnapshotResponse; + return proto.flow.access.ProtocolStateSnapshotResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.flow.access.EventsResponse.Result} returns this -*/ -proto.flow.access.EventsResponse.Result.prototype.setBlockTimestamp = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.access.ProtocolStateSnapshotResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.access.ProtocolStateSnapshotResponse} + */ +proto.flow.access.ProtocolStateSnapshotResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSerializedsnapshot(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.flow.access.EventsResponse.Result} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.flow.access.EventsResponse.Result.prototype.clearBlockTimestamp = function() { - return this.setBlockTimestamp(undefined); +proto.flow.access.ProtocolStateSnapshotResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.access.ProtocolStateSnapshotResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.access.ProtocolStateSnapshotResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.EventsResponse.Result.prototype.hasBlockTimestamp = function() { - return jspb.Message.getField(this, 4) != null; +proto.flow.access.ProtocolStateSnapshotResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSerializedsnapshot_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } }; /** - * repeated Result results = 1; - * @return {!Array} + * optional bytes serializedSnapshot = 1; + * @return {!(string|Uint8Array)} */ -proto.flow.access.EventsResponse.prototype.getResultsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.flow.access.EventsResponse.Result, 1)); +proto.flow.access.ProtocolStateSnapshotResponse.prototype.getSerializedsnapshot = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.flow.access.EventsResponse} returns this -*/ -proto.flow.access.EventsResponse.prototype.setResultsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * optional bytes serializedSnapshot = 1; + * This is a type-conversion wrapper around `getSerializedsnapshot()` + * @return {string} + */ +proto.flow.access.ProtocolStateSnapshotResponse.prototype.getSerializedsnapshot_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSerializedsnapshot())); }; /** - * @param {!proto.flow.access.EventsResponse.Result=} opt_value - * @param {number=} opt_index - * @return {!proto.flow.access.EventsResponse.Result} + * optional bytes serializedSnapshot = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSerializedsnapshot()` + * @return {!Uint8Array} */ -proto.flow.access.EventsResponse.prototype.addResults = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.access.EventsResponse.Result, opt_index); +proto.flow.access.ProtocolStateSnapshotResponse.prototype.getSerializedsnapshot_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSerializedsnapshot())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.flow.access.EventsResponse} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.ProtocolStateSnapshotResponse} returns this */ -proto.flow.access.EventsResponse.prototype.clearResultsList = function() { - return this.setResultsList([]); +proto.flow.access.ProtocolStateSnapshotResponse.prototype.setSerializedsnapshot = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5832,8 +7415,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.GetNetworkParametersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.GetNetworkParametersRequest.toObject(opt_includeInstance, this); +proto.flow.access.GetExecutionResultForBlockIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.GetExecutionResultForBlockIDRequest.toObject(opt_includeInstance, this); }; @@ -5842,13 +7425,13 @@ proto.flow.access.GetNetworkParametersRequest.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.GetNetworkParametersRequest} msg The msg instance to transform. + * @param {!proto.flow.access.GetExecutionResultForBlockIDRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetNetworkParametersRequest.toObject = function(includeInstance, msg) { +proto.flow.access.GetExecutionResultForBlockIDRequest.toObject = function(includeInstance, msg) { var f, obj = { - + blockId: msg.getBlockId_asB64() }; if (includeInstance) { @@ -5862,29 +7445,33 @@ proto.flow.access.GetNetworkParametersRequest.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.GetNetworkParametersRequest} + * @return {!proto.flow.access.GetExecutionResultForBlockIDRequest} */ -proto.flow.access.GetNetworkParametersRequest.deserializeBinary = function(bytes) { +proto.flow.access.GetExecutionResultForBlockIDRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.GetNetworkParametersRequest; - return proto.flow.access.GetNetworkParametersRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.GetExecutionResultForBlockIDRequest; + return proto.flow.access.GetExecutionResultForBlockIDRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.GetNetworkParametersRequest} msg The message object to deserialize into. + * @param {!proto.flow.access.GetExecutionResultForBlockIDRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.GetNetworkParametersRequest} + * @return {!proto.flow.access.GetExecutionResultForBlockIDRequest} */ -proto.flow.access.GetNetworkParametersRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.GetExecutionResultForBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); + break; default: reader.skipField(); break; @@ -5898,9 +7485,9 @@ proto.flow.access.GetNetworkParametersRequest.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.GetNetworkParametersRequest.prototype.serializeBinary = function() { +proto.flow.access.GetExecutionResultForBlockIDRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.GetNetworkParametersRequest.serializeBinaryToWriter(this, writer); + proto.flow.access.GetExecutionResultForBlockIDRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5908,12 +7495,61 @@ proto.flow.access.GetNetworkParametersRequest.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.GetNetworkParametersRequest} message + * @param {!proto.flow.access.GetExecutionResultForBlockIDRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetNetworkParametersRequest.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.GetExecutionResultForBlockIDRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes block_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.access.GetExecutionResultForBlockIDRequest.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes block_id = 1; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} + */ +proto.flow.access.GetExecutionResultForBlockIDRequest.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); +}; + + +/** + * optional bytes block_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} + */ +proto.flow.access.GetExecutionResultForBlockIDRequest.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.access.GetExecutionResultForBlockIDRequest} returns this + */ +proto.flow.access.GetExecutionResultForBlockIDRequest.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -5933,8 +7569,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.access.GetNetworkParametersResponse.prototype.toObject = function(opt_includeInstance) { - return proto.flow.access.GetNetworkParametersResponse.toObject(opt_includeInstance, this); +proto.flow.access.ExecutionResultForBlockIDResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.access.ExecutionResultForBlockIDResponse.toObject(opt_includeInstance, this); }; @@ -5943,13 +7579,13 @@ proto.flow.access.GetNetworkParametersResponse.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.access.GetNetworkParametersResponse} msg The msg instance to transform. + * @param {!proto.flow.access.ExecutionResultForBlockIDResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetNetworkParametersResponse.toObject = function(includeInstance, msg) { +proto.flow.access.ExecutionResultForBlockIDResponse.toObject = function(includeInstance, msg) { var f, obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, "") + executionResult: (f = msg.getExecutionResult()) && flow_entities_execution_result_pb.ExecutionResult.toObject(includeInstance, f) }; if (includeInstance) { @@ -5963,23 +7599,23 @@ proto.flow.access.GetNetworkParametersResponse.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.access.GetNetworkParametersResponse} + * @return {!proto.flow.access.ExecutionResultForBlockIDResponse} */ -proto.flow.access.GetNetworkParametersResponse.deserializeBinary = function(bytes) { +proto.flow.access.ExecutionResultForBlockIDResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.access.GetNetworkParametersResponse; - return proto.flow.access.GetNetworkParametersResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.access.ExecutionResultForBlockIDResponse; + return proto.flow.access.ExecutionResultForBlockIDResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.access.GetNetworkParametersResponse} msg The message object to deserialize into. + * @param {!proto.flow.access.ExecutionResultForBlockIDResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.access.GetNetworkParametersResponse} + * @return {!proto.flow.access.ExecutionResultForBlockIDResponse} */ -proto.flow.access.GetNetworkParametersResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.access.ExecutionResultForBlockIDResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5987,8 +7623,9 @@ proto.flow.access.GetNetworkParametersResponse.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChainId(value); + var value = new flow_entities_execution_result_pb.ExecutionResult; + reader.readMessage(value,flow_entities_execution_result_pb.ExecutionResult.deserializeBinaryFromReader); + msg.setExecutionResult(value); break; default: reader.skipField(); @@ -6003,9 +7640,9 @@ proto.flow.access.GetNetworkParametersResponse.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.access.GetNetworkParametersResponse.prototype.serializeBinary = function() { +proto.flow.access.ExecutionResultForBlockIDResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.access.GetNetworkParametersResponse.serializeBinaryToWriter(this, writer); + proto.flow.access.ExecutionResultForBlockIDResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6013,37 +7650,57 @@ proto.flow.access.GetNetworkParametersResponse.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.access.GetNetworkParametersResponse} message + * @param {!proto.flow.access.ExecutionResultForBlockIDResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.access.GetNetworkParametersResponse.serializeBinaryToWriter = function(message, writer) { +proto.flow.access.ExecutionResultForBlockIDResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChainId(); - if (f.length > 0) { - writer.writeString( + f = message.getExecutionResult(); + if (f != null) { + writer.writeMessage( 1, - f + f, + flow_entities_execution_result_pb.ExecutionResult.serializeBinaryToWriter ); } }; /** - * optional string chain_id = 1; - * @return {string} + * optional flow.entities.ExecutionResult execution_result = 1; + * @return {?proto.flow.entities.ExecutionResult} */ -proto.flow.access.GetNetworkParametersResponse.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.flow.access.ExecutionResultForBlockIDResponse.prototype.getExecutionResult = function() { + return /** @type{?proto.flow.entities.ExecutionResult} */ ( + jspb.Message.getWrapperField(this, flow_entities_execution_result_pb.ExecutionResult, 1)); }; /** - * @param {string} value - * @return {!proto.flow.access.GetNetworkParametersResponse} returns this + * @param {?proto.flow.entities.ExecutionResult|undefined} value + * @return {!proto.flow.access.ExecutionResultForBlockIDResponse} returns this +*/ +proto.flow.access.ExecutionResultForBlockIDResponse.prototype.setExecutionResult = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.flow.access.ExecutionResultForBlockIDResponse} returns this */ -proto.flow.access.GetNetworkParametersResponse.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.flow.access.ExecutionResultForBlockIDResponse.prototype.clearExecutionResult = function() { + return this.setExecutionResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.flow.access.ExecutionResultForBlockIDResponse.prototype.hasExecutionResult = function() { + return jspb.Message.getField(this, 1) != null; }; diff --git a/packages/protobuf/src/generated/flow/access/access_pb_service.d.ts b/packages/protobuf/src/generated/flow/access/access_pb_service.d.ts index 11761414a..9375c2e5f 100644 --- a/packages/protobuf/src/generated/flow/access/access_pb_service.d.ts +++ b/packages/protobuf/src/generated/flow/access/access_pb_service.d.ts @@ -103,6 +103,33 @@ type AccessAPIGetTransactionResult = { readonly responseType: typeof flow_access_access_pb.TransactionResultResponse; }; +type AccessAPIGetTransactionResultByIndex = { + readonly methodName: string; + readonly service: typeof AccessAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_access_access_pb.GetTransactionByIndexRequest; + readonly responseType: typeof flow_access_access_pb.TransactionResultResponse; +}; + +type AccessAPIGetTransactionResultsByBlockID = { + readonly methodName: string; + readonly service: typeof AccessAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_access_access_pb.GetTransactionsByBlockIDRequest; + readonly responseType: typeof flow_access_access_pb.TransactionResultsResponse; +}; + +type AccessAPIGetTransactionsByBlockID = { + readonly methodName: string; + readonly service: typeof AccessAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_access_access_pb.GetTransactionsByBlockIDRequest; + readonly responseType: typeof flow_access_access_pb.TransactionsResponse; +}; + type AccessAPIGetAccount = { readonly methodName: string; readonly service: typeof AccessAPI; @@ -184,6 +211,24 @@ type AccessAPIGetNetworkParameters = { readonly responseType: typeof flow_access_access_pb.GetNetworkParametersResponse; }; +type AccessAPIGetLatestProtocolStateSnapshot = { + readonly methodName: string; + readonly service: typeof AccessAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_access_access_pb.GetLatestProtocolStateSnapshotRequest; + readonly responseType: typeof flow_access_access_pb.ProtocolStateSnapshotResponse; +}; + +type AccessAPIGetExecutionResultForBlockID = { + readonly methodName: string; + readonly service: typeof AccessAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_access_access_pb.GetExecutionResultForBlockIDRequest; + readonly responseType: typeof flow_access_access_pb.ExecutionResultForBlockIDResponse; +}; + export class AccessAPI { static readonly serviceName: string; static readonly Ping: AccessAPIPing; @@ -197,6 +242,9 @@ export class AccessAPI { static readonly SendTransaction: AccessAPISendTransaction; static readonly GetTransaction: AccessAPIGetTransaction; static readonly GetTransactionResult: AccessAPIGetTransactionResult; + static readonly GetTransactionResultByIndex: AccessAPIGetTransactionResultByIndex; + static readonly GetTransactionResultsByBlockID: AccessAPIGetTransactionResultsByBlockID; + static readonly GetTransactionsByBlockID: AccessAPIGetTransactionsByBlockID; static readonly GetAccount: AccessAPIGetAccount; static readonly GetAccountAtLatestBlock: AccessAPIGetAccountAtLatestBlock; static readonly GetAccountAtBlockHeight: AccessAPIGetAccountAtBlockHeight; @@ -206,6 +254,8 @@ export class AccessAPI { static readonly GetEventsForHeightRange: AccessAPIGetEventsForHeightRange; static readonly GetEventsForBlockIDs: AccessAPIGetEventsForBlockIDs; static readonly GetNetworkParameters: AccessAPIGetNetworkParameters; + static readonly GetLatestProtocolStateSnapshot: AccessAPIGetLatestProtocolStateSnapshot; + static readonly GetExecutionResultForBlockID: AccessAPIGetExecutionResultForBlockID; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -339,6 +389,33 @@ export class AccessAPIClient { requestMessage: flow_access_access_pb.GetTransactionRequest, callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void ): UnaryResponse; + getTransactionResultByIndex( + requestMessage: flow_access_access_pb.GetTransactionByIndexRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void + ): UnaryResponse; + getTransactionResultByIndex( + requestMessage: flow_access_access_pb.GetTransactionByIndexRequest, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void + ): UnaryResponse; + getTransactionResultsByBlockID( + requestMessage: flow_access_access_pb.GetTransactionsByBlockIDRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultsResponse|null) => void + ): UnaryResponse; + getTransactionResultsByBlockID( + requestMessage: flow_access_access_pb.GetTransactionsByBlockIDRequest, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultsResponse|null) => void + ): UnaryResponse; + getTransactionsByBlockID( + requestMessage: flow_access_access_pb.GetTransactionsByBlockIDRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionsResponse|null) => void + ): UnaryResponse; + getTransactionsByBlockID( + requestMessage: flow_access_access_pb.GetTransactionsByBlockIDRequest, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionsResponse|null) => void + ): UnaryResponse; getAccount( requestMessage: flow_access_access_pb.GetAccountRequest, metadata: grpc.Metadata, @@ -420,5 +497,23 @@ export class AccessAPIClient { requestMessage: flow_access_access_pb.GetNetworkParametersRequest, callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.GetNetworkParametersResponse|null) => void ): UnaryResponse; + getLatestProtocolStateSnapshot( + requestMessage: flow_access_access_pb.GetLatestProtocolStateSnapshotRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ProtocolStateSnapshotResponse|null) => void + ): UnaryResponse; + getLatestProtocolStateSnapshot( + requestMessage: flow_access_access_pb.GetLatestProtocolStateSnapshotRequest, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ProtocolStateSnapshotResponse|null) => void + ): UnaryResponse; + getExecutionResultForBlockID( + requestMessage: flow_access_access_pb.GetExecutionResultForBlockIDRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecutionResultForBlockIDResponse|null) => void + ): UnaryResponse; + getExecutionResultForBlockID( + requestMessage: flow_access_access_pb.GetExecutionResultForBlockIDRequest, + callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecutionResultForBlockIDResponse|null) => void + ): UnaryResponse; } diff --git a/packages/protobuf/src/generated/flow/access/access_pb_service.js b/packages/protobuf/src/generated/flow/access/access_pb_service.js index aebe26fd8..981df5b25 100644 --- a/packages/protobuf/src/generated/flow/access/access_pb_service.js +++ b/packages/protobuf/src/generated/flow/access/access_pb_service.js @@ -109,6 +109,33 @@ AccessAPI.GetTransactionResult = { responseType: flow_access_access_pb.TransactionResultResponse }; +AccessAPI.GetTransactionResultByIndex = { + methodName: "GetTransactionResultByIndex", + service: AccessAPI, + requestStream: false, + responseStream: false, + requestType: flow_access_access_pb.GetTransactionByIndexRequest, + responseType: flow_access_access_pb.TransactionResultResponse +}; + +AccessAPI.GetTransactionResultsByBlockID = { + methodName: "GetTransactionResultsByBlockID", + service: AccessAPI, + requestStream: false, + responseStream: false, + requestType: flow_access_access_pb.GetTransactionsByBlockIDRequest, + responseType: flow_access_access_pb.TransactionResultsResponse +}; + +AccessAPI.GetTransactionsByBlockID = { + methodName: "GetTransactionsByBlockID", + service: AccessAPI, + requestStream: false, + responseStream: false, + requestType: flow_access_access_pb.GetTransactionsByBlockIDRequest, + responseType: flow_access_access_pb.TransactionsResponse +}; + AccessAPI.GetAccount = { methodName: "GetAccount", service: AccessAPI, @@ -190,6 +217,24 @@ AccessAPI.GetNetworkParameters = { responseType: flow_access_access_pb.GetNetworkParametersResponse }; +AccessAPI.GetLatestProtocolStateSnapshot = { + methodName: "GetLatestProtocolStateSnapshot", + service: AccessAPI, + requestStream: false, + responseStream: false, + requestType: flow_access_access_pb.GetLatestProtocolStateSnapshotRequest, + responseType: flow_access_access_pb.ProtocolStateSnapshotResponse +}; + +AccessAPI.GetExecutionResultForBlockID = { + methodName: "GetExecutionResultForBlockID", + service: AccessAPI, + requestStream: false, + responseStream: false, + requestType: flow_access_access_pb.GetExecutionResultForBlockIDRequest, + responseType: flow_access_access_pb.ExecutionResultForBlockIDResponse +}; + exports.AccessAPI = AccessAPI; function AccessAPIClient(serviceHost, options) { @@ -538,6 +583,99 @@ AccessAPIClient.prototype.getTransactionResult = function getTransactionResult(r }; }; +AccessAPIClient.prototype.getTransactionResultByIndex = function getTransactionResultByIndex(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AccessAPI.GetTransactionResultByIndex, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AccessAPIClient.prototype.getTransactionResultsByBlockID = function getTransactionResultsByBlockID(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AccessAPI.GetTransactionResultsByBlockID, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AccessAPIClient.prototype.getTransactionsByBlockID = function getTransactionsByBlockID(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AccessAPI.GetTransactionsByBlockID, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + AccessAPIClient.prototype.getAccount = function getAccount(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; @@ -817,5 +955,67 @@ AccessAPIClient.prototype.getNetworkParameters = function getNetworkParameters(r }; }; +AccessAPIClient.prototype.getLatestProtocolStateSnapshot = function getLatestProtocolStateSnapshot(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AccessAPI.GetLatestProtocolStateSnapshot, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AccessAPIClient.prototype.getExecutionResultForBlockID = function getExecutionResultForBlockID(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AccessAPI.GetExecutionResultForBlockID, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.AccessAPIClient = AccessAPIClient; diff --git a/packages/protobuf/src/generated/flow/entities/account.ts b/packages/protobuf/src/generated/flow/entities/account.ts deleted file mode 100644 index 52de7800b..000000000 --- a/packages/protobuf/src/generated/flow/entities/account.ts +++ /dev/null @@ -1,201 +0,0 @@ -import * as pb_1 from "google-protobuf"; -export namespace entities { - export class Account extends pb_1.Message { - constructor(data?: any[] | { - address?: Uint8Array; - balance?: number; - code?: Uint8Array; - keys?: AccountKey[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [4], null); - if (!Array.isArray(data) && typeof data == "object") { - this.address = data.address; - this.balance = data.balance; - this.code = data.code; - this.keys = data.keys; - } - } - get address(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set address(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get balance(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as number | undefined; - } - set balance(value: number) { - pb_1.Message.setField(this, 2, value); - } - get code(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as Uint8Array | undefined; - } - set code(value: Uint8Array) { - pb_1.Message.setField(this, 3, value); - } - get keys(): AccountKey[] { - return pb_1.Message.getRepeatedWrapperField(this, AccountKey, 4) as AccountKey[]; - } - set keys(value: AccountKey[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - toObject() { - return { - address: this.address, - balance: this.balance, - code: this.code, - keys: this.keys.map((item: AccountKey) => item.toObject()) - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.address !== undefined) - writer.writeBytes(1, this.address); - if (this.balance !== undefined) - writer.writeUint64(2, this.balance); - if (this.code !== undefined) - writer.writeBytes(3, this.code); - if (this.keys !== undefined) - writer.writeRepeatedMessage(4, this.keys, (item: AccountKey) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Account { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Account(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.address = reader.readBytes(); - break; - case 2: - message.balance = reader.readUint64(); - break; - case 3: - message.code = reader.readBytes(); - break; - case 4: - reader.readMessage(message.keys, () => pb_1.Message.addToRepeatedWrapperField(message, 4, AccountKey.deserialize(reader), AccountKey)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class AccountKey extends pb_1.Message { - constructor(data?: any[] | { - index?: number; - public_key?: Uint8Array; - sign_algo?: number; - hash_algo?: number; - weight?: number; - sequence_number?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.index = data.index; - this.public_key = data.public_key; - this.sign_algo = data.sign_algo; - this.hash_algo = data.hash_algo; - this.weight = data.weight; - this.sequence_number = data.sequence_number; - } - } - get index(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as number | undefined; - } - set index(value: number) { - pb_1.Message.setField(this, 1, value); - } - get public_key(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set public_key(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - get sign_algo(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as number | undefined; - } - set sign_algo(value: number) { - pb_1.Message.setField(this, 3, value); - } - get hash_algo(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 4, undefined) as number | undefined; - } - set hash_algo(value: number) { - pb_1.Message.setField(this, 4, value); - } - get weight(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 5, undefined) as number | undefined; - } - set weight(value: number) { - pb_1.Message.setField(this, 5, value); - } - get sequence_number(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 6, undefined) as number | undefined; - } - set sequence_number(value: number) { - pb_1.Message.setField(this, 6, value); - } - toObject() { - return { - index: this.index, - public_key: this.public_key, - sign_algo: this.sign_algo, - hash_algo: this.hash_algo, - weight: this.weight, - sequence_number: this.sequence_number - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.index !== undefined) - writer.writeUint32(1, this.index); - if (this.public_key !== undefined) - writer.writeBytes(2, this.public_key); - if (this.sign_algo !== undefined) - writer.writeUint32(3, this.sign_algo); - if (this.hash_algo !== undefined) - writer.writeUint32(4, this.hash_algo); - if (this.weight !== undefined) - writer.writeUint32(5, this.weight); - if (this.sequence_number !== undefined) - writer.writeUint32(6, this.sequence_number); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AccountKey { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new AccountKey(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.index = reader.readUint32(); - break; - case 2: - message.public_key = reader.readBytes(); - break; - case 3: - message.sign_algo = reader.readUint32(); - break; - case 4: - message.hash_algo = reader.readUint32(); - break; - case 5: - message.weight = reader.readUint32(); - break; - case 6: - message.sequence_number = reader.readUint32(); - break; - default: reader.skipField(); - } - } - return message; - } - } -} diff --git a/packages/protobuf/src/generated/flow/entities/account_pb.js b/packages/protobuf/src/generated/flow/entities/account_pb.js index 3f2b2a468..624263def 100644 --- a/packages/protobuf/src/generated/flow/entities/account_pb.js +++ b/packages/protobuf/src/generated/flow/entities/account_pb.js @@ -2,15 +2,24 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); goog.exportSymbol('proto.flow.entities.Account', null, global); goog.exportSymbol('proto.flow.entities.AccountKey', null, global); diff --git a/packages/protobuf/src/generated/flow/entities/block.ts b/packages/protobuf/src/generated/flow/entities/block.ts deleted file mode 100644 index 3a42db3f2..000000000 --- a/packages/protobuf/src/generated/flow/entities/block.ts +++ /dev/null @@ -1,130 +0,0 @@ -import * as pb_1 from "google-protobuf"; -export namespace entities { - export class Block extends pb_1.Message { - constructor(data?: any[] | { - id?: Uint8Array; - parent_id?: Uint8Array; - height?: number; - timestamp?: google.protobuf.Timestamp; - collection_guarantees?: CollectionGuarantee[]; - block_seals?: BlockSeal[]; - signatures?: Uint8Array[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [5, 6, 7], null); - if (!Array.isArray(data) && typeof data == "object") { - this.id = data.id; - this.parent_id = data.parent_id; - this.height = data.height; - this.timestamp = data.timestamp; - this.collection_guarantees = data.collection_guarantees; - this.block_seals = data.block_seals; - this.signatures = data.signatures; - } - } - get id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get parent_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set parent_id(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - get height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as number | undefined; - } - set height(value: number) { - pb_1.Message.setField(this, 3, value); - } - get timestamp(): google.protobuf.Timestamp | undefined { - return pb_1.Message.getWrapperField(this, google.protobuf.Timestamp, 4) as google.protobuf.Timestamp | undefined; - } - set timestamp(value: google.protobuf.Timestamp) { - pb_1.Message.setWrapperField(this, 4, value); - } - get collection_guarantees(): CollectionGuarantee[] { - return pb_1.Message.getRepeatedWrapperField(this, CollectionGuarantee, 5) as CollectionGuarantee[]; - } - set collection_guarantees(value: CollectionGuarantee[]) { - pb_1.Message.setRepeatedWrapperField(this, 5, value); - } - get block_seals(): BlockSeal[] { - return pb_1.Message.getRepeatedWrapperField(this, BlockSeal, 6) as BlockSeal[]; - } - set block_seals(value: BlockSeal[]) { - pb_1.Message.setRepeatedWrapperField(this, 6, value); - } - get signatures(): Uint8Array[] { - return pb_1.Message.getField(this, 7) as Uint8Array[]; - } - set signatures(value: Uint8Array[]) { - pb_1.Message.setField(this, 7, value); - } - toObject() { - return { - id: this.id, - parent_id: this.parent_id, - height: this.height, - timestamp: this.timestamp && this.timestamp.toObject(), - collection_guarantees: this.collection_guarantees.map((item: CollectionGuarantee) => item.toObject()), - block_seals: this.block_seals.map((item: BlockSeal) => item.toObject()), - signatures: this.signatures - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.id !== undefined) - writer.writeBytes(1, this.id); - if (this.parent_id !== undefined) - writer.writeBytes(2, this.parent_id); - if (this.height !== undefined) - writer.writeUint64(3, this.height); - if (this.timestamp !== undefined) - writer.writeMessage(4, this.timestamp, () => this.timestamp.serialize(writer)); - if (this.collection_guarantees !== undefined) - writer.writeRepeatedMessage(5, this.collection_guarantees, (item: CollectionGuarantee) => item.serialize(writer)); - if (this.block_seals !== undefined) - writer.writeRepeatedMessage(6, this.block_seals, (item: BlockSeal) => item.serialize(writer)); - if (this.signatures !== undefined) - writer.writeRepeatedBytes(7, this.signatures); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Block { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Block(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readBytes(); - break; - case 2: - message.parent_id = reader.readBytes(); - break; - case 3: - message.height = reader.readUint64(); - break; - case 4: - reader.readMessage(message.timestamp, () => message.timestamp = google.protobuf.Timestamp.deserialize(reader)); - break; - case 5: - reader.readMessage(message.collection_guarantees, () => pb_1.Message.addToRepeatedWrapperField(message, 5, CollectionGuarantee.deserialize(reader), CollectionGuarantee)); - break; - case 6: - reader.readMessage(message.block_seals, () => pb_1.Message.addToRepeatedWrapperField(message, 6, BlockSeal.deserialize(reader), BlockSeal)); - break; - case 7: - pb_1.Message.addToRepeatedField(message, 7, reader.readBytes()); - break; - default: reader.skipField(); - } - } - return message; - } - } -} diff --git a/packages/protobuf/src/generated/flow/entities/block_header.ts b/packages/protobuf/src/generated/flow/entities/block_header.ts deleted file mode 100644 index 27f05e038..000000000 --- a/packages/protobuf/src/generated/flow/entities/block_header.ts +++ /dev/null @@ -1,74 +0,0 @@ -import * as pb_1 from "google-protobuf"; -export namespace entities { - export class BlockHeader extends pb_1.Message { - constructor(data?: any[] | { - id?: Uint8Array; - parent_id?: Uint8Array; - height?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.id = data.id; - this.parent_id = data.parent_id; - this.height = data.height; - } - } - get id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get parent_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set parent_id(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - get height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as number | undefined; - } - set height(value: number) { - pb_1.Message.setField(this, 3, value); - } - toObject() { - return { - id: this.id, - parent_id: this.parent_id, - height: this.height - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.id !== undefined) - writer.writeBytes(1, this.id); - if (this.parent_id !== undefined) - writer.writeBytes(2, this.parent_id); - if (this.height !== undefined) - writer.writeUint64(3, this.height); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockHeader { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new BlockHeader(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readBytes(); - break; - case 2: - message.parent_id = reader.readBytes(); - break; - case 3: - message.height = reader.readUint64(); - break; - default: reader.skipField(); - } - } - return message; - } - } -} diff --git a/packages/protobuf/src/generated/flow/entities/block_header_pb.d.ts b/packages/protobuf/src/generated/flow/entities/block_header_pb.d.ts index 77b110a2d..244c34e8a 100644 --- a/packages/protobuf/src/generated/flow/entities/block_header_pb.d.ts +++ b/packages/protobuf/src/generated/flow/entities/block_header_pb.d.ts @@ -23,6 +23,44 @@ export class BlockHeader extends jspb.Message { getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; + getPayloadHash(): Uint8Array | string; + getPayloadHash_asU8(): Uint8Array; + getPayloadHash_asB64(): string; + setPayloadHash(value: Uint8Array | string): void; + + getView(): number; + setView(value: number): void; + + clearParentVoterIdsList(): void; + getParentVoterIdsList(): Array; + getParentVoterIdsList_asU8(): Array; + getParentVoterIdsList_asB64(): Array; + setParentVoterIdsList(value: Array): void; + addParentVoterIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getParentVoterSigData(): Uint8Array | string; + getParentVoterSigData_asU8(): Uint8Array; + getParentVoterSigData_asB64(): string; + setParentVoterSigData(value: Uint8Array | string): void; + + getProposerId(): Uint8Array | string; + getProposerId_asU8(): Uint8Array; + getProposerId_asB64(): string; + setProposerId(value: Uint8Array | string): void; + + getProposerSigData(): Uint8Array | string; + getProposerSigData_asU8(): Uint8Array; + getProposerSigData_asB64(): string; + setProposerSigData(value: Uint8Array | string): void; + + getChainId(): string; + setChainId(value: string): void; + + getParentVoterIndices(): Uint8Array | string; + getParentVoterIndices_asU8(): Uint8Array; + getParentVoterIndices_asB64(): string; + setParentVoterIndices(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BlockHeader.AsObject; static toObject(includeInstance: boolean, msg: BlockHeader): BlockHeader.AsObject; @@ -39,6 +77,14 @@ export namespace BlockHeader { parentId: Uint8Array | string, height: number, timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + payloadHash: Uint8Array | string, + view: number, + parentVoterIdsList: Array, + parentVoterSigData: Uint8Array | string, + proposerId: Uint8Array | string, + proposerSigData: Uint8Array | string, + chainId: string, + parentVoterIndices: Uint8Array | string, } } diff --git a/packages/protobuf/src/generated/flow/entities/block_header_pb.js b/packages/protobuf/src/generated/flow/entities/block_header_pb.js index ee1b6bf35..da35d0b38 100644 --- a/packages/protobuf/src/generated/flow/entities/block_header_pb.js +++ b/packages/protobuf/src/generated/flow/entities/block_header_pb.js @@ -2,15 +2,24 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); @@ -26,7 +35,7 @@ goog.exportSymbol('proto.flow.entities.BlockHeader', null, global); * @constructor */ proto.flow.entities.BlockHeader = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.BlockHeader.repeatedFields_, null); }; goog.inherits(proto.flow.entities.BlockHeader, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -37,6 +46,13 @@ if (goog.DEBUG && !COMPILED) { proto.flow.entities.BlockHeader.displayName = 'proto.flow.entities.BlockHeader'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.entities.BlockHeader.repeatedFields_ = [7]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -71,7 +87,15 @@ proto.flow.entities.BlockHeader.toObject = function(includeInstance, msg) { id: msg.getId_asB64(), parentId: msg.getParentId_asB64(), height: jspb.Message.getFieldWithDefault(msg, 3, 0), - timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + payloadHash: msg.getPayloadHash_asB64(), + view: jspb.Message.getFieldWithDefault(msg, 6, 0), + parentVoterIdsList: msg.getParentVoterIdsList_asB64(), + parentVoterSigData: msg.getParentVoterSigData_asB64(), + proposerId: msg.getProposerId_asB64(), + proposerSigData: msg.getProposerSigData_asB64(), + chainId: jspb.Message.getFieldWithDefault(msg, 11, ""), + parentVoterIndices: msg.getParentVoterIndices_asB64() }; if (includeInstance) { @@ -125,6 +149,38 @@ proto.flow.entities.BlockHeader.deserializeBinaryFromReader = function(msg, read reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setTimestamp(value); break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPayloadHash(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setView(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addParentVoterIds(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setParentVoterSigData(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProposerId(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProposerSigData(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setParentVoterIndices(value); + break; default: reader.skipField(); break; @@ -183,6 +239,62 @@ proto.flow.entities.BlockHeader.serializeBinaryToWriter = function(message, writ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } + f = message.getPayloadHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getView(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getParentVoterIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 7, + f + ); + } + f = message.getParentVoterSigData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getProposerId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getProposerSigData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getParentVoterIndices_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } }; @@ -325,4 +437,311 @@ proto.flow.entities.BlockHeader.prototype.hasTimestamp = function() { }; +/** + * optional bytes payload_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.BlockHeader.prototype.getPayloadHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes payload_hash = 5; + * This is a type-conversion wrapper around `getPayloadHash()` + * @return {string} + */ +proto.flow.entities.BlockHeader.prototype.getPayloadHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPayloadHash())); +}; + + +/** + * optional bytes payload_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPayloadHash()` + * @return {!Uint8Array} + */ +proto.flow.entities.BlockHeader.prototype.getPayloadHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPayloadHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.setPayloadHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional uint64 view = 6; + * @return {number} + */ +proto.flow.entities.BlockHeader.prototype.getView = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.setView = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated bytes parent_voter_ids = 7; + * @return {!(Array|Array)} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterIdsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * repeated bytes parent_voter_ids = 7; + * This is a type-conversion wrapper around `getParentVoterIdsList()` + * @return {!Array} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getParentVoterIdsList())); +}; + + +/** + * repeated bytes parent_voter_ids = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getParentVoterIdsList()` + * @return {!Array} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getParentVoterIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.setParentVoterIdsList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.addParentVoterIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.clearParentVoterIdsList = function() { + return this.setParentVoterIdsList([]); +}; + + +/** + * optional bytes parent_voter_sig_data = 8; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterSigData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes parent_voter_sig_data = 8; + * This is a type-conversion wrapper around `getParentVoterSigData()` + * @return {string} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterSigData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getParentVoterSigData())); +}; + + +/** + * optional bytes parent_voter_sig_data = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getParentVoterSigData()` + * @return {!Uint8Array} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterSigData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getParentVoterSigData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.setParentVoterSigData = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional bytes proposer_id = 9; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.BlockHeader.prototype.getProposerId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes proposer_id = 9; + * This is a type-conversion wrapper around `getProposerId()` + * @return {string} + */ +proto.flow.entities.BlockHeader.prototype.getProposerId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerId())); +}; + + +/** + * optional bytes proposer_id = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProposerId()` + * @return {!Uint8Array} + */ +proto.flow.entities.BlockHeader.prototype.getProposerId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.setProposerId = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional bytes proposer_sig_data = 10; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.BlockHeader.prototype.getProposerSigData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes proposer_sig_data = 10; + * This is a type-conversion wrapper around `getProposerSigData()` + * @return {string} + */ +proto.flow.entities.BlockHeader.prototype.getProposerSigData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerSigData())); +}; + + +/** + * optional bytes proposer_sig_data = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProposerSigData()` + * @return {!Uint8Array} + */ +proto.flow.entities.BlockHeader.prototype.getProposerSigData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerSigData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.setProposerSigData = function(value) { + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional string chain_id = 11; + * @return {string} + */ +proto.flow.entities.BlockHeader.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional bytes parent_voter_indices = 12; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterIndices = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes parent_voter_indices = 12; + * This is a type-conversion wrapper around `getParentVoterIndices()` + * @return {string} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterIndices_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getParentVoterIndices())); +}; + + +/** + * optional bytes parent_voter_indices = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getParentVoterIndices()` + * @return {!Uint8Array} + */ +proto.flow.entities.BlockHeader.prototype.getParentVoterIndices_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getParentVoterIndices())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.BlockHeader} returns this + */ +proto.flow.entities.BlockHeader.prototype.setParentVoterIndices = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); +}; + + goog.object.extend(exports, proto.flow.entities); diff --git a/packages/protobuf/src/generated/flow/entities/block_pb.d.ts b/packages/protobuf/src/generated/flow/entities/block_pb.d.ts index 8a6a59381..97064b3a0 100644 --- a/packages/protobuf/src/generated/flow/entities/block_pb.d.ts +++ b/packages/protobuf/src/generated/flow/entities/block_pb.d.ts @@ -5,6 +5,8 @@ import * as jspb from "google-protobuf"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as flow_entities_collection_pb from "../../flow/entities/collection_pb"; import * as flow_entities_block_seal_pb from "../../flow/entities/block_seal_pb"; +import * as flow_entities_execution_result_pb from "../../flow/entities/execution_result_pb"; +import * as flow_entities_block_header_pb from "../../flow/entities/block_header_pb"; export class Block extends jspb.Message { getId(): Uint8Array | string; @@ -42,6 +44,21 @@ export class Block extends jspb.Message { setSignaturesList(value: Array): void; addSignatures(value: Uint8Array | string, index?: number): Uint8Array | string; + clearExecutionReceiptMetalistList(): void; + getExecutionReceiptMetalistList(): Array; + setExecutionReceiptMetalistList(value: Array): void; + addExecutionReceiptMetalist(value?: flow_entities_execution_result_pb.ExecutionReceiptMeta, index?: number): flow_entities_execution_result_pb.ExecutionReceiptMeta; + + clearExecutionResultListList(): void; + getExecutionResultListList(): Array; + setExecutionResultListList(value: Array): void; + addExecutionResultList(value?: flow_entities_execution_result_pb.ExecutionResult, index?: number): flow_entities_execution_result_pb.ExecutionResult; + + hasBlockHeader(): boolean; + clearBlockHeader(): void; + getBlockHeader(): flow_entities_block_header_pb.BlockHeader | undefined; + setBlockHeader(value?: flow_entities_block_header_pb.BlockHeader): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Block.AsObject; static toObject(includeInstance: boolean, msg: Block): Block.AsObject; @@ -61,6 +78,9 @@ export namespace Block { collectionGuaranteesList: Array, blockSealsList: Array, signaturesList: Array, + executionReceiptMetalistList: Array, + executionResultListList: Array, + blockHeader?: flow_entities_block_header_pb.BlockHeader.AsObject, } } diff --git a/packages/protobuf/src/generated/flow/entities/block_pb.js b/packages/protobuf/src/generated/flow/entities/block_pb.js index 92337874d..35290e5d9 100644 --- a/packages/protobuf/src/generated/flow/entities/block_pb.js +++ b/packages/protobuf/src/generated/flow/entities/block_pb.js @@ -2,15 +2,24 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); @@ -18,6 +27,10 @@ var flow_entities_collection_pb = require('../../flow/entities/collection_pb.js' goog.object.extend(proto, flow_entities_collection_pb); var flow_entities_block_seal_pb = require('../../flow/entities/block_seal_pb.js'); goog.object.extend(proto, flow_entities_block_seal_pb); +var flow_entities_execution_result_pb = require('../../flow/entities/execution_result_pb.js'); +goog.object.extend(proto, flow_entities_execution_result_pb); +var flow_entities_block_header_pb = require('../../flow/entities/block_header_pb.js'); +goog.object.extend(proto, flow_entities_block_header_pb); goog.exportSymbol('proto.flow.entities.Block', null, global); /** * Generated by JsPbCodeGenerator. @@ -46,7 +59,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.flow.entities.Block.repeatedFields_ = [5,6,7]; +proto.flow.entities.Block.repeatedFields_ = [5,6,7,8,9]; @@ -87,7 +100,12 @@ proto.flow.entities.Block.toObject = function(includeInstance, msg) { flow_entities_collection_pb.CollectionGuarantee.toObject, includeInstance), blockSealsList: jspb.Message.toObjectList(msg.getBlockSealsList(), flow_entities_block_seal_pb.BlockSeal.toObject, includeInstance), - signaturesList: msg.getSignaturesList_asB64() + signaturesList: msg.getSignaturesList_asB64(), + executionReceiptMetalistList: jspb.Message.toObjectList(msg.getExecutionReceiptMetalistList(), + flow_entities_execution_result_pb.ExecutionReceiptMeta.toObject, includeInstance), + executionResultListList: jspb.Message.toObjectList(msg.getExecutionResultListList(), + flow_entities_execution_result_pb.ExecutionResult.toObject, includeInstance), + blockHeader: (f = msg.getBlockHeader()) && flow_entities_block_header_pb.BlockHeader.toObject(includeInstance, f) }; if (includeInstance) { @@ -155,6 +173,21 @@ proto.flow.entities.Block.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.addSignatures(value); break; + case 8: + var value = new flow_entities_execution_result_pb.ExecutionReceiptMeta; + reader.readMessage(value,flow_entities_execution_result_pb.ExecutionReceiptMeta.deserializeBinaryFromReader); + msg.addExecutionReceiptMetalist(value); + break; + case 9: + var value = new flow_entities_execution_result_pb.ExecutionResult; + reader.readMessage(value,flow_entities_execution_result_pb.ExecutionResult.deserializeBinaryFromReader); + msg.addExecutionResultList(value); + break; + case 10: + var value = new flow_entities_block_header_pb.BlockHeader; + reader.readMessage(value,flow_entities_block_header_pb.BlockHeader.deserializeBinaryFromReader); + msg.setBlockHeader(value); + break; default: reader.skipField(); break; @@ -236,6 +269,30 @@ proto.flow.entities.Block.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getExecutionReceiptMetalistList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + flow_entities_execution_result_pb.ExecutionReceiptMeta.serializeBinaryToWriter + ); + } + f = message.getExecutionResultListList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + flow_entities_execution_result_pb.ExecutionResult.serializeBinaryToWriter + ); + } + f = message.getBlockHeader(); + if (f != null) { + writer.writeMessage( + 10, + f, + flow_entities_block_header_pb.BlockHeader.serializeBinaryToWriter + ); + } }; @@ -515,4 +572,117 @@ proto.flow.entities.Block.prototype.clearSignaturesList = function() { }; +/** + * repeated ExecutionReceiptMeta execution_receipt_metaList = 8; + * @return {!Array} + */ +proto.flow.entities.Block.prototype.getExecutionReceiptMetalistList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, flow_entities_execution_result_pb.ExecutionReceiptMeta, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.flow.entities.Block} returns this +*/ +proto.flow.entities.Block.prototype.setExecutionReceiptMetalistList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.flow.entities.ExecutionReceiptMeta=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.ExecutionReceiptMeta} + */ +proto.flow.entities.Block.prototype.addExecutionReceiptMetalist = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.flow.entities.ExecutionReceiptMeta, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.Block} returns this + */ +proto.flow.entities.Block.prototype.clearExecutionReceiptMetalistList = function() { + return this.setExecutionReceiptMetalistList([]); +}; + + +/** + * repeated ExecutionResult execution_result_list = 9; + * @return {!Array} + */ +proto.flow.entities.Block.prototype.getExecutionResultListList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, flow_entities_execution_result_pb.ExecutionResult, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.flow.entities.Block} returns this +*/ +proto.flow.entities.Block.prototype.setExecutionResultListList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.flow.entities.ExecutionResult=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.ExecutionResult} + */ +proto.flow.entities.Block.prototype.addExecutionResultList = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.flow.entities.ExecutionResult, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.Block} returns this + */ +proto.flow.entities.Block.prototype.clearExecutionResultListList = function() { + return this.setExecutionResultListList([]); +}; + + +/** + * optional BlockHeader block_header = 10; + * @return {?proto.flow.entities.BlockHeader} + */ +proto.flow.entities.Block.prototype.getBlockHeader = function() { + return /** @type{?proto.flow.entities.BlockHeader} */ ( + jspb.Message.getWrapperField(this, flow_entities_block_header_pb.BlockHeader, 10)); +}; + + +/** + * @param {?proto.flow.entities.BlockHeader|undefined} value + * @return {!proto.flow.entities.Block} returns this +*/ +proto.flow.entities.Block.prototype.setBlockHeader = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.flow.entities.Block} returns this + */ +proto.flow.entities.Block.prototype.clearBlockHeader = function() { + return this.setBlockHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.flow.entities.Block.prototype.hasBlockHeader = function() { + return jspb.Message.getField(this, 10) != null; +}; + + goog.object.extend(exports, proto.flow.entities); diff --git a/packages/protobuf/src/generated/flow/entities/block_seal.ts b/packages/protobuf/src/generated/flow/entities/block_seal.ts deleted file mode 100644 index d71833329..000000000 --- a/packages/protobuf/src/generated/flow/entities/block_seal.ts +++ /dev/null @@ -1,88 +0,0 @@ -import * as pb_1 from "google-protobuf"; -export namespace entities { - export class BlockSeal extends pb_1.Message { - constructor(data?: any[] | { - block_id?: Uint8Array; - execution_receipt_id?: Uint8Array; - execution_receipt_signatures?: Uint8Array[]; - result_approval_signatures?: Uint8Array[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [3, 4], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block_id = data.block_id; - this.execution_receipt_id = data.execution_receipt_id; - this.execution_receipt_signatures = data.execution_receipt_signatures; - this.result_approval_signatures = data.result_approval_signatures; - } - } - get block_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set block_id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get execution_receipt_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set execution_receipt_id(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - get execution_receipt_signatures(): Uint8Array[] { - return pb_1.Message.getField(this, 3) as Uint8Array[]; - } - set execution_receipt_signatures(value: Uint8Array[]) { - pb_1.Message.setField(this, 3, value); - } - get result_approval_signatures(): Uint8Array[] { - return pb_1.Message.getField(this, 4) as Uint8Array[]; - } - set result_approval_signatures(value: Uint8Array[]) { - pb_1.Message.setField(this, 4, value); - } - toObject() { - return { - block_id: this.block_id, - execution_receipt_id: this.execution_receipt_id, - execution_receipt_signatures: this.execution_receipt_signatures, - result_approval_signatures: this.result_approval_signatures - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block_id !== undefined) - writer.writeBytes(1, this.block_id); - if (this.execution_receipt_id !== undefined) - writer.writeBytes(2, this.execution_receipt_id); - if (this.execution_receipt_signatures !== undefined) - writer.writeRepeatedBytes(3, this.execution_receipt_signatures); - if (this.result_approval_signatures !== undefined) - writer.writeRepeatedBytes(4, this.result_approval_signatures); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockSeal { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new BlockSeal(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.block_id = reader.readBytes(); - break; - case 2: - message.execution_receipt_id = reader.readBytes(); - break; - case 3: - pb_1.Message.addToRepeatedField(message, 3, reader.readBytes()); - break; - case 4: - pb_1.Message.addToRepeatedField(message, 4, reader.readBytes()); - break; - default: reader.skipField(); - } - } - return message; - } - } -} diff --git a/packages/protobuf/src/generated/flow/entities/block_seal_pb.d.ts b/packages/protobuf/src/generated/flow/entities/block_seal_pb.d.ts index 7e4fc0f70..51968562e 100644 --- a/packages/protobuf/src/generated/flow/entities/block_seal_pb.d.ts +++ b/packages/protobuf/src/generated/flow/entities/block_seal_pb.d.ts @@ -28,6 +28,21 @@ export class BlockSeal extends jspb.Message { setResultApprovalSignaturesList(value: Array): void; addResultApprovalSignatures(value: Uint8Array | string, index?: number): Uint8Array | string; + getFinalState(): Uint8Array | string; + getFinalState_asU8(): Uint8Array; + getFinalState_asB64(): string; + setFinalState(value: Uint8Array | string): void; + + getResultId(): Uint8Array | string; + getResultId_asU8(): Uint8Array; + getResultId_asB64(): string; + setResultId(value: Uint8Array | string): void; + + clearAggregatedApprovalSigsList(): void; + getAggregatedApprovalSigsList(): Array; + setAggregatedApprovalSigsList(value: Array): void; + addAggregatedApprovalSigs(value?: AggregatedSignature, index?: number): AggregatedSignature; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BlockSeal.AsObject; static toObject(includeInstance: boolean, msg: BlockSeal): BlockSeal.AsObject; @@ -44,6 +59,41 @@ export namespace BlockSeal { executionReceiptId: Uint8Array | string, executionReceiptSignaturesList: Array, resultApprovalSignaturesList: Array, + finalState: Uint8Array | string, + resultId: Uint8Array | string, + aggregatedApprovalSigsList: Array, + } +} + +export class AggregatedSignature extends jspb.Message { + clearVerifierSignaturesList(): void; + getVerifierSignaturesList(): Array; + getVerifierSignaturesList_asU8(): Array; + getVerifierSignaturesList_asB64(): Array; + setVerifierSignaturesList(value: Array): void; + addVerifierSignatures(value: Uint8Array | string, index?: number): Uint8Array | string; + + clearSignerIdsList(): void; + getSignerIdsList(): Array; + getSignerIdsList_asU8(): Array; + getSignerIdsList_asB64(): Array; + setSignerIdsList(value: Array): void; + addSignerIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AggregatedSignature.AsObject; + static toObject(includeInstance: boolean, msg: AggregatedSignature): AggregatedSignature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AggregatedSignature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AggregatedSignature; + static deserializeBinaryFromReader(message: AggregatedSignature, reader: jspb.BinaryReader): AggregatedSignature; +} + +export namespace AggregatedSignature { + export type AsObject = { + verifierSignaturesList: Array, + signerIdsList: Array, } } diff --git a/packages/protobuf/src/generated/flow/entities/block_seal_pb.js b/packages/protobuf/src/generated/flow/entities/block_seal_pb.js index 6af6745e7..d3ce61622 100644 --- a/packages/protobuf/src/generated/flow/entities/block_seal_pb.js +++ b/packages/protobuf/src/generated/flow/entities/block_seal_pb.js @@ -2,16 +2,26 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); - +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +goog.exportSymbol('proto.flow.entities.AggregatedSignature', null, global); goog.exportSymbol('proto.flow.entities.BlockSeal', null, global); /** * Generated by JsPbCodeGenerator. @@ -34,13 +44,34 @@ if (goog.DEBUG && !COMPILED) { */ proto.flow.entities.BlockSeal.displayName = 'proto.flow.entities.BlockSeal'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.entities.AggregatedSignature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.AggregatedSignature.repeatedFields_, null); +}; +goog.inherits(proto.flow.entities.AggregatedSignature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.entities.AggregatedSignature.displayName = 'proto.flow.entities.AggregatedSignature'; +} /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.flow.entities.BlockSeal.repeatedFields_ = [3,4]; +proto.flow.entities.BlockSeal.repeatedFields_ = [3,4,7]; @@ -76,7 +107,11 @@ proto.flow.entities.BlockSeal.toObject = function(includeInstance, msg) { blockId: msg.getBlockId_asB64(), executionReceiptId: msg.getExecutionReceiptId_asB64(), executionReceiptSignaturesList: msg.getExecutionReceiptSignaturesList_asB64(), - resultApprovalSignaturesList: msg.getResultApprovalSignaturesList_asB64() + resultApprovalSignaturesList: msg.getResultApprovalSignaturesList_asB64(), + finalState: msg.getFinalState_asB64(), + resultId: msg.getResultId_asB64(), + aggregatedApprovalSigsList: jspb.Message.toObjectList(msg.getAggregatedApprovalSigsList(), + proto.flow.entities.AggregatedSignature.toObject, includeInstance) }; if (includeInstance) { @@ -129,6 +164,19 @@ proto.flow.entities.BlockSeal.deserializeBinaryFromReader = function(msg, reader var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.addResultApprovalSignatures(value); break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFinalState(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setResultId(value); + break; + case 7: + var value = new proto.flow.entities.AggregatedSignature; + reader.readMessage(value,proto.flow.entities.AggregatedSignature.deserializeBinaryFromReader); + msg.addAggregatedApprovalSigs(value); + break; default: reader.skipField(); break; @@ -186,6 +234,28 @@ proto.flow.entities.BlockSeal.serializeBinaryToWriter = function(message, writer f ); } + f = message.getFinalState_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getResultId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getAggregatedApprovalSigsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.flow.entities.AggregatedSignature.serializeBinaryToWriter + ); + } }; @@ -395,4 +465,379 @@ proto.flow.entities.BlockSeal.prototype.clearResultApprovalSignaturesList = func }; +/** + * optional bytes final_state = 5; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.BlockSeal.prototype.getFinalState = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes final_state = 5; + * This is a type-conversion wrapper around `getFinalState()` + * @return {string} + */ +proto.flow.entities.BlockSeal.prototype.getFinalState_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFinalState())); +}; + + +/** + * optional bytes final_state = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFinalState()` + * @return {!Uint8Array} + */ +proto.flow.entities.BlockSeal.prototype.getFinalState_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFinalState())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.BlockSeal} returns this + */ +proto.flow.entities.BlockSeal.prototype.setFinalState = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional bytes result_id = 6; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.BlockSeal.prototype.getResultId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes result_id = 6; + * This is a type-conversion wrapper around `getResultId()` + * @return {string} + */ +proto.flow.entities.BlockSeal.prototype.getResultId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getResultId())); +}; + + +/** + * optional bytes result_id = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResultId()` + * @return {!Uint8Array} + */ +proto.flow.entities.BlockSeal.prototype.getResultId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getResultId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.BlockSeal} returns this + */ +proto.flow.entities.BlockSeal.prototype.setResultId = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * repeated AggregatedSignature aggregated_approval_sigs = 7; + * @return {!Array} + */ +proto.flow.entities.BlockSeal.prototype.getAggregatedApprovalSigsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.AggregatedSignature, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.flow.entities.BlockSeal} returns this +*/ +proto.flow.entities.BlockSeal.prototype.setAggregatedApprovalSigsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.flow.entities.AggregatedSignature=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.AggregatedSignature} + */ +proto.flow.entities.BlockSeal.prototype.addAggregatedApprovalSigs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.flow.entities.AggregatedSignature, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.BlockSeal} returns this + */ +proto.flow.entities.BlockSeal.prototype.clearAggregatedApprovalSigsList = function() { + return this.setAggregatedApprovalSigsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.entities.AggregatedSignature.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.entities.AggregatedSignature.prototype.toObject = function(opt_includeInstance) { + return proto.flow.entities.AggregatedSignature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.entities.AggregatedSignature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.AggregatedSignature.toObject = function(includeInstance, msg) { + var f, obj = { + verifierSignaturesList: msg.getVerifierSignaturesList_asB64(), + signerIdsList: msg.getSignerIdsList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.entities.AggregatedSignature} + */ +proto.flow.entities.AggregatedSignature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.entities.AggregatedSignature; + return proto.flow.entities.AggregatedSignature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.entities.AggregatedSignature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.entities.AggregatedSignature} + */ +proto.flow.entities.AggregatedSignature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addVerifierSignatures(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSignerIds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.entities.AggregatedSignature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.entities.AggregatedSignature.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.entities.AggregatedSignature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.AggregatedSignature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVerifierSignaturesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getSignerIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } +}; + + +/** + * repeated bytes verifier_signatures = 1; + * @return {!(Array|Array)} + */ +proto.flow.entities.AggregatedSignature.prototype.getVerifierSignaturesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes verifier_signatures = 1; + * This is a type-conversion wrapper around `getVerifierSignaturesList()` + * @return {!Array} + */ +proto.flow.entities.AggregatedSignature.prototype.getVerifierSignaturesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getVerifierSignaturesList())); +}; + + +/** + * repeated bytes verifier_signatures = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVerifierSignaturesList()` + * @return {!Array} + */ +proto.flow.entities.AggregatedSignature.prototype.getVerifierSignaturesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getVerifierSignaturesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.entities.AggregatedSignature} returns this + */ +proto.flow.entities.AggregatedSignature.prototype.setVerifierSignaturesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.entities.AggregatedSignature} returns this + */ +proto.flow.entities.AggregatedSignature.prototype.addVerifierSignatures = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.AggregatedSignature} returns this + */ +proto.flow.entities.AggregatedSignature.prototype.clearVerifierSignaturesList = function() { + return this.setVerifierSignaturesList([]); +}; + + +/** + * repeated bytes signer_ids = 2; + * @return {!(Array|Array)} + */ +proto.flow.entities.AggregatedSignature.prototype.getSignerIdsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes signer_ids = 2; + * This is a type-conversion wrapper around `getSignerIdsList()` + * @return {!Array} + */ +proto.flow.entities.AggregatedSignature.prototype.getSignerIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSignerIdsList())); +}; + + +/** + * repeated bytes signer_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignerIdsList()` + * @return {!Array} + */ +proto.flow.entities.AggregatedSignature.prototype.getSignerIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSignerIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.entities.AggregatedSignature} returns this + */ +proto.flow.entities.AggregatedSignature.prototype.setSignerIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.entities.AggregatedSignature} returns this + */ +proto.flow.entities.AggregatedSignature.prototype.addSignerIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.AggregatedSignature} returns this + */ +proto.flow.entities.AggregatedSignature.prototype.clearSignerIdsList = function() { + return this.setSignerIdsList([]); +}; + + goog.object.extend(exports, proto.flow.entities); diff --git a/packages/protobuf/src/generated/flow/entities/collection.ts b/packages/protobuf/src/generated/flow/entities/collection.ts deleted file mode 100644 index 0b0ac224d..000000000 --- a/packages/protobuf/src/generated/flow/entities/collection.ts +++ /dev/null @@ -1,117 +0,0 @@ -import * as pb_1 from "google-protobuf"; -export namespace entities { - export class Collection extends pb_1.Message { - constructor(data?: any[] | { - id?: Uint8Array; - transaction_ids?: Uint8Array[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [2], null); - if (!Array.isArray(data) && typeof data == "object") { - this.id = data.id; - this.transaction_ids = data.transaction_ids; - } - } - get id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get transaction_ids(): Uint8Array[] { - return pb_1.Message.getField(this, 2) as Uint8Array[]; - } - set transaction_ids(value: Uint8Array[]) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - id: this.id, - transaction_ids: this.transaction_ids - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.id !== undefined) - writer.writeBytes(1, this.id); - if (this.transaction_ids !== undefined) - writer.writeRepeatedBytes(2, this.transaction_ids); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Collection { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Collection(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readBytes(); - break; - case 2: - pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class CollectionGuarantee extends pb_1.Message { - constructor(data?: any[] | { - collection_id?: Uint8Array; - signatures?: Uint8Array[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [2], null); - if (!Array.isArray(data) && typeof data == "object") { - this.collection_id = data.collection_id; - this.signatures = data.signatures; - } - } - get collection_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set collection_id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get signatures(): Uint8Array[] { - return pb_1.Message.getField(this, 2) as Uint8Array[]; - } - set signatures(value: Uint8Array[]) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - collection_id: this.collection_id, - signatures: this.signatures - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.collection_id !== undefined) - writer.writeBytes(1, this.collection_id); - if (this.signatures !== undefined) - writer.writeRepeatedBytes(2, this.signatures); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CollectionGuarantee { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new CollectionGuarantee(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.collection_id = reader.readBytes(); - break; - case 2: - pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); - break; - default: reader.skipField(); - } - } - return message; - } - } -} diff --git a/packages/protobuf/src/generated/flow/entities/collection_pb.d.ts b/packages/protobuf/src/generated/flow/entities/collection_pb.d.ts index ab6c4c882..045aece66 100644 --- a/packages/protobuf/src/generated/flow/entities/collection_pb.d.ts +++ b/packages/protobuf/src/generated/flow/entities/collection_pb.d.ts @@ -46,6 +46,28 @@ export class CollectionGuarantee extends jspb.Message { setSignaturesList(value: Array): void; addSignatures(value: Uint8Array | string, index?: number): Uint8Array | string; + getReferenceBlockId(): Uint8Array | string; + getReferenceBlockId_asU8(): Uint8Array; + getReferenceBlockId_asB64(): string; + setReferenceBlockId(value: Uint8Array | string): void; + + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + clearSignerIdsList(): void; + getSignerIdsList(): Array; + getSignerIdsList_asU8(): Array; + getSignerIdsList_asB64(): Array; + setSignerIdsList(value: Array): void; + addSignerIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getSignerIndices(): Uint8Array | string; + getSignerIndices_asU8(): Uint8Array; + getSignerIndices_asB64(): string; + setSignerIndices(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CollectionGuarantee.AsObject; static toObject(includeInstance: boolean, msg: CollectionGuarantee): CollectionGuarantee.AsObject; @@ -60,6 +82,10 @@ export namespace CollectionGuarantee { export type AsObject = { collectionId: Uint8Array | string, signaturesList: Array, + referenceBlockId: Uint8Array | string, + signature: Uint8Array | string, + signerIdsList: Array, + signerIndices: Uint8Array | string, } } diff --git a/packages/protobuf/src/generated/flow/entities/collection_pb.js b/packages/protobuf/src/generated/flow/entities/collection_pb.js index be7c9ff04..bfb0784fc 100644 --- a/packages/protobuf/src/generated/flow/entities/collection_pb.js +++ b/packages/protobuf/src/generated/flow/entities/collection_pb.js @@ -2,15 +2,24 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); goog.exportSymbol('proto.flow.entities.Collection', null, global); goog.exportSymbol('proto.flow.entities.CollectionGuarantee', null, global); @@ -296,7 +305,7 @@ proto.flow.entities.Collection.prototype.clearTransactionIdsList = function() { * @private {!Array} * @const */ -proto.flow.entities.CollectionGuarantee.repeatedFields_ = [2]; +proto.flow.entities.CollectionGuarantee.repeatedFields_ = [2,5]; @@ -330,7 +339,11 @@ proto.flow.entities.CollectionGuarantee.prototype.toObject = function(opt_includ proto.flow.entities.CollectionGuarantee.toObject = function(includeInstance, msg) { var f, obj = { collectionId: msg.getCollectionId_asB64(), - signaturesList: msg.getSignaturesList_asB64() + signaturesList: msg.getSignaturesList_asB64(), + referenceBlockId: msg.getReferenceBlockId_asB64(), + signature: msg.getSignature_asB64(), + signerIdsList: msg.getSignerIdsList_asB64(), + signerIndices: msg.getSignerIndices_asB64() }; if (includeInstance) { @@ -375,6 +388,22 @@ proto.flow.entities.CollectionGuarantee.deserializeBinaryFromReader = function(m var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.addSignatures(value); break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReferenceBlockId(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSignerIds(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignerIndices(value); + break; default: reader.skipField(); break; @@ -418,6 +447,34 @@ proto.flow.entities.CollectionGuarantee.serializeBinaryToWriter = function(messa f ); } + f = message.getReferenceBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getSignerIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 5, + f + ); + } + f = message.getSignerIndices_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } }; @@ -524,4 +581,191 @@ proto.flow.entities.CollectionGuarantee.prototype.clearSignaturesList = function }; +/** + * optional bytes reference_block_id = 3; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.CollectionGuarantee.prototype.getReferenceBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes reference_block_id = 3; + * This is a type-conversion wrapper around `getReferenceBlockId()` + * @return {string} + */ +proto.flow.entities.CollectionGuarantee.prototype.getReferenceBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReferenceBlockId())); +}; + + +/** + * optional bytes reference_block_id = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReferenceBlockId()` + * @return {!Uint8Array} + */ +proto.flow.entities.CollectionGuarantee.prototype.getReferenceBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReferenceBlockId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.CollectionGuarantee} returns this + */ +proto.flow.entities.CollectionGuarantee.prototype.setReferenceBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes signature = 4; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes signature = 4; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.CollectionGuarantee} returns this + */ +proto.flow.entities.CollectionGuarantee.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * repeated bytes signer_ids = 5; + * @return {!(Array|Array)} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignerIdsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * repeated bytes signer_ids = 5; + * This is a type-conversion wrapper around `getSignerIdsList()` + * @return {!Array} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignerIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSignerIdsList())); +}; + + +/** + * repeated bytes signer_ids = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignerIdsList()` + * @return {!Array} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignerIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSignerIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.entities.CollectionGuarantee} returns this + */ +proto.flow.entities.CollectionGuarantee.prototype.setSignerIdsList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.entities.CollectionGuarantee} returns this + */ +proto.flow.entities.CollectionGuarantee.prototype.addSignerIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.CollectionGuarantee} returns this + */ +proto.flow.entities.CollectionGuarantee.prototype.clearSignerIdsList = function() { + return this.setSignerIdsList([]); +}; + + +/** + * optional bytes signer_indices = 6; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignerIndices = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes signer_indices = 6; + * This is a type-conversion wrapper around `getSignerIndices()` + * @return {string} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignerIndices_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignerIndices())); +}; + + +/** + * optional bytes signer_indices = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignerIndices()` + * @return {!Uint8Array} + */ +proto.flow.entities.CollectionGuarantee.prototype.getSignerIndices_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignerIndices())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.CollectionGuarantee} returns this + */ +proto.flow.entities.CollectionGuarantee.prototype.setSignerIndices = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + goog.object.extend(exports, proto.flow.entities); diff --git a/packages/protobuf/src/generated/flow/entities/event.ts b/packages/protobuf/src/generated/flow/entities/event.ts deleted file mode 100644 index 642ca5cb6..000000000 --- a/packages/protobuf/src/generated/flow/entities/event.ts +++ /dev/null @@ -1,102 +0,0 @@ -import * as pb_1 from "google-protobuf"; -export namespace entities { - export class Event extends pb_1.Message { - constructor(data?: any[] | { - type?: string; - transaction_id?: Uint8Array; - transaction_index?: number; - event_index?: number; - payload?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.type = data.type; - this.transaction_id = data.transaction_id; - this.transaction_index = data.transaction_index; - this.event_index = data.event_index; - this.payload = data.payload; - } - } - get type(): string | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as string | undefined; - } - set type(value: string) { - pb_1.Message.setField(this, 1, value); - } - get transaction_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set transaction_id(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - get transaction_index(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as number | undefined; - } - set transaction_index(value: number) { - pb_1.Message.setField(this, 3, value); - } - get event_index(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 4, undefined) as number | undefined; - } - set event_index(value: number) { - pb_1.Message.setField(this, 4, value); - } - get payload(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 5, undefined) as Uint8Array | undefined; - } - set payload(value: Uint8Array) { - pb_1.Message.setField(this, 5, value); - } - toObject() { - return { - type: this.type, - transaction_id: this.transaction_id, - transaction_index: this.transaction_index, - event_index: this.event_index, - payload: this.payload - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.type !== undefined) - writer.writeString(1, this.type); - if (this.transaction_id !== undefined) - writer.writeBytes(2, this.transaction_id); - if (this.transaction_index !== undefined) - writer.writeUint32(3, this.transaction_index); - if (this.event_index !== undefined) - writer.writeUint32(4, this.event_index); - if (this.payload !== undefined) - writer.writeBytes(5, this.payload); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Event { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Event(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.type = reader.readString(); - break; - case 2: - message.transaction_id = reader.readBytes(); - break; - case 3: - message.transaction_index = reader.readUint32(); - break; - case 4: - message.event_index = reader.readUint32(); - break; - case 5: - message.payload = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } -} diff --git a/packages/protobuf/src/generated/flow/entities/event_pb.js b/packages/protobuf/src/generated/flow/entities/event_pb.js index 339aedd4a..c334adcd6 100644 --- a/packages/protobuf/src/generated/flow/entities/event_pb.js +++ b/packages/protobuf/src/generated/flow/entities/event_pb.js @@ -2,15 +2,24 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); goog.exportSymbol('proto.flow.entities.Event', null, global); /** diff --git a/packages/protobuf/src/generated/flow/entities/execution_result_pb.d.ts b/packages/protobuf/src/generated/flow/entities/execution_result_pb.d.ts new file mode 100644 index 000000000..9c6095ea5 --- /dev/null +++ b/packages/protobuf/src/generated/flow/entities/execution_result_pb.d.ts @@ -0,0 +1,181 @@ +// package: flow.entities +// file: flow/entities/execution_result.proto + +import * as jspb from "google-protobuf"; + +export class ExecutionResult extends jspb.Message { + getPreviousResultId(): Uint8Array | string; + getPreviousResultId_asU8(): Uint8Array; + getPreviousResultId_asB64(): string; + setPreviousResultId(value: Uint8Array | string): void; + + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + clearChunksList(): void; + getChunksList(): Array; + setChunksList(value: Array): void; + addChunks(value?: Chunk, index?: number): Chunk; + + clearServiceEventsList(): void; + getServiceEventsList(): Array; + setServiceEventsList(value: Array): void; + addServiceEvents(value?: ServiceEvent, index?: number): ServiceEvent; + + getExecutionDataId(): Uint8Array | string; + getExecutionDataId_asU8(): Uint8Array; + getExecutionDataId_asB64(): string; + setExecutionDataId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExecutionResult.AsObject; + static toObject(includeInstance: boolean, msg: ExecutionResult): ExecutionResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExecutionResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExecutionResult; + static deserializeBinaryFromReader(message: ExecutionResult, reader: jspb.BinaryReader): ExecutionResult; +} + +export namespace ExecutionResult { + export type AsObject = { + previousResultId: Uint8Array | string, + blockId: Uint8Array | string, + chunksList: Array, + serviceEventsList: Array, + executionDataId: Uint8Array | string, + } +} + +export class Chunk extends jspb.Message { + getCollectionindex(): number; + setCollectionindex(value: number): void; + + getStartState(): Uint8Array | string; + getStartState_asU8(): Uint8Array; + getStartState_asB64(): string; + setStartState(value: Uint8Array | string): void; + + getEventCollection(): Uint8Array | string; + getEventCollection_asU8(): Uint8Array; + getEventCollection_asB64(): string; + setEventCollection(value: Uint8Array | string): void; + + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + getTotalComputationUsed(): number; + setTotalComputationUsed(value: number): void; + + getNumberOfTransactions(): number; + setNumberOfTransactions(value: number): void; + + getIndex(): number; + setIndex(value: number): void; + + getEndState(): Uint8Array | string; + getEndState_asU8(): Uint8Array; + getEndState_asB64(): string; + setEndState(value: Uint8Array | string): void; + + getExecutionDataId(): Uint8Array | string; + getExecutionDataId_asU8(): Uint8Array; + getExecutionDataId_asB64(): string; + setExecutionDataId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Chunk.AsObject; + static toObject(includeInstance: boolean, msg: Chunk): Chunk.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Chunk, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Chunk; + static deserializeBinaryFromReader(message: Chunk, reader: jspb.BinaryReader): Chunk; +} + +export namespace Chunk { + export type AsObject = { + collectionindex: number, + startState: Uint8Array | string, + eventCollection: Uint8Array | string, + blockId: Uint8Array | string, + totalComputationUsed: number, + numberOfTransactions: number, + index: number, + endState: Uint8Array | string, + executionDataId: Uint8Array | string, + } +} + +export class ServiceEvent extends jspb.Message { + getType(): string; + setType(value: string): void; + + getPayload(): Uint8Array | string; + getPayload_asU8(): Uint8Array; + getPayload_asB64(): string; + setPayload(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceEvent.AsObject; + static toObject(includeInstance: boolean, msg: ServiceEvent): ServiceEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceEvent; + static deserializeBinaryFromReader(message: ServiceEvent, reader: jspb.BinaryReader): ServiceEvent; +} + +export namespace ServiceEvent { + export type AsObject = { + type: string, + payload: Uint8Array | string, + } +} + +export class ExecutionReceiptMeta extends jspb.Message { + getExecutorId(): Uint8Array | string; + getExecutorId_asU8(): Uint8Array; + getExecutorId_asB64(): string; + setExecutorId(value: Uint8Array | string): void; + + getResultId(): Uint8Array | string; + getResultId_asU8(): Uint8Array; + getResultId_asB64(): string; + setResultId(value: Uint8Array | string): void; + + clearSpocksList(): void; + getSpocksList(): Array; + getSpocksList_asU8(): Array; + getSpocksList_asB64(): Array; + setSpocksList(value: Array): void; + addSpocks(value: Uint8Array | string, index?: number): Uint8Array | string; + + getExecutorSignature(): Uint8Array | string; + getExecutorSignature_asU8(): Uint8Array; + getExecutorSignature_asB64(): string; + setExecutorSignature(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExecutionReceiptMeta.AsObject; + static toObject(includeInstance: boolean, msg: ExecutionReceiptMeta): ExecutionReceiptMeta.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExecutionReceiptMeta, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExecutionReceiptMeta; + static deserializeBinaryFromReader(message: ExecutionReceiptMeta, reader: jspb.BinaryReader): ExecutionReceiptMeta; +} + +export namespace ExecutionReceiptMeta { + export type AsObject = { + executorId: Uint8Array | string, + resultId: Uint8Array | string, + spocksList: Array, + executorSignature: Uint8Array | string, + } +} + diff --git a/packages/protobuf/src/generated/flow/entities/execution_result_pb.js b/packages/protobuf/src/generated/flow/entities/execution_result_pb.js new file mode 100644 index 000000000..f3428750f --- /dev/null +++ b/packages/protobuf/src/generated/flow/entities/execution_result_pb.js @@ -0,0 +1,1503 @@ +// source: flow/entities/execution_result.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +goog.exportSymbol('proto.flow.entities.Chunk', null, global); +goog.exportSymbol('proto.flow.entities.ExecutionReceiptMeta', null, global); +goog.exportSymbol('proto.flow.entities.ExecutionResult', null, global); +goog.exportSymbol('proto.flow.entities.ServiceEvent', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.entities.ExecutionResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.ExecutionResult.repeatedFields_, null); +}; +goog.inherits(proto.flow.entities.ExecutionResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.entities.ExecutionResult.displayName = 'proto.flow.entities.ExecutionResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.entities.Chunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.entities.Chunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.entities.Chunk.displayName = 'proto.flow.entities.Chunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.entities.ServiceEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.entities.ServiceEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.entities.ServiceEvent.displayName = 'proto.flow.entities.ServiceEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.entities.ExecutionReceiptMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.ExecutionReceiptMeta.repeatedFields_, null); +}; +goog.inherits(proto.flow.entities.ExecutionReceiptMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.entities.ExecutionReceiptMeta.displayName = 'proto.flow.entities.ExecutionReceiptMeta'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.entities.ExecutionResult.repeatedFields_ = [3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.entities.ExecutionResult.prototype.toObject = function(opt_includeInstance) { + return proto.flow.entities.ExecutionResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.entities.ExecutionResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.ExecutionResult.toObject = function(includeInstance, msg) { + var f, obj = { + previousResultId: msg.getPreviousResultId_asB64(), + blockId: msg.getBlockId_asB64(), + chunksList: jspb.Message.toObjectList(msg.getChunksList(), + proto.flow.entities.Chunk.toObject, includeInstance), + serviceEventsList: jspb.Message.toObjectList(msg.getServiceEventsList(), + proto.flow.entities.ServiceEvent.toObject, includeInstance), + executionDataId: msg.getExecutionDataId_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.entities.ExecutionResult} + */ +proto.flow.entities.ExecutionResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.entities.ExecutionResult; + return proto.flow.entities.ExecutionResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.entities.ExecutionResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.entities.ExecutionResult} + */ +proto.flow.entities.ExecutionResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPreviousResultId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); + break; + case 3: + var value = new proto.flow.entities.Chunk; + reader.readMessage(value,proto.flow.entities.Chunk.deserializeBinaryFromReader); + msg.addChunks(value); + break; + case 4: + var value = new proto.flow.entities.ServiceEvent; + reader.readMessage(value,proto.flow.entities.ServiceEvent.deserializeBinaryFromReader); + msg.addServiceEvents(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExecutionDataId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.entities.ExecutionResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.entities.ExecutionResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.entities.ExecutionResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.ExecutionResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPreviousResultId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getChunksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.flow.entities.Chunk.serializeBinaryToWriter + ); + } + f = message.getServiceEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.flow.entities.ServiceEvent.serializeBinaryToWriter + ); + } + f = message.getExecutionDataId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional bytes previous_result_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.ExecutionResult.prototype.getPreviousResultId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes previous_result_id = 1; + * This is a type-conversion wrapper around `getPreviousResultId()` + * @return {string} + */ +proto.flow.entities.ExecutionResult.prototype.getPreviousResultId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreviousResultId())); +}; + + +/** + * optional bytes previous_result_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPreviousResultId()` + * @return {!Uint8Array} + */ +proto.flow.entities.ExecutionResult.prototype.getPreviousResultId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreviousResultId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.ExecutionResult} returns this + */ +proto.flow.entities.ExecutionResult.prototype.setPreviousResultId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes block_id = 2; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.ExecutionResult.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes block_id = 2; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} + */ +proto.flow.entities.ExecutionResult.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); +}; + + +/** + * optional bytes block_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} + */ +proto.flow.entities.ExecutionResult.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.ExecutionResult} returns this + */ +proto.flow.entities.ExecutionResult.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated Chunk chunks = 3; + * @return {!Array} + */ +proto.flow.entities.ExecutionResult.prototype.getChunksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.Chunk, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.flow.entities.ExecutionResult} returns this +*/ +proto.flow.entities.ExecutionResult.prototype.setChunksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.flow.entities.Chunk=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.Chunk} + */ +proto.flow.entities.ExecutionResult.prototype.addChunks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Chunk, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.ExecutionResult} returns this + */ +proto.flow.entities.ExecutionResult.prototype.clearChunksList = function() { + return this.setChunksList([]); +}; + + +/** + * repeated ServiceEvent service_events = 4; + * @return {!Array} + */ +proto.flow.entities.ExecutionResult.prototype.getServiceEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.ServiceEvent, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.flow.entities.ExecutionResult} returns this +*/ +proto.flow.entities.ExecutionResult.prototype.setServiceEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.flow.entities.ServiceEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.ServiceEvent} + */ +proto.flow.entities.ExecutionResult.prototype.addServiceEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.flow.entities.ServiceEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.ExecutionResult} returns this + */ +proto.flow.entities.ExecutionResult.prototype.clearServiceEventsList = function() { + return this.setServiceEventsList([]); +}; + + +/** + * optional bytes execution_data_id = 5; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.ExecutionResult.prototype.getExecutionDataId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes execution_data_id = 5; + * This is a type-conversion wrapper around `getExecutionDataId()` + * @return {string} + */ +proto.flow.entities.ExecutionResult.prototype.getExecutionDataId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExecutionDataId())); +}; + + +/** + * optional bytes execution_data_id = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExecutionDataId()` + * @return {!Uint8Array} + */ +proto.flow.entities.ExecutionResult.prototype.getExecutionDataId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExecutionDataId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.ExecutionResult} returns this + */ +proto.flow.entities.ExecutionResult.prototype.setExecutionDataId = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.entities.Chunk.prototype.toObject = function(opt_includeInstance) { + return proto.flow.entities.Chunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.entities.Chunk} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.Chunk.toObject = function(includeInstance, msg) { + var f, obj = { + collectionindex: jspb.Message.getFieldWithDefault(msg, 1, 0), + startState: msg.getStartState_asB64(), + eventCollection: msg.getEventCollection_asB64(), + blockId: msg.getBlockId_asB64(), + totalComputationUsed: jspb.Message.getFieldWithDefault(msg, 5, 0), + numberOfTransactions: jspb.Message.getFieldWithDefault(msg, 6, 0), + index: jspb.Message.getFieldWithDefault(msg, 7, 0), + endState: msg.getEndState_asB64(), + executionDataId: msg.getExecutionDataId_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.entities.Chunk} + */ +proto.flow.entities.Chunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.entities.Chunk; + return proto.flow.entities.Chunk.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.entities.Chunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.entities.Chunk} + */ +proto.flow.entities.Chunk.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCollectionindex(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartState(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEventCollection(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalComputationUsed(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumberOfTransactions(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndex(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEndState(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExecutionDataId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.entities.Chunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.entities.Chunk.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.entities.Chunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.Chunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCollectionindex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getStartState_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getEventCollection_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getTotalComputationUsed(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getNumberOfTransactions(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getEndState_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getExecutionDataId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } +}; + + +/** + * optional uint32 CollectionIndex = 1; + * @return {number} + */ +proto.flow.entities.Chunk.prototype.getCollectionindex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setCollectionindex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes start_state = 2; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.Chunk.prototype.getStartState = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes start_state = 2; + * This is a type-conversion wrapper around `getStartState()` + * @return {string} + */ +proto.flow.entities.Chunk.prototype.getStartState_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartState())); +}; + + +/** + * optional bytes start_state = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartState()` + * @return {!Uint8Array} + */ +proto.flow.entities.Chunk.prototype.getStartState_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartState())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setStartState = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes event_collection = 3; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.Chunk.prototype.getEventCollection = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes event_collection = 3; + * This is a type-conversion wrapper around `getEventCollection()` + * @return {string} + */ +proto.flow.entities.Chunk.prototype.getEventCollection_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEventCollection())); +}; + + +/** + * optional bytes event_collection = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEventCollection()` + * @return {!Uint8Array} + */ +proto.flow.entities.Chunk.prototype.getEventCollection_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEventCollection())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setEventCollection = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes block_id = 4; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.Chunk.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes block_id = 4; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} + */ +proto.flow.entities.Chunk.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); +}; + + +/** + * optional bytes block_id = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} + */ +proto.flow.entities.Chunk.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional uint64 total_computation_used = 5; + * @return {number} + */ +proto.flow.entities.Chunk.prototype.getTotalComputationUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setTotalComputationUsed = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint32 number_of_transactions = 6; + * @return {number} + */ +proto.flow.entities.Chunk.prototype.getNumberOfTransactions = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setNumberOfTransactions = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 index = 7; + * @return {number} + */ +proto.flow.entities.Chunk.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional bytes end_state = 8; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.Chunk.prototype.getEndState = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes end_state = 8; + * This is a type-conversion wrapper around `getEndState()` + * @return {string} + */ +proto.flow.entities.Chunk.prototype.getEndState_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEndState())); +}; + + +/** + * optional bytes end_state = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEndState()` + * @return {!Uint8Array} + */ +proto.flow.entities.Chunk.prototype.getEndState_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEndState())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setEndState = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional bytes execution_data_id = 9; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.Chunk.prototype.getExecutionDataId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes execution_data_id = 9; + * This is a type-conversion wrapper around `getExecutionDataId()` + * @return {string} + */ +proto.flow.entities.Chunk.prototype.getExecutionDataId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExecutionDataId())); +}; + + +/** + * optional bytes execution_data_id = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExecutionDataId()` + * @return {!Uint8Array} + */ +proto.flow.entities.Chunk.prototype.getExecutionDataId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExecutionDataId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.Chunk} returns this + */ +proto.flow.entities.Chunk.prototype.setExecutionDataId = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.entities.ServiceEvent.prototype.toObject = function(opt_includeInstance) { + return proto.flow.entities.ServiceEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.entities.ServiceEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.ServiceEvent.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + payload: msg.getPayload_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.entities.ServiceEvent} + */ +proto.flow.entities.ServiceEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.entities.ServiceEvent; + return proto.flow.entities.ServiceEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.entities.ServiceEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.entities.ServiceEvent} + */ +proto.flow.entities.ServiceEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPayload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.entities.ServiceEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.entities.ServiceEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.entities.ServiceEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.ServiceEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPayload_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.flow.entities.ServiceEvent.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.flow.entities.ServiceEvent} returns this + */ +proto.flow.entities.ServiceEvent.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes payload = 2; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.ServiceEvent.prototype.getPayload = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payload = 2; + * This is a type-conversion wrapper around `getPayload()` + * @return {string} + */ +proto.flow.entities.ServiceEvent.prototype.getPayload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPayload())); +}; + + +/** + * optional bytes payload = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPayload()` + * @return {!Uint8Array} + */ +proto.flow.entities.ServiceEvent.prototype.getPayload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPayload())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.ServiceEvent} returns this + */ +proto.flow.entities.ServiceEvent.prototype.setPayload = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.entities.ExecutionReceiptMeta.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.toObject = function(opt_includeInstance) { + return proto.flow.entities.ExecutionReceiptMeta.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.entities.ExecutionReceiptMeta} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.ExecutionReceiptMeta.toObject = function(includeInstance, msg) { + var f, obj = { + executorId: msg.getExecutorId_asB64(), + resultId: msg.getResultId_asB64(), + spocksList: msg.getSpocksList_asB64(), + executorSignature: msg.getExecutorSignature_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.entities.ExecutionReceiptMeta} + */ +proto.flow.entities.ExecutionReceiptMeta.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.entities.ExecutionReceiptMeta; + return proto.flow.entities.ExecutionReceiptMeta.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.entities.ExecutionReceiptMeta} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.entities.ExecutionReceiptMeta} + */ +proto.flow.entities.ExecutionReceiptMeta.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExecutorId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setResultId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSpocks(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExecutorSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.entities.ExecutionReceiptMeta.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.entities.ExecutionReceiptMeta} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.entities.ExecutionReceiptMeta.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExecutorId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getResultId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSpocksList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } + f = message.getExecutorSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes executor_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes executor_id = 1; + * This is a type-conversion wrapper around `getExecutorId()` + * @return {string} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExecutorId())); +}; + + +/** + * optional bytes executor_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExecutorId()` + * @return {!Uint8Array} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExecutorId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.setExecutorId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes result_id = 2; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getResultId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes result_id = 2; + * This is a type-conversion wrapper around `getResultId()` + * @return {string} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getResultId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getResultId())); +}; + + +/** + * optional bytes result_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getResultId()` + * @return {!Uint8Array} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getResultId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getResultId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.setResultId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated bytes spocks = 3; + * @return {!(Array|Array)} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getSpocksList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes spocks = 3; + * This is a type-conversion wrapper around `getSpocksList()` + * @return {!Array} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getSpocksList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSpocksList())); +}; + + +/** + * repeated bytes spocks = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSpocksList()` + * @return {!Array} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getSpocksList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSpocksList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.setSpocksList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.addSpocks = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.clearSpocksList = function() { + return this.setSpocksList([]); +}; + + +/** + * optional bytes executor_signature = 4; + * @return {!(string|Uint8Array)} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes executor_signature = 4; + * This is a type-conversion wrapper around `getExecutorSignature()` + * @return {string} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExecutorSignature())); +}; + + +/** + * optional bytes executor_signature = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExecutorSignature()` + * @return {!Uint8Array} + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExecutorSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this + */ +proto.flow.entities.ExecutionReceiptMeta.prototype.setExecutorSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +goog.object.extend(exports, proto.flow.entities); diff --git a/packages/protobuf/src/generated/flow/entities/execution_result_pb_service.d.ts b/packages/protobuf/src/generated/flow/entities/execution_result_pb_service.d.ts new file mode 100644 index 000000000..8b684ec07 --- /dev/null +++ b/packages/protobuf/src/generated/flow/entities/execution_result_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: flow.entities +// file: flow/entities/execution_result.proto + diff --git a/packages/protobuf/src/generated/flow/entities/execution_result_pb_service.js b/packages/protobuf/src/generated/flow/entities/execution_result_pb_service.js new file mode 100644 index 000000000..8b684ec07 --- /dev/null +++ b/packages/protobuf/src/generated/flow/entities/execution_result_pb_service.js @@ -0,0 +1,3 @@ +// package: flow.entities +// file: flow/entities/execution_result.proto + diff --git a/packages/protobuf/src/generated/flow/entities/transaction.ts b/packages/protobuf/src/generated/flow/entities/transaction.ts deleted file mode 100644 index c35fc6803..000000000 --- a/packages/protobuf/src/generated/flow/entities/transaction.ts +++ /dev/null @@ -1,295 +0,0 @@ -import * as pb_1 from "google-protobuf"; -export namespace entities { - export class Transaction extends pb_1.Message { - constructor(data?: any[] | { - script?: Uint8Array; - reference_block_id?: Uint8Array; - gas_limit?: number; - proposal_key?: Transaction.ProposalKey; - payer?: Uint8Array; - authorizers?: Uint8Array[]; - payload_signatures?: Transaction.Signature[]; - envelope_signatures?: Transaction.Signature[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [6, 7, 8], null); - if (!Array.isArray(data) && typeof data == "object") { - this.script = data.script; - this.reference_block_id = data.reference_block_id; - this.gas_limit = data.gas_limit; - this.proposal_key = data.proposal_key; - this.payer = data.payer; - this.authorizers = data.authorizers; - this.payload_signatures = data.payload_signatures; - this.envelope_signatures = data.envelope_signatures; - } - } - get script(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set script(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get reference_block_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set reference_block_id(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - get gas_limit(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as number | undefined; - } - set gas_limit(value: number) { - pb_1.Message.setField(this, 3, value); - } - get proposal_key(): Transaction.ProposalKey | undefined { - return pb_1.Message.getWrapperField(this, Transaction.ProposalKey, 4) as Transaction.ProposalKey | undefined; - } - set proposal_key(value: Transaction.ProposalKey) { - pb_1.Message.setWrapperField(this, 4, value); - } - get payer(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 5, undefined) as Uint8Array | undefined; - } - set payer(value: Uint8Array) { - pb_1.Message.setField(this, 5, value); - } - get authorizers(): Uint8Array[] { - return pb_1.Message.getField(this, 6) as Uint8Array[]; - } - set authorizers(value: Uint8Array[]) { - pb_1.Message.setField(this, 6, value); - } - get payload_signatures(): Transaction.Signature[] { - return pb_1.Message.getRepeatedWrapperField(this, Transaction.Signature, 7) as Transaction.Signature[]; - } - set payload_signatures(value: Transaction.Signature[]) { - pb_1.Message.setRepeatedWrapperField(this, 7, value); - } - get envelope_signatures(): Transaction.Signature[] { - return pb_1.Message.getRepeatedWrapperField(this, Transaction.Signature, 8) as Transaction.Signature[]; - } - set envelope_signatures(value: Transaction.Signature[]) { - pb_1.Message.setRepeatedWrapperField(this, 8, value); - } - toObject() { - return { - script: this.script, - reference_block_id: this.reference_block_id, - gas_limit: this.gas_limit, - proposal_key: this.proposal_key && this.proposal_key.toObject(), - payer: this.payer, - authorizers: this.authorizers, - payload_signatures: this.payload_signatures.map((item: Transaction.Signature) => item.toObject()), - envelope_signatures: this.envelope_signatures.map((item: Transaction.Signature) => item.toObject()) - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.script !== undefined) - writer.writeBytes(1, this.script); - if (this.reference_block_id !== undefined) - writer.writeBytes(2, this.reference_block_id); - if (this.gas_limit !== undefined) - writer.writeUint64(3, this.gas_limit); - if (this.proposal_key !== undefined) - writer.writeMessage(4, this.proposal_key, () => this.proposal_key.serialize(writer)); - if (this.payer !== undefined) - writer.writeBytes(5, this.payer); - if (this.authorizers !== undefined) - writer.writeRepeatedBytes(6, this.authorizers); - if (this.payload_signatures !== undefined) - writer.writeRepeatedMessage(7, this.payload_signatures, (item: Transaction.Signature) => item.serialize(writer)); - if (this.envelope_signatures !== undefined) - writer.writeRepeatedMessage(8, this.envelope_signatures, (item: Transaction.Signature) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Transaction { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Transaction(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.script = reader.readBytes(); - break; - case 2: - message.reference_block_id = reader.readBytes(); - break; - case 3: - message.gas_limit = reader.readUint64(); - break; - case 4: - reader.readMessage(message.proposal_key, () => message.proposal_key = Transaction.ProposalKey.deserialize(reader)); - break; - case 5: - message.payer = reader.readBytes(); - break; - case 6: - pb_1.Message.addToRepeatedField(message, 6, reader.readBytes()); - break; - case 7: - reader.readMessage(message.payload_signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 7, Transaction.Signature.deserialize(reader), Transaction.Signature)); - break; - case 8: - reader.readMessage(message.envelope_signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 8, Transaction.Signature.deserialize(reader), Transaction.Signature)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export namespace Transaction { - export class ProposalKey extends pb_1.Message { - constructor(data?: any[] | { - address?: Uint8Array; - key_id?: number; - sequence_number?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.address = data.address; - this.key_id = data.key_id; - this.sequence_number = data.sequence_number; - } - } - get address(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set address(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get key_id(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as number | undefined; - } - set key_id(value: number) { - pb_1.Message.setField(this, 2, value); - } - get sequence_number(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as number | undefined; - } - set sequence_number(value: number) { - pb_1.Message.setField(this, 3, value); - } - toObject() { - return { - address: this.address, - key_id: this.key_id, - sequence_number: this.sequence_number - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.address !== undefined) - writer.writeBytes(1, this.address); - if (this.key_id !== undefined) - writer.writeUint32(2, this.key_id); - if (this.sequence_number !== undefined) - writer.writeUint64(3, this.sequence_number); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProposalKey { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new ProposalKey(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.address = reader.readBytes(); - break; - case 2: - message.key_id = reader.readUint32(); - break; - case 3: - message.sequence_number = reader.readUint64(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class Signature extends pb_1.Message { - constructor(data?: any[] | { - address?: Uint8Array; - key_id?: number; - signature?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.address = data.address; - this.key_id = data.key_id; - this.signature = data.signature; - } - } - get address(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set address(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get key_id(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as number | undefined; - } - set key_id(value: number) { - pb_1.Message.setField(this, 2, value); - } - get signature(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 3, undefined) as Uint8Array | undefined; - } - set signature(value: Uint8Array) { - pb_1.Message.setField(this, 3, value); - } - toObject() { - return { - address: this.address, - key_id: this.key_id, - signature: this.signature - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.address !== undefined) - writer.writeBytes(1, this.address); - if (this.key_id !== undefined) - writer.writeUint32(2, this.key_id); - if (this.signature !== undefined) - writer.writeBytes(3, this.signature); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signature { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Signature(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.address = reader.readBytes(); - break; - case 2: - message.key_id = reader.readUint32(); - break; - case 3: - message.signature = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - } - export enum TransactionStatus { - UNKNOWN = 0, - PENDING = 1, - FINALIZED = 2, - EXECUTED = 3, - SEALED = 4 - } -} diff --git a/packages/protobuf/src/generated/flow/entities/transaction_pb.d.ts b/packages/protobuf/src/generated/flow/entities/transaction_pb.d.ts index 05eab32dc..b05bbbd9a 100644 --- a/packages/protobuf/src/generated/flow/entities/transaction_pb.d.ts +++ b/packages/protobuf/src/generated/flow/entities/transaction_pb.d.ts @@ -2,6 +2,7 @@ // file: flow/entities/transaction.proto import * as jspb from "google-protobuf"; +import * as flow_entities_event_pb from "../../flow/entities/event_pb"; export class Transaction extends jspb.Message { getScript(): Uint8Array | string; diff --git a/packages/protobuf/src/generated/flow/entities/transaction_pb.js b/packages/protobuf/src/generated/flow/entities/transaction_pb.js index 725d34255..790237d16 100644 --- a/packages/protobuf/src/generated/flow/entities/transaction_pb.js +++ b/packages/protobuf/src/generated/flow/entities/transaction_pb.js @@ -2,16 +2,27 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); - +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var flow_entities_event_pb = require('../../flow/entities/event_pb.js'); +goog.object.extend(proto, flow_entities_event_pb); goog.exportSymbol('proto.flow.entities.Transaction', null, global); goog.exportSymbol('proto.flow.entities.Transaction.ProposalKey', null, global); goog.exportSymbol('proto.flow.entities.Transaction.Signature', null, global); diff --git a/packages/protobuf/src/generated/flow/execution/execution.ts b/packages/protobuf/src/generated/flow/execution/execution.ts deleted file mode 100644 index a04a0f61b..000000000 --- a/packages/protobuf/src/generated/flow/execution/execution.ts +++ /dev/null @@ -1,548 +0,0 @@ -import * as pb_1 from "google-protobuf"; -import * as grpc_1 from "grpc"; -export namespace execution { - export class PingRequest extends pb_1.Message { - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { } - } - toObject() { - return {}; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PingRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new PingRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - } - export class PingResponse extends pb_1.Message { - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { } - } - toObject() { - return {}; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PingResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new PingResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - } - export class GetAccountAtBlockIDRequest extends pb_1.Message { - constructor(data?: any[] | { - block_id?: Uint8Array; - address?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block_id = data.block_id; - this.address = data.address; - } - } - get block_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set block_id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get address(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set address(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - block_id: this.block_id, - address: this.address - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block_id !== undefined) - writer.writeBytes(1, this.block_id); - if (this.address !== undefined) - writer.writeBytes(2, this.address); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAccountAtBlockIDRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetAccountAtBlockIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.block_id = reader.readBytes(); - break; - case 2: - message.address = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetAccountAtBlockIDResponse extends pb_1.Message { - constructor(data?: any[] | { - account?: entities.Account; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.account = data.account; - } - } - get account(): entities.Account | undefined { - return pb_1.Message.getWrapperField(this, entities.Account, 1) as entities.Account | undefined; - } - set account(value: entities.Account) { - pb_1.Message.setWrapperField(this, 1, value); - } - toObject() { - return { - account: this.account && this.account.toObject() - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.account !== undefined) - writer.writeMessage(1, this.account, () => this.account.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetAccountAtBlockIDResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetAccountAtBlockIDResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.account, () => message.account = entities.Account.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class ExecuteScriptAtBlockIDRequest extends pb_1.Message { - constructor(data?: any[] | { - block_id?: Uint8Array; - script?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block_id = data.block_id; - this.script = data.script; - } - } - get block_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set block_id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get script(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set script(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - block_id: this.block_id, - script: this.script - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block_id !== undefined) - writer.writeBytes(1, this.block_id); - if (this.script !== undefined) - writer.writeBytes(2, this.script); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExecuteScriptAtBlockIDRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new ExecuteScriptAtBlockIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.block_id = reader.readBytes(); - break; - case 2: - message.script = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class ExecuteScriptResponse extends pb_1.Message { - constructor(data?: any[] | { - value?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.value = data.value; - } - } - get value(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set value(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - toObject() { - return { - value: this.value - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.value !== undefined) - writer.writeBytes(1, this.value); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExecuteScriptResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new ExecuteScriptResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.value = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class EventsResponse extends pb_1.Message { - constructor(data?: any[] | { - results?: EventsResponse.Result[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [1], null); - if (!Array.isArray(data) && typeof data == "object") { - this.results = data.results; - } - } - get results(): EventsResponse.Result[] { - return pb_1.Message.getRepeatedWrapperField(this, EventsResponse.Result, 1) as EventsResponse.Result[]; - } - set results(value: EventsResponse.Result[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - toObject() { - return { - results: this.results.map((item: EventsResponse.Result) => item.toObject()) - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.results !== undefined) - writer.writeRepeatedMessage(1, this.results, (item: EventsResponse.Result) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EventsResponse { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new EventsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.results, () => pb_1.Message.addToRepeatedWrapperField(message, 1, EventsResponse.Result.deserialize(reader), EventsResponse.Result)); - break; - default: reader.skipField(); - } - } - return message; - } - } - export namespace EventsResponse { - export class Result extends pb_1.Message { - constructor(data?: any[] | { - block_id?: Uint8Array; - block_height?: number; - events?: entities.Event[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [3], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block_id = data.block_id; - this.block_height = data.block_height; - this.events = data.events; - } - } - get block_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set block_id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get block_height(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as number | undefined; - } - set block_height(value: number) { - pb_1.Message.setField(this, 2, value); - } - get events(): entities.Event[] { - return pb_1.Message.getRepeatedWrapperField(this, entities.Event, 3) as entities.Event[]; - } - set events(value: entities.Event[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - toObject() { - return { - block_id: this.block_id, - block_height: this.block_height, - events: this.events.map((item: entities.Event) => item.toObject()) - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block_id !== undefined) - writer.writeBytes(1, this.block_id); - if (this.block_height !== undefined) - writer.writeUint64(2, this.block_height); - if (this.events !== undefined) - writer.writeRepeatedMessage(3, this.events, (item: entities.Event) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Result { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Result(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.block_id = reader.readBytes(); - break; - case 2: - message.block_height = reader.readUint64(); - break; - case 3: - reader.readMessage(message.events, () => pb_1.Message.addToRepeatedWrapperField(message, 3, entities.Event.deserialize(reader), entities.Event)); - break; - default: reader.skipField(); - } - } - return message; - } - } - } - export class GetEventsForBlockIDsRequest extends pb_1.Message { - constructor(data?: any[] | { - type?: string; - block_ids?: Uint8Array[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [2], null); - if (!Array.isArray(data) && typeof data == "object") { - this.type = data.type; - this.block_ids = data.block_ids; - } - } - get type(): string | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as string | undefined; - } - set type(value: string) { - pb_1.Message.setField(this, 1, value); - } - get block_ids(): Uint8Array[] { - return pb_1.Message.getField(this, 2) as Uint8Array[]; - } - set block_ids(value: Uint8Array[]) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - type: this.type, - block_ids: this.block_ids - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.type !== undefined) - writer.writeString(1, this.type); - if (this.block_ids !== undefined) - writer.writeRepeatedBytes(2, this.block_ids); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetEventsForBlockIDsRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetEventsForBlockIDsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.type = reader.readString(); - break; - case 2: - pb_1.Message.addToRepeatedField(message, 2, reader.readBytes()); - break; - default: reader.skipField(); - } - } - return message; - } - } - export class GetEventsForBlockIDTransactionIDRequest extends pb_1.Message { - constructor(data?: any[] | { - block_id?: Uint8Array; - transaction_id?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.block_id = data.block_id; - this.transaction_id = data.transaction_id; - } - } - get block_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as Uint8Array | undefined; - } - set block_id(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get transaction_id(): Uint8Array | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as Uint8Array | undefined; - } - set transaction_id(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - block_id: this.block_id, - transaction_id: this.transaction_id - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.block_id !== undefined) - writer.writeBytes(1, this.block_id); - if (this.transaction_id !== undefined) - writer.writeBytes(2, this.transaction_id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetEventsForBlockIDTransactionIDRequest { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new GetEventsForBlockIDTransactionIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.block_id = reader.readBytes(); - break; - case 2: - message.transaction_id = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - } - export var ExecutionAPI = { - Ping: { - path: "/execution.ExecutionAPI/Ping", - requestStream: false, - responseStream: false, - requestType: execution.PingRequest, - responseType: execution.PingResponse, - requestSerialize: (message: PingRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => PingRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: PingResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => PingResponse.deserialize(new Uint8Array(bytes)) - }, - GetAccountAtBlockID: { - path: "/execution.ExecutionAPI/GetAccountAtBlockID", - requestStream: false, - responseStream: false, - requestType: execution.GetAccountAtBlockIDRequest, - responseType: execution.GetAccountAtBlockIDResponse, - requestSerialize: (message: GetAccountAtBlockIDRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetAccountAtBlockIDRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: GetAccountAtBlockIDResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => GetAccountAtBlockIDResponse.deserialize(new Uint8Array(bytes)) - }, - ExecuteScriptAtBlockID: { - path: "/execution.ExecutionAPI/ExecuteScriptAtBlockID", - requestStream: false, - responseStream: false, - requestType: execution.ExecuteScriptAtBlockIDRequest, - responseType: execution.ExecuteScriptResponse, - requestSerialize: (message: ExecuteScriptAtBlockIDRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => ExecuteScriptAtBlockIDRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: ExecuteScriptResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => ExecuteScriptResponse.deserialize(new Uint8Array(bytes)) - }, - GetEventsForBlockIDs: { - path: "/execution.ExecutionAPI/GetEventsForBlockIDs", - requestStream: false, - responseStream: false, - requestType: execution.GetEventsForBlockIDsRequest, - responseType: execution.EventsResponse, - requestSerialize: (message: GetEventsForBlockIDsRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetEventsForBlockIDsRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: EventsResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => EventsResponse.deserialize(new Uint8Array(bytes)) - }, - GetEventsForBlockIDTransactionID: { - path: "/execution.ExecutionAPI/GetEventsForBlockIDTransactionID", - requestStream: false, - responseStream: false, - requestType: execution.GetEventsForBlockIDTransactionIDRequest, - responseType: execution.EventsResponse, - requestSerialize: (message: GetEventsForBlockIDTransactionIDRequest) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetEventsForBlockIDTransactionIDRequest.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: EventsResponse) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => EventsResponse.deserialize(new Uint8Array(bytes)) - } - }; - export class ExecutionAPIClient extends grpc_1.makeGenericClientConstructor(ExecutionAPI, "ExecutionAPI", {}) { - constructor(address: string, credentials: grpc_1.ChannelCredentials) { - super(address, credentials) - } - } -} diff --git a/packages/protobuf/src/generated/flow/execution/execution_pb.d.ts b/packages/protobuf/src/generated/flow/execution/execution_pb.d.ts index 33bfc01ba..e84b5b812 100644 --- a/packages/protobuf/src/generated/flow/execution/execution_pb.d.ts +++ b/packages/protobuf/src/generated/flow/execution/execution_pb.d.ts @@ -3,7 +3,9 @@ import * as jspb from "google-protobuf"; import * as flow_entities_account_pb from "../../flow/entities/account_pb"; +import * as flow_entities_block_header_pb from "../../flow/entities/block_header_pb"; import * as flow_entities_event_pb from "../../flow/entities/event_pb"; +import * as flow_entities_transaction_pb from "../../flow/entities/transaction_pb"; export class PingRequest extends jspb.Message { serializeBinary(): Uint8Array; @@ -255,6 +257,32 @@ export namespace GetTransactionResultRequest { } } +export class GetTransactionByIndexRequest extends jspb.Message { + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + getIndex(): number; + setIndex(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTransactionByIndexRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTransactionByIndexRequest): GetTransactionByIndexRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTransactionByIndexRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTransactionByIndexRequest; + static deserializeBinaryFromReader(message: GetTransactionByIndexRequest, reader: jspb.BinaryReader): GetTransactionByIndexRequest; +} + +export namespace GetTransactionByIndexRequest { + export type AsObject = { + blockId: Uint8Array | string, + index: number, + } +} + export class GetTransactionResultResponse extends jspb.Message { getStatusCode(): number; setStatusCode(value: number): void; @@ -285,3 +313,173 @@ export namespace GetTransactionResultResponse { } } +export class GetTransactionsByBlockIDRequest extends jspb.Message { + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTransactionsByBlockIDRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTransactionsByBlockIDRequest): GetTransactionsByBlockIDRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTransactionsByBlockIDRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTransactionsByBlockIDRequest; + static deserializeBinaryFromReader(message: GetTransactionsByBlockIDRequest, reader: jspb.BinaryReader): GetTransactionsByBlockIDRequest; +} + +export namespace GetTransactionsByBlockIDRequest { + export type AsObject = { + blockId: Uint8Array | string, + } +} + +export class GetTransactionResultsResponse extends jspb.Message { + clearTransactionResultsList(): void; + getTransactionResultsList(): Array; + setTransactionResultsList(value: Array): void; + addTransactionResults(value?: GetTransactionResultResponse, index?: number): GetTransactionResultResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTransactionResultsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetTransactionResultsResponse): GetTransactionResultsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTransactionResultsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTransactionResultsResponse; + static deserializeBinaryFromReader(message: GetTransactionResultsResponse, reader: jspb.BinaryReader): GetTransactionResultsResponse; +} + +export namespace GetTransactionResultsResponse { + export type AsObject = { + transactionResultsList: Array, + } +} + +export class GetRegisterAtBlockIDRequest extends jspb.Message { + getBlockId(): Uint8Array | string; + getBlockId_asU8(): Uint8Array; + getBlockId_asB64(): string; + setBlockId(value: Uint8Array | string): void; + + getRegisterOwner(): Uint8Array | string; + getRegisterOwner_asU8(): Uint8Array; + getRegisterOwner_asB64(): string; + setRegisterOwner(value: Uint8Array | string): void; + + getRegisterController(): Uint8Array | string; + getRegisterController_asU8(): Uint8Array; + getRegisterController_asB64(): string; + setRegisterController(value: Uint8Array | string): void; + + getRegisterKey(): Uint8Array | string; + getRegisterKey_asU8(): Uint8Array; + getRegisterKey_asB64(): string; + setRegisterKey(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRegisterAtBlockIDRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRegisterAtBlockIDRequest): GetRegisterAtBlockIDRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRegisterAtBlockIDRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRegisterAtBlockIDRequest; + static deserializeBinaryFromReader(message: GetRegisterAtBlockIDRequest, reader: jspb.BinaryReader): GetRegisterAtBlockIDRequest; +} + +export namespace GetRegisterAtBlockIDRequest { + export type AsObject = { + blockId: Uint8Array | string, + registerOwner: Uint8Array | string, + registerController: Uint8Array | string, + registerKey: Uint8Array | string, + } +} + +export class GetRegisterAtBlockIDResponse extends jspb.Message { + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRegisterAtBlockIDResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRegisterAtBlockIDResponse): GetRegisterAtBlockIDResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRegisterAtBlockIDResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRegisterAtBlockIDResponse; + static deserializeBinaryFromReader(message: GetRegisterAtBlockIDResponse, reader: jspb.BinaryReader): GetRegisterAtBlockIDResponse; +} + +export namespace GetRegisterAtBlockIDResponse { + export type AsObject = { + value: Uint8Array | string, + } +} + +export class GetLatestBlockHeaderRequest extends jspb.Message { + getIsSealed(): boolean; + setIsSealed(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLatestBlockHeaderRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetLatestBlockHeaderRequest): GetLatestBlockHeaderRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetLatestBlockHeaderRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLatestBlockHeaderRequest; + static deserializeBinaryFromReader(message: GetLatestBlockHeaderRequest, reader: jspb.BinaryReader): GetLatestBlockHeaderRequest; +} + +export namespace GetLatestBlockHeaderRequest { + export type AsObject = { + isSealed: boolean, + } +} + +export class GetBlockHeaderByIDRequest extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBlockHeaderByIDRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetBlockHeaderByIDRequest): GetBlockHeaderByIDRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetBlockHeaderByIDRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBlockHeaderByIDRequest; + static deserializeBinaryFromReader(message: GetBlockHeaderByIDRequest, reader: jspb.BinaryReader): GetBlockHeaderByIDRequest; +} + +export namespace GetBlockHeaderByIDRequest { + export type AsObject = { + id: Uint8Array | string, + } +} + +export class BlockHeaderResponse extends jspb.Message { + hasBlock(): boolean; + clearBlock(): void; + getBlock(): flow_entities_block_header_pb.BlockHeader | undefined; + setBlock(value?: flow_entities_block_header_pb.BlockHeader): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockHeaderResponse.AsObject; + static toObject(includeInstance: boolean, msg: BlockHeaderResponse): BlockHeaderResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockHeaderResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockHeaderResponse; + static deserializeBinaryFromReader(message: BlockHeaderResponse, reader: jspb.BinaryReader): BlockHeaderResponse; +} + +export namespace BlockHeaderResponse { + export type AsObject = { + block?: flow_entities_block_header_pb.BlockHeader.AsObject, + } +} + diff --git a/packages/protobuf/src/generated/flow/execution/execution_pb.js b/packages/protobuf/src/generated/flow/execution/execution_pb.js index 597200c5d..8bf9058c0 100644 --- a/packages/protobuf/src/generated/flow/execution/execution_pb.js +++ b/packages/protobuf/src/generated/flow/execution/execution_pb.js @@ -2,29 +2,50 @@ /** * @fileoverview * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); var flow_entities_account_pb = require('../../flow/entities/account_pb.js'); goog.object.extend(proto, flow_entities_account_pb); +var flow_entities_block_header_pb = require('../../flow/entities/block_header_pb.js'); +goog.object.extend(proto, flow_entities_block_header_pb); var flow_entities_event_pb = require('../../flow/entities/event_pb.js'); goog.object.extend(proto, flow_entities_event_pb); +var flow_entities_transaction_pb = require('../../flow/entities/transaction_pb.js'); +goog.object.extend(proto, flow_entities_transaction_pb); +goog.exportSymbol('proto.flow.execution.BlockHeaderResponse', null, global); goog.exportSymbol('proto.flow.execution.ExecuteScriptAtBlockIDRequest', null, global); goog.exportSymbol('proto.flow.execution.ExecuteScriptAtBlockIDResponse', null, global); goog.exportSymbol('proto.flow.execution.GetAccountAtBlockIDRequest', null, global); goog.exportSymbol('proto.flow.execution.GetAccountAtBlockIDResponse', null, global); +goog.exportSymbol('proto.flow.execution.GetBlockHeaderByIDRequest', null, global); goog.exportSymbol('proto.flow.execution.GetEventsForBlockIDsRequest', null, global); goog.exportSymbol('proto.flow.execution.GetEventsForBlockIDsResponse', null, global); goog.exportSymbol('proto.flow.execution.GetEventsForBlockIDsResponse.Result', null, global); +goog.exportSymbol('proto.flow.execution.GetLatestBlockHeaderRequest', null, global); +goog.exportSymbol('proto.flow.execution.GetRegisterAtBlockIDRequest', null, global); +goog.exportSymbol('proto.flow.execution.GetRegisterAtBlockIDResponse', null, global); +goog.exportSymbol('proto.flow.execution.GetTransactionByIndexRequest', null, global); goog.exportSymbol('proto.flow.execution.GetTransactionResultRequest', null, global); goog.exportSymbol('proto.flow.execution.GetTransactionResultResponse', null, global); +goog.exportSymbol('proto.flow.execution.GetTransactionResultsResponse', null, global); +goog.exportSymbol('proto.flow.execution.GetTransactionsByBlockIDRequest', null, global); goog.exportSymbol('proto.flow.execution.PingRequest', null, global); goog.exportSymbol('proto.flow.execution.PingResponse', null, global); /** @@ -237,6 +258,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.flow.execution.GetTransactionResultRequest.displayName = 'proto.flow.execution.GetTransactionResultRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.execution.GetTransactionByIndexRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.execution.GetTransactionByIndexRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.execution.GetTransactionByIndexRequest.displayName = 'proto.flow.execution.GetTransactionByIndexRequest'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -258,6 +300,153 @@ if (goog.DEBUG && !COMPILED) { */ proto.flow.execution.GetTransactionResultResponse.displayName = 'proto.flow.execution.GetTransactionResultResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.execution.GetTransactionsByBlockIDRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.execution.GetTransactionsByBlockIDRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.execution.GetTransactionsByBlockIDRequest.displayName = 'proto.flow.execution.GetTransactionsByBlockIDRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.execution.GetTransactionResultsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.execution.GetTransactionResultsResponse.repeatedFields_, null); +}; +goog.inherits(proto.flow.execution.GetTransactionResultsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.execution.GetTransactionResultsResponse.displayName = 'proto.flow.execution.GetTransactionResultsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.execution.GetRegisterAtBlockIDRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.execution.GetRegisterAtBlockIDRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.execution.GetRegisterAtBlockIDRequest.displayName = 'proto.flow.execution.GetRegisterAtBlockIDRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.execution.GetRegisterAtBlockIDResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.execution.GetRegisterAtBlockIDResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.execution.GetRegisterAtBlockIDResponse.displayName = 'proto.flow.execution.GetRegisterAtBlockIDResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.execution.GetLatestBlockHeaderRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.execution.GetLatestBlockHeaderRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.execution.GetLatestBlockHeaderRequest.displayName = 'proto.flow.execution.GetLatestBlockHeaderRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.execution.GetBlockHeaderByIDRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.execution.GetBlockHeaderByIDRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.execution.GetBlockHeaderByIDRequest.displayName = 'proto.flow.execution.GetBlockHeaderByIDRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.flow.execution.BlockHeaderResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.flow.execution.BlockHeaderResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.flow.execution.BlockHeaderResponse.displayName = 'proto.flow.execution.BlockHeaderResponse'; +} @@ -2084,13 +2273,6 @@ proto.flow.execution.GetTransactionResultRequest.prototype.setTransactionId = fu -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.flow.execution.GetTransactionResultResponse.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2106,8 +2288,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.flow.execution.GetTransactionResultResponse.prototype.toObject = function(opt_includeInstance) { - return proto.flow.execution.GetTransactionResultResponse.toObject(opt_includeInstance, this); +proto.flow.execution.GetTransactionByIndexRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.GetTransactionByIndexRequest.toObject(opt_includeInstance, this); }; @@ -2116,16 +2298,14 @@ proto.flow.execution.GetTransactionResultResponse.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.flow.execution.GetTransactionResultResponse} msg The msg instance to transform. + * @param {!proto.flow.execution.GetTransactionByIndexRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.execution.GetTransactionResultResponse.toObject = function(includeInstance, msg) { +proto.flow.execution.GetTransactionByIndexRequest.toObject = function(includeInstance, msg) { var f, obj = { - statusCode: jspb.Message.getFieldWithDefault(msg, 1, 0), - errorMessage: jspb.Message.getFieldWithDefault(msg, 2, ""), - eventsList: jspb.Message.toObjectList(msg.getEventsList(), - flow_entities_event_pb.Event.toObject, includeInstance) + blockId: msg.getBlockId_asB64(), + index: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -2139,23 +2319,23 @@ proto.flow.execution.GetTransactionResultResponse.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.flow.execution.GetTransactionResultResponse} + * @return {!proto.flow.execution.GetTransactionByIndexRequest} */ -proto.flow.execution.GetTransactionResultResponse.deserializeBinary = function(bytes) { +proto.flow.execution.GetTransactionByIndexRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.flow.execution.GetTransactionResultResponse; - return proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.flow.execution.GetTransactionByIndexRequest; + return proto.flow.execution.GetTransactionByIndexRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.flow.execution.GetTransactionResultResponse} msg The message object to deserialize into. + * @param {!proto.flow.execution.GetTransactionByIndexRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.flow.execution.GetTransactionResultResponse} + * @return {!proto.flow.execution.GetTransactionByIndexRequest} */ -proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.flow.execution.GetTransactionByIndexRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2163,17 +2343,12 @@ proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setStatusCode(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setErrorMessage(value); - break; - case 3: - var value = new flow_entities_event_pb.Event; - reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader); - msg.addEvents(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); break; default: reader.skipField(); @@ -2188,9 +2363,9 @@ proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.flow.execution.GetTransactionResultResponse.prototype.serializeBinary = function() { +proto.flow.execution.GetTransactionByIndexRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.flow.execution.GetTransactionResultResponse.serializeBinaryToWriter(this, writer); + proto.flow.execution.GetTransactionByIndexRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2198,96 +2373,294 @@ proto.flow.execution.GetTransactionResultResponse.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.flow.execution.GetTransactionResultResponse} message + * @param {!proto.flow.execution.GetTransactionByIndexRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.flow.execution.GetTransactionResultResponse.serializeBinaryToWriter = function(message, writer) { +proto.flow.execution.GetTransactionByIndexRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStatusCode(); - if (f !== 0) { - writer.writeUint32( + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getErrorMessage(); - if (f.length > 0) { - writer.writeString( + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( 2, f ); } - f = message.getEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - flow_entities_event_pb.Event.serializeBinaryToWriter - ); - } }; /** - * optional uint32 status_code = 1; - * @return {number} + * optional bytes block_id = 1; + * @return {!(string|Uint8Array)} */ -proto.flow.execution.GetTransactionResultResponse.prototype.getStatusCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.flow.execution.GetTransactionByIndexRequest.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.flow.execution.GetTransactionResultResponse} returns this + * optional bytes block_id = 1; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} */ -proto.flow.execution.GetTransactionResultResponse.prototype.setStatusCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.flow.execution.GetTransactionByIndexRequest.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); }; /** - * optional string error_message = 2; - * @return {string} + * optional bytes block_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} */ -proto.flow.execution.GetTransactionResultResponse.prototype.getErrorMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.flow.execution.GetTransactionByIndexRequest.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); }; /** - * @param {string} value - * @return {!proto.flow.execution.GetTransactionResultResponse} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.execution.GetTransactionByIndexRequest} returns this */ -proto.flow.execution.GetTransactionResultResponse.prototype.setErrorMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.flow.execution.GetTransactionByIndexRequest.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * repeated flow.entities.Event events = 3; - * @return {!Array} + * optional uint32 index = 2; + * @return {number} */ -proto.flow.execution.GetTransactionResultResponse.prototype.getEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 3)); +proto.flow.execution.GetTransactionByIndexRequest.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!Array} value - * @return {!proto.flow.execution.GetTransactionResultResponse} returns this -*/ -proto.flow.execution.GetTransactionResultResponse.prototype.setEventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + * @param {number} value + * @return {!proto.flow.execution.GetTransactionByIndexRequest} returns this + */ +proto.flow.execution.GetTransactionByIndexRequest.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + /** - * @param {!proto.flow.entities.Event=} opt_value - * @param {number=} opt_index - * @return {!proto.flow.entities.Event} + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.execution.GetTransactionResultResponse.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.execution.GetTransactionResultResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.GetTransactionResultResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.execution.GetTransactionResultResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetTransactionResultResponse.toObject = function(includeInstance, msg) { + var f, obj = { + statusCode: jspb.Message.getFieldWithDefault(msg, 1, 0), + errorMessage: jspb.Message.getFieldWithDefault(msg, 2, ""), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + flow_entities_event_pb.Event.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.execution.GetTransactionResultResponse} + */ +proto.flow.execution.GetTransactionResultResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.execution.GetTransactionResultResponse; + return proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.execution.GetTransactionResultResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.execution.GetTransactionResultResponse} + */ +proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStatusCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + case 3: + var value = new flow_entities_event_pb.Event; + reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.execution.GetTransactionResultResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.execution.GetTransactionResultResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.execution.GetTransactionResultResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetTransactionResultResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatusCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + flow_entities_event_pb.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 status_code = 1; + * @return {number} + */ +proto.flow.execution.GetTransactionResultResponse.prototype.getStatusCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.flow.execution.GetTransactionResultResponse} returns this + */ +proto.flow.execution.GetTransactionResultResponse.prototype.setStatusCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string error_message = 2; + * @return {string} + */ +proto.flow.execution.GetTransactionResultResponse.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.flow.execution.GetTransactionResultResponse} returns this + */ +proto.flow.execution.GetTransactionResultResponse.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated flow.entities.Event events = 3; + * @return {!Array} + */ +proto.flow.execution.GetTransactionResultResponse.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.flow.execution.GetTransactionResultResponse} returns this +*/ +proto.flow.execution.GetTransactionResultResponse.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.flow.entities.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.entities.Event} */ proto.flow.execution.GetTransactionResultResponse.prototype.addEvents = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Event, opt_index); @@ -2303,4 +2676,1223 @@ proto.flow.execution.GetTransactionResultResponse.prototype.clearEventsList = fu }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.GetTransactionsByBlockIDRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.execution.GetTransactionsByBlockIDRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: msg.getBlockId_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.execution.GetTransactionsByBlockIDRequest} + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.execution.GetTransactionsByBlockIDRequest; + return proto.flow.execution.GetTransactionsByBlockIDRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.execution.GetTransactionsByBlockIDRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.execution.GetTransactionsByBlockIDRequest} + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.execution.GetTransactionsByBlockIDRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.execution.GetTransactionsByBlockIDRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes block_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes block_id = 1; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); +}; + + +/** + * optional bytes block_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.execution.GetTransactionsByBlockIDRequest} returns this + */ +proto.flow.execution.GetTransactionsByBlockIDRequest.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.flow.execution.GetTransactionResultsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.execution.GetTransactionResultsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.GetTransactionResultsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.execution.GetTransactionResultsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetTransactionResultsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + transactionResultsList: jspb.Message.toObjectList(msg.getTransactionResultsList(), + proto.flow.execution.GetTransactionResultResponse.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.execution.GetTransactionResultsResponse} + */ +proto.flow.execution.GetTransactionResultsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.execution.GetTransactionResultsResponse; + return proto.flow.execution.GetTransactionResultsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.execution.GetTransactionResultsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.execution.GetTransactionResultsResponse} + */ +proto.flow.execution.GetTransactionResultsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.flow.execution.GetTransactionResultResponse; + reader.readMessage(value,proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader); + msg.addTransactionResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.execution.GetTransactionResultsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.execution.GetTransactionResultsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.execution.GetTransactionResultsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetTransactionResultsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionResultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.flow.execution.GetTransactionResultResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated GetTransactionResultResponse transaction_results = 1; + * @return {!Array} + */ +proto.flow.execution.GetTransactionResultsResponse.prototype.getTransactionResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.flow.execution.GetTransactionResultResponse, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.flow.execution.GetTransactionResultsResponse} returns this +*/ +proto.flow.execution.GetTransactionResultsResponse.prototype.setTransactionResultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.flow.execution.GetTransactionResultResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.flow.execution.GetTransactionResultResponse} + */ +proto.flow.execution.GetTransactionResultsResponse.prototype.addTransactionResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.execution.GetTransactionResultResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.flow.execution.GetTransactionResultsResponse} returns this + */ +proto.flow.execution.GetTransactionResultsResponse.prototype.clearTransactionResultsList = function() { + return this.setTransactionResultsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.GetRegisterAtBlockIDRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.execution.GetRegisterAtBlockIDRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: msg.getBlockId_asB64(), + registerOwner: msg.getRegisterOwner_asB64(), + registerController: msg.getRegisterController_asB64(), + registerKey: msg.getRegisterKey_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.execution.GetRegisterAtBlockIDRequest; + return proto.flow.execution.GetRegisterAtBlockIDRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.execution.GetRegisterAtBlockIDRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRegisterOwner(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRegisterController(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRegisterKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.execution.GetRegisterAtBlockIDRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.execution.GetRegisterAtBlockIDRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRegisterOwner_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getRegisterController_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getRegisterKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes block_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getBlockId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes block_id = 1; + * This is a type-conversion wrapper around `getBlockId()` + * @return {string} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getBlockId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockId())); +}; + + +/** + * optional bytes block_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockId()` + * @return {!Uint8Array} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getBlockId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} returns this + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.setBlockId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes register_owner = 2; + * @return {!(string|Uint8Array)} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterOwner = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes register_owner = 2; + * This is a type-conversion wrapper around `getRegisterOwner()` + * @return {string} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterOwner_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRegisterOwner())); +}; + + +/** + * optional bytes register_owner = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRegisterOwner()` + * @return {!Uint8Array} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterOwner_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRegisterOwner())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} returns this + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.setRegisterOwner = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes register_controller = 3; + * @return {!(string|Uint8Array)} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterController = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes register_controller = 3; + * This is a type-conversion wrapper around `getRegisterController()` + * @return {string} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterController_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRegisterController())); +}; + + +/** + * optional bytes register_controller = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRegisterController()` + * @return {!Uint8Array} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterController_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRegisterController())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} returns this + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.setRegisterController = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes register_key = 4; + * @return {!(string|Uint8Array)} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes register_key = 4; + * This is a type-conversion wrapper around `getRegisterKey()` + * @return {string} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRegisterKey())); +}; + + +/** + * optional bytes register_key = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRegisterKey()` + * @return {!Uint8Array} + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRegisterKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} returns this + */ +proto.flow.execution.GetRegisterAtBlockIDRequest.prototype.setRegisterKey = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.GetRegisterAtBlockIDResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.execution.GetRegisterAtBlockIDResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.toObject = function(includeInstance, msg) { + var f, obj = { + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.execution.GetRegisterAtBlockIDResponse} + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.execution.GetRegisterAtBlockIDResponse; + return proto.flow.execution.GetRegisterAtBlockIDResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.execution.GetRegisterAtBlockIDResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.execution.GetRegisterAtBlockIDResponse} + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.execution.GetRegisterAtBlockIDResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.execution.GetRegisterAtBlockIDResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes value = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes value = 1; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.execution.GetRegisterAtBlockIDResponse} returns this + */ +proto.flow.execution.GetRegisterAtBlockIDResponse.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.execution.GetLatestBlockHeaderRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.GetLatestBlockHeaderRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.execution.GetLatestBlockHeaderRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetLatestBlockHeaderRequest.toObject = function(includeInstance, msg) { + var f, obj = { + isSealed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.execution.GetLatestBlockHeaderRequest} + */ +proto.flow.execution.GetLatestBlockHeaderRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.execution.GetLatestBlockHeaderRequest; + return proto.flow.execution.GetLatestBlockHeaderRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.execution.GetLatestBlockHeaderRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.execution.GetLatestBlockHeaderRequest} + */ +proto.flow.execution.GetLatestBlockHeaderRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsSealed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.execution.GetLatestBlockHeaderRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.execution.GetLatestBlockHeaderRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.execution.GetLatestBlockHeaderRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetLatestBlockHeaderRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsSealed(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool is_sealed = 1; + * @return {boolean} + */ +proto.flow.execution.GetLatestBlockHeaderRequest.prototype.getIsSealed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.flow.execution.GetLatestBlockHeaderRequest} returns this + */ +proto.flow.execution.GetLatestBlockHeaderRequest.prototype.setIsSealed = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.execution.GetBlockHeaderByIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.GetBlockHeaderByIDRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.execution.GetBlockHeaderByIDRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetBlockHeaderByIDRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.execution.GetBlockHeaderByIDRequest} + */ +proto.flow.execution.GetBlockHeaderByIDRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.execution.GetBlockHeaderByIDRequest; + return proto.flow.execution.GetBlockHeaderByIDRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.execution.GetBlockHeaderByIDRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.execution.GetBlockHeaderByIDRequest} + */ +proto.flow.execution.GetBlockHeaderByIDRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.execution.GetBlockHeaderByIDRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.execution.GetBlockHeaderByIDRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.execution.GetBlockHeaderByIDRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.GetBlockHeaderByIDRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.flow.execution.GetBlockHeaderByIDRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.flow.execution.GetBlockHeaderByIDRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.flow.execution.GetBlockHeaderByIDRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.flow.execution.GetBlockHeaderByIDRequest} returns this + */ +proto.flow.execution.GetBlockHeaderByIDRequest.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.flow.execution.BlockHeaderResponse.prototype.toObject = function(opt_includeInstance) { + return proto.flow.execution.BlockHeaderResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.flow.execution.BlockHeaderResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.BlockHeaderResponse.toObject = function(includeInstance, msg) { + var f, obj = { + block: (f = msg.getBlock()) && flow_entities_block_header_pb.BlockHeader.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.flow.execution.BlockHeaderResponse} + */ +proto.flow.execution.BlockHeaderResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.flow.execution.BlockHeaderResponse; + return proto.flow.execution.BlockHeaderResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.flow.execution.BlockHeaderResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.flow.execution.BlockHeaderResponse} + */ +proto.flow.execution.BlockHeaderResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new flow_entities_block_header_pb.BlockHeader; + reader.readMessage(value,flow_entities_block_header_pb.BlockHeader.deserializeBinaryFromReader); + msg.setBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.flow.execution.BlockHeaderResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.flow.execution.BlockHeaderResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.flow.execution.BlockHeaderResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.flow.execution.BlockHeaderResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + flow_entities_block_header_pb.BlockHeader.serializeBinaryToWriter + ); + } +}; + + +/** + * optional flow.entities.BlockHeader block = 1; + * @return {?proto.flow.entities.BlockHeader} + */ +proto.flow.execution.BlockHeaderResponse.prototype.getBlock = function() { + return /** @type{?proto.flow.entities.BlockHeader} */ ( + jspb.Message.getWrapperField(this, flow_entities_block_header_pb.BlockHeader, 1)); +}; + + +/** + * @param {?proto.flow.entities.BlockHeader|undefined} value + * @return {!proto.flow.execution.BlockHeaderResponse} returns this +*/ +proto.flow.execution.BlockHeaderResponse.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.flow.execution.BlockHeaderResponse} returns this + */ +proto.flow.execution.BlockHeaderResponse.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.flow.execution.BlockHeaderResponse.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + goog.object.extend(exports, proto.flow.execution); diff --git a/packages/protobuf/src/generated/flow/execution/execution_pb_service.d.ts b/packages/protobuf/src/generated/flow/execution/execution_pb_service.d.ts index d2b52fd8c..f059d3104 100644 --- a/packages/protobuf/src/generated/flow/execution/execution_pb_service.d.ts +++ b/packages/protobuf/src/generated/flow/execution/execution_pb_service.d.ts @@ -49,6 +49,51 @@ type ExecutionAPIGetTransactionResult = { readonly responseType: typeof flow_execution_execution_pb.GetTransactionResultResponse; }; +type ExecutionAPIGetTransactionResultByIndex = { + readonly methodName: string; + readonly service: typeof ExecutionAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_execution_execution_pb.GetTransactionByIndexRequest; + readonly responseType: typeof flow_execution_execution_pb.GetTransactionResultResponse; +}; + +type ExecutionAPIGetTransactionResultsByBlockID = { + readonly methodName: string; + readonly service: typeof ExecutionAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_execution_execution_pb.GetTransactionsByBlockIDRequest; + readonly responseType: typeof flow_execution_execution_pb.GetTransactionResultsResponse; +}; + +type ExecutionAPIGetRegisterAtBlockID = { + readonly methodName: string; + readonly service: typeof ExecutionAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_execution_execution_pb.GetRegisterAtBlockIDRequest; + readonly responseType: typeof flow_execution_execution_pb.GetRegisterAtBlockIDResponse; +}; + +type ExecutionAPIGetLatestBlockHeader = { + readonly methodName: string; + readonly service: typeof ExecutionAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_execution_execution_pb.GetLatestBlockHeaderRequest; + readonly responseType: typeof flow_execution_execution_pb.BlockHeaderResponse; +}; + +type ExecutionAPIGetBlockHeaderByID = { + readonly methodName: string; + readonly service: typeof ExecutionAPI; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof flow_execution_execution_pb.GetBlockHeaderByIDRequest; + readonly responseType: typeof flow_execution_execution_pb.BlockHeaderResponse; +}; + export class ExecutionAPI { static readonly serviceName: string; static readonly Ping: ExecutionAPIPing; @@ -56,6 +101,11 @@ export class ExecutionAPI { static readonly ExecuteScriptAtBlockID: ExecutionAPIExecuteScriptAtBlockID; static readonly GetEventsForBlockIDs: ExecutionAPIGetEventsForBlockIDs; static readonly GetTransactionResult: ExecutionAPIGetTransactionResult; + static readonly GetTransactionResultByIndex: ExecutionAPIGetTransactionResultByIndex; + static readonly GetTransactionResultsByBlockID: ExecutionAPIGetTransactionResultsByBlockID; + static readonly GetRegisterAtBlockID: ExecutionAPIGetRegisterAtBlockID; + static readonly GetLatestBlockHeader: ExecutionAPIGetLatestBlockHeader; + static readonly GetBlockHeaderByID: ExecutionAPIGetBlockHeaderByID; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -135,5 +185,50 @@ export class ExecutionAPIClient { requestMessage: flow_execution_execution_pb.GetTransactionResultRequest, callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultResponse|null) => void ): UnaryResponse; + getTransactionResultByIndex( + requestMessage: flow_execution_execution_pb.GetTransactionByIndexRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultResponse|null) => void + ): UnaryResponse; + getTransactionResultByIndex( + requestMessage: flow_execution_execution_pb.GetTransactionByIndexRequest, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultResponse|null) => void + ): UnaryResponse; + getTransactionResultsByBlockID( + requestMessage: flow_execution_execution_pb.GetTransactionsByBlockIDRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultsResponse|null) => void + ): UnaryResponse; + getTransactionResultsByBlockID( + requestMessage: flow_execution_execution_pb.GetTransactionsByBlockIDRequest, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultsResponse|null) => void + ): UnaryResponse; + getRegisterAtBlockID( + requestMessage: flow_execution_execution_pb.GetRegisterAtBlockIDRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetRegisterAtBlockIDResponse|null) => void + ): UnaryResponse; + getRegisterAtBlockID( + requestMessage: flow_execution_execution_pb.GetRegisterAtBlockIDRequest, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetRegisterAtBlockIDResponse|null) => void + ): UnaryResponse; + getLatestBlockHeader( + requestMessage: flow_execution_execution_pb.GetLatestBlockHeaderRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.BlockHeaderResponse|null) => void + ): UnaryResponse; + getLatestBlockHeader( + requestMessage: flow_execution_execution_pb.GetLatestBlockHeaderRequest, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.BlockHeaderResponse|null) => void + ): UnaryResponse; + getBlockHeaderByID( + requestMessage: flow_execution_execution_pb.GetBlockHeaderByIDRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.BlockHeaderResponse|null) => void + ): UnaryResponse; + getBlockHeaderByID( + requestMessage: flow_execution_execution_pb.GetBlockHeaderByIDRequest, + callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.BlockHeaderResponse|null) => void + ): UnaryResponse; } diff --git a/packages/protobuf/src/generated/flow/execution/execution_pb_service.js b/packages/protobuf/src/generated/flow/execution/execution_pb_service.js index 35a8f1f20..469eedef0 100644 --- a/packages/protobuf/src/generated/flow/execution/execution_pb_service.js +++ b/packages/protobuf/src/generated/flow/execution/execution_pb_service.js @@ -55,6 +55,51 @@ ExecutionAPI.GetTransactionResult = { responseType: flow_execution_execution_pb.GetTransactionResultResponse }; +ExecutionAPI.GetTransactionResultByIndex = { + methodName: "GetTransactionResultByIndex", + service: ExecutionAPI, + requestStream: false, + responseStream: false, + requestType: flow_execution_execution_pb.GetTransactionByIndexRequest, + responseType: flow_execution_execution_pb.GetTransactionResultResponse +}; + +ExecutionAPI.GetTransactionResultsByBlockID = { + methodName: "GetTransactionResultsByBlockID", + service: ExecutionAPI, + requestStream: false, + responseStream: false, + requestType: flow_execution_execution_pb.GetTransactionsByBlockIDRequest, + responseType: flow_execution_execution_pb.GetTransactionResultsResponse +}; + +ExecutionAPI.GetRegisterAtBlockID = { + methodName: "GetRegisterAtBlockID", + service: ExecutionAPI, + requestStream: false, + responseStream: false, + requestType: flow_execution_execution_pb.GetRegisterAtBlockIDRequest, + responseType: flow_execution_execution_pb.GetRegisterAtBlockIDResponse +}; + +ExecutionAPI.GetLatestBlockHeader = { + methodName: "GetLatestBlockHeader", + service: ExecutionAPI, + requestStream: false, + responseStream: false, + requestType: flow_execution_execution_pb.GetLatestBlockHeaderRequest, + responseType: flow_execution_execution_pb.BlockHeaderResponse +}; + +ExecutionAPI.GetBlockHeaderByID = { + methodName: "GetBlockHeaderByID", + service: ExecutionAPI, + requestStream: false, + responseStream: false, + requestType: flow_execution_execution_pb.GetBlockHeaderByIDRequest, + responseType: flow_execution_execution_pb.BlockHeaderResponse +}; + exports.ExecutionAPI = ExecutionAPI; function ExecutionAPIClient(serviceHost, options) { @@ -217,5 +262,160 @@ ExecutionAPIClient.prototype.getTransactionResult = function getTransactionResul }; }; +ExecutionAPIClient.prototype.getTransactionResultByIndex = function getTransactionResultByIndex(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ExecutionAPI.GetTransactionResultByIndex, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ExecutionAPIClient.prototype.getTransactionResultsByBlockID = function getTransactionResultsByBlockID(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ExecutionAPI.GetTransactionResultsByBlockID, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ExecutionAPIClient.prototype.getRegisterAtBlockID = function getRegisterAtBlockID(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ExecutionAPI.GetRegisterAtBlockID, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ExecutionAPIClient.prototype.getLatestBlockHeader = function getLatestBlockHeader(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ExecutionAPI.GetLatestBlockHeader, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ExecutionAPIClient.prototype.getBlockHeaderByID = function getBlockHeaderByID(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ExecutionAPI.GetBlockHeaderByID, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.ExecutionAPIClient = ExecutionAPIClient; diff --git a/packages/protobuf/src/generated/google/protobuf/timestamp.ts b/packages/protobuf/src/generated/google/protobuf/timestamp.ts deleted file mode 100644 index 3b79b2497..000000000 --- a/packages/protobuf/src/generated/google/protobuf/timestamp.ts +++ /dev/null @@ -1,60 +0,0 @@ -import * as pb_1 from "google-protobuf"; -export namespace google.protobuf { - export class Timestamp extends pb_1.Message { - constructor(data?: any[] | { - seconds?: number; - nanos?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) && data, 0, -1, [], null); - if (!Array.isArray(data) && typeof data == "object") { - this.seconds = data.seconds; - this.nanos = data.nanos; - } - } - get seconds(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 1, undefined) as number | undefined; - } - set seconds(value: number) { - pb_1.Message.setField(this, 1, value); - } - get nanos(): number | undefined { - return pb_1.Message.getFieldWithDefault(this, 2, undefined) as number | undefined; - } - set nanos(value: number) { - pb_1.Message.setField(this, 2, value); - } - toObject() { - return { - seconds: this.seconds, - nanos: this.nanos - }; - } - serialize(w?: pb_1.BinaryWriter): Uint8Array | undefined { - const writer = w || new pb_1.BinaryWriter(); - if (this.seconds !== undefined) - writer.writeInt64(1, this.seconds); - if (this.nanos !== undefined) - writer.writeInt32(2, this.nanos); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Timestamp { - const reader = bytes instanceof Uint8Array ? new pb_1.BinaryReader(bytes) : bytes, message = new Timestamp(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.seconds = reader.readInt64(); - break; - case 2: - message.nanos = reader.readInt32(); - break; - default: reader.skipField(); - } - } - return message; - } - } -} diff --git a/packages/protobuf/src/proto/flow/access/access.proto b/packages/protobuf/src/proto/flow/access/access.proto old mode 100755 new mode 100644 index ce646abb3..464894ff2 --- a/packages/protobuf/src/proto/flow/access/access.proto +++ b/packages/protobuf/src/proto/flow/access/access.proto @@ -2,86 +2,133 @@ syntax = "proto3"; package flow.access; -option go_package = "access"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/access"; +option java_package = "org.onflow.protobuf.access"; import "flow/entities/account.proto"; import "flow/entities/block_header.proto"; import "flow/entities/block.proto"; import "flow/entities/collection.proto"; import "flow/entities/event.proto"; +import "flow/entities/execution_result.proto"; import "flow/entities/transaction.proto"; import "google/protobuf/timestamp.proto"; // AccessAPI is the public-facing API provided by access nodes. service AccessAPI { - // Ping is used to check if the access node is alive and healthy. - rpc Ping (PingRequest) returns (PingResponse); + rpc Ping(PingRequest) returns (PingResponse); // Block Headers // GetLatestBlockHeader gets the latest sealed or unsealed block header. - rpc GetLatestBlockHeader (GetLatestBlockHeaderRequest) returns (BlockHeaderResponse); + rpc GetLatestBlockHeader(GetLatestBlockHeaderRequest) + returns (BlockHeaderResponse); // GetBlockHeaderByID gets a block header by ID. - rpc GetBlockHeaderByID (GetBlockHeaderByIDRequest) returns (BlockHeaderResponse); + rpc GetBlockHeaderByID(GetBlockHeaderByIDRequest) + returns (BlockHeaderResponse); // GetBlockHeaderByHeight gets a block header by height. - rpc GetBlockHeaderByHeight (GetBlockHeaderByHeightRequest) returns (BlockHeaderResponse); + rpc GetBlockHeaderByHeight(GetBlockHeaderByHeightRequest) + returns (BlockHeaderResponse); // Blocks - // GetLatestBlock gets the full payload of the latest sealed or unsealed block. - rpc GetLatestBlock (GetLatestBlockRequest) returns (BlockResponse); + // GetLatestBlock gets the full payload of the latest sealed or unsealed + // block. + rpc GetLatestBlock(GetLatestBlockRequest) returns (BlockResponse); // GetBlockByID gets a full block by ID. - rpc GetBlockByID (GetBlockByIDRequest) returns (BlockResponse); + rpc GetBlockByID(GetBlockByIDRequest) returns (BlockResponse); // GetBlockByHeight gets a full block by height. - rpc GetBlockByHeight (GetBlockByHeightRequest) returns (BlockResponse); + rpc GetBlockByHeight(GetBlockByHeightRequest) returns (BlockResponse); // Collections // GetCollectionByID gets a collection by ID. - rpc GetCollectionByID (GetCollectionByIDRequest) returns (CollectionResponse); + rpc GetCollectionByID(GetCollectionByIDRequest) returns (CollectionResponse); // Transactions // SendTransaction submits a transaction to the network. - rpc SendTransaction (SendTransactionRequest) returns (SendTransactionResponse); + rpc SendTransaction(SendTransactionRequest) returns (SendTransactionResponse); // GetTransaction gets a transaction by ID. - rpc GetTransaction (GetTransactionRequest) returns (TransactionResponse); + rpc GetTransaction(GetTransactionRequest) returns (TransactionResponse); // GetTransactionResult gets the result of a transaction. - rpc GetTransactionResult (GetTransactionRequest) returns (TransactionResultResponse); + rpc GetTransactionResult(GetTransactionRequest) + returns (TransactionResultResponse); + // GetTransactionResultByIndex gets the result of a transaction at a specified + // block and index + rpc GetTransactionResultByIndex(GetTransactionByIndexRequest) + returns (TransactionResultResponse); + // GetTransactionResultsByBlockID gets all the transaction results for a + // specified block + rpc GetTransactionResultsByBlockID(GetTransactionsByBlockIDRequest) + returns (TransactionResultsResponse); + // GetTransactionsByBlockID gets all the transactions for a specified block + rpc GetTransactionsByBlockID(GetTransactionsByBlockIDRequest) + returns (TransactionsResponse); // Accounts // GetAccount is an alias for GetAccountAtLatestBlock. // - // Warning: this function is deprecated. It behaves identically to GetAccountAtLatestBlock and will be removed in a future version. - rpc GetAccount (GetAccountRequest) returns (GetAccountResponse); - // GetAccountAtLatestBlock gets an account by address from the latest sealed execution state. - rpc GetAccountAtLatestBlock (GetAccountAtLatestBlockRequest) returns (AccountResponse); - // GetAccountAtBlockHeight gets an account by address at the given block height - rpc GetAccountAtBlockHeight (GetAccountAtBlockHeightRequest) returns (AccountResponse); + // Warning: this function is deprecated. It behaves identically to + // GetAccountAtLatestBlock and will be removed in a future version. + rpc GetAccount(GetAccountRequest) returns (GetAccountResponse); + // GetAccountAtLatestBlock gets an account by address from the latest sealed + // execution state. + rpc GetAccountAtLatestBlock(GetAccountAtLatestBlockRequest) + returns (AccountResponse); + // GetAccountAtBlockHeight gets an account by address at the given block + // height + rpc GetAccountAtBlockHeight(GetAccountAtBlockHeightRequest) + returns (AccountResponse); // Scripts - // ExecuteScriptAtLatestBlock executes a read-only Cadence script against the latest sealed execution state. - rpc ExecuteScriptAtLatestBlock (ExecuteScriptAtLatestBlockRequest) returns (ExecuteScriptResponse); - // ExecuteScriptAtBlockID executes a ready-only Cadence script against the execution state at the block with the given ID. - rpc ExecuteScriptAtBlockID (ExecuteScriptAtBlockIDRequest) returns (ExecuteScriptResponse); - // ExecuteScriptAtBlockHeight executes a ready-only Cadence script against the execution state at the given block height. - rpc ExecuteScriptAtBlockHeight (ExecuteScriptAtBlockHeightRequest) returns (ExecuteScriptResponse); + // ExecuteScriptAtLatestBlock executes a read-only Cadence script against the + // latest sealed execution state. + rpc ExecuteScriptAtLatestBlock(ExecuteScriptAtLatestBlockRequest) + returns (ExecuteScriptResponse); + // ExecuteScriptAtBlockID executes a ready-only Cadence script against the + // execution state at the block with the given ID. + rpc ExecuteScriptAtBlockID(ExecuteScriptAtBlockIDRequest) + returns (ExecuteScriptResponse); + // ExecuteScriptAtBlockHeight executes a ready-only Cadence script against the + // execution state at the given block height. + rpc ExecuteScriptAtBlockHeight(ExecuteScriptAtBlockHeightRequest) + returns (ExecuteScriptResponse); // Events - // GetEventsForHeightRange retrieves events emitted within the specified block range. - rpc GetEventsForHeightRange (GetEventsForHeightRangeRequest) returns (EventsResponse); + // GetEventsForHeightRange retrieves events emitted within the specified block + // range. + rpc GetEventsForHeightRange(GetEventsForHeightRangeRequest) + returns (EventsResponse); - // GetEventsForBlockIDs retrieves events for the specified block IDs and event type. - rpc GetEventsForBlockIDs (GetEventsForBlockIDsRequest) returns (EventsResponse); + // GetEventsForBlockIDs retrieves events for the specified block IDs and event + // type. + rpc GetEventsForBlockIDs(GetEventsForBlockIDsRequest) + returns (EventsResponse); // NetworkParameters // GetNetworkParameters retrieves the Flow network details - rpc GetNetworkParameters (GetNetworkParametersRequest) returns (GetNetworkParametersResponse); + rpc GetNetworkParameters(GetNetworkParametersRequest) + returns (GetNetworkParametersResponse); + + // ProtocolState + + // GetLatestProtocolStateSnapshot retrieves the latest sealed protocol state + // snapshot. Used by Flow nodes joining the network to bootstrap a + // space-efficient local state. + rpc GetLatestProtocolStateSnapshot(GetLatestProtocolStateSnapshotRequest) + returns (ProtocolStateSnapshotResponse); + + // GetExecutionResultForBlockID returns Execution Result for a given block. + // At present, Access Node might not have execution results for every block + // and as usual, until sealed, this data can change + rpc GetExecutionResultForBlockID(GetExecutionResultForBlockIDRequest) + returns (ExecutionResultForBlockIDResponse); } message PingRequest {} @@ -110,14 +157,17 @@ message BlockHeaderResponse { message GetLatestBlockRequest { bool is_sealed = 1; + bool full_block_response = 2; } message GetBlockByIDRequest { bytes id = 1; + bool full_block_response = 2; } message GetBlockByHeightRequest { uint64 height = 1; + bool full_block_response = 2; } message BlockResponse { @@ -148,6 +198,23 @@ message GetTransactionRequest { bytes id = 1; } +message GetTransactionByIndexRequest { + bytes block_id = 1; + uint32 index = 2; +} + +message GetTransactionsByBlockIDRequest { + bytes block_id = 1; +} + +message TransactionResultsResponse { + repeated TransactionResultResponse transaction_results = 1; +} + +message TransactionsResponse { + repeated entities.Transaction transactions = 1; +} + message TransactionResponse { entities.Transaction transaction = 1; } @@ -157,6 +224,9 @@ message TransactionResultResponse { uint32 status_code = 2; string error_message = 3; repeated entities.Event events = 4; + bytes block_id = 5; + bytes transaction_id = 6; + bytes collection_id = 7; } // Accounts @@ -235,3 +305,21 @@ message GetNetworkParametersRequest {} message GetNetworkParametersResponse { string chain_id = 1; } + +// Protocol State + +message GetLatestProtocolStateSnapshotRequest {} + +message ProtocolStateSnapshotResponse { + bytes serializedSnapshot = 1; +} + +// Execution Results + +message GetExecutionResultForBlockIDRequest { + bytes block_id = 1; +} + +message ExecutionResultForBlockIDResponse { + entities.ExecutionResult execution_result = 1; +} diff --git a/packages/protobuf/src/proto/flow/entities/account.proto b/packages/protobuf/src/proto/flow/entities/account.proto old mode 100755 new mode 100644 index 30926de91..e4dbb1ea4 --- a/packages/protobuf/src/proto/flow/entities/account.proto +++ b/packages/protobuf/src/proto/flow/entities/account.proto @@ -2,7 +2,8 @@ syntax = "proto3"; package flow.entities; -option go_package = "entities"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; +option java_package = "org.onflow.protobuf.entities"; message Account { bytes address = 1; diff --git a/packages/protobuf/src/proto/flow/entities/block.proto b/packages/protobuf/src/proto/flow/entities/block.proto old mode 100755 new mode 100644 index 43b8221a7..115ed26fc --- a/packages/protobuf/src/proto/flow/entities/block.proto +++ b/packages/protobuf/src/proto/flow/entities/block.proto @@ -2,12 +2,15 @@ syntax = "proto3"; package flow.entities; -option go_package = "entities"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; +option java_package = "org.onflow.protobuf.entities"; import "google/protobuf/timestamp.proto"; import "flow/entities/collection.proto"; import "flow/entities/block_seal.proto"; +import "flow/entities/execution_result.proto"; +import "flow/entities/block_header.proto"; message Block { bytes id = 1; @@ -17,4 +20,7 @@ message Block { repeated CollectionGuarantee collection_guarantees = 5; repeated BlockSeal block_seals = 6; repeated bytes signatures = 7; + repeated ExecutionReceiptMeta execution_receipt_metaList = 8; + repeated ExecutionResult execution_result_list = 9; + BlockHeader block_header = 10; } diff --git a/packages/protobuf/src/proto/flow/entities/block_header.proto b/packages/protobuf/src/proto/flow/entities/block_header.proto old mode 100755 new mode 100644 index 153916a92..0afba3497 --- a/packages/protobuf/src/proto/flow/entities/block_header.proto +++ b/packages/protobuf/src/proto/flow/entities/block_header.proto @@ -2,7 +2,8 @@ syntax = "proto3"; package flow.entities; -option go_package = "entities"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; +option java_package = "org.onflow.protobuf.entities"; import "google/protobuf/timestamp.proto"; @@ -11,4 +12,12 @@ message BlockHeader { bytes parent_id = 2; uint64 height = 3; google.protobuf.Timestamp timestamp = 4; + bytes payload_hash = 5; + uint64 view = 6; + repeated bytes parent_voter_ids = 7; // deprecated!! value will be empty. replaced by parent_vote_indices + bytes parent_voter_sig_data = 8; + bytes proposer_id = 9; + bytes proposer_sig_data = 10; + string chain_id = 11; + bytes parent_voter_indices = 12; } diff --git a/packages/protobuf/src/proto/flow/entities/block_seal.proto b/packages/protobuf/src/proto/flow/entities/block_seal.proto old mode 100755 new mode 100644 index c306c784f..5c71d0bc2 --- a/packages/protobuf/src/proto/flow/entities/block_seal.proto +++ b/packages/protobuf/src/proto/flow/entities/block_seal.proto @@ -2,11 +2,20 @@ syntax = "proto3"; package flow.entities; -option go_package = "entities"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; +option java_package = "org.onflow.protobuf.entities"; message BlockSeal { bytes block_id = 1; bytes execution_receipt_id = 2; repeated bytes execution_receipt_signatures = 3; repeated bytes result_approval_signatures = 4; + bytes final_state = 5; + bytes result_id = 6; + repeated AggregatedSignature aggregated_approval_sigs = 7; } + +message AggregatedSignature { + repeated bytes verifier_signatures = 1; + repeated bytes signer_ids = 2; +} \ No newline at end of file diff --git a/packages/protobuf/src/proto/flow/entities/collection.proto b/packages/protobuf/src/proto/flow/entities/collection.proto old mode 100755 new mode 100644 index 7aded5193..bdbe29e45 --- a/packages/protobuf/src/proto/flow/entities/collection.proto +++ b/packages/protobuf/src/proto/flow/entities/collection.proto @@ -2,7 +2,8 @@ syntax = "proto3"; package flow.entities; -option go_package = "entities"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; +option java_package = "org.onflow.protobuf.entities"; message Collection { bytes id = 1; @@ -12,4 +13,8 @@ message Collection { message CollectionGuarantee { bytes collection_id = 1; repeated bytes signatures = 2; -} \ No newline at end of file + bytes reference_block_id = 3; + bytes signature = 4; + repeated bytes signer_ids = 5; // deprecated!! value will be empty. replaced by signer_indices + bytes signer_indices = 6; +} diff --git a/packages/protobuf/src/proto/flow/entities/event.proto b/packages/protobuf/src/proto/flow/entities/event.proto old mode 100755 new mode 100644 index 9ceefa3cc..fb1c1e567 --- a/packages/protobuf/src/proto/flow/entities/event.proto +++ b/packages/protobuf/src/proto/flow/entities/event.proto @@ -2,7 +2,8 @@ syntax = "proto3"; package flow.entities; -option go_package = "entities"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; +option java_package = "org.onflow.protobuf.entities"; message Event { string type = 1; diff --git a/packages/protobuf/src/proto/flow/entities/execution_result.proto b/packages/protobuf/src/proto/flow/entities/execution_result.proto new file mode 100644 index 000000000..120603dbe --- /dev/null +++ b/packages/protobuf/src/proto/flow/entities/execution_result.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package flow.entities; + +option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; +option java_package = "org.onflow.protobuf.entities"; + +message ExecutionResult { + bytes previous_result_id = 1; + bytes block_id = 2; + repeated Chunk chunks = 3; + repeated ServiceEvent service_events = 4; + bytes execution_data_id = 5 [deprecated = true]; +} + +message Chunk { + uint32 CollectionIndex = 1; + bytes start_state = 2; // state when starting executing this chunk + bytes event_collection = 3; // Events generated by executing results + bytes block_id = 4; // Block id of the execution result this chunk belongs to + uint64 total_computation_used = + 5; // total amount of computation used by running all txs in this chunk + uint32 number_of_transactions = + 6; // number of transactions inside the collection + uint64 index = 7; // chunk index inside the ER (starts from zero) + bytes end_state = 8; // EndState inferred from next chunk or from the ER + bytes execution_data_id = 9; +} + +message ServiceEvent { + string type = 1; + bytes payload = 2; +} + +message ExecutionReceiptMeta { + bytes executor_id = 1; + bytes result_id = 2; + repeated bytes spocks = 3; + bytes executor_signature = 4; +} diff --git a/packages/protobuf/src/proto/flow/entities/transaction.proto b/packages/protobuf/src/proto/flow/entities/transaction.proto old mode 100755 new mode 100644 index 93edb0ba6..6590f8cae --- a/packages/protobuf/src/proto/flow/entities/transaction.proto +++ b/packages/protobuf/src/proto/flow/entities/transaction.proto @@ -2,7 +2,10 @@ syntax = "proto3"; package flow.entities; -option go_package = "entities"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; +option java_package = "org.onflow.protobuf.entities"; + +import "flow/entities/event.proto"; enum TransactionStatus { UNKNOWN = 0; @@ -19,7 +22,7 @@ message Transaction { uint32 key_id = 2; uint64 sequence_number = 3; } - + message Signature { bytes address = 1; uint32 key_id = 2; diff --git a/packages/protobuf/src/proto/flow/execution/execution.proto b/packages/protobuf/src/proto/flow/execution/execution.proto old mode 100755 new mode 100644 index 6f8be2f48..6cfea60a2 --- a/packages/protobuf/src/proto/flow/execution/execution.proto +++ b/packages/protobuf/src/proto/flow/execution/execution.proto @@ -2,36 +2,69 @@ syntax = "proto3"; package flow.execution; -option go_package = "execution"; +option go_package = "github.com/onflow/flow/protobuf/go/flow/execution"; +option java_package = "org.onflow.protobuf.execution"; import "flow/entities/account.proto"; +import "flow/entities/block_header.proto"; import "flow/entities/event.proto"; +import "flow/entities/transaction.proto"; // ExecutionAPI is the API provided by the execution nodes. service ExecutionAPI { + // Ping is used to check if the access node is alive and healthy. + rpc Ping(PingRequest) returns (PingResponse); - // Ping is used to check if the access node is alive and healthy. - rpc Ping (PingRequest) returns (PingResponse); + // Accounts - // Accounts + // GetAccountAtBlockID gets an account by address at the given block ID + rpc GetAccountAtBlockID(GetAccountAtBlockIDRequest) + returns (GetAccountAtBlockIDResponse); - // GetAccountAtBlockID gets an account by address at the given block ID - rpc GetAccountAtBlockID (GetAccountAtBlockIDRequest) returns (GetAccountAtBlockIDResponse); + // Scripts - // Scripts + // ExecuteScriptAtBlockID executes a ready-only Cadence script against the + // execution state at the block with the given ID. + rpc ExecuteScriptAtBlockID(ExecuteScriptAtBlockIDRequest) + returns (ExecuteScriptAtBlockIDResponse); - // ExecuteScriptAtBlockID executes a ready-only Cadence script against the execution state at the block with the given ID. - rpc ExecuteScriptAtBlockID (ExecuteScriptAtBlockIDRequest) returns (ExecuteScriptAtBlockIDResponse); + // Events - // Events + // GetEventsForBlockIDs retrieves events for all the specified block IDs that + // have the given type + rpc GetEventsForBlockIDs(GetEventsForBlockIDsRequest) + returns (GetEventsForBlockIDsResponse); - // GetEventsForBlockIDs retrieves events for all the specified block IDs that have the given type - rpc GetEventsForBlockIDs (GetEventsForBlockIDsRequest) returns (GetEventsForBlockIDsResponse); + // Transaction - // Transaction + // GetTransactionResult gets the result of a transaction. + rpc GetTransactionResult(GetTransactionResultRequest) + returns (GetTransactionResultResponse); - // GetTransactionResult gets the result of a transaction. - rpc GetTransactionResult (GetTransactionResultRequest) returns (GetTransactionResultResponse); + // GetTransactionResultByIndex gets the result of a transaction at the index . + rpc GetTransactionResultByIndex(GetTransactionByIndexRequest) + returns (GetTransactionResultResponse); + + // GetTransactionResultByIndex gets the results of all transactions in the + // block ordered by transaction index + rpc GetTransactionResultsByBlockID(GetTransactionsByBlockIDRequest) + returns (GetTransactionResultsResponse); + + // Registers + + // GetRegisterAtBlockID collects a register at the block with the given ID (if + // available). + rpc GetRegisterAtBlockID(GetRegisterAtBlockIDRequest) + returns (GetRegisterAtBlockIDResponse); + + // Block headers + + // GetLatestBlockHeader gets the latest sealed or unsealed block header. + rpc GetLatestBlockHeader(GetLatestBlockHeaderRequest) + returns (BlockHeaderResponse); + // GetBlockHeaderByID gets a block header by ID. + rpc GetBlockHeaderByID(GetBlockHeaderByIDRequest) + returns (BlockHeaderResponse); } // Ping @@ -43,51 +76,91 @@ message PingResponse {} // Accounts message GetAccountAtBlockIDRequest { - bytes block_id = 1; - bytes address = 2; + bytes block_id = 1; + bytes address = 2; } message GetAccountAtBlockIDResponse { - entities.Account account = 1; + entities.Account account = 1; } // Scripts message ExecuteScriptAtBlockIDRequest { - bytes block_id = 1; - bytes script = 2; - repeated bytes arguments = 3; + bytes block_id = 1; + bytes script = 2; + repeated bytes arguments = 3; } message ExecuteScriptAtBlockIDResponse { - bytes value = 1; + bytes value = 1; } // Events message GetEventsForBlockIDsResponse { - message Result { - bytes block_id = 1; - uint64 block_height = 2; - repeated entities.Event events = 3; - } - repeated Result results = 1; + message Result { + bytes block_id = 1; + uint64 block_height = 2; + repeated entities.Event events = 3; + } + repeated Result results = 1; } message GetEventsForBlockIDsRequest { - string type = 1; - repeated bytes block_ids = 2; + string type = 1; + repeated bytes block_ids = 2; } // Transactions message GetTransactionResultRequest { - bytes block_id = 1; - bytes transaction_id = 2; + bytes block_id = 1; + bytes transaction_id = 2; +} + +message GetTransactionByIndexRequest { + bytes block_id = 1; + uint32 index = 2; } message GetTransactionResultResponse { - uint32 status_code = 1; - string error_message = 2; - repeated entities.Event events = 3; + uint32 status_code = 1; + string error_message = 2; + repeated entities.Event events = 3; +} + +message GetTransactionsByBlockIDRequest { + bytes block_id = 1; +} + +message GetTransactionResultsResponse { + repeated GetTransactionResultResponse transaction_results = 1; +} + +// Registers + +message GetRegisterAtBlockIDRequest { + bytes block_id = 1; + bytes register_owner = 2; + bytes register_controller = 3; + bytes register_key = 4; +} + +message GetRegisterAtBlockIDResponse { + bytes value = 1; +} + +// Block Headers + +message GetLatestBlockHeaderRequest { + bool is_sealed = 1; +} + +message GetBlockHeaderByIDRequest { + bytes id = 1; +} + +message BlockHeaderResponse { + entities.BlockHeader block = 1; } diff --git a/packages/protobuf/src/proto/flow/legacy/access/access.proto b/packages/protobuf/src/proto/flow/legacy/access/access.proto old mode 100755 new mode 100644 index 9aa9e081c..6b1a1cc14 --- a/packages/protobuf/src/proto/flow/legacy/access/access.proto +++ b/packages/protobuf/src/proto/flow/legacy/access/access.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package access; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/access"; +option java_package = "org.onflow.protobuf.legacy.access"; + import "flow/legacy/entities/account.proto"; import "flow/legacy/entities/block_header.proto"; import "flow/legacy/entities/block.proto"; @@ -11,74 +14,94 @@ import "flow/legacy/entities/transaction.proto"; // AccessAPI is the public-facing API provided by access nodes. service AccessAPI { - // Ping is used to check if the access node is alive and healthy. - rpc Ping (PingRequest) returns (PingResponse); + rpc Ping(PingRequest) returns (PingResponse); // Block Headers // GetLatestBlockHeader gets the latest sealed or unsealed block header. - rpc GetLatestBlockHeader (GetLatestBlockHeaderRequest) returns (BlockHeaderResponse); + rpc GetLatestBlockHeader(GetLatestBlockHeaderRequest) + returns (BlockHeaderResponse); // GetBlockHeaderByID gets a block header by ID. - rpc GetBlockHeaderByID (GetBlockHeaderByIDRequest) returns (BlockHeaderResponse); + rpc GetBlockHeaderByID(GetBlockHeaderByIDRequest) + returns (BlockHeaderResponse); // GetBlockHeaderByHeight gets a block header by height. - rpc GetBlockHeaderByHeight (GetBlockHeaderByHeightRequest) returns (BlockHeaderResponse); + rpc GetBlockHeaderByHeight(GetBlockHeaderByHeightRequest) + returns (BlockHeaderResponse); // Blocks - // GetLatestBlock gets the full payload of the latest sealed or unsealed block. - rpc GetLatestBlock (GetLatestBlockRequest) returns (BlockResponse); + // GetLatestBlock gets the full payload of the latest sealed or unsealed + // block. + rpc GetLatestBlock(GetLatestBlockRequest) returns (BlockResponse); // GetBlockByID gets a full block by ID. - rpc GetBlockByID (GetBlockByIDRequest) returns (BlockResponse); + rpc GetBlockByID(GetBlockByIDRequest) returns (BlockResponse); // GetBlockByHeight gets a full block by height. - rpc GetBlockByHeight (GetBlockByHeightRequest) returns (BlockResponse); + rpc GetBlockByHeight(GetBlockByHeightRequest) returns (BlockResponse); // Collections // GetCollectionByID gets a collection by ID. - rpc GetCollectionByID (GetCollectionByIDRequest) returns (CollectionResponse); + rpc GetCollectionByID(GetCollectionByIDRequest) returns (CollectionResponse); // Transactions // SendTransaction submits a transaction to the network. - rpc SendTransaction (SendTransactionRequest) returns (SendTransactionResponse); + rpc SendTransaction(SendTransactionRequest) returns (SendTransactionResponse); // GetTransaction gets a transaction by ID. - rpc GetTransaction (GetTransactionRequest) returns (TransactionResponse); + rpc GetTransaction(GetTransactionRequest) returns (TransactionResponse); // GetTransactionResult gets the result of a transaction. - rpc GetTransactionResult (GetTransactionRequest) returns (TransactionResultResponse); + rpc GetTransactionResult(GetTransactionRequest) + returns (TransactionResultResponse); // Accounts // GetAccount is an alias for GetAccountAtLatestBlock. // - // Warning: this function is deprecated. It behaves identically to GetAccountAtLatestBlock and will be removed in a future version. - rpc GetAccount (GetAccountRequest) returns (GetAccountResponse); - // GetAccountAtLatestBlock gets an account by address from the latest sealed execution state. - rpc GetAccountAtLatestBlock (GetAccountAtLatestBlockRequest) returns (AccountResponse); - // GetAccountAtBlockHeight gets an account by address at the given block height - rpc GetAccountAtBlockHeight (GetAccountAtBlockHeightRequest) returns (AccountResponse); + // Warning: this function is deprecated. It behaves identically to + // GetAccountAtLatestBlock and will be removed in a future version. + rpc GetAccount(GetAccountRequest) returns (GetAccountResponse); + // GetAccountAtLatestBlock gets an account by address from the latest sealed + // execution state. + rpc GetAccountAtLatestBlock(GetAccountAtLatestBlockRequest) + returns (AccountResponse); + // GetAccountAtBlockHeight gets an account by address at the given block + // height + rpc GetAccountAtBlockHeight(GetAccountAtBlockHeightRequest) + returns (AccountResponse); // Scripts - // ExecuteScriptAtLatestBlock executes a read-only Cadence script against the latest sealed execution state. - rpc ExecuteScriptAtLatestBlock (ExecuteScriptAtLatestBlockRequest) returns (ExecuteScriptResponse); - // ExecuteScriptAtBlockID executes a ready-only Cadence script against the execution state at the block with the given ID. - rpc ExecuteScriptAtBlockID (ExecuteScriptAtBlockIDRequest) returns (ExecuteScriptResponse); - // ExecuteScriptAtBlockHeight executes a ready-only Cadence script against the execution state at the given block height. - rpc ExecuteScriptAtBlockHeight (ExecuteScriptAtBlockHeightRequest) returns (ExecuteScriptResponse); + // ExecuteScriptAtLatestBlock executes a read-only Cadence script against the + // latest sealed execution state. + rpc ExecuteScriptAtLatestBlock(ExecuteScriptAtLatestBlockRequest) + returns (ExecuteScriptResponse); + // ExecuteScriptAtBlockID executes a ready-only Cadence script against the + // execution state at the block with the given ID. + rpc ExecuteScriptAtBlockID(ExecuteScriptAtBlockIDRequest) + returns (ExecuteScriptResponse); + // ExecuteScriptAtBlockHeight executes a ready-only Cadence script against the + // execution state at the given block height. + rpc ExecuteScriptAtBlockHeight(ExecuteScriptAtBlockHeightRequest) + returns (ExecuteScriptResponse); // Events - // GetEventsForHeightRange retrieves events emitted within the specified block range. - rpc GetEventsForHeightRange (GetEventsForHeightRangeRequest) returns (EventsResponse); + // GetEventsForHeightRange retrieves events emitted within the specified block + // range. + rpc GetEventsForHeightRange(GetEventsForHeightRangeRequest) + returns (EventsResponse); - // GetEventsForBlockIDs retrieves events for the specified block IDs and event type. - rpc GetEventsForBlockIDs (GetEventsForBlockIDsRequest) returns (EventsResponse); + // GetEventsForBlockIDs retrieves events for the specified block IDs and event + // type. + rpc GetEventsForBlockIDs(GetEventsForBlockIDsRequest) + returns (EventsResponse); // NetworkParameters // GetNetworkParameters retrieves the Flow network details - rpc GetNetworkParameters (GetNetworkParametersRequest) returns (GetNetworkParametersResponse); + rpc GetNetworkParameters(GetNetworkParametersRequest) + returns (GetNetworkParametersResponse); } message PingRequest {} diff --git a/packages/protobuf/src/proto/flow/legacy/entities/account.proto b/packages/protobuf/src/proto/flow/legacy/entities/account.proto old mode 100755 new mode 100644 index 730b37d19..2578d064f --- a/packages/protobuf/src/proto/flow/legacy/entities/account.proto +++ b/packages/protobuf/src/proto/flow/legacy/entities/account.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package entities; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/entities"; +option java_package = "org.onflow.protobuf.legacy.entities"; + message Account { bytes address = 1; uint64 balance = 2; diff --git a/packages/protobuf/src/proto/flow/legacy/entities/block.proto b/packages/protobuf/src/proto/flow/legacy/entities/block.proto old mode 100755 new mode 100644 index e36dd88a6..3c6648469 --- a/packages/protobuf/src/proto/flow/legacy/entities/block.proto +++ b/packages/protobuf/src/proto/flow/legacy/entities/block.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package entities; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/entities"; +option java_package = "org.onflow.protobuf.legacy.entities"; + import "google/protobuf/timestamp.proto"; import "flow/legacy/entities/collection.proto"; diff --git a/packages/protobuf/src/proto/flow/legacy/entities/block_header.proto b/packages/protobuf/src/proto/flow/legacy/entities/block_header.proto old mode 100755 new mode 100644 index 38c8afb18..e5fa5afbf --- a/packages/protobuf/src/proto/flow/legacy/entities/block_header.proto +++ b/packages/protobuf/src/proto/flow/legacy/entities/block_header.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package entities; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/entities"; +option java_package = "org.onflow.protobuf.legacy.entities"; + import "google/protobuf/timestamp.proto"; message BlockHeader { diff --git a/packages/protobuf/src/proto/flow/legacy/entities/block_seal.proto b/packages/protobuf/src/proto/flow/legacy/entities/block_seal.proto old mode 100755 new mode 100644 index 6989735b4..d61617a35 --- a/packages/protobuf/src/proto/flow/legacy/entities/block_seal.proto +++ b/packages/protobuf/src/proto/flow/legacy/entities/block_seal.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package entities; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/entities"; +option java_package = "org.onflow.protobuf.legacy.entities"; + message BlockSeal { bytes block_id = 1; bytes execution_receipt_id = 2; diff --git a/packages/protobuf/src/proto/flow/legacy/entities/collection.proto b/packages/protobuf/src/proto/flow/legacy/entities/collection.proto old mode 100755 new mode 100644 index 3bb9bba0e..59667c6a7 --- a/packages/protobuf/src/proto/flow/legacy/entities/collection.proto +++ b/packages/protobuf/src/proto/flow/legacy/entities/collection.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package entities; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/entities"; +option java_package = "org.onflow.protobuf.legacy.entities"; + message Collection { bytes id = 1; repeated bytes transaction_ids = 2; diff --git a/packages/protobuf/src/proto/flow/legacy/entities/event.proto b/packages/protobuf/src/proto/flow/legacy/entities/event.proto old mode 100755 new mode 100644 index 7283a1822..6185b5469 --- a/packages/protobuf/src/proto/flow/legacy/entities/event.proto +++ b/packages/protobuf/src/proto/flow/legacy/entities/event.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package entities; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/entities"; +option java_package = "org.onflow.protobuf.legacy.entities"; + message Event { string type = 1; bytes transaction_id = 2; diff --git a/packages/protobuf/src/proto/flow/legacy/entities/transaction.proto b/packages/protobuf/src/proto/flow/legacy/entities/transaction.proto old mode 100755 new mode 100644 index 11e4d85a7..9b028dfc6 --- a/packages/protobuf/src/proto/flow/legacy/entities/transaction.proto +++ b/packages/protobuf/src/proto/flow/legacy/entities/transaction.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package entities; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/entities"; +option java_package = "org.onflow.protobuf.legacy.entities"; + enum TransactionStatus { UNKNOWN = 0; PENDING = 1; @@ -17,7 +20,7 @@ message Transaction { uint32 key_id = 2; uint64 sequence_number = 3; } - + message Signature { bytes address = 1; uint32 key_id = 2; diff --git a/packages/protobuf/src/proto/flow/legacy/execution/execution.proto b/packages/protobuf/src/proto/flow/legacy/execution/execution.proto old mode 100755 new mode 100644 index f12db6af4..6b9fd904c --- a/packages/protobuf/src/proto/flow/legacy/execution/execution.proto +++ b/packages/protobuf/src/proto/flow/legacy/execution/execution.proto @@ -2,34 +2,42 @@ syntax = "proto3"; package execution; +option go_package = "github.com/onflow/flow/protobuf/go/flow/legacy/execution"; +option java_package = "org.onflow.protobuf.legacy.execution"; + import "flow/legacy/entities/account.proto"; import "flow/legacy/entities/event.proto"; // ExecutionAPI is the API provided by the execution nodes. service ExecutionAPI { + // Ping is used to check if the access node is alive and healthy. + rpc Ping(PingRequest) returns (PingResponse); - // Ping is used to check if the access node is alive and healthy. - rpc Ping (PingRequest) returns (PingResponse); - - // Accounts + // Accounts - // GetAccountAtBlockID gets an account by address at the given block ID - rpc GetAccountAtBlockID (GetAccountAtBlockIDRequest) returns (GetAccountAtBlockIDResponse); + // GetAccountAtBlockID gets an account by address at the given block ID + rpc GetAccountAtBlockID(GetAccountAtBlockIDRequest) + returns (GetAccountAtBlockIDResponse); - // Scripts + // Scripts - // ExecuteScriptAtBlockID executes a ready-only Cadence script against the execution state at the block with the given ID. - rpc ExecuteScriptAtBlockID (ExecuteScriptAtBlockIDRequest) returns (ExecuteScriptAtBlockIDResponse); + // ExecuteScriptAtBlockID executes a ready-only Cadence script against the + // execution state at the block with the given ID. + rpc ExecuteScriptAtBlockID(ExecuteScriptAtBlockIDRequest) + returns (ExecuteScriptAtBlockIDResponse); - // Events + // Events - // GetEventsForBlockIDs retrieves events for all the specified block IDs that have the given type - rpc GetEventsForBlockIDs (GetEventsForBlockIDsRequest) returns (GetEventsForBlockIDsResponse); + // GetEventsForBlockIDs retrieves events for all the specified block IDs that + // have the given type + rpc GetEventsForBlockIDs(GetEventsForBlockIDsRequest) + returns (GetEventsForBlockIDsResponse); - // Transaction + // Transaction - // GetTransactionResult gets the result of a transaction. - rpc GetTransactionResult (GetTransactionResultRequest) returns (GetTransactionResultResponse); + // GetTransactionResult gets the result of a transaction. + rpc GetTransactionResult(GetTransactionResultRequest) + returns (GetTransactionResultResponse); } // Ping @@ -41,51 +49,51 @@ message PingResponse {} // Accounts message GetAccountAtBlockIDRequest { - bytes block_id = 1; - bytes address = 2; + bytes block_id = 1; + bytes address = 2; } message GetAccountAtBlockIDResponse { - entities.Account account = 1; + entities.Account account = 1; } // Scripts message ExecuteScriptAtBlockIDRequest { - bytes block_id = 1; - bytes script = 2; - repeated bytes arguments = 3; + bytes block_id = 1; + bytes script = 2; + repeated bytes arguments = 3; } message ExecuteScriptAtBlockIDResponse { - bytes value = 1; + bytes value = 1; } // Events message GetEventsForBlockIDsResponse { - message Result { - bytes block_id = 1; - uint64 block_height = 2; - repeated entities.Event events = 3; - } - repeated Result results = 1; + message Result { + bytes block_id = 1; + uint64 block_height = 2; + repeated entities.Event events = 3; + } + repeated Result results = 1; } message GetEventsForBlockIDsRequest { - string type = 1; - repeated bytes block_ids = 2; + string type = 1; + repeated bytes block_ids = 2; } // Transactions message GetTransactionResultRequest { - bytes block_id = 1; - bytes transaction_id = 2; + bytes block_id = 1; + bytes transaction_id = 2; } message GetTransactionResultResponse { - uint32 status_code = 1; - string error_message = 2; - repeated entities.Event events = 3; + uint32 status_code = 1; + string error_message = 2; + repeated entities.Event events = 3; } diff --git a/packages/transport-grpc/src/send-get-block.js b/packages/transport-grpc/src/send-get-block.js index 7546f33e1..2f67f1642 100644 --- a/packages/transport-grpc/src/send-get-block.js +++ b/packages/transport-grpc/src/send-get-block.js @@ -58,12 +58,18 @@ function constructResponse(ix, context, res) { id: u8ToHex(block.getId_asU8(), context), parentId: u8ToHex(block.getParentId_asU8(), context), height: block.getHeight(), - timestamp: block.getTimestamp().toDate().toISOString(), + timestamp: block + .getTimestamp() + .toDate() + .toISOString(), collectionGuarantees: collectionGuarantees.map(collectionGuarantee => ({ collectionId: u8ToHex( collectionGuarantee.getCollectionId_asU8(), context ), + signerIds: collectionGuarantee + .getSignerIdsList_asU8() + .map(id => u8ToHex(id, context)), })), blockSeals: blockSeals.map(blockSeal => ({ blockId: u8ToHex(blockSeal.getBlockId_asU8(), context), diff --git a/packages/transport-grpc/src/send-get-block.test.js b/packages/transport-grpc/src/send-get-block.test.js index ef4532646..cd81f9ede 100644 --- a/packages/transport-grpc/src/send-get-block.test.js +++ b/packages/transport-grpc/src/send-get-block.test.js @@ -100,7 +100,12 @@ describe("Send Get Block", () => { parentId: "a1b2c3", height: 123, timestamp: dateNow.toISOString(), - collectionGuarantees: [], + collectionGuarantees: [ + { + collectionId: "abc32111", + signerIds: ["abc32121"], + }, + ], blockSeals: [], } @@ -114,7 +119,12 @@ describe("Send Get Block", () => { toISOString: () => dateNow.toISOString(), }), }), - getCollectionGuaranteesList: () => [], + getCollectionGuaranteesList: () => [ + { + getCollectionId_asU8: () => hexStrToUInt8Array("abc32111"), + getSignerIdsList_asU8: () => [hexStrToUInt8Array("abc32121")], + }, + ], getBlockSealsList: () => [], getSignaturesList: () => [], }),