@firmachain/firma-js 0.3.4 → 0.3.5

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.
Files changed (243) hide show
  1. package/dist/index.js +5 -1
  2. package/dist/sdk/FirmaAuthzService.d.ts +8 -7
  3. package/dist/sdk/FirmaAuthzService.js +12 -22
  4. package/dist/sdk/FirmaBankService.js +2 -2
  5. package/dist/sdk/FirmaChainService.js +1 -1
  6. package/dist/sdk/FirmaContractService.d.ts +1 -1
  7. package/dist/sdk/FirmaContractService.js +6 -6
  8. package/dist/sdk/FirmaCosmWasmCw20.d.ts +2 -2
  9. package/dist/sdk/FirmaCosmWasmCw20.js +8 -8
  10. package/dist/sdk/FirmaCosmWasmCw721.d.ts +2 -2
  11. package/dist/sdk/FirmaCosmWasmCw721.js +12 -12
  12. package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +1 -1
  13. package/dist/sdk/FirmaCosmWasmCwBridge.js +8 -8
  14. package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +1 -1
  15. package/dist/sdk/FirmaCosmWasmCwMarketplace.js +5 -5
  16. package/dist/sdk/FirmaCosmWasmService.d.ts +1 -1
  17. package/dist/sdk/FirmaCosmWasmService.js +13 -13
  18. package/dist/sdk/FirmaDistributionService.d.ts +1 -1
  19. package/dist/sdk/FirmaDistributionService.js +6 -6
  20. package/dist/sdk/FirmaFeeGrantService.d.ts +7 -6
  21. package/dist/sdk/FirmaFeeGrantService.js +9 -26
  22. package/dist/sdk/FirmaGovService.d.ts +1 -1
  23. package/dist/sdk/FirmaGovService.js +14 -14
  24. package/dist/sdk/FirmaIbcService.d.ts +3 -3
  25. package/dist/sdk/FirmaIbcService.js +11 -8
  26. package/dist/sdk/FirmaIpfsService.js +1 -1
  27. package/dist/sdk/FirmaMintService.js +1 -1
  28. package/dist/sdk/FirmaNftService.d.ts +1 -1
  29. package/dist/sdk/FirmaNftService.js +6 -6
  30. package/dist/sdk/FirmaSlashingService.js +1 -1
  31. package/dist/sdk/FirmaStakingService.d.ts +3 -3
  32. package/dist/sdk/FirmaStakingService.js +6 -6
  33. package/dist/sdk/FirmaTokenService.d.ts +1 -1
  34. package/dist/sdk/FirmaTokenService.js +5 -5
  35. package/dist/sdk/FirmaUtil.d.ts +25 -24
  36. package/dist/sdk/FirmaUtil.js +199 -144
  37. package/dist/sdk/FirmaWalletService.d.ts +6 -7
  38. package/dist/sdk/FirmaWalletService.js +78 -36
  39. package/dist/sdk/firmachain/authz/AuthzQueryClient.js +4 -4
  40. package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +8 -11
  41. package/dist/sdk/firmachain/authz/AuthzTxTypes.js +6 -10
  42. package/dist/sdk/firmachain/authz/index.js +5 -1
  43. package/dist/sdk/firmachain/bank/BankQueryClient.js +5 -5
  44. package/dist/sdk/firmachain/bank/index.js +5 -1
  45. package/dist/sdk/firmachain/common/ITxClient.d.ts +2 -4
  46. package/dist/sdk/firmachain/common/ITxClient.js +20 -92
  47. package/dist/sdk/firmachain/common/LedgerWallet.d.ts +19 -3
  48. package/dist/sdk/firmachain/common/LedgerWallet.js +138 -68
  49. package/dist/sdk/firmachain/common/TendermintQueryClient.js +1 -1
  50. package/dist/sdk/firmachain/common/TxCommon.d.ts +13 -29
  51. package/dist/sdk/firmachain/common/accounts.d.ts +1 -1
  52. package/dist/sdk/firmachain/common/accounts.js +7 -7
  53. package/dist/sdk/firmachain/{amino → common}/coins.d.ts +2 -14
  54. package/dist/sdk/firmachain/{amino → common}/coins.js +4 -25
  55. package/dist/sdk/firmachain/common/index.d.ts +0 -1
  56. package/dist/sdk/firmachain/common/index.js +5 -4
  57. package/dist/sdk/firmachain/{amino → common}/wallet.js +15 -11
  58. package/dist/sdk/firmachain/contract/ContractQueryClient.js +3 -3
  59. package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +6 -6
  60. package/dist/sdk/firmachain/contract/index.js +5 -1
  61. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +9 -9
  62. package/dist/sdk/firmachain/cosmwasm/index.js +5 -1
  63. package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +6 -6
  64. package/dist/sdk/firmachain/distribution/index.js +5 -1
  65. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +3 -3
  66. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +4 -45
  67. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +3 -82
  68. package/dist/sdk/firmachain/feegrant/index.js +5 -1
  69. package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -3
  70. package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +29 -29
  71. package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -3
  72. package/dist/sdk/firmachain/gov/GovQueryClient.js +3 -3
  73. package/dist/sdk/firmachain/gov/index.js +5 -1
  74. package/dist/sdk/firmachain/ibc/IbcQueryClient.js +2 -2
  75. package/dist/sdk/firmachain/ibc/index.js +5 -1
  76. package/dist/sdk/firmachain/mint/MintQueryClient.js +1 -1
  77. package/dist/sdk/firmachain/mint/index.js +5 -1
  78. package/dist/sdk/firmachain/nft/NftQueryClient.js +1 -1
  79. package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +8 -8
  80. package/dist/sdk/firmachain/nft/index.js +5 -1
  81. package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +1 -1
  82. package/dist/sdk/firmachain/slashing/index.js +5 -1
  83. package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +2 -2
  84. package/dist/sdk/firmachain/staking/StakingQueryClient.js +10 -9
  85. package/dist/sdk/firmachain/staking/index.js +5 -1
  86. package/dist/sdk/firmachain/token/TokenQueryClient.js +1 -1
  87. package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +11 -11
  88. package/dist/sdk/firmachain/token/TokenTxTypes.js +1 -1
  89. package/dist/sdk/firmachain/token/index.js +5 -1
  90. package/dist/test/00.wallet.test.js +4 -4
  91. package/dist/test/01.contract_tx.test.js +5 -5
  92. package/dist/test/02.contract_query.test.js +15 -15
  93. package/dist/test/03.contract_scenario.test.js +28 -28
  94. package/dist/test/04.bank_tx.test.js +4 -4
  95. package/dist/test/05.bank_query.test.js +9 -9
  96. package/dist/test/06.feegrant_tx.test.js +59 -35
  97. package/dist/test/07.feegrant_query.test.js +18 -15
  98. package/dist/test/08.gas_estimate.test.js +110 -70
  99. package/dist/test/09.ipfs.test.js +4 -4
  100. package/dist/test/10.nft_tx.test.js +7 -7
  101. package/dist/test/11.nft_query.test.js +9 -9
  102. package/dist/test/12.staking_tx.test.js +27 -15
  103. package/dist/test/13.staking_query.test.js +20 -20
  104. package/dist/test/14.distribution_tx.test.js +8 -8
  105. package/dist/test/15.distribution_query.test.js +15 -15
  106. package/dist/test/16.gov_tx.test.js +17 -17
  107. package/dist/test/17.gov_query.test.js +19 -19
  108. package/dist/test/18.util.test.js +105 -63
  109. package/dist/test/19.chain.test.js +38 -38
  110. package/dist/test/20.slashing_query.test.js +25 -25
  111. package/dist/test/21.token_tx.test.js +6 -6
  112. package/dist/test/22.token_query.test.js +4 -4
  113. package/dist/test/23.authz_tx.test.js +77 -47
  114. package/dist/test/24.authz_query.test.js +66 -67
  115. package/dist/test/25.cosmwasm_tx.test.js +7 -7
  116. package/dist/test/26.cosmwasm_query.test.js +127 -59
  117. package/dist/test/{27.arbitary_sign.test.js → 27.arbitrary_sign.test.js} +34 -62
  118. package/dist/test/28.ibc_tx.test.js +8 -8
  119. package/dist/test/29.mint_query.test.js +2 -2
  120. package/dist/test/30.cw20_tx.test.js +20 -20
  121. package/dist/test/31.cw20_query.test.js +24 -24
  122. package/dist/test/32.cw721_tx.test.js +19 -19
  123. package/dist/test/33.cw721_query.test.js +32 -32
  124. package/dist/test/34.cw_bridge_tx.test.js +19 -19
  125. package/dist/test/35.cw_bridge_tx_low.test.js +13 -13
  126. package/dist/test/36.cw_bridge_query.test.js +20 -20
  127. package/dist/test/37.cw_marketplace_tx.test.js +32 -32
  128. package/dist/test/38.cw_marketplace_query.test.js +2 -2
  129. package/package.json +9 -10
  130. package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
  131. package/dist/sdk/firmachain/amino/addresses.js +0 -46
  132. package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -291
  133. package/dist/sdk/firmachain/amino/aminomsgs.js +0 -81
  134. package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
  135. package/dist/sdk/firmachain/amino/aminotypes.js +0 -538
  136. package/dist/sdk/firmachain/amino/encoding.d.ts +0 -33
  137. package/dist/sdk/firmachain/amino/encoding.js +0 -252
  138. package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
  139. package/dist/sdk/firmachain/amino/multisig.js +0 -42
  140. package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
  141. package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
  142. package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
  143. package/dist/sdk/firmachain/amino/signature.js +0 -36
  144. package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -44
  145. package/dist/sdk/firmachain/amino/signdoc.js +0 -68
  146. package/dist/sdk/firmachain/amino/signer.d.ts +0 -33
  147. package/dist/sdk/firmachain/amino/signer.js +0 -2
  148. package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
  149. package/dist/sdk/firmachain/amino/stdtx.js +0 -17
  150. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -22
  151. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -170
  152. package/dist/sdk/firmachain/common/aminotypes.d.ts +0 -19
  153. package/dist/sdk/firmachain/common/aminotypes.js +0 -74
  154. package/dist/sdk/firmachain/common/events.d.ts +0 -32
  155. package/dist/sdk/firmachain/common/events.js +0 -18
  156. package/dist/sdk/firmachain/common/fee.d.ts +0 -26
  157. package/dist/sdk/firmachain/common/fee.js +0 -83
  158. package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +0 -15
  159. package/dist/sdk/firmachain/common/modules/auth/queries.js +0 -64
  160. package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +0 -2
  161. package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +0 -15
  162. package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +0 -2
  163. package/dist/sdk/firmachain/common/modules/authz/messages.js +0 -9
  164. package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +0 -10
  165. package/dist/sdk/firmachain/common/modules/authz/queries.js +0 -88
  166. package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +0 -35
  167. package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +0 -85
  168. package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +0 -8
  169. package/dist/sdk/firmachain/common/modules/bank/messages.js +0 -12
  170. package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +0 -15
  171. package/dist/sdk/firmachain/common/modules/bank/queries.js +0 -128
  172. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +0 -14
  173. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +0 -11
  174. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +0 -44
  175. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +0 -113
  176. package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +0 -8
  177. package/dist/sdk/firmachain/common/modules/distribution/messages.js +0 -15
  178. package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +0 -16
  179. package/dist/sdk/firmachain/common/modules/distribution/queries.js +0 -171
  180. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +0 -18
  181. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +0 -11
  182. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +0 -2
  183. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +0 -14
  184. package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +0 -2
  185. package/dist/sdk/firmachain/common/modules/feegrant/messages.js +0 -8
  186. package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +0 -9
  187. package/dist/sdk/firmachain/common/modules/feegrant/queries.js +0 -81
  188. package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +0 -79
  189. package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +0 -152
  190. package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +0 -29
  191. package/dist/sdk/firmachain/common/modules/gov/messages.js +0 -39
  192. package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +0 -19
  193. package/dist/sdk/firmachain/common/modules/gov/queries.js +0 -160
  194. package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +0 -2
  195. package/dist/sdk/firmachain/common/modules/group/aminomessages.js +0 -8
  196. package/dist/sdk/firmachain/common/modules/group/messages.d.ts +0 -2
  197. package/dist/sdk/firmachain/common/modules/group/messages.js +0 -28
  198. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +0 -38
  199. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +0 -55
  200. package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +0 -8
  201. package/dist/sdk/firmachain/common/modules/ibc/messages.js +0 -32
  202. package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +0 -58
  203. package/dist/sdk/firmachain/common/modules/ibc/queries.js +0 -576
  204. package/dist/sdk/firmachain/common/modules/index.d.ts +0 -32
  205. package/dist/sdk/firmachain/common/modules/index.js +0 -101
  206. package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +0 -21
  207. package/dist/sdk/firmachain/common/modules/mint/queries.js +0 -95
  208. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +0 -12
  209. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +0 -11
  210. package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +0 -10
  211. package/dist/sdk/firmachain/common/modules/slashing/queries.js +0 -88
  212. package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +0 -112
  213. package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +0 -234
  214. package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +0 -33
  215. package/dist/sdk/firmachain/common/modules/staking/messages.js +0 -37
  216. package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +0 -23
  217. package/dist/sdk/firmachain/common/modules/staking/queries.js +0 -242
  218. package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +0 -11
  219. package/dist/sdk/firmachain/common/modules/tx/queries.js +0 -103
  220. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +0 -16
  221. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +0 -56
  222. package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +0 -2
  223. package/dist/sdk/firmachain/common/modules/vesting/messages.js +0 -7
  224. package/dist/sdk/firmachain/common/queryclient/index.d.ts +0 -2
  225. package/dist/sdk/firmachain/common/queryclient/index.js +0 -10
  226. package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +0 -75
  227. package/dist/sdk/firmachain/common/queryclient/queryclient.js +0 -157
  228. package/dist/sdk/firmachain/common/queryclient/utils.d.ts +0 -33
  229. package/dist/sdk/firmachain/common/queryclient/utils.js +0 -101
  230. package/dist/sdk/firmachain/common/search.d.ts +0 -10
  231. package/dist/sdk/firmachain/common/search.js +0 -7
  232. package/dist/sdk/firmachain/common/signing.d.ts +0 -15
  233. package/dist/sdk/firmachain/common/signing.js +0 -87
  234. package/dist/sdk/firmachain/common/signingstargateclient.d.ts +0 -121
  235. package/dist/sdk/firmachain/common/signingstargateclient.js +0 -674
  236. package/dist/sdk/firmachain/common/stargateclient.d.ts +0 -210
  237. package/dist/sdk/firmachain/common/stargateclient.js +0 -527
  238. package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -110
  239. package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -108
  240. /package/dist/sdk/firmachain/{amino → common}/paths.d.ts +0 -0
  241. /package/dist/sdk/firmachain/{amino → common}/paths.js +0 -0
  242. /package/dist/sdk/firmachain/{amino → common}/wallet.d.ts +0 -0
  243. /package/dist/test/{27.arbitary_sign.test.d.ts → 27.arbitrary_sign.test.d.ts} +0 -0
@@ -1,210 +0,0 @@
1
- import { CometClient, HttpEndpoint } from "@cosmjs/tendermint-rpc";
2
- import { MsgData } from "cosmjs-types/cosmos/base/abci/v1beta1/abci";
3
- import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
4
- import { Account, AccountParser } from "./accounts";
5
- import { Event } from "./events";
6
- import { AuthExtension, BankExtension, StakingExtension, TxExtension } from "./modules";
7
- import { QueryClient } from "./queryclient";
8
- import { SearchTxQuery } from "./search";
9
- export declare class TimeoutError extends Error {
10
- readonly txId: string;
11
- constructor(message: string, txId: string);
12
- }
13
- export interface BlockHeader {
14
- readonly version: {
15
- readonly block: string;
16
- readonly app: string;
17
- };
18
- readonly height: number;
19
- readonly chainId: string;
20
- /** An RFC 3339 time string like e.g. '2020-02-15T10:39:10.4696305Z' */
21
- readonly time: string;
22
- }
23
- export interface Block {
24
- /** The ID is a hash of the block header (uppercase hex) */
25
- readonly id: string;
26
- readonly header: BlockHeader;
27
- /** Array of raw transactions */
28
- readonly txs: readonly Uint8Array[];
29
- }
30
- /** A transaction that is indexed as part of the transaction history */
31
- export interface IndexedTx {
32
- readonly height: number;
33
- /** The position of the transaction within the block. This is a 0-based index. */
34
- readonly txIndex: number;
35
- /** Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex */
36
- readonly hash: string;
37
- /** Transaction execution error code. 0 on success. */
38
- readonly code: number;
39
- readonly events: readonly Event[];
40
- /**
41
- * A string-based log document.
42
- *
43
- * This currently seems to merge attributes of multiple events into one event per type
44
- * (https://github.com/tendermint/tendermint/issues/9595). You might want to use the `events`
45
- * field instead.
46
- *
47
- * @deprecated This field is not filled anymore in Cosmos SDK 0.50+ (https://github.com/cosmos/cosmos-sdk/pull/15845).
48
- * Please consider using `events` instead.
49
- */
50
- readonly rawLog: string;
51
- /**
52
- * Raw transaction bytes stored in Tendermint.
53
- *
54
- * If you hash this, you get the transaction hash (= transaction ID):
55
- *
56
- * ```js
57
- * import { sha256 } from "@cosmjs/crypto";
58
- * import { toHex } from "@cosmjs/encoding";
59
- *
60
- * const transactionId = toHex(sha256(indexTx.tx)).toUpperCase();
61
- * ```
62
- *
63
- * Use `decodeTxRaw` from @cosmjs/proto-signing to decode this.
64
- */
65
- readonly tx: Uint8Array;
66
- /**
67
- * 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)
68
- * as `Any`s.
69
- * This field is an empty list for chains running Cosmos SDK < 0.46.
70
- */
71
- readonly msgResponses: Array<{
72
- readonly typeUrl: string;
73
- readonly value: Uint8Array;
74
- }>;
75
- readonly gasUsed: bigint;
76
- readonly gasWanted: bigint;
77
- }
78
- export interface SequenceResponse {
79
- readonly accountNumber: number;
80
- readonly sequence: number;
81
- }
82
- /**
83
- * The response after successfully broadcasting a transaction.
84
- * Success or failure refer to the execution result.
85
- */
86
- export interface DeliverTxResponse {
87
- readonly height: number;
88
- /** The position of the transaction within the block. This is a 0-based index. */
89
- readonly txIndex: number;
90
- /** Error code. The transaction suceeded if and only if code is 0. */
91
- readonly code: number;
92
- readonly transactionHash: string;
93
- readonly events: readonly Event[];
94
- /**
95
- * A string-based log document.
96
- *
97
- * This currently seems to merge attributes of multiple events into one event per type
98
- * (https://github.com/tendermint/tendermint/issues/9595). You might want to use the `events`
99
- * field instead.
100
- *
101
- * @deprecated This field is not filled anymore in Cosmos SDK 0.50+ (https://github.com/cosmos/cosmos-sdk/pull/15845).
102
- * Please consider using `events` instead.
103
- */
104
- readonly rawLog?: string;
105
- /** @deprecated Use `msgResponses` instead. */
106
- readonly data?: readonly MsgData[];
107
- /**
108
- * 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)
109
- * as `Any`s.
110
- * This field is an empty list for chains running Cosmos SDK < 0.46.
111
- */
112
- readonly msgResponses: Array<{
113
- readonly typeUrl: string;
114
- readonly value: Uint8Array;
115
- }>;
116
- readonly gasUsed: bigint;
117
- readonly gasWanted: bigint;
118
- }
119
- export declare function isDeliverTxFailure(result: DeliverTxResponse): boolean;
120
- export declare function isDeliverTxSuccess(result: DeliverTxResponse): boolean;
121
- /**
122
- * Ensures the given result is a success. Throws a detailed error message otherwise.
123
- */
124
- export declare function assertIsDeliverTxSuccess(result: DeliverTxResponse): void;
125
- /**
126
- * Ensures the given result is a failure. Throws a detailed error message otherwise.
127
- */
128
- export declare function assertIsDeliverTxFailure(result: DeliverTxResponse): void;
129
- /**
130
- * An error when broadcasting the transaction. This contains the CheckTx errors
131
- * from the blockchain. Once a transaction is included in a block no BroadcastTxError
132
- * is thrown, even if the execution fails (DeliverTx errors).
133
- */
134
- export declare class BroadcastTxError extends Error {
135
- readonly code: number;
136
- readonly codespace: string;
137
- readonly log: string | undefined;
138
- constructor(code: number, codespace: string, log: string | undefined);
139
- }
140
- /** Use for testing only */
141
- export interface PrivateStargateClient {
142
- readonly cometClient: CometClient | undefined;
143
- }
144
- export interface StargateClientOptions {
145
- readonly accountParser?: AccountParser;
146
- }
147
- export declare class StargateClient {
148
- private readonly cometClient;
149
- private readonly queryClient;
150
- private readonly accountParser;
151
- /**
152
- * Creates an instance by connecting to the given CometBFT RPC endpoint.
153
- *
154
- * This uses auto-detection to decide between a CometBFT 0.38, Tendermint 0.37 and 0.34 client.
155
- * To set the Comet client explicitly, use `create`.
156
- */
157
- static connect(endpoint: string | HttpEndpoint, options?: StargateClientOptions): Promise<StargateClient>;
158
- /**
159
- * Creates an instance from a manually created Comet client.
160
- * Use this to use `Comet38Client` or `Tendermint37Client` instead of `Tendermint34Client`.
161
- */
162
- static create(cometClient: CometClient, options?: StargateClientOptions): Promise<StargateClient>;
163
- protected constructor(cometClient: CometClient | undefined, options: StargateClientOptions);
164
- protected getCometClient(): CometClient | undefined;
165
- protected forceGetCometClient(): CometClient;
166
- protected getQueryClient(): (QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension) | undefined;
167
- protected forceGetQueryClient(): QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension;
168
- getHeight(): Promise<number>;
169
- getAccount(searchAddress: string): Promise<Account | null>;
170
- getSequence(address: string): Promise<SequenceResponse>;
171
- getBlock(height?: number): Promise<Block>;
172
- getBalance(address: string, searchDenom: string): Promise<Coin>;
173
- /**
174
- * Queries all balances for all denoms that belong to this address.
175
- *
176
- * Uses the grpc queries (which iterates over the store internally), and we cannot get
177
- * proofs from such a method.
178
- */
179
- getAllBalances(address: string): Promise<readonly Coin[]>;
180
- getBalanceStaked(address: string): Promise<Coin | null>;
181
- getDelegation(delegatorAddress: string, validatorAddress: string): Promise<Coin | null>;
182
- getTx(id: string): Promise<IndexedTx | null>;
183
- searchTx(query: SearchTxQuery): Promise<IndexedTx[]>;
184
- disconnect(): void;
185
- /**
186
- * Broadcasts a signed transaction to the network and monitors its inclusion in a block.
187
- *
188
- * If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure),
189
- * an error is thrown.
190
- *
191
- * If the transaction is not included in a block before the provided timeout, this errors with a `TimeoutError`.
192
- *
193
- * If the transaction is included in a block, a `DeliverTxResponse` is returned. The caller then
194
- * usually needs to check for execution success or failure.
195
- */
196
- broadcastTx(tx: Uint8Array, timeoutMs?: number, pollIntervalMs?: number): Promise<DeliverTxResponse>;
197
- /**
198
- * Broadcasts a signed transaction to the network without monitoring it.
199
- *
200
- * If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure),
201
- * an error is thrown.
202
- *
203
- * If the transaction is broadcasted, a `string` containing the hash of the transaction is returned. The caller then
204
- * usually needs to check if the transaction was included in a block and was successful.
205
- *
206
- * @returns Returns the hash of the transaction
207
- */
208
- broadcastTxSync(tx: Uint8Array): Promise<string>;
209
- private txsQuery;
210
- }