@hyperweb/telescope 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main/helpers/helper-func-types-interface.js +7 -7
- package/main/helpers/helper-func-types.js +7 -7
- package/main/helpers/types-helper.js +38 -4
- package/module/helpers/helper-func-types-interface.js +7 -7
- package/module/helpers/helper-func-types.js +7 -7
- package/module/helpers/types-helper.js +38 -4
- package/package.json +2 -2
- package/src/helpers/helper-func-types-interface.ts +7 -7
- package/src/helpers/helper-func-types.ts +7 -7
- package/src/helpers/types-helper.ts +38 -4
|
@@ -4,12 +4,12 @@ exports.getHelperFuncTypesForInterface = void 0;
|
|
|
4
4
|
const getHelperFuncTypesForInterface = (options) => {
|
|
5
5
|
return `
|
|
6
6
|
import { HttpEndpoint } from "@interchainjs/types";
|
|
7
|
-
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}"
|
|
8
|
-
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}"
|
|
9
|
-
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}"
|
|
10
|
-
import { TelescopeGeneratedCodec, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}"
|
|
11
|
-
import { toConverters, toEncoders } from "@interchainjs/cosmos
|
|
12
|
-
import { ISigningClient } from "@interchainjs/cosmos
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
8
|
+
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}";` : ''}
|
|
9
|
+
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
10
|
+
import { TelescopeGeneratedCodec, DeliverTxResponse, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}";` : ''}${!options.isGeneratingCosmosTypes ? `
|
|
11
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
12
|
+
import { ISigningClient } from "@interchainjs/cosmos";` : ''}
|
|
13
13
|
|
|
14
14
|
export interface QueryBuilderOptions<TReq, TRes> {
|
|
15
15
|
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
|
|
@@ -61,7 +61,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
|
|
|
61
61
|
message: TMsg | TMsg[],
|
|
62
62
|
fee: StdFee | 'auto',
|
|
63
63
|
memo: string
|
|
64
|
-
): Promise<
|
|
64
|
+
): Promise<DeliverTxResponse> => {
|
|
65
65
|
if (!client) throw new Error("SigningClient is not initialized");
|
|
66
66
|
|
|
67
67
|
//register all related encoders and converters
|
|
@@ -4,12 +4,12 @@ exports.getHelperFuncTypes = void 0;
|
|
|
4
4
|
const getHelperFuncTypes = (options) => {
|
|
5
5
|
return `
|
|
6
6
|
import { HttpEndpoint } from "@interchainjs/types";
|
|
7
|
-
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}"
|
|
8
|
-
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}"
|
|
9
|
-
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}"
|
|
10
|
-
import { TelescopeGeneratedCodec, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}"
|
|
11
|
-
import { toConverters, toEncoders } from "@interchainjs/cosmos
|
|
12
|
-
import { ISigningClient } from "@interchainjs/cosmos
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
8
|
+
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}";` : ''}
|
|
9
|
+
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
10
|
+
import { TelescopeGeneratedCodec, DeliverTxResponse, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}";` : ''}${!options.isGeneratingCosmosTypes ? `
|
|
11
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
12
|
+
import { ISigningClient } from "@interchainjs/cosmos";` : ''}
|
|
13
13
|
|
|
14
14
|
export interface QueryBuilderOptions<TReq, TRes> {
|
|
15
15
|
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
|
|
@@ -54,7 +54,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
|
|
|
54
54
|
message: TMsg | TMsg[],
|
|
55
55
|
fee: StdFee | 'auto',
|
|
56
56
|
memo: string
|
|
57
|
-
): Promise<
|
|
57
|
+
): Promise<DeliverTxResponse> => {
|
|
58
58
|
if (!client) throw new Error("SigningClient is not initialized");
|
|
59
59
|
|
|
60
60
|
//register all related encoders and converters
|
|
@@ -8,9 +8,9 @@ ${options.useInterchainJs ? '' : `import { OfflineSigner } from "@cosmjs/proto-s
|
|
|
8
8
|
import { HttpEndpoint } from "${options.useInterchainJs ? "@interchainjs/types" : "@cosmjs/tendermint-rpc"}";
|
|
9
9
|
${options.useInterchainJs ? `
|
|
10
10
|
|
|
11
|
-
import { Event, Attribute } from "@interchainjs/types";
|
|
12
|
-
|
|
11
|
+
import { DeliverTxResponse, Event, Attribute } from "@interchainjs/types";
|
|
13
12
|
|
|
13
|
+
export type { DeliverTxResponse }
|
|
14
14
|
|
|
15
15
|
` : ''}
|
|
16
16
|
export type ProtoMsg = Omit<Any, "typeUrl"> & { typeUrl: any };
|
|
@@ -105,7 +105,41 @@ export interface Event {
|
|
|
105
105
|
attributes: readonly Attribute[];
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
/**
|
|
109
|
+
* The response after successfully broadcasting a transaction.
|
|
110
|
+
* Success or failure refer to the execution result.
|
|
111
|
+
*/
|
|
112
|
+
export interface DeliverTxResponse {
|
|
113
|
+
height: number;
|
|
114
|
+
/** The position of the transaction within the block. This is a 0-based index. */
|
|
115
|
+
txIndex: number;
|
|
116
|
+
/** Error code. The transaction suceeded if and only if code is 0. */
|
|
117
|
+
code: number;
|
|
118
|
+
transactionHash: string;
|
|
119
|
+
events: readonly Event[];
|
|
120
|
+
/**
|
|
121
|
+
* A string-based log document.
|
|
122
|
+
*
|
|
123
|
+
* This currently seems to merge attributes of multiple events into one event per type
|
|
124
|
+
* (https://github.com/tendermint/tendermint/issues/9595). You might want to use the \`events\`
|
|
125
|
+
* field instead.
|
|
126
|
+
*/
|
|
127
|
+
rawLog?: string;
|
|
128
|
+
/** @deprecated Use \`msgResponses\` instead. */
|
|
129
|
+
data?: readonly MsgData[];
|
|
130
|
+
/**
|
|
131
|
+
* The message responses of the [TxMsgData](https://github.com/cosmos/cosmos-sdk/blob/v0.46.3/proto/cosmos/base/abci/v1beta1/abci.proto#L128-L140)
|
|
132
|
+
* as \`Any\`s.
|
|
133
|
+
* This field is an empty list for chains running Cosmos SDK < 0.46.
|
|
134
|
+
*/
|
|
135
|
+
msgResponses: Array<{
|
|
136
|
+
typeUrl: string;
|
|
137
|
+
value: Uint8Array;
|
|
138
|
+
}>;
|
|
139
|
+
gasUsed: bigint;
|
|
140
|
+
gasWanted: bigint;
|
|
141
|
+
origin?: any;
|
|
142
|
+
}
|
|
109
143
|
`}
|
|
110
144
|
export interface TxRpc {
|
|
111
145
|
request(
|
|
@@ -118,7 +152,7 @@ export interface TxRpc {
|
|
|
118
152
|
messages: EncodeObject[],
|
|
119
153
|
fee: StdFee | "auto" | number,
|
|
120
154
|
memo: string
|
|
121
|
-
): Promise<
|
|
155
|
+
): Promise<DeliverTxResponse>;
|
|
122
156
|
}
|
|
123
157
|
${options.useInterchainJs ? '' : `
|
|
124
158
|
export interface SigningClientParams {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export const getHelperFuncTypesForInterface = (options) => {
|
|
2
2
|
return `
|
|
3
3
|
import { HttpEndpoint } from "@interchainjs/types";
|
|
4
|
-
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}"
|
|
5
|
-
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}"
|
|
6
|
-
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}"
|
|
7
|
-
import { TelescopeGeneratedCodec, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}"
|
|
8
|
-
import { toConverters, toEncoders } from "@interchainjs/cosmos
|
|
9
|
-
import { ISigningClient } from "@interchainjs/cosmos
|
|
4
|
+
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
5
|
+
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}";` : ''}
|
|
6
|
+
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
7
|
+
import { TelescopeGeneratedCodec, DeliverTxResponse, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}";` : ''}${!options.isGeneratingCosmosTypes ? `
|
|
8
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
9
|
+
import { ISigningClient } from "@interchainjs/cosmos";` : ''}
|
|
10
10
|
|
|
11
11
|
export interface QueryBuilderOptions<TReq, TRes> {
|
|
12
12
|
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
|
|
@@ -58,7 +58,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
|
|
|
58
58
|
message: TMsg | TMsg[],
|
|
59
59
|
fee: StdFee | 'auto',
|
|
60
60
|
memo: string
|
|
61
|
-
): Promise<
|
|
61
|
+
): Promise<DeliverTxResponse> => {
|
|
62
62
|
if (!client) throw new Error("SigningClient is not initialized");
|
|
63
63
|
|
|
64
64
|
//register all related encoders and converters
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export const getHelperFuncTypes = (options) => {
|
|
2
2
|
return `
|
|
3
3
|
import { HttpEndpoint } from "@interchainjs/types";
|
|
4
|
-
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}"
|
|
5
|
-
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}"
|
|
6
|
-
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}"
|
|
7
|
-
import { TelescopeGeneratedCodec, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}"
|
|
8
|
-
import { toConverters, toEncoders } from "@interchainjs/cosmos
|
|
9
|
-
import { ISigningClient } from "@interchainjs/cosmos
|
|
4
|
+
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
5
|
+
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}";` : ''}
|
|
6
|
+
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
7
|
+
import { TelescopeGeneratedCodec, DeliverTxResponse, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}";` : ''}${!options.isGeneratingCosmosTypes ? `
|
|
8
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
9
|
+
import { ISigningClient } from "@interchainjs/cosmos";` : ''}
|
|
10
10
|
|
|
11
11
|
export interface QueryBuilderOptions<TReq, TRes> {
|
|
12
12
|
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
|
|
@@ -51,7 +51,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
|
|
|
51
51
|
message: TMsg | TMsg[],
|
|
52
52
|
fee: StdFee | 'auto',
|
|
53
53
|
memo: string
|
|
54
|
-
): Promise<
|
|
54
|
+
): Promise<DeliverTxResponse> => {
|
|
55
55
|
if (!client) throw new Error("SigningClient is not initialized");
|
|
56
56
|
|
|
57
57
|
//register all related encoders and converters
|
|
@@ -5,9 +5,9 @@ ${options.useInterchainJs ? '' : `import { OfflineSigner } from "@cosmjs/proto-s
|
|
|
5
5
|
import { HttpEndpoint } from "${options.useInterchainJs ? "@interchainjs/types" : "@cosmjs/tendermint-rpc"}";
|
|
6
6
|
${options.useInterchainJs ? `
|
|
7
7
|
|
|
8
|
-
import { Event, Attribute } from "@interchainjs/types";
|
|
9
|
-
|
|
8
|
+
import { DeliverTxResponse, Event, Attribute } from "@interchainjs/types";
|
|
10
9
|
|
|
10
|
+
export type { DeliverTxResponse }
|
|
11
11
|
|
|
12
12
|
` : ''}
|
|
13
13
|
export type ProtoMsg = Omit<Any, "typeUrl"> & { typeUrl: any };
|
|
@@ -102,7 +102,41 @@ export interface Event {
|
|
|
102
102
|
attributes: readonly Attribute[];
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
/**
|
|
106
|
+
* The response after successfully broadcasting a transaction.
|
|
107
|
+
* Success or failure refer to the execution result.
|
|
108
|
+
*/
|
|
109
|
+
export interface DeliverTxResponse {
|
|
110
|
+
height: number;
|
|
111
|
+
/** The position of the transaction within the block. This is a 0-based index. */
|
|
112
|
+
txIndex: number;
|
|
113
|
+
/** Error code. The transaction suceeded if and only if code is 0. */
|
|
114
|
+
code: number;
|
|
115
|
+
transactionHash: string;
|
|
116
|
+
events: readonly Event[];
|
|
117
|
+
/**
|
|
118
|
+
* A string-based log document.
|
|
119
|
+
*
|
|
120
|
+
* This currently seems to merge attributes of multiple events into one event per type
|
|
121
|
+
* (https://github.com/tendermint/tendermint/issues/9595). You might want to use the \`events\`
|
|
122
|
+
* field instead.
|
|
123
|
+
*/
|
|
124
|
+
rawLog?: string;
|
|
125
|
+
/** @deprecated Use \`msgResponses\` instead. */
|
|
126
|
+
data?: readonly MsgData[];
|
|
127
|
+
/**
|
|
128
|
+
* The message responses of the [TxMsgData](https://github.com/cosmos/cosmos-sdk/blob/v0.46.3/proto/cosmos/base/abci/v1beta1/abci.proto#L128-L140)
|
|
129
|
+
* as \`Any\`s.
|
|
130
|
+
* This field is an empty list for chains running Cosmos SDK < 0.46.
|
|
131
|
+
*/
|
|
132
|
+
msgResponses: Array<{
|
|
133
|
+
typeUrl: string;
|
|
134
|
+
value: Uint8Array;
|
|
135
|
+
}>;
|
|
136
|
+
gasUsed: bigint;
|
|
137
|
+
gasWanted: bigint;
|
|
138
|
+
origin?: any;
|
|
139
|
+
}
|
|
106
140
|
`}
|
|
107
141
|
export interface TxRpc {
|
|
108
142
|
request(
|
|
@@ -115,7 +149,7 @@ export interface TxRpc {
|
|
|
115
149
|
messages: EncodeObject[],
|
|
116
150
|
fee: StdFee | "auto" | number,
|
|
117
151
|
memo: string
|
|
118
|
-
): Promise<
|
|
152
|
+
): Promise<DeliverTxResponse>;
|
|
119
153
|
}
|
|
120
154
|
${options.useInterchainJs ? '' : `
|
|
121
155
|
export interface SigningClientParams {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperweb/telescope",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A TypeScript Transpiler for Cosmos Protobufs",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/hyperweb-io/telescope/tree/master/packages/telescope#readme",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"rimraf": "5.0.0",
|
|
112
112
|
"yaml": "^2.3.4"
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "1804eecac10a575169679de3ca4a52c0191fc292"
|
|
115
115
|
}
|
|
@@ -3,12 +3,12 @@ import { TelescopeOptions } from "@cosmology/types";
|
|
|
3
3
|
export const getHelperFuncTypesForInterface = (options: TelescopeOptions) => {
|
|
4
4
|
return `
|
|
5
5
|
import { HttpEndpoint } from "@interchainjs/types";
|
|
6
|
-
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}"
|
|
7
|
-
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}"
|
|
8
|
-
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}"
|
|
9
|
-
import { TelescopeGeneratedCodec, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}"
|
|
10
|
-
import { toConverters, toEncoders } from "@interchainjs/cosmos
|
|
11
|
-
import { ISigningClient } from "@interchainjs/cosmos
|
|
6
|
+
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
7
|
+
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}";` : ''}
|
|
8
|
+
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
9
|
+
import { TelescopeGeneratedCodec, DeliverTxResponse, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}";` : ''}${!options.isGeneratingCosmosTypes ? `
|
|
10
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
11
|
+
import { ISigningClient } from "@interchainjs/cosmos";` : ''}
|
|
12
12
|
|
|
13
13
|
export interface QueryBuilderOptions<TReq, TRes> {
|
|
14
14
|
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
|
|
@@ -60,7 +60,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
|
|
|
60
60
|
message: TMsg | TMsg[],
|
|
61
61
|
fee: StdFee | 'auto',
|
|
62
62
|
memo: string
|
|
63
|
-
): Promise<
|
|
63
|
+
): Promise<DeliverTxResponse> => {
|
|
64
64
|
if (!client) throw new Error("SigningClient is not initialized");
|
|
65
65
|
|
|
66
66
|
//register all related encoders and converters
|
|
@@ -3,12 +3,12 @@ import { TelescopeOptions } from "@cosmology/types";
|
|
|
3
3
|
export const getHelperFuncTypes = (options: TelescopeOptions) => {
|
|
4
4
|
return `
|
|
5
5
|
import { HttpEndpoint } from "@interchainjs/types";
|
|
6
|
-
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}"
|
|
7
|
-
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}"
|
|
8
|
-
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}"
|
|
9
|
-
import { TelescopeGeneratedCodec, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}"
|
|
10
|
-
import { toConverters, toEncoders } from "@interchainjs/cosmos
|
|
11
|
-
import { ISigningClient } from "@interchainjs/cosmos
|
|
6
|
+
import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
7
|
+
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}";` : ''}
|
|
8
|
+
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
9
|
+
import { TelescopeGeneratedCodec, DeliverTxResponse, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}";` : ''}${!options.isGeneratingCosmosTypes ? `
|
|
10
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
11
|
+
import { ISigningClient } from "@interchainjs/cosmos";` : ''}
|
|
12
12
|
|
|
13
13
|
export interface QueryBuilderOptions<TReq, TRes> {
|
|
14
14
|
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
|
|
@@ -53,7 +53,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
|
|
|
53
53
|
message: TMsg | TMsg[],
|
|
54
54
|
fee: StdFee | 'auto',
|
|
55
55
|
memo: string
|
|
56
|
-
): Promise<
|
|
56
|
+
): Promise<DeliverTxResponse> => {
|
|
57
57
|
if (!client) throw new Error("SigningClient is not initialized");
|
|
58
58
|
|
|
59
59
|
//register all related encoders and converters
|
|
@@ -13,9 +13,9 @@ import { HttpEndpoint } from "${
|
|
|
13
13
|
}";
|
|
14
14
|
${options.useInterchainJs ? `
|
|
15
15
|
|
|
16
|
-
import { Event, Attribute } from "@interchainjs/types";
|
|
17
|
-
|
|
16
|
+
import { DeliverTxResponse, Event, Attribute } from "@interchainjs/types";
|
|
18
17
|
|
|
18
|
+
export type { DeliverTxResponse }
|
|
19
19
|
|
|
20
20
|
` : ''}
|
|
21
21
|
export type ProtoMsg = Omit<Any, "typeUrl"> & { typeUrl: any };
|
|
@@ -110,7 +110,41 @@ export interface Event {
|
|
|
110
110
|
attributes: readonly Attribute[];
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
/**
|
|
114
|
+
* The response after successfully broadcasting a transaction.
|
|
115
|
+
* Success or failure refer to the execution result.
|
|
116
|
+
*/
|
|
117
|
+
export interface DeliverTxResponse {
|
|
118
|
+
height: number;
|
|
119
|
+
/** The position of the transaction within the block. This is a 0-based index. */
|
|
120
|
+
txIndex: number;
|
|
121
|
+
/** Error code. The transaction suceeded if and only if code is 0. */
|
|
122
|
+
code: number;
|
|
123
|
+
transactionHash: string;
|
|
124
|
+
events: readonly Event[];
|
|
125
|
+
/**
|
|
126
|
+
* A string-based log document.
|
|
127
|
+
*
|
|
128
|
+
* This currently seems to merge attributes of multiple events into one event per type
|
|
129
|
+
* (https://github.com/tendermint/tendermint/issues/9595). You might want to use the \`events\`
|
|
130
|
+
* field instead.
|
|
131
|
+
*/
|
|
132
|
+
rawLog?: string;
|
|
133
|
+
/** @deprecated Use \`msgResponses\` instead. */
|
|
134
|
+
data?: readonly MsgData[];
|
|
135
|
+
/**
|
|
136
|
+
* The message responses of the [TxMsgData](https://github.com/cosmos/cosmos-sdk/blob/v0.46.3/proto/cosmos/base/abci/v1beta1/abci.proto#L128-L140)
|
|
137
|
+
* as \`Any\`s.
|
|
138
|
+
* This field is an empty list for chains running Cosmos SDK < 0.46.
|
|
139
|
+
*/
|
|
140
|
+
msgResponses: Array<{
|
|
141
|
+
typeUrl: string;
|
|
142
|
+
value: Uint8Array;
|
|
143
|
+
}>;
|
|
144
|
+
gasUsed: bigint;
|
|
145
|
+
gasWanted: bigint;
|
|
146
|
+
origin?: any;
|
|
147
|
+
}
|
|
114
148
|
`}
|
|
115
149
|
export interface TxRpc {
|
|
116
150
|
request(
|
|
@@ -123,7 +157,7 @@ export interface TxRpc {
|
|
|
123
157
|
messages: EncodeObject[],
|
|
124
158
|
fee: StdFee | "auto" | number,
|
|
125
159
|
memo: string
|
|
126
|
-
): Promise<
|
|
160
|
+
): Promise<DeliverTxResponse>;
|
|
127
161
|
}
|
|
128
162
|
${options.useInterchainJs ? '' : `
|
|
129
163
|
export interface SigningClientParams {
|