From cf2f030d9f54b981f3b1831d26056255f793b821 Mon Sep 17 00:00:00 2001 From: Koinos <67607993+koinos-ci@users.noreply.github.com> Date: Tue, 19 Mar 2024 20:03:27 +0000 Subject: [PATCH] Update for koinos-proto commit 642130d --- index.d.ts | 106 +++++++++++--------- index.js | 276 +++++++++++++++++++++++++++++++++-------------------- index.json | 25 +++-- 3 files changed, 247 insertions(+), 160 deletions(-) diff --git a/index.d.ts b/index.d.ts index 305523b..7da7ac3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11951,97 +11951,109 @@ export namespace koinos { public toJSON(): { [k: string]: any }; } - /** Properties of an error_response. */ - interface Ierror_response { + /** Properties of an error_status. */ + interface Ierror_status { - /** error_response message */ + /** error_status message */ message?: (string|null); - /** error_response data */ + /** error_status data */ data?: (string|null); + + /** error_status code */ + code?: (number|null); + + /** error_status details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents an error_response. */ - class error_response implements Ierror_response { + /** Represents an error_status. */ + class error_status implements Ierror_status { /** - * Constructs a new error_response. + * Constructs a new error_status. * @param [properties] Properties to set */ - constructor(properties?: koinos.rpc.Ierror_response); + constructor(properties?: koinos.rpc.Ierror_status); - /** error_response message. */ + /** error_status message. */ public message: string; - /** error_response data. */ + /** error_status data. */ public data: string; + /** error_status code. */ + public code: number; + + /** error_status details. */ + public details: google.protobuf.IAny[]; + /** - * Creates a new error_response instance using the specified properties. + * Creates a new error_status instance using the specified properties. * @param [properties] Properties to set - * @returns error_response instance + * @returns error_status instance */ - public static create(properties?: koinos.rpc.Ierror_response): koinos.rpc.error_response; + public static create(properties?: koinos.rpc.Ierror_status): koinos.rpc.error_status; /** - * Encodes the specified error_response message. Does not implicitly {@link koinos.rpc.error_response.verify|verify} messages. - * @param message error_response message or plain object to encode + * Encodes the specified error_status message. Does not implicitly {@link koinos.rpc.error_status.verify|verify} messages. + * @param message error_status message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: koinos.rpc.Ierror_response, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: koinos.rpc.Ierror_status, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified error_response message, length delimited. Does not implicitly {@link koinos.rpc.error_response.verify|verify} messages. - * @param message error_response message or plain object to encode + * Encodes the specified error_status message, length delimited. Does not implicitly {@link koinos.rpc.error_status.verify|verify} messages. + * @param message error_status message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: koinos.rpc.Ierror_response, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: koinos.rpc.Ierror_status, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an error_response message from the specified reader or buffer. + * Decodes an error_status message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns error_response + * @returns error_status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): koinos.rpc.error_response; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): koinos.rpc.error_status; /** - * Decodes an error_response message from the specified reader or buffer, length delimited. + * Decodes an error_status message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns error_response + * @returns error_status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): koinos.rpc.error_response; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): koinos.rpc.error_status; /** - * Verifies an error_response message. + * Verifies an error_status message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an error_response message from a plain object. Also converts values to their respective internal types. + * Creates an error_status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns error_response + * @returns error_status */ - public static fromObject(object: { [k: string]: any }): koinos.rpc.error_response; + public static fromObject(object: { [k: string]: any }): koinos.rpc.error_status; /** - * Creates a plain object from an error_response message. Also converts values to other types if specified. - * @param message error_response + * Creates a plain object from an error_status message. Also converts values to other types if specified. + * @param message error_status * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: koinos.rpc.error_response, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: koinos.rpc.error_status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this error_response to JSON. + * Converts this error_status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -12336,7 +12348,7 @@ export namespace koinos { reserved?: (koinos.rpc.Ireserved_rpc|null); /** contract_meta_store_response error */ - error?: (koinos.rpc.Ierror_response|null); + error?: (koinos.rpc.Ierror_status|null); /** contract_meta_store_response get_contract_meta */ get_contract_meta?: (koinos.rpc.contract_meta_store.Iget_contract_meta_response|null); @@ -12355,7 +12367,7 @@ export namespace koinos { public reserved?: (koinos.rpc.Ireserved_rpc|null); /** contract_meta_store_response error. */ - public error?: (koinos.rpc.Ierror_response|null); + public error?: (koinos.rpc.Ierror_status|null); /** contract_meta_store_response get_contract_meta. */ public get_contract_meta?: (koinos.rpc.contract_meta_store.Iget_contract_meta_response|null); @@ -12718,7 +12730,7 @@ export namespace koinos { reserved?: (koinos.rpc.Ireserved_rpc|null); /** p2p_response error */ - error?: (koinos.rpc.Ierror_response|null); + error?: (koinos.rpc.Ierror_status|null); /** p2p_response get_gossip_status */ get_gossip_status?: (koinos.rpc.p2p.Iget_gossip_status_response|null); @@ -12737,7 +12749,7 @@ export namespace koinos { public reserved?: (koinos.rpc.Ireserved_rpc|null); /** p2p_response error. */ - public error?: (koinos.rpc.Ierror_response|null); + public error?: (koinos.rpc.Ierror_status|null); /** p2p_response get_gossip_status. */ public get_gossip_status?: (koinos.rpc.p2p.Iget_gossip_status_response|null); @@ -13694,7 +13706,7 @@ export namespace koinos { reserved?: (koinos.rpc.Ireserved_rpc|null); /** block_store_response error */ - error?: (koinos.rpc.Ierror_response|null); + error?: (koinos.rpc.Ierror_status|null); /** block_store_response get_blocks_by_id */ get_blocks_by_id?: (koinos.rpc.block_store.Iget_blocks_by_id_response|null); @@ -13722,7 +13734,7 @@ export namespace koinos { public reserved?: (koinos.rpc.Ireserved_rpc|null); /** block_store_response error. */ - public error?: (koinos.rpc.Ierror_response|null); + public error?: (koinos.rpc.Ierror_status|null); /** block_store_response get_blocks_by_id. */ public get_blocks_by_id?: (koinos.rpc.block_store.Iget_blocks_by_id_response|null); @@ -14232,7 +14244,7 @@ export namespace koinos { reserved?: (koinos.rpc.Ireserved_rpc|null); /** account_history_response error */ - error?: (koinos.rpc.Ierror_response|null); + error?: (koinos.rpc.Ierror_status|null); /** account_history_response get_account_history */ get_account_history?: (koinos.rpc.account_history.Iget_account_history_response|null); @@ -14251,7 +14263,7 @@ export namespace koinos { public reserved?: (koinos.rpc.Ireserved_rpc|null); /** account_history_response error. */ - public error?: (koinos.rpc.Ierror_response|null); + public error?: (koinos.rpc.Ierror_status|null); /** account_history_response get_account_history. */ public get_account_history?: (koinos.rpc.account_history.Iget_account_history_response|null); @@ -14620,7 +14632,7 @@ export namespace koinos { reserved?: (koinos.rpc.Ireserved_rpc|null); /** transaction_store_response error */ - error?: (koinos.rpc.Ierror_response|null); + error?: (koinos.rpc.Ierror_status|null); /** transaction_store_response get_transactions_by_id */ get_transactions_by_id?: (koinos.rpc.transaction_store.Iget_transactions_by_id_response|null); @@ -14639,7 +14651,7 @@ export namespace koinos { public reserved?: (koinos.rpc.Ireserved_rpc|null); /** transaction_store_response error. */ - public error?: (koinos.rpc.Ierror_response|null); + public error?: (koinos.rpc.Ierror_status|null); /** transaction_store_response get_transactions_by_id. */ public get_transactions_by_id?: (koinos.rpc.transaction_store.Iget_transactions_by_id_response|null); @@ -16730,7 +16742,7 @@ export namespace koinos { reserved?: (koinos.rpc.Ireserved_rpc|null); /** chain_response error */ - error?: (koinos.rpc.Ierror_response|null); + error?: (koinos.rpc.Ierror_status|null); /** chain_response submit_block */ submit_block?: (koinos.rpc.chain.Isubmit_block_response|null); @@ -16776,7 +16788,7 @@ export namespace koinos { public reserved?: (koinos.rpc.Ireserved_rpc|null); /** chain_response error. */ - public error?: (koinos.rpc.Ierror_response|null); + public error?: (koinos.rpc.Ierror_status|null); /** chain_response submit_block. */ public submit_block?: (koinos.rpc.chain.Isubmit_block_response|null); @@ -17916,7 +17928,7 @@ export namespace koinos { reserved?: (koinos.rpc.Ireserved_rpc|null); /** mempool_response error */ - error?: (koinos.rpc.Ierror_response|null); + error?: (koinos.rpc.Ierror_status|null); /** mempool_response check_pending_account_resources */ check_pending_account_resources?: (koinos.rpc.mempool.Icheck_pending_account_resources_response|null); @@ -17944,7 +17956,7 @@ export namespace koinos { public reserved?: (koinos.rpc.Ireserved_rpc|null); /** mempool_response error. */ - public error?: (koinos.rpc.Ierror_response|null); + public error?: (koinos.rpc.Ierror_status|null); /** mempool_response check_pending_account_resources. */ public check_pending_account_resources?: (koinos.rpc.mempool.Icheck_pending_account_resources_response|null); diff --git a/index.js b/index.js index 140b421..171bbbb 100644 --- a/index.js +++ b/index.js @@ -28658,25 +28658,28 @@ return reserved_rpc; })(); - rpc.error_response = (function() { + rpc.error_status = (function() { /** - * Properties of an error_response. + * Properties of an error_status. * @memberof koinos.rpc - * @interface Ierror_response - * @property {string|null} [message] error_response message - * @property {string|null} [data] error_response data + * @interface Ierror_status + * @property {string|null} [message] error_status message + * @property {string|null} [data] error_status data + * @property {number|null} [code] error_status code + * @property {Array.|null} [details] error_status details */ /** - * Constructs a new error_response. + * Constructs a new error_status. * @memberof koinos.rpc - * @classdesc Represents an error_response. - * @implements Ierror_response + * @classdesc Represents an error_status. + * @implements Ierror_status * @constructor - * @param {koinos.rpc.Ierror_response=} [properties] Properties to set + * @param {koinos.rpc.Ierror_status=} [properties] Properties to set */ - function error_response(properties) { + function error_status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28684,80 +28687,101 @@ } /** - * error_response message. + * error_status message. * @member {string} message - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @instance */ - error_response.prototype.message = ""; + error_status.prototype.message = ""; /** - * error_response data. + * error_status data. * @member {string} data - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @instance */ - error_response.prototype.data = ""; + error_status.prototype.data = ""; /** - * Creates a new error_response instance using the specified properties. + * error_status code. + * @member {number} code + * @memberof koinos.rpc.error_status + * @instance + */ + error_status.prototype.code = 0; + + /** + * error_status details. + * @member {Array.} details + * @memberof koinos.rpc.error_status + * @instance + */ + error_status.prototype.details = $util.emptyArray; + + /** + * Creates a new error_status instance using the specified properties. * @function create - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @static - * @param {koinos.rpc.Ierror_response=} [properties] Properties to set - * @returns {koinos.rpc.error_response} error_response instance + * @param {koinos.rpc.Ierror_status=} [properties] Properties to set + * @returns {koinos.rpc.error_status} error_status instance */ - error_response.create = function create(properties) { - return new error_response(properties); + error_status.create = function create(properties) { + return new error_status(properties); }; /** - * Encodes the specified error_response message. Does not implicitly {@link koinos.rpc.error_response.verify|verify} messages. + * Encodes the specified error_status message. Does not implicitly {@link koinos.rpc.error_status.verify|verify} messages. * @function encode - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @static - * @param {koinos.rpc.Ierror_response} message error_response message or plain object to encode + * @param {koinos.rpc.Ierror_status} message error_status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - error_response.encode = function encode(message, writer) { + error_status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.message != null && Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); if (message.data != null && Object.hasOwnProperty.call(message, "data")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.data); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.code); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified error_response message, length delimited. Does not implicitly {@link koinos.rpc.error_response.verify|verify} messages. + * Encodes the specified error_status message, length delimited. Does not implicitly {@link koinos.rpc.error_status.verify|verify} messages. * @function encodeDelimited - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @static - * @param {koinos.rpc.Ierror_response} message error_response message or plain object to encode + * @param {koinos.rpc.Ierror_status} message error_status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - error_response.encodeDelimited = function encodeDelimited(message, writer) { + error_status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an error_response message from the specified reader or buffer. + * Decodes an error_status message from the specified reader or buffer. * @function decode - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {koinos.rpc.error_response} error_response + * @returns {koinos.rpc.error_status} error_status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - error_response.decode = function decode(reader, length) { + error_status.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.koinos.rpc.error_response(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.koinos.rpc.error_status(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -28767,6 +28791,14 @@ case 2: message.data = reader.string(); break; + case 3: + message.code = reader.int32(); + break; + case 10: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -28776,30 +28808,30 @@ }; /** - * Decodes an error_response message from the specified reader or buffer, length delimited. + * Decodes an error_status message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {koinos.rpc.error_response} error_response + * @returns {koinos.rpc.error_status} error_status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - error_response.decodeDelimited = function decodeDelimited(reader) { + error_status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an error_response message. + * Verifies an error_status message. * @function verify - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - error_response.verify = function verify(message) { + error_status.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.message != null && message.hasOwnProperty("message")) @@ -28808,64 +28840,98 @@ if (message.data != null && message.hasOwnProperty("data")) if (!$util.isString(message.data)) return "data: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } return null; }; /** - * Creates an error_response message from a plain object. Also converts values to their respective internal types. + * Creates an error_status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @static * @param {Object.} object Plain object - * @returns {koinos.rpc.error_response} error_response + * @returns {koinos.rpc.error_status} error_status */ - error_response.fromObject = function fromObject(object) { - if (object instanceof $root.koinos.rpc.error_response) + error_status.fromObject = function fromObject(object) { + if (object instanceof $root.koinos.rpc.error_status) return object; - var message = new $root.koinos.rpc.error_response(); + var message = new $root.koinos.rpc.error_status(); if (object.message != null) message.message = String(object.message); if (object.data != null) message.data = String(object.data); + if (object.code != null) + message.code = object.code | 0; + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".koinos.rpc.error_status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".koinos.rpc.error_status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } return message; }; /** - * Creates a plain object from an error_response message. Also converts values to other types if specified. + * Creates a plain object from an error_status message. Also converts values to other types if specified. * @function toObject - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @static - * @param {koinos.rpc.error_response} message error_response + * @param {koinos.rpc.error_status} message error_status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - error_response.toObject = function toObject(message, options) { + error_status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.details = []; if (options.defaults) { object.message = ""; object.data = ""; + object.code = 0; } if (message.message != null && message.hasOwnProperty("message")) object.message = message.message; if (message.data != null && message.hasOwnProperty("data")) object.data = message.data; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } return object; }; /** - * Converts this error_response to JSON. + * Converts this error_status to JSON. * @function toJSON - * @memberof koinos.rpc.error_response + * @memberof koinos.rpc.error_status * @instance * @returns {Object.} JSON object */ - error_response.prototype.toJSON = function toJSON() { + error_status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return error_response; + return error_status; })(); rpc.contract_meta_store = (function() { @@ -29517,7 +29583,7 @@ * @memberof koinos.rpc.contract_meta_store * @interface Icontract_meta_store_response * @property {koinos.rpc.Ireserved_rpc|null} [reserved] contract_meta_store_response reserved - * @property {koinos.rpc.Ierror_response|null} [error] contract_meta_store_response error + * @property {koinos.rpc.Ierror_status|null} [error] contract_meta_store_response error * @property {koinos.rpc.contract_meta_store.Iget_contract_meta_response|null} [get_contract_meta] contract_meta_store_response get_contract_meta */ @@ -29546,7 +29612,7 @@ /** * contract_meta_store_response error. - * @member {koinos.rpc.Ierror_response|null|undefined} error + * @member {koinos.rpc.Ierror_status|null|undefined} error * @memberof koinos.rpc.contract_meta_store.contract_meta_store_response * @instance */ @@ -29601,7 +29667,7 @@ if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) $root.koinos.rpc.reserved_rpc.encode(message.reserved, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.koinos.rpc.error_response.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.koinos.rpc.error_status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.get_contract_meta != null && Object.hasOwnProperty.call(message, "get_contract_meta")) $root.koinos.rpc.contract_meta_store.get_contract_meta_response.encode(message.get_contract_meta, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; @@ -29642,7 +29708,7 @@ message.reserved = $root.koinos.rpc.reserved_rpc.decode(reader, reader.uint32()); break; case 2: - message.error = $root.koinos.rpc.error_response.decode(reader, reader.uint32()); + message.error = $root.koinos.rpc.error_status.decode(reader, reader.uint32()); break; case 3: message.get_contract_meta = $root.koinos.rpc.contract_meta_store.get_contract_meta_response.decode(reader, reader.uint32()); @@ -29696,7 +29762,7 @@ return "response: multiple values"; properties.response = 1; { - var error = $root.koinos.rpc.error_response.verify(message.error); + var error = $root.koinos.rpc.error_status.verify(message.error); if (error) return "error." + error; } @@ -29734,7 +29800,7 @@ if (object.error != null) { if (typeof object.error !== "object") throw TypeError(".koinos.rpc.contract_meta_store.contract_meta_store_response.error: object expected"); - message.error = $root.koinos.rpc.error_response.fromObject(object.error); + message.error = $root.koinos.rpc.error_status.fromObject(object.error); } if (object.get_contract_meta != null) { if (typeof object.get_contract_meta !== "object") @@ -29763,7 +29829,7 @@ object.response = "reserved"; } if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.koinos.rpc.error_response.toObject(message.error, options); + object.error = $root.koinos.rpc.error_status.toObject(message.error, options); if (options.oneofs) object.response = "error"; } @@ -30400,7 +30466,7 @@ * @memberof koinos.rpc.p2p * @interface Ip2p_response * @property {koinos.rpc.Ireserved_rpc|null} [reserved] p2p_response reserved - * @property {koinos.rpc.Ierror_response|null} [error] p2p_response error + * @property {koinos.rpc.Ierror_status|null} [error] p2p_response error * @property {koinos.rpc.p2p.Iget_gossip_status_response|null} [get_gossip_status] p2p_response get_gossip_status */ @@ -30429,7 +30495,7 @@ /** * p2p_response error. - * @member {koinos.rpc.Ierror_response|null|undefined} error + * @member {koinos.rpc.Ierror_status|null|undefined} error * @memberof koinos.rpc.p2p.p2p_response * @instance */ @@ -30484,7 +30550,7 @@ if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) $root.koinos.rpc.reserved_rpc.encode(message.reserved, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.koinos.rpc.error_response.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.koinos.rpc.error_status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.get_gossip_status != null && Object.hasOwnProperty.call(message, "get_gossip_status")) $root.koinos.rpc.p2p.get_gossip_status_response.encode(message.get_gossip_status, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; @@ -30525,7 +30591,7 @@ message.reserved = $root.koinos.rpc.reserved_rpc.decode(reader, reader.uint32()); break; case 2: - message.error = $root.koinos.rpc.error_response.decode(reader, reader.uint32()); + message.error = $root.koinos.rpc.error_status.decode(reader, reader.uint32()); break; case 3: message.get_gossip_status = $root.koinos.rpc.p2p.get_gossip_status_response.decode(reader, reader.uint32()); @@ -30579,7 +30645,7 @@ return "response: multiple values"; properties.response = 1; { - var error = $root.koinos.rpc.error_response.verify(message.error); + var error = $root.koinos.rpc.error_status.verify(message.error); if (error) return "error." + error; } @@ -30617,7 +30683,7 @@ if (object.error != null) { if (typeof object.error !== "object") throw TypeError(".koinos.rpc.p2p.p2p_response.error: object expected"); - message.error = $root.koinos.rpc.error_response.fromObject(object.error); + message.error = $root.koinos.rpc.error_status.fromObject(object.error); } if (object.get_gossip_status != null) { if (typeof object.get_gossip_status !== "object") @@ -30646,7 +30712,7 @@ object.response = "reserved"; } if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.koinos.rpc.error_response.toObject(message.error, options); + object.error = $root.koinos.rpc.error_status.toObject(message.error, options); if (options.oneofs) object.response = "error"; } @@ -32737,7 +32803,7 @@ * @memberof koinos.rpc.block_store * @interface Iblock_store_response * @property {koinos.rpc.Ireserved_rpc|null} [reserved] block_store_response reserved - * @property {koinos.rpc.Ierror_response|null} [error] block_store_response error + * @property {koinos.rpc.Ierror_status|null} [error] block_store_response error * @property {koinos.rpc.block_store.Iget_blocks_by_id_response|null} [get_blocks_by_id] block_store_response get_blocks_by_id * @property {koinos.rpc.block_store.Iget_blocks_by_height_response|null} [get_blocks_by_height] block_store_response get_blocks_by_height * @property {koinos.rpc.block_store.Iadd_block_response|null} [add_block] block_store_response add_block @@ -32769,7 +32835,7 @@ /** * block_store_response error. - * @member {koinos.rpc.Ierror_response|null|undefined} error + * @member {koinos.rpc.Ierror_status|null|undefined} error * @memberof koinos.rpc.block_store.block_store_response * @instance */ @@ -32848,7 +32914,7 @@ if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) $root.koinos.rpc.reserved_rpc.encode(message.reserved, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.koinos.rpc.error_response.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.koinos.rpc.error_status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.get_blocks_by_id != null && Object.hasOwnProperty.call(message, "get_blocks_by_id")) $root.koinos.rpc.block_store.get_blocks_by_id_response.encode(message.get_blocks_by_id, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.get_blocks_by_height != null && Object.hasOwnProperty.call(message, "get_blocks_by_height")) @@ -32895,7 +32961,7 @@ message.reserved = $root.koinos.rpc.reserved_rpc.decode(reader, reader.uint32()); break; case 2: - message.error = $root.koinos.rpc.error_response.decode(reader, reader.uint32()); + message.error = $root.koinos.rpc.error_status.decode(reader, reader.uint32()); break; case 3: message.get_blocks_by_id = $root.koinos.rpc.block_store.get_blocks_by_id_response.decode(reader, reader.uint32()); @@ -32958,7 +33024,7 @@ return "response: multiple values"; properties.response = 1; { - var error = $root.koinos.rpc.error_response.verify(message.error); + var error = $root.koinos.rpc.error_status.verify(message.error); if (error) return "error." + error; } @@ -33026,7 +33092,7 @@ if (object.error != null) { if (typeof object.error !== "object") throw TypeError(".koinos.rpc.block_store.block_store_response.error: object expected"); - message.error = $root.koinos.rpc.error_response.fromObject(object.error); + message.error = $root.koinos.rpc.error_status.fromObject(object.error); } if (object.get_blocks_by_id != null) { if (typeof object.get_blocks_by_id !== "object") @@ -33070,7 +33136,7 @@ object.response = "reserved"; } if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.koinos.rpc.error_response.toObject(message.error, options); + object.error = $root.koinos.rpc.error_status.toObject(message.error, options); if (options.oneofs) object.response = "error"; } @@ -34193,7 +34259,7 @@ * @memberof koinos.rpc.account_history * @interface Iaccount_history_response * @property {koinos.rpc.Ireserved_rpc|null} [reserved] account_history_response reserved - * @property {koinos.rpc.Ierror_response|null} [error] account_history_response error + * @property {koinos.rpc.Ierror_status|null} [error] account_history_response error * @property {koinos.rpc.account_history.Iget_account_history_response|null} [get_account_history] account_history_response get_account_history */ @@ -34222,7 +34288,7 @@ /** * account_history_response error. - * @member {koinos.rpc.Ierror_response|null|undefined} error + * @member {koinos.rpc.Ierror_status|null|undefined} error * @memberof koinos.rpc.account_history.account_history_response * @instance */ @@ -34277,7 +34343,7 @@ if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) $root.koinos.rpc.reserved_rpc.encode(message.reserved, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.koinos.rpc.error_response.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.koinos.rpc.error_status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.get_account_history != null && Object.hasOwnProperty.call(message, "get_account_history")) $root.koinos.rpc.account_history.get_account_history_response.encode(message.get_account_history, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; @@ -34318,7 +34384,7 @@ message.reserved = $root.koinos.rpc.reserved_rpc.decode(reader, reader.uint32()); break; case 2: - message.error = $root.koinos.rpc.error_response.decode(reader, reader.uint32()); + message.error = $root.koinos.rpc.error_status.decode(reader, reader.uint32()); break; case 3: message.get_account_history = $root.koinos.rpc.account_history.get_account_history_response.decode(reader, reader.uint32()); @@ -34372,7 +34438,7 @@ return "response: multiple values"; properties.response = 1; { - var error = $root.koinos.rpc.error_response.verify(message.error); + var error = $root.koinos.rpc.error_status.verify(message.error); if (error) return "error." + error; } @@ -34410,7 +34476,7 @@ if (object.error != null) { if (typeof object.error !== "object") throw TypeError(".koinos.rpc.account_history.account_history_response.error: object expected"); - message.error = $root.koinos.rpc.error_response.fromObject(object.error); + message.error = $root.koinos.rpc.error_status.fromObject(object.error); } if (object.get_account_history != null) { if (typeof object.get_account_history !== "object") @@ -34439,7 +34505,7 @@ object.response = "reserved"; } if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.koinos.rpc.error_response.toObject(message.error, options); + object.error = $root.koinos.rpc.error_status.toObject(message.error, options); if (options.oneofs) object.response = "error"; } @@ -35143,7 +35209,7 @@ * @memberof koinos.rpc.transaction_store * @interface Itransaction_store_response * @property {koinos.rpc.Ireserved_rpc|null} [reserved] transaction_store_response reserved - * @property {koinos.rpc.Ierror_response|null} [error] transaction_store_response error + * @property {koinos.rpc.Ierror_status|null} [error] transaction_store_response error * @property {koinos.rpc.transaction_store.Iget_transactions_by_id_response|null} [get_transactions_by_id] transaction_store_response get_transactions_by_id */ @@ -35172,7 +35238,7 @@ /** * transaction_store_response error. - * @member {koinos.rpc.Ierror_response|null|undefined} error + * @member {koinos.rpc.Ierror_status|null|undefined} error * @memberof koinos.rpc.transaction_store.transaction_store_response * @instance */ @@ -35227,7 +35293,7 @@ if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) $root.koinos.rpc.reserved_rpc.encode(message.reserved, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.koinos.rpc.error_response.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.koinos.rpc.error_status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.get_transactions_by_id != null && Object.hasOwnProperty.call(message, "get_transactions_by_id")) $root.koinos.rpc.transaction_store.get_transactions_by_id_response.encode(message.get_transactions_by_id, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; @@ -35268,7 +35334,7 @@ message.reserved = $root.koinos.rpc.reserved_rpc.decode(reader, reader.uint32()); break; case 2: - message.error = $root.koinos.rpc.error_response.decode(reader, reader.uint32()); + message.error = $root.koinos.rpc.error_status.decode(reader, reader.uint32()); break; case 3: message.get_transactions_by_id = $root.koinos.rpc.transaction_store.get_transactions_by_id_response.decode(reader, reader.uint32()); @@ -35322,7 +35388,7 @@ return "response: multiple values"; properties.response = 1; { - var error = $root.koinos.rpc.error_response.verify(message.error); + var error = $root.koinos.rpc.error_status.verify(message.error); if (error) return "error." + error; } @@ -35360,7 +35426,7 @@ if (object.error != null) { if (typeof object.error !== "object") throw TypeError(".koinos.rpc.transaction_store.transaction_store_response.error: object expected"); - message.error = $root.koinos.rpc.error_response.fromObject(object.error); + message.error = $root.koinos.rpc.error_status.fromObject(object.error); } if (object.get_transactions_by_id != null) { if (typeof object.get_transactions_by_id !== "object") @@ -35389,7 +35455,7 @@ object.response = "reserved"; } if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.koinos.rpc.error_response.toObject(message.error, options); + object.error = $root.koinos.rpc.error_status.toObject(message.error, options); if (options.oneofs) object.response = "error"; } @@ -40124,7 +40190,7 @@ * @memberof koinos.rpc.chain * @interface Ichain_response * @property {koinos.rpc.Ireserved_rpc|null} [reserved] chain_response reserved - * @property {koinos.rpc.Ierror_response|null} [error] chain_response error + * @property {koinos.rpc.Ierror_status|null} [error] chain_response error * @property {koinos.rpc.chain.Isubmit_block_response|null} [submit_block] chain_response submit_block * @property {koinos.rpc.chain.Isubmit_transaction_response|null} [submit_transaction] chain_response submit_transaction * @property {koinos.rpc.chain.Iget_head_info_response|null} [get_head_info] chain_response get_head_info @@ -40162,7 +40228,7 @@ /** * chain_response error. - * @member {koinos.rpc.Ierror_response|null|undefined} error + * @member {koinos.rpc.Ierror_status|null|undefined} error * @memberof koinos.rpc.chain.chain_response * @instance */ @@ -40289,7 +40355,7 @@ if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) $root.koinos.rpc.reserved_rpc.encode(message.reserved, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.koinos.rpc.error_response.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.koinos.rpc.error_status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.submit_block != null && Object.hasOwnProperty.call(message, "submit_block")) $root.koinos.rpc.chain.submit_block_response.encode(message.submit_block, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.submit_transaction != null && Object.hasOwnProperty.call(message, "submit_transaction")) @@ -40348,7 +40414,7 @@ message.reserved = $root.koinos.rpc.reserved_rpc.decode(reader, reader.uint32()); break; case 2: - message.error = $root.koinos.rpc.error_response.decode(reader, reader.uint32()); + message.error = $root.koinos.rpc.error_status.decode(reader, reader.uint32()); break; case 3: message.submit_block = $root.koinos.rpc.chain.submit_block_response.decode(reader, reader.uint32()); @@ -40429,7 +40495,7 @@ return "response: multiple values"; properties.response = 1; { - var error = $root.koinos.rpc.error_response.verify(message.error); + var error = $root.koinos.rpc.error_status.verify(message.error); if (error) return "error." + error; } @@ -40557,7 +40623,7 @@ if (object.error != null) { if (typeof object.error !== "object") throw TypeError(".koinos.rpc.chain.chain_response.error: object expected"); - message.error = $root.koinos.rpc.error_response.fromObject(object.error); + message.error = $root.koinos.rpc.error_status.fromObject(object.error); } if (object.submit_block != null) { if (typeof object.submit_block !== "object") @@ -40631,7 +40697,7 @@ object.response = "reserved"; } if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.koinos.rpc.error_response.toObject(message.error, options); + object.error = $root.koinos.rpc.error_status.toObject(message.error, options); if (options.oneofs) object.response = "error"; } @@ -43343,7 +43409,7 @@ * @memberof koinos.rpc.mempool * @interface Imempool_response * @property {koinos.rpc.Ireserved_rpc|null} [reserved] mempool_response reserved - * @property {koinos.rpc.Ierror_response|null} [error] mempool_response error + * @property {koinos.rpc.Ierror_status|null} [error] mempool_response error * @property {koinos.rpc.mempool.Icheck_pending_account_resources_response|null} [check_pending_account_resources] mempool_response check_pending_account_resources * @property {koinos.rpc.mempool.Iget_pending_transactions_response|null} [get_pending_transactions] mempool_response get_pending_transactions * @property {koinos.rpc.mempool.Icheck_account_nonce_response|null} [check_account_nonce] mempool_response check_account_nonce @@ -43375,7 +43441,7 @@ /** * mempool_response error. - * @member {koinos.rpc.Ierror_response|null|undefined} error + * @member {koinos.rpc.Ierror_status|null|undefined} error * @memberof koinos.rpc.mempool.mempool_response * @instance */ @@ -43454,7 +43520,7 @@ if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) $root.koinos.rpc.reserved_rpc.encode(message.reserved, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.koinos.rpc.error_response.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.koinos.rpc.error_status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.check_pending_account_resources != null && Object.hasOwnProperty.call(message, "check_pending_account_resources")) $root.koinos.rpc.mempool.check_pending_account_resources_response.encode(message.check_pending_account_resources, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.get_pending_transactions != null && Object.hasOwnProperty.call(message, "get_pending_transactions")) @@ -43501,7 +43567,7 @@ message.reserved = $root.koinos.rpc.reserved_rpc.decode(reader, reader.uint32()); break; case 2: - message.error = $root.koinos.rpc.error_response.decode(reader, reader.uint32()); + message.error = $root.koinos.rpc.error_status.decode(reader, reader.uint32()); break; case 3: message.check_pending_account_resources = $root.koinos.rpc.mempool.check_pending_account_resources_response.decode(reader, reader.uint32()); @@ -43564,7 +43630,7 @@ return "response: multiple values"; properties.response = 1; { - var error = $root.koinos.rpc.error_response.verify(message.error); + var error = $root.koinos.rpc.error_status.verify(message.error); if (error) return "error." + error; } @@ -43632,7 +43698,7 @@ if (object.error != null) { if (typeof object.error !== "object") throw TypeError(".koinos.rpc.mempool.mempool_response.error: object expected"); - message.error = $root.koinos.rpc.error_response.fromObject(object.error); + message.error = $root.koinos.rpc.error_status.fromObject(object.error); } if (object.check_pending_account_resources != null) { if (typeof object.check_pending_account_resources !== "object") @@ -43676,7 +43742,7 @@ object.response = "reserved"; } if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.koinos.rpc.error_response.toObject(message.error, options); + object.error = $root.koinos.rpc.error_status.toObject(message.error, options); if (options.oneofs) object.response = "error"; } diff --git a/index.json b/index.json index b0c82c8..12e71be 100644 --- a/index.json +++ b/index.json @@ -2037,7 +2037,7 @@ "reserved_rpc": { "fields": {} }, - "error_response": { + "error_status": { "fields": { "message": { "type": "string", @@ -2046,6 +2046,15 @@ "data": { "type": "string", "id": 2 + }, + "code": { + "type": "int32", + "id": 3 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 10 } } }, @@ -2109,7 +2118,7 @@ "id": 1 }, "error": { - "type": "rpc.error_response", + "type": "rpc.error_status", "id": 2 }, "get_contract_meta": { @@ -2172,7 +2181,7 @@ "id": 1 }, "error": { - "type": "rpc.error_response", + "type": "rpc.error_status", "id": 2 }, "get_gossip_status": { @@ -2336,7 +2345,7 @@ "id": 1 }, "error": { - "type": "rpc.error_response", + "type": "rpc.error_status", "id": 2 }, "get_blocks_by_id": { @@ -2477,7 +2486,7 @@ "id": 1 }, "error": { - "type": "rpc.error_response", + "type": "rpc.error_status", "id": 2 }, "get_account_history": { @@ -2550,7 +2559,7 @@ "id": 1 }, "error": { - "type": "rpc.error_response", + "type": "rpc.error_status", "id": 2 }, "get_transactions_by_id": { @@ -2876,7 +2885,7 @@ "id": 1 }, "error": { - "type": "rpc.error_response", + "type": "rpc.error_status", "id": 2 }, "submit_block": { @@ -3191,7 +3200,7 @@ "id": 1 }, "error": { - "type": "rpc.error_response", + "type": "rpc.error_status", "id": 2 }, "check_pending_account_resources": {