carbon-js-sdk 0.11.71 → 0.11.73
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/lib/CarbonSDK.js +244 -266
- package/lib/clients/BatchQueryClient.js +9 -21
- package/lib/clients/CarbonQueryClient.js +1 -2
- package/lib/clients/ETHClient.js +231 -245
- package/lib/clients/GasFee.js +2 -3
- package/lib/clients/GrpcQueryClient.js +5 -1
- package/lib/clients/HydrogenClient.js +110 -63
- package/lib/clients/InsightsQueryClient.js +457 -593
- package/lib/clients/TokenClient.js +271 -318
- package/lib/codec/Switcheo/carbon/adl/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/adl/genesis.js +14 -9
- package/lib/codec/Switcheo/carbon/adl/query.d.ts +4 -1
- package/lib/codec/Switcheo/carbon/adl/query.js +3 -11
- package/lib/codec/Switcheo/carbon/adl/tx.d.ts +4 -1
- package/lib/codec/Switcheo/carbon/adl/tx.js +3 -11
- package/lib/codec/Switcheo/carbon/admin/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/admin/genesis.js +40 -35
- package/lib/codec/Switcheo/carbon/admin/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/admin/params.js +42 -33
- package/lib/codec/Switcheo/carbon/admin/query.d.ts +10 -1
- package/lib/codec/Switcheo/carbon/admin/query.js +113 -86
- package/lib/codec/Switcheo/carbon/admin/tx.d.ts +12 -1
- package/lib/codec/Switcheo/carbon/admin/tx.js +164 -128
- package/lib/codec/Switcheo/carbon/bank/event.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/bank/event.js +149 -116
- package/lib/codec/Switcheo/carbon/bank/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/bank/genesis.js +23 -15
- package/lib/codec/Switcheo/carbon/bank/query.d.ts +12 -1
- package/lib/codec/Switcheo/carbon/bank/query.js +287 -258
- package/lib/codec/Switcheo/carbon/bank/tx.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/bank/tx.js +91 -67
- package/lib/codec/Switcheo/carbon/book/book.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/book/book.js +144 -113
- package/lib/codec/Switcheo/carbon/book/event.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/book/event.js +120 -85
- package/lib/codec/Switcheo/carbon/book/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/book/export.js +2 -2
- package/lib/codec/Switcheo/carbon/book/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/book/genesis.js +27 -19
- package/lib/codec/Switcheo/carbon/book/legacy.d.ts +8 -7
- package/lib/codec/Switcheo/carbon/book/legacy.js +50 -45
- package/lib/codec/Switcheo/carbon/book/query.d.ts +15 -2
- package/lib/codec/Switcheo/carbon/book/query.js +264 -239
- package/lib/codec/Switcheo/carbon/book/tx.d.ts +4 -1
- package/lib/codec/Switcheo/carbon/book/tx.js +3 -11
- package/lib/codec/Switcheo/carbon/bridge/bridge.d.ts +35 -0
- package/lib/codec/Switcheo/carbon/bridge/bridge.js +486 -281
- package/lib/codec/Switcheo/carbon/bridge/event.d.ts +23 -1
- package/lib/codec/Switcheo/carbon/bridge/event.js +886 -945
- package/lib/codec/Switcheo/carbon/bridge/export.d.ts +4 -4
- package/lib/codec/Switcheo/carbon/bridge/export.js +10 -21
- package/lib/codec/Switcheo/carbon/bridge/genesis.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/bridge/genesis.js +117 -69
- package/lib/codec/Switcheo/carbon/bridge/params.d.ts +23 -0
- package/lib/codec/Switcheo/carbon/bridge/params.js +294 -68
- package/lib/codec/Switcheo/carbon/bridge/pending_action.d.ts +7 -1
- package/lib/codec/Switcheo/carbon/bridge/pending_action.js +374 -381
- package/lib/codec/Switcheo/carbon/bridge/query.d.ts +77 -3
- package/lib/codec/Switcheo/carbon/bridge/query.js +808 -520
- package/lib/codec/Switcheo/carbon/bridge/tx.d.ts +55 -253
- package/lib/codec/Switcheo/carbon/bridge/tx.js +1495 -2388
- package/lib/codec/Switcheo/carbon/broker/amm.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/broker/amm.js +132 -112
- package/lib/codec/Switcheo/carbon/broker/candlestick.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/broker/candlestick.js +97 -89
- package/lib/codec/Switcheo/carbon/broker/event.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/broker/event.js +241 -252
- package/lib/codec/Switcheo/carbon/broker/genesis.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/broker/genesis.js +27 -19
- package/lib/codec/Switcheo/carbon/broker/incoming_liquidations.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/broker/incoming_liquidations.js +47 -33
- package/lib/codec/Switcheo/carbon/broker/pagination.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/broker/pagination.js +32 -31
- package/lib/codec/Switcheo/carbon/broker/query.d.ts +11 -2
- package/lib/codec/Switcheo/carbon/broker/query.js +279 -284
- package/lib/codec/Switcheo/carbon/broker/tx.d.ts +7 -1
- package/lib/codec/Switcheo/carbon/broker/tx.js +77 -55
- package/lib/codec/Switcheo/carbon/btcx/denom_cross_chain_info.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/btcx/denom_cross_chain_info.js +43 -44
- package/lib/codec/Switcheo/carbon/btcx/denom_info.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/btcx/denom_info.js +63 -64
- package/lib/codec/Switcheo/carbon/btcx/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/btcx/genesis.js +14 -9
- package/lib/codec/Switcheo/carbon/btcx/query.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/btcx/query.js +120 -116
- package/lib/codec/Switcheo/carbon/btcx/tx.d.ts +10 -1
- package/lib/codec/Switcheo/carbon/btcx/tx.js +210 -189
- package/lib/codec/Switcheo/carbon/ccm/genesis.d.ts +7 -0
- package/lib/codec/Switcheo/carbon/ccm/genesis.js +299 -215
- package/lib/codec/Switcheo/carbon/ccm/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/ccm/params.js +28 -18
- package/lib/codec/Switcheo/carbon/ccm/query.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/ccm/query.js +137 -118
- package/lib/codec/Switcheo/carbon/ccm/tx.d.ts +9 -1
- package/lib/codec/Switcheo/carbon/ccm/tx.js +162 -156
- package/lib/codec/Switcheo/carbon/cdp/asset_params.d.ts +6 -0
- package/lib/codec/Switcheo/carbon/cdp/asset_params.js +255 -227
- package/lib/codec/Switcheo/carbon/cdp/cdp_liquidations.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/cdp/cdp_liquidations.js +138 -142
- package/lib/codec/Switcheo/carbon/cdp/debt_info.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/cdp/debt_info.js +68 -64
- package/lib/codec/Switcheo/carbon/cdp/e_mode_category.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/cdp/e_mode_category.js +57 -60
- package/lib/codec/Switcheo/carbon/cdp/event.d.ts +37 -4
- package/lib/codec/Switcheo/carbon/cdp/event.js +1315 -1279
- package/lib/codec/Switcheo/carbon/cdp/export.d.ts +3 -2
- package/lib/codec/Switcheo/carbon/cdp/export.js +22 -4
- package/lib/codec/Switcheo/carbon/cdp/genesis.d.ts +13 -5
- package/lib/codec/Switcheo/carbon/cdp/genesis.js +421 -316
- package/lib/codec/Switcheo/carbon/cdp/nlend.d.ts +39 -0
- package/lib/codec/Switcheo/carbon/cdp/nlend.js +172 -0
- package/lib/codec/Switcheo/carbon/cdp/params.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/cdp/params.js +229 -209
- package/lib/codec/Switcheo/carbon/cdp/query.d.ts +213 -7
- package/lib/codec/Switcheo/carbon/cdp/query.js +2249 -1370
- package/lib/codec/Switcheo/carbon/cdp/rate_strategy_params.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/cdp/rate_strategy_params.js +52 -57
- package/lib/codec/Switcheo/carbon/cdp/reward_scheme.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/cdp/reward_scheme.js +277 -275
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_debt_info.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_debt_info.js +60 -55
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_interest_info.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/cdp/stablecoin_interest_info.js +34 -29
- package/lib/codec/Switcheo/carbon/cdp/tx.d.ts +124 -4
- package/lib/codec/Switcheo/carbon/cdp/tx.js +1991 -1557
- package/lib/codec/Switcheo/carbon/coin/bridge.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/coin/bridge.js +74 -69
- package/lib/codec/Switcheo/carbon/coin/event.d.ts +13 -1
- package/lib/codec/Switcheo/carbon/coin/event.js +360 -348
- package/lib/codec/Switcheo/carbon/coin/export.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/coin/export.js +6 -2
- package/lib/codec/Switcheo/carbon/coin/genesis.d.ts +3 -1
- package/lib/codec/Switcheo/carbon/coin/genesis.js +92 -60
- package/lib/codec/Switcheo/carbon/coin/group.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/coin/group.js +104 -97
- package/lib/codec/Switcheo/carbon/coin/params.d.ts +35 -0
- package/lib/codec/Switcheo/carbon/coin/params.js +148 -0
- package/lib/codec/Switcheo/carbon/coin/proposal.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/coin/proposal.js +40 -37
- package/lib/codec/Switcheo/carbon/coin/query.d.ts +29 -2
- package/lib/codec/Switcheo/carbon/coin/query.js +647 -577
- package/lib/codec/Switcheo/carbon/coin/token.d.ts +7 -0
- package/lib/codec/Switcheo/carbon/coin/token.js +344 -344
- package/lib/codec/Switcheo/carbon/coin/tx.d.ts +57 -3
- package/lib/codec/Switcheo/carbon/coin/tx.js +1621 -1514
- package/lib/codec/Switcheo/carbon/erc20/erc20.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/erc20/erc20.js +46 -44
- package/lib/codec/Switcheo/carbon/erc20/events.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/erc20/events.js +151 -144
- package/lib/codec/Switcheo/carbon/erc20/genesis.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/erc20/genesis.js +34 -27
- package/lib/codec/Switcheo/carbon/erc20/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/erc20/params.js +61 -52
- package/lib/codec/Switcheo/carbon/erc20/query.d.ts +10 -1
- package/lib/codec/Switcheo/carbon/erc20/query.js +140 -121
- package/lib/codec/Switcheo/carbon/erc20/tx.d.ts +18 -1
- package/lib/codec/Switcheo/carbon/erc20/tx.js +341 -287
- package/lib/codec/Switcheo/carbon/evmbank/genesis.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/evmbank/genesis.js +77 -56
- package/lib/codec/Switcheo/carbon/evmbank/query.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/evmbank/query.js +45 -35
- package/lib/codec/Switcheo/carbon/evmcontract/evm_hooks.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/evmcontract/evm_hooks.js +196 -172
- package/lib/codec/Switcheo/carbon/evmcontract/genesis.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/evmcontract/genesis.js +44 -31
- package/lib/codec/Switcheo/carbon/evmcontract/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/evmcontract/params.js +47 -40
- package/lib/codec/Switcheo/carbon/evmcontract/query.d.ts +15 -2
- package/lib/codec/Switcheo/carbon/evmcontract/query.js +248 -219
- package/lib/codec/Switcheo/carbon/evmcontract/tx.d.ts +10 -1
- package/lib/codec/Switcheo/carbon/evmcontract/tx.js +151 -131
- package/lib/codec/Switcheo/carbon/evmmerge/address.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/evmmerge/address.js +31 -27
- package/lib/codec/Switcheo/carbon/evmmerge/event.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/evmmerge/event.js +38 -37
- package/lib/codec/Switcheo/carbon/evmmerge/genesis.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/evmmerge/genesis.js +91 -71
- package/lib/codec/Switcheo/carbon/evmmerge/offchain.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/evmmerge/offchain.js +58 -42
- package/lib/codec/Switcheo/carbon/evmmerge/query.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/evmmerge/query.js +107 -91
- package/lib/codec/Switcheo/carbon/evmmerge/tx.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/evmmerge/tx.js +54 -40
- package/lib/codec/Switcheo/carbon/fee/event.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/fee/event.js +36 -28
- package/lib/codec/Switcheo/carbon/fee/fee.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/fee/fee.js +84 -64
- package/lib/codec/Switcheo/carbon/fee/genesis.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/fee/genesis.js +29 -19
- package/lib/codec/Switcheo/carbon/fee/query.d.ts +13 -2
- package/lib/codec/Switcheo/carbon/fee/query.js +202 -180
- package/lib/codec/Switcheo/carbon/fee/tx.d.ts +13 -2
- package/lib/codec/Switcheo/carbon/fee/tx.js +186 -147
- package/lib/codec/Switcheo/carbon/headersync/consensus_peers.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/headersync/consensus_peers.js +181 -158
- package/lib/codec/Switcheo/carbon/headersync/genesis.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/headersync/genesis.js +207 -153
- package/lib/codec/Switcheo/carbon/headersync/query.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/headersync/query.js +53 -44
- package/lib/codec/Switcheo/carbon/headersync/tx.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/headersync/tx.js +92 -68
- package/lib/codec/Switcheo/carbon/inflation/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/inflation/genesis.js +34 -31
- package/lib/codec/Switcheo/carbon/inflation/inflation.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/inflation/inflation.js +73 -71
- package/lib/codec/Switcheo/carbon/inflation/query.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/inflation/query.js +43 -34
- package/lib/codec/Switcheo/carbon/inflation/tx.d.ts +4 -1
- package/lib/codec/Switcheo/carbon/inflation/tx.js +3 -11
- package/lib/codec/Switcheo/carbon/insurance/event.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/insurance/event.js +14 -9
- package/lib/codec/Switcheo/carbon/insurance/fund.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/insurance/fund.js +116 -98
- package/lib/codec/Switcheo/carbon/insurance/genesis.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/insurance/genesis.js +36 -27
- package/lib/codec/Switcheo/carbon/insurance/params.d.ts +3 -1
- package/lib/codec/Switcheo/carbon/insurance/params.js +82 -69
- package/lib/codec/Switcheo/carbon/insurance/query.d.ts +14 -3
- package/lib/codec/Switcheo/carbon/insurance/query.js +182 -150
- package/lib/codec/Switcheo/carbon/insurance/tx.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/insurance/tx.js +106 -91
- package/lib/codec/Switcheo/carbon/leverage/event.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/leverage/event.js +42 -39
- package/lib/codec/Switcheo/carbon/leverage/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/leverage/genesis.js +23 -15
- package/lib/codec/Switcheo/carbon/leverage/leverage.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/leverage/leverage.js +60 -50
- package/lib/codec/Switcheo/carbon/leverage/query.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/leverage/query.js +102 -79
- package/lib/codec/Switcheo/carbon/leverage/tx.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/leverage/tx.js +54 -40
- package/lib/codec/Switcheo/carbon/liquidation/event.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/liquidation/event.js +66 -61
- package/lib/codec/Switcheo/carbon/liquidation/genesis.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/liquidation/genesis.js +62 -45
- package/lib/codec/Switcheo/carbon/liquidation/outstanding_position.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/liquidation/outstanding_position.js +89 -76
- package/lib/codec/Switcheo/carbon/liquidation/query.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/liquidation/query.js +124 -122
- package/lib/codec/Switcheo/carbon/liquidation/quote_changes.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/liquidation/quote_changes.js +34 -24
- package/lib/codec/Switcheo/carbon/liquidation/tx.d.ts +4 -1
- package/lib/codec/Switcheo/carbon/liquidation/tx.js +3 -11
- package/lib/codec/Switcheo/carbon/liquiditypool/event.d.ts +15 -2
- package/lib/codec/Switcheo/carbon/liquiditypool/event.js +612 -614
- package/lib/codec/Switcheo/carbon/liquiditypool/genesis.d.ts +3 -2
- package/lib/codec/Switcheo/carbon/liquiditypool/genesis.js +121 -96
- package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.d.ts +10 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.js +543 -524
- package/lib/codec/Switcheo/carbon/liquiditypool/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/params.js +66 -58
- package/lib/codec/Switcheo/carbon/liquiditypool/proposal.d.ts +10 -1
- package/lib/codec/Switcheo/carbon/liquiditypool/proposal.js +336 -331
- package/lib/codec/Switcheo/carbon/liquiditypool/query.d.ts +37 -3
- package/lib/codec/Switcheo/carbon/liquiditypool/query.js +799 -711
- package/lib/codec/Switcheo/carbon/liquiditypool/reward.d.ts +16 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/reward.js +579 -537
- package/lib/codec/Switcheo/carbon/liquiditypool/tx.d.ts +45 -1
- package/lib/codec/Switcheo/carbon/liquiditypool/tx.js +1209 -1091
- package/lib/codec/Switcheo/carbon/lockproxy/event.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/lockproxy/event.js +181 -174
- package/lib/codec/Switcheo/carbon/lockproxy/genesis.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/lockproxy/genesis.js +177 -123
- package/lib/codec/Switcheo/carbon/lockproxy/lockproxy.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/lockproxy/lockproxy.js +84 -75
- package/lib/codec/Switcheo/carbon/lockproxy/query.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/lockproxy/query.js +130 -106
- package/lib/codec/Switcheo/carbon/lockproxy/tx.d.ts +18 -1
- package/lib/codec/Switcheo/carbon/lockproxy/tx.js +515 -490
- package/lib/codec/Switcheo/carbon/market/event.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/market/event.js +33 -27
- package/lib/codec/Switcheo/carbon/market/fee.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/market/fee.js +152 -136
- package/lib/codec/Switcheo/carbon/market/genesis.d.ts +3 -2
- package/lib/codec/Switcheo/carbon/market/genesis.js +75 -57
- package/lib/codec/Switcheo/carbon/market/market.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/market/market.js +475 -478
- package/lib/codec/Switcheo/carbon/market/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/market/params.js +454 -513
- package/lib/codec/Switcheo/carbon/market/proposal.d.ts +4 -1
- package/lib/codec/Switcheo/carbon/market/proposal.js +109 -105
- package/lib/codec/Switcheo/carbon/market/query.d.ts +26 -3
- package/lib/codec/Switcheo/carbon/market/query.js +577 -516
- package/lib/codec/Switcheo/carbon/market/tx.d.ts +36 -4
- package/lib/codec/Switcheo/carbon/market/tx.js +830 -742
- package/lib/codec/Switcheo/carbon/marketstats/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/marketstats/genesis.js +14 -9
- package/lib/codec/Switcheo/carbon/marketstats/marketstats.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/marketstats/marketstats.js +123 -118
- package/lib/codec/Switcheo/carbon/marketstats/query.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/marketstats/query.js +41 -27
- package/lib/codec/Switcheo/carbon/marketstats/tx.d.ts +4 -1
- package/lib/codec/Switcheo/carbon/marketstats/tx.js +3 -11
- package/lib/codec/Switcheo/carbon/misc/block.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/misc/block.js +47 -47
- package/lib/codec/Switcheo/carbon/misc/message.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/misc/message.js +71 -62
- package/lib/codec/Switcheo/carbon/misc/message_type.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/misc/message_type.js +23 -18
- package/lib/codec/Switcheo/carbon/misc/query.d.ts +19 -2
- package/lib/codec/Switcheo/carbon/misc/query.js +390 -317
- package/lib/codec/Switcheo/carbon/misc/trade.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/misc/trade.js +105 -101
- package/lib/codec/Switcheo/carbon/misc/transaction.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/misc/transaction.js +185 -182
- package/lib/codec/Switcheo/carbon/oracle/event.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/oracle/event.js +113 -112
- package/lib/codec/Switcheo/carbon/oracle/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/oracle/export.js +4 -2
- package/lib/codec/Switcheo/carbon/oracle/genesis.d.ts +3 -2
- package/lib/codec/Switcheo/carbon/oracle/genesis.js +73 -44
- package/lib/codec/Switcheo/carbon/oracle/historical.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/oracle/historical.js +100 -92
- package/lib/codec/Switcheo/carbon/oracle/oracle.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/oracle/oracle.js +174 -167
- package/lib/codec/Switcheo/carbon/oracle/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/oracle/params.js +214 -219
- package/lib/codec/Switcheo/carbon/oracle/query.d.ts +62 -4
- package/lib/codec/Switcheo/carbon/oracle/query.js +905 -708
- package/lib/codec/Switcheo/carbon/oracle/slashing.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/oracle/slashing.js +86 -88
- package/lib/codec/Switcheo/carbon/oracle/tx.d.ts +31 -2
- package/lib/codec/Switcheo/carbon/oracle/tx.js +846 -728
- package/lib/codec/Switcheo/carbon/order/event.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/order/event.js +55 -60
- package/lib/codec/Switcheo/carbon/order/evm_hooks.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/order/evm_hooks.js +176 -154
- package/lib/codec/Switcheo/carbon/order/genesis.d.ts +5 -1
- package/lib/codec/Switcheo/carbon/order/genesis.js +151 -128
- package/lib/codec/Switcheo/carbon/order/order.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/order/order.js +407 -395
- package/lib/codec/Switcheo/carbon/order/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/order/params.js +63 -57
- package/lib/codec/Switcheo/carbon/order/query.d.ts +17 -2
- package/lib/codec/Switcheo/carbon/order/query.js +306 -267
- package/lib/codec/Switcheo/carbon/order/tx.d.ts +18 -1
- package/lib/codec/Switcheo/carbon/order/tx.js +444 -388
- package/lib/codec/Switcheo/carbon/otc/event.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/otc/event.js +75 -76
- package/lib/codec/Switcheo/carbon/otc/genesis.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/otc/genesis.js +42 -33
- package/lib/codec/Switcheo/carbon/otc/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/otc/params.js +164 -149
- package/lib/codec/Switcheo/carbon/otc/query.d.ts +16 -3
- package/lib/codec/Switcheo/carbon/otc/query.js +297 -279
- package/lib/codec/Switcheo/carbon/otc/quote.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/otc/quote.js +80 -74
- package/lib/codec/Switcheo/carbon/otc/rfq.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/otc/rfq.js +80 -69
- package/lib/codec/Switcheo/carbon/otc/tx.d.ts +15 -2
- package/lib/codec/Switcheo/carbon/otc/tx.js +253 -200
- package/lib/codec/Switcheo/carbon/perpspool/event.d.ts +14 -2
- package/lib/codec/Switcheo/carbon/perpspool/event.js +576 -586
- package/lib/codec/Switcheo/carbon/perpspool/genesis.d.ts +7 -2
- package/lib/codec/Switcheo/carbon/perpspool/genesis.js +238 -200
- package/lib/codec/Switcheo/carbon/perpspool/market.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/perpspool/market.js +263 -251
- package/lib/codec/Switcheo/carbon/perpspool/params.d.ts +7 -1
- package/lib/codec/Switcheo/carbon/perpspool/params.js +422 -376
- package/lib/codec/Switcheo/carbon/perpspool/pool.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/perpspool/pool.js +326 -335
- package/lib/codec/Switcheo/carbon/perpspool/query.d.ts +38 -2
- package/lib/codec/Switcheo/carbon/perpspool/query.js +914 -841
- package/lib/codec/Switcheo/carbon/perpspool/quote.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/perpspool/quote.js +100 -91
- package/lib/codec/Switcheo/carbon/perpspool/tx.d.ts +38 -5
- package/lib/codec/Switcheo/carbon/perpspool/tx.js +909 -853
- package/lib/codec/Switcheo/carbon/perpspool/user_vault.d.ts +4 -0
- package/lib/codec/Switcheo/carbon/perpspool/user_vault.js +235 -244
- package/lib/codec/Switcheo/carbon/position/event.d.ts +3 -1
- package/lib/codec/Switcheo/carbon/position/event.js +111 -120
- package/lib/codec/Switcheo/carbon/position/evm_hooks.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/position/evm_hooks.js +101 -81
- package/lib/codec/Switcheo/carbon/position/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/position/genesis.js +23 -15
- package/lib/codec/Switcheo/carbon/position/position.d.ts +5 -0
- package/lib/codec/Switcheo/carbon/position/position.js +322 -322
- package/lib/codec/Switcheo/carbon/position/query.d.ts +15 -2
- package/lib/codec/Switcheo/carbon/position/query.js +258 -221
- package/lib/codec/Switcheo/carbon/position/tx.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/position/tx.js +54 -40
- package/lib/codec/Switcheo/carbon/pricing/event.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/pricing/event.js +189 -170
- package/lib/codec/Switcheo/carbon/pricing/export.d.ts +2 -2
- package/lib/codec/Switcheo/carbon/pricing/export.js +8 -1
- package/lib/codec/Switcheo/carbon/pricing/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/pricing/genesis.js +39 -30
- package/lib/codec/Switcheo/carbon/pricing/legacy.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/pricing/legacy.js +41 -35
- package/lib/codec/Switcheo/carbon/pricing/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/pricing/params.js +150 -139
- package/lib/codec/Switcheo/carbon/pricing/pricing.d.ts +42 -0
- package/lib/codec/Switcheo/carbon/pricing/pricing.js +436 -208
- package/lib/codec/Switcheo/carbon/pricing/query.d.ts +70 -2
- package/lib/codec/Switcheo/carbon/pricing/query.js +568 -289
- package/lib/codec/Switcheo/carbon/pricing/tx.d.ts +20 -1
- package/lib/codec/Switcheo/carbon/pricing/tx.js +381 -316
- package/lib/codec/Switcheo/carbon/profile/event.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/profile/event.js +33 -29
- package/lib/codec/Switcheo/carbon/profile/genesis.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/profile/genesis.js +19 -15
- package/lib/codec/Switcheo/carbon/profile/profile.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/profile/profile.js +36 -28
- package/lib/codec/Switcheo/carbon/profile/query.d.ts +11 -2
- package/lib/codec/Switcheo/carbon/profile/query.js +146 -132
- package/lib/codec/Switcheo/carbon/profile/tx.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/profile/tx.js +54 -40
- package/lib/codec/Switcheo/carbon/sequence/genesis.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/sequence/genesis.js +54 -40
- package/lib/codec/Switcheo/carbon/sequence/query.d.ts +8 -1
- package/lib/codec/Switcheo/carbon/sequence/query.js +101 -84
- package/lib/codec/Switcheo/carbon/sequence/tx.d.ts +6 -1
- package/lib/codec/Switcheo/carbon/sequence/tx.js +63 -56
- package/lib/codec/Switcheo/carbon/subaccount/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/subaccount/export.js +2 -2
- package/lib/codec/Switcheo/carbon/subaccount/genesis.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/subaccount/genesis.js +51 -34
- package/lib/codec/Switcheo/carbon/subaccount/legacy.d.ts +8 -7
- package/lib/codec/Switcheo/carbon/subaccount/legacy.js +33 -26
- package/lib/codec/Switcheo/carbon/subaccount/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/subaccount/params.js +47 -32
- package/lib/codec/Switcheo/carbon/subaccount/query.d.ts +25 -3
- package/lib/codec/Switcheo/carbon/subaccount/query.js +505 -448
- package/lib/codec/Switcheo/carbon/subaccount/subaccount.d.ts +3 -0
- package/lib/codec/Switcheo/carbon/subaccount/subaccount.js +122 -122
- package/lib/codec/Switcheo/carbon/subaccount/tx.d.ts +12 -1
- package/lib/codec/Switcheo/carbon/subaccount/tx.js +219 -197
- package/lib/codec/alliance/alliance/alliance.d.ts +3 -0
- package/lib/codec/alliance/alliance/alliance.js +171 -156
- package/lib/codec/alliance/alliance/delegations.d.ts +4 -0
- package/lib/codec/alliance/alliance/delegations.js +163 -134
- package/lib/codec/alliance/alliance/events.d.ts +5 -0
- package/lib/codec/alliance/alliance/events.js +199 -200
- package/lib/codec/alliance/alliance/genesis.d.ts +8 -3
- package/lib/codec/alliance/alliance/genesis.js +224 -191
- package/lib/codec/alliance/alliance/gov.d.ts +3 -0
- package/lib/codec/alliance/alliance/gov.js +211 -208
- package/lib/codec/alliance/alliance/params.d.ts +2 -0
- package/lib/codec/alliance/alliance/params.js +79 -69
- package/lib/codec/alliance/alliance/query.d.ts +36 -4
- package/lib/codec/alliance/alliance/query.js +905 -851
- package/lib/codec/alliance/alliance/redelegations.d.ts +3 -0
- package/lib/codec/alliance/alliance/redelegations.js +127 -131
- package/lib/codec/alliance/alliance/tx.d.ts +21 -2
- package/lib/codec/alliance/alliance/tx.js +505 -459
- package/lib/codec/alliance/alliance/unbonding.d.ts +1 -0
- package/lib/codec/alliance/alliance/unbonding.js +46 -44
- package/lib/codec/amino/amino.js +1 -10
- package/lib/codec/cosmos/app/runtime/v1alpha1/module.d.ts +2 -0
- package/lib/codec/cosmos/app/runtime/v1alpha1/module.js +113 -80
- package/lib/codec/cosmos/app/v1alpha1/config.d.ts +3 -0
- package/lib/codec/cosmos/app/v1alpha1/config.js +99 -77
- package/lib/codec/cosmos/app/v1alpha1/module.d.ts +3 -0
- package/lib/codec/cosmos/app/v1alpha1/module.js +87 -64
- package/lib/codec/cosmos/app/v1alpha1/query.d.ts +6 -1
- package/lib/codec/cosmos/app/v1alpha1/query.js +43 -32
- package/lib/codec/cosmos/auth/module/v1/module.d.ts +2 -0
- package/lib/codec/cosmos/auth/module/v1/module.js +67 -50
- package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +4 -0
- package/lib/codec/cosmos/auth/v1beta1/auth.js +208 -192
- package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +2 -1
- package/lib/codec/cosmos/auth/v1beta1/genesis.js +34 -27
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +26 -3
- package/lib/codec/cosmos/auth/v1beta1/query.js +462 -402
- package/lib/codec/cosmos/auth/v1beta1/tx.d.ts +6 -1
- package/lib/codec/cosmos/auth/v1beta1/tx.js +51 -39
- package/lib/codec/cosmos/authz/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/authz/module/v1/module.js +14 -9
- package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +4 -0
- package/lib/codec/cosmos/authz/v1beta1/authz.js +117 -103
- package/lib/codec/cosmos/authz/v1beta1/event.d.ts +2 -0
- package/lib/codec/cosmos/authz/v1beta1/event.js +69 -56
- package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +1 -0
- package/lib/codec/cosmos/authz/v1beta1/genesis.js +23 -15
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +10 -1
- package/lib/codec/cosmos/authz/v1beta1/query.js +204 -189
- package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +11 -2
- package/lib/codec/cosmos/authz/v1beta1/tx.js +182 -142
- package/lib/codec/cosmos/autocli/v1/options.d.ts +7 -0
- package/lib/codec/cosmos/autocli/v1/options.js +340 -289
- package/lib/codec/cosmos/autocli/v1/query.d.ts +7 -1
- package/lib/codec/cosmos/autocli/v1/query.js +80 -57
- package/lib/codec/cosmos/bank/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/bank/module/v1/module.js +41 -31
- package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +1 -0
- package/lib/codec/cosmos/bank/v1beta1/authz.js +27 -19
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +7 -0
- package/lib/codec/cosmos/bank/v1beta1/bank.js +234 -199
- package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +3 -1
- package/lib/codec/cosmos/bank/v1beta1/genesis.js +85 -62
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +33 -3
- package/lib/codec/cosmos/bank/v1beta1/query.js +734 -673
- package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +13 -2
- package/lib/codec/cosmos/bank/v1beta1/tx.js +198 -148
- package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +11 -0
- package/lib/codec/cosmos/base/abci/v1beta1/abci.js +536 -495
- package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +8 -1
- package/lib/codec/cosmos/base/node/v1beta1/query.js +170 -154
- package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +2 -0
- package/lib/codec/cosmos/base/query/v1beta1/pagination.js +108 -102
- package/lib/codec/cosmos/base/reflection/v1beta1/reflection.d.ts +8 -1
- package/lib/codec/cosmos/base/reflection/v1beta1/reflection.js +87 -64
- package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.d.ts +30 -1
- package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.js +656 -557
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +26 -4
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.js +725 -685
- package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +3 -1
- package/lib/codec/cosmos/base/tendermint/v1beta1/types.js +215 -221
- package/lib/codec/cosmos/base/v1beta1/coin.d.ts +4 -0
- package/lib/codec/cosmos/base/v1beta1/coin.js +95 -72
- package/lib/codec/cosmos/circuit/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/circuit/module/v1/module.js +22 -16
- package/lib/codec/cosmos/circuit/v1/query.d.ts +11 -2
- package/lib/codec/cosmos/circuit/v1/query.js +140 -117
- package/lib/codec/cosmos/circuit/v1/tx.d.ts +10 -1
- package/lib/codec/cosmos/circuit/v1/tx.js +158 -131
- package/lib/codec/cosmos/circuit/v1/types.d.ts +3 -0
- package/lib/codec/cosmos/circuit/v1/types.js +94 -71
- package/lib/codec/cosmos/consensus/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/consensus/module/v1/module.js +22 -16
- package/lib/codec/cosmos/consensus/v1/query.d.ts +6 -1
- package/lib/codec/cosmos/consensus/v1/query.js +43 -34
- package/lib/codec/cosmos/consensus/v1/tx.d.ts +7 -2
- package/lib/codec/cosmos/consensus/v1/tx.js +78 -76
- package/lib/codec/cosmos/crisis/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/crisis/module/v1/module.js +31 -24
- package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +1 -0
- package/lib/codec/cosmos/crisis/v1beta1/genesis.js +25 -21
- package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +8 -1
- package/lib/codec/cosmos/crisis/v1beta1/tx.js +102 -88
- package/lib/codec/cosmos/crypto/ed25519/keys.d.ts +2 -0
- package/lib/codec/cosmos/crypto/ed25519/keys.js +69 -52
- package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +1 -0
- package/lib/codec/cosmos/crypto/hd/v1/hd.js +52 -51
- package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +5 -0
- package/lib/codec/cosmos/crypto/keyring/v1/record.js +141 -136
- package/lib/codec/cosmos/crypto/multisig/keys.d.ts +1 -0
- package/lib/codec/cosmos/crypto/multisig/keys.js +31 -22
- package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.d.ts +2 -0
- package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.js +80 -58
- package/lib/codec/cosmos/crypto/secp256k1/keys.d.ts +2 -0
- package/lib/codec/cosmos/crypto/secp256k1/keys.js +69 -52
- package/lib/codec/cosmos/crypto/secp256r1/keys.d.ts +2 -0
- package/lib/codec/cosmos/crypto/secp256r1/keys.js +69 -52
- package/lib/codec/cosmos/distribution/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/distribution/module/v1/module.js +31 -24
- package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +13 -1
- package/lib/codec/cosmos/distribution/v1beta1/distribution.js +397 -356
- package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +9 -1
- package/lib/codec/cosmos/distribution/v1beta1/genesis.js +371 -332
- package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +27 -2
- package/lib/codec/cosmos/distribution/v1beta1/query.js +531 -472
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +19 -2
- package/lib/codec/cosmos/distribution/v1beta1/tx.js +337 -283
- package/lib/codec/cosmos/evidence/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/evidence/module/v1/module.js +14 -9
- package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +1 -0
- package/lib/codec/cosmos/evidence/v1beta1/evidence.js +49 -52
- package/lib/codec/cosmos/evidence/v1beta1/genesis.d.ts +1 -0
- package/lib/codec/cosmos/evidence/v1beta1/genesis.js +19 -15
- package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +8 -1
- package/lib/codec/cosmos/evidence/v1beta1/query.js +139 -119
- package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +6 -1
- package/lib/codec/cosmos/evidence/v1beta1/tx.js +84 -67
- package/lib/codec/cosmos/feegrant/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/feegrant/module/v1/module.js +14 -9
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +5 -1
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.js +156 -142
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +1 -0
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.js +21 -15
- package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +11 -2
- package/lib/codec/cosmos/feegrant/v1beta1/query.js +181 -161
- package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +10 -1
- package/lib/codec/cosmos/feegrant/v1beta1/tx.js +135 -107
- package/lib/codec/cosmos/genutil/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/genutil/module/v1/module.js +14 -9
- package/lib/codec/cosmos/genutil/v1beta1/genesis.d.ts +1 -0
- package/lib/codec/cosmos/genutil/v1beta1/genesis.js +47 -33
- package/lib/codec/cosmos/gov/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/gov/module/v1/module.js +33 -27
- package/lib/codec/cosmos/gov/v1/genesis.d.ts +2 -1
- package/lib/codec/cosmos/gov/v1/genesis.js +98 -93
- package/lib/codec/cosmos/gov/v1/gov.d.ts +10 -1
- package/lib/codec/cosmos/gov/v1/gov.js +524 -507
- package/lib/codec/cosmos/gov/v1/query.d.ts +23 -2
- package/lib/codec/cosmos/gov/v1/query.js +518 -494
- package/lib/codec/cosmos/gov/v1/tx.d.ts +19 -2
- package/lib/codec/cosmos/gov/v1/tx.js +425 -383
- package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +2 -1
- package/lib/codec/cosmos/gov/v1beta1/genesis.js +80 -71
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +9 -0
- package/lib/codec/cosmos/gov/v1beta1/gov.js +391 -349
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +21 -2
- package/lib/codec/cosmos/gov/v1beta1/query.js +473 -454
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +13 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +226 -189
- package/lib/codec/cosmos/group/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/group/module/v1/module.js +36 -34
- package/lib/codec/cosmos/group/v1/events.d.ts +11 -0
- package/lib/codec/cosmos/group/v1/events.js +289 -267
- package/lib/codec/cosmos/group/v1/genesis.d.ts +1 -0
- package/lib/codec/cosmos/group/v1/genesis.js +89 -69
- package/lib/codec/cosmos/group/v1/query.d.ts +33 -2
- package/lib/codec/cosmos/group/v1/query.js +802 -744
- package/lib/codec/cosmos/group/v1/tx.d.ts +33 -2
- package/lib/codec/cosmos/group/v1/tx.js +830 -769
- package/lib/codec/cosmos/group/v1/types.d.ts +12 -1
- package/lib/codec/cosmos/group/v1/types.js +562 -565
- package/lib/codec/cosmos/ics23/v1/proofs.d.ts +13 -0
- package/lib/codec/cosmos/ics23/v1/proofs.js +559 -553
- package/lib/codec/cosmos/mint/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/mint/module/v1/module.js +31 -24
- package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +1 -0
- package/lib/codec/cosmos/mint/v1beta1/genesis.js +36 -31
- package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +2 -0
- package/lib/codec/cosmos/mint/v1beta1/mint.js +95 -89
- package/lib/codec/cosmos/mint/v1beta1/query.d.ts +10 -1
- package/lib/codec/cosmos/mint/v1beta1/query.js +144 -109
- package/lib/codec/cosmos/mint/v1beta1/tx.d.ts +6 -1
- package/lib/codec/cosmos/mint/v1beta1/tx.js +51 -39
- package/lib/codec/cosmos/msg/textual/v1/textual.js +1 -10
- package/lib/codec/cosmos/msg/v1/msg.js +1 -10
- package/lib/codec/cosmos/nft/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/nft/module/v1/module.js +14 -9
- package/lib/codec/cosmos/nft/v1beta1/event.d.ts +3 -0
- package/lib/codec/cosmos/nft/v1beta1/event.js +108 -84
- package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +2 -0
- package/lib/codec/cosmos/nft/v1beta1/genesis.js +58 -41
- package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +2 -0
- package/lib/codec/cosmos/nft/v1beta1/nft.js +108 -103
- package/lib/codec/cosmos/nft/v1beta1/query.d.ts +19 -2
- package/lib/codec/cosmos/nft/v1beta1/query.js +360 -315
- package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +6 -1
- package/lib/codec/cosmos/nft/v1beta1/tx.js +60 -44
- package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +1 -0
- package/lib/codec/cosmos/orm/module/v1alpha1/module.js +14 -9
- package/lib/codec/cosmos/orm/query/v1alpha1/query.d.ts +18 -8
- package/lib/codec/cosmos/orm/query/v1alpha1/query.js +309 -281
- package/lib/codec/cosmos/orm/v1/orm.d.ts +4 -0
- package/lib/codec/cosmos/orm/v1/orm.js +122 -102
- package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +2 -0
- package/lib/codec/cosmos/orm/v1alpha1/schema.js +98 -76
- package/lib/codec/cosmos/params/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/params/module/v1/module.js +14 -9
- package/lib/codec/cosmos/params/v1beta1/params.d.ts +2 -0
- package/lib/codec/cosmos/params/v1beta1/params.js +70 -55
- package/lib/codec/cosmos/params/v1beta1/query.d.ts +9 -1
- package/lib/codec/cosmos/params/v1beta1/query.js +120 -92
- package/lib/codec/cosmos/query/v1/query.js +1 -10
- package/lib/codec/cosmos/reflection/v1/reflection.d.ts +6 -1
- package/lib/codec/cosmos/reflection/v1/reflection.js +37 -27
- package/lib/codec/cosmos/slashing/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/slashing/module/v1/module.js +22 -16
- package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +4 -0
- package/lib/codec/cosmos/slashing/v1beta1/genesis.js +133 -108
- package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +11 -2
- package/lib/codec/cosmos/slashing/v1beta1/query.js +144 -124
- package/lib/codec/cosmos/slashing/v1beta1/slashing.d.ts +2 -0
- package/lib/codec/cosmos/slashing/v1beta1/slashing.js +165 -156
- package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +8 -1
- package/lib/codec/cosmos/slashing/v1beta1/tx.js +87 -68
- package/lib/codec/cosmos/staking/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/staking/module/v1/module.js +44 -44
- package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +2 -0
- package/lib/codec/cosmos/staking/v1beta1/authz.js +72 -70
- package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +3 -1
- package/lib/codec/cosmos/staking/v1beta1/genesis.js +141 -103
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +33 -2
- package/lib/codec/cosmos/staking/v1beta1/query.js +799 -745
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +23 -2
- package/lib/codec/cosmos/staking/v1beta1/staking.js +872 -848
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +19 -2
- package/lib/codec/cosmos/staking/v1beta1/tx.js +465 -454
- package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.d.ts +2 -0
- package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.js +78 -58
- package/lib/codec/cosmos/store/snapshots/v1/snapshot.d.ts +7 -0
- package/lib/codec/cosmos/store/snapshots/v1/snapshot.js +268 -245
- package/lib/codec/cosmos/store/streaming/abci/grpc.d.ts +9 -2
- package/lib/codec/cosmos/store/streaming/abci/grpc.js +109 -95
- package/lib/codec/cosmos/store/v1beta1/commit_info.d.ts +3 -0
- package/lib/codec/cosmos/store/v1beta1/commit_info.js +130 -111
- package/lib/codec/cosmos/store/v1beta1/listening.d.ts +3 -1
- package/lib/codec/cosmos/store/v1beta1/listening.js +116 -100
- package/lib/codec/cosmos/tx/config/v1/config.d.ts +1 -0
- package/lib/codec/cosmos/tx/config/v1/config.js +32 -26
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +5 -0
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.js +190 -163
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +25 -4
- package/lib/codec/cosmos/tx/v1beta1/service.js +556 -539
- package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +15 -2
- package/lib/codec/cosmos/tx/v1beta1/tx.js +540 -512
- package/lib/codec/cosmos/upgrade/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/upgrade/module/v1/module.js +22 -16
- package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +15 -2
- package/lib/codec/cosmos/upgrade/v1beta1/query.js +238 -193
- package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +8 -1
- package/lib/codec/cosmos/upgrade/v1beta1/tx.js +84 -66
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +4 -0
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.js +149 -144
- package/lib/codec/cosmos/vesting/module/v1/module.d.ts +1 -0
- package/lib/codec/cosmos/vesting/module/v1/module.js +14 -9
- package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +10 -1
- package/lib/codec/cosmos/vesting/v1beta1/tx.js +185 -167
- package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +6 -0
- package/lib/codec/cosmos/vesting/v1beta1/vesting.js +223 -193
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +2 -0
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.js +69 -52
- package/lib/codec/ethermint/evm/v1/events.d.ts +4 -0
- package/lib/codec/ethermint/evm/v1/events.js +132 -121
- package/lib/codec/ethermint/evm/v1/evm.d.ts +8 -0
- package/lib/codec/ethermint/evm/v1/evm.js +598 -592
- package/lib/codec/ethermint/evm/v1/genesis.d.ts +2 -0
- package/lib/codec/ethermint/evm/v1/genesis.js +66 -53
- package/lib/codec/ethermint/evm/v1/query.d.ts +29 -2
- package/lib/codec/ethermint/evm/v1/query.js +750 -700
- package/lib/codec/ethermint/evm/v1/tx.d.ts +13 -2
- package/lib/codec/ethermint/evm/v1/tx.js +471 -452
- package/lib/codec/ethermint/feemarket/v1/events.d.ts +2 -0
- package/lib/codec/ethermint/feemarket/v1/events.js +49 -38
- package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +1 -0
- package/lib/codec/ethermint/feemarket/v1/feemarket.js +90 -90
- package/lib/codec/ethermint/feemarket/v1/genesis.d.ts +1 -0
- package/lib/codec/ethermint/feemarket/v1/genesis.js +36 -31
- package/lib/codec/ethermint/feemarket/v1/query.d.ts +10 -1
- package/lib/codec/ethermint/feemarket/v1/query.js +114 -90
- package/lib/codec/ethermint/feemarket/v1/tx.d.ts +6 -1
- package/lib/codec/ethermint/feemarket/v1/tx.js +51 -39
- package/lib/codec/ethermint/types/v1/account.d.ts +1 -0
- package/lib/codec/ethermint/types/v1/account.js +33 -28
- package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +1 -0
- package/lib/codec/ethermint/types/v1/dynamic_fee.js +23 -18
- package/lib/codec/ethermint/types/v1/indexer.d.ts +1 -0
- package/lib/codec/ethermint/types/v1/indexer.js +79 -78
- package/lib/codec/ethermint/types/v1/web3.d.ts +1 -0
- package/lib/codec/ethermint/types/v1/web3.js +67 -56
- package/lib/codec/google/protobuf/any.d.ts +1 -0
- package/lib/codec/google/protobuf/any.js +58 -41
- package/lib/codec/google/protobuf/descriptor.d.ts +105 -19
- package/lib/codec/google/protobuf/descriptor.js +1968 -1734
- package/lib/codec/google/protobuf/duration.d.ts +1 -0
- package/lib/codec/google/protobuf/duration.js +34 -28
- package/lib/codec/google/protobuf/empty.d.ts +1 -0
- package/lib/codec/google/protobuf/empty.js +14 -9
- package/lib/codec/google/protobuf/timestamp.d.ts +1 -0
- package/lib/codec/google/protobuf/timestamp.js +34 -28
- package/lib/codec/google/protobuf/wrappers.d.ts +36 -0
- package/lib/codec/google/protobuf/wrappers.js +206 -173
- package/lib/codec/ibc/applications/fee/v1/ack.d.ts +1 -0
- package/lib/codec/ibc/applications/fee/v1/ack.js +68 -59
- package/lib/codec/ibc/applications/fee/v1/fee.d.ts +5 -1
- package/lib/codec/ibc/applications/fee/v1/fee.js +124 -102
- package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +5 -0
- package/lib/codec/ibc/applications/fee/v1/genesis.js +190 -147
- package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +1 -0
- package/lib/codec/ibc/applications/fee/v1/metadata.js +30 -22
- package/lib/codec/ibc/applications/fee/v1/query.d.ts +25 -2
- package/lib/codec/ibc/applications/fee/v1/query.js +559 -507
- package/lib/codec/ibc/applications/fee/v1/tx.d.ts +13 -2
- package/lib/codec/ibc/applications/fee/v1/tx.js +230 -214
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +1 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.js +23 -19
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +8 -1
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.js +92 -77
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +10 -1
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +191 -182
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +5 -0
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +207 -184
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.d.ts +1 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.js +31 -23
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.d.ts +6 -1
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.js +43 -32
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.d.ts +6 -1
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.js +51 -39
- package/lib/codec/ibc/applications/interchain_accounts/v1/account.d.ts +1 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/account.js +34 -30
- package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.d.ts +1 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.js +56 -58
- package/lib/codec/ibc/applications/interchain_accounts/v1/packet.d.ts +2 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/packet.js +85 -63
- package/lib/codec/ibc/applications/transfer/v1/authz.d.ts +2 -0
- package/lib/codec/ibc/applications/transfer/v1/authz.js +72 -57
- package/lib/codec/ibc/applications/transfer/v1/genesis.d.ts +2 -1
- package/lib/codec/ibc/applications/transfer/v1/genesis.js +46 -37
- package/lib/codec/ibc/applications/transfer/v1/query.d.ts +17 -2
- package/lib/codec/ibc/applications/transfer/v1/query.js +273 -236
- package/lib/codec/ibc/applications/transfer/v1/transfer.d.ts +2 -0
- package/lib/codec/ibc/applications/transfer/v1/transfer.js +59 -48
- package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +8 -1
- package/lib/codec/ibc/applications/transfer/v1/tx.js +154 -142
- package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +1 -0
- package/lib/codec/ibc/applications/transfer/v2/packet.js +48 -46
- package/lib/codec/ibc/core/channel/v1/channel.d.ts +11 -2
- package/lib/codec/ibc/core/channel/v1/channel.js +450 -430
- package/lib/codec/ibc/core/channel/v1/genesis.d.ts +3 -1
- package/lib/codec/ibc/core/channel/v1/genesis.js +133 -98
- package/lib/codec/ibc/core/channel/v1/query.d.ts +40 -3
- package/lib/codec/ibc/core/channel/v1/query.js +1239 -1193
- package/lib/codec/ibc/core/channel/v1/tx.d.ts +44 -3
- package/lib/codec/ibc/core/channel/v1/tx.js +1587 -1532
- package/lib/codec/ibc/core/channel/v1/upgrade.d.ts +4 -1
- package/lib/codec/ibc/core/channel/v1/upgrade.js +108 -104
- package/lib/codec/ibc/core/client/v1/client.d.ts +8 -1
- package/lib/codec/ibc/core/client/v1/client.js +236 -226
- package/lib/codec/ibc/core/client/v1/genesis.d.ts +4 -1
- package/lib/codec/ibc/core/client/v1/genesis.js +155 -119
- package/lib/codec/ibc/core/client/v1/query.d.ts +24 -3
- package/lib/codec/ibc/core/client/v1/query.js +524 -467
- package/lib/codec/ibc/core/client/v1/tx.d.ts +19 -2
- package/lib/codec/ibc/core/client/v1/tx.js +427 -377
- package/lib/codec/ibc/core/commitment/v1/commitment.d.ts +4 -0
- package/lib/codec/ibc/core/commitment/v1/commitment.js +107 -82
- package/lib/codec/ibc/core/connection/v1/connection.d.ts +7 -0
- package/lib/codec/ibc/core/connection/v1/connection.js +246 -225
- package/lib/codec/ibc/core/connection/v1/genesis.d.ts +2 -1
- package/lib/codec/ibc/core/connection/v1/genesis.js +51 -38
- package/lib/codec/ibc/core/connection/v1/query.d.ts +18 -3
- package/lib/codec/ibc/core/connection/v1/query.js +405 -379
- package/lib/codec/ibc/core/connection/v1/tx.d.ts +15 -2
- package/lib/codec/ibc/core/connection/v1/tx.js +481 -469
- package/lib/codec/ibc/core/types/v1/genesis.d.ts +2 -1
- package/lib/codec/ibc/core/types/v1/genesis.js +54 -56
- package/lib/codec/ibc/lightclients/localhost/v2/localhost.d.ts +1 -0
- package/lib/codec/ibc/lightclients/localhost/v2/localhost.js +25 -21
- package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.d.ts +17 -1
- package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.js +612 -605
- package/lib/codec/ibc/lightclients/solomachine/v3/solomachine.d.ts +8 -0
- package/lib/codec/ibc/lightclients/solomachine/v3/solomachine.js +360 -353
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +8 -3
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.js +312 -313
- package/lib/codec/ibc/lightclients/wasm/v1/genesis.d.ts +2 -0
- package/lib/codec/ibc/lightclients/wasm/v1/genesis.js +71 -50
- package/lib/codec/ibc/lightclients/wasm/v1/query.d.ts +8 -1
- package/lib/codec/ibc/lightclients/wasm/v1/query.js +127 -104
- package/lib/codec/ibc/lightclients/wasm/v1/tx.d.ts +10 -1
- package/lib/codec/ibc/lightclients/wasm/v1/tx.js +180 -145
- package/lib/codec/ibc/lightclients/wasm/v1/wasm.d.ts +4 -0
- package/lib/codec/ibc/lightclients/wasm/v1/wasm.js +124 -103
- package/lib/codec/index.d.ts +5 -19
- package/lib/codec/index.js +429 -163
- package/lib/codec/oraclesvc/query.d.ts +4 -1
- package/lib/codec/oraclesvc/query.js +5 -9
- package/lib/codec/tendermint/abci/types.d.ts +53 -3
- package/lib/codec/tendermint/abci/types.js +2265 -2151
- package/lib/codec/tendermint/crypto/keys.d.ts +3 -2
- package/lib/codec/tendermint/crypto/keys.js +60 -48
- package/lib/codec/tendermint/crypto/proof.d.ts +5 -0
- package/lib/codec/tendermint/crypto/proof.js +186 -162
- package/lib/codec/tendermint/libs/bits/types.d.ts +1 -0
- package/lib/codec/tendermint/libs/bits/types.js +33 -29
- package/lib/codec/tendermint/oracle/types.d.ts +6 -0
- package/lib/codec/tendermint/oracle/types.js +323 -286
- package/lib/codec/tendermint/p2p/types.d.ts +4 -0
- package/lib/codec/tendermint/p2p/types.js +207 -191
- package/lib/codec/tendermint/types/block.d.ts +2 -1
- package/lib/codec/tendermint/types/block.js +53 -56
- package/lib/codec/tendermint/types/evidence.d.ts +5 -1
- package/lib/codec/tendermint/types/evidence.js +178 -166
- package/lib/codec/tendermint/types/params.d.ts +7 -0
- package/lib/codec/tendermint/types/params.js +233 -232
- package/lib/codec/tendermint/types/types.d.ts +15 -0
- package/lib/codec/tendermint/types/types.js +803 -796
- package/lib/codec/tendermint/types/validator.d.ts +3 -0
- package/lib/codec/tendermint/types/validator.js +151 -141
- package/lib/codec/tendermint/version/types.d.ts +2 -0
- package/lib/codec/tendermint/version/types.js +62 -58
- package/lib/constant/network.js +80 -20
- package/lib/modules/admin.js +478 -555
- package/lib/modules/alliance.js +56 -79
- package/lib/modules/bank.js +10 -21
- package/lib/modules/base.js +3 -14
- package/lib/modules/bridge.js +62 -78
- package/lib/modules/broker.js +18 -31
- package/lib/modules/cdp.js +749 -851
- package/lib/modules/coin.js +80 -111
- package/lib/modules/cosmwasm.js +44 -63
- package/lib/modules/erc20.js +43 -62
- package/lib/modules/evm.js +25 -37
- package/lib/modules/evmmerge.js +10 -21
- package/lib/modules/fee.js +5 -16
- package/lib/modules/gov.js +35 -50
- package/lib/modules/grant.js +28 -45
- package/lib/modules/ibc.js +193 -185
- package/lib/modules/leverage.js +22 -37
- package/lib/modules/liquiditypool.js +128 -159
- package/lib/modules/market.js +89 -119
- package/lib/modules/order.js +86 -115
- package/lib/modules/otc.js +30 -45
- package/lib/modules/perpspool.js +141 -163
- package/lib/modules/position.js +22 -37
- package/lib/modules/profile.js +10 -21
- package/lib/modules/staking.js +59 -85
- package/lib/modules/subaccount.js +33 -48
- package/lib/modules/xchain.js +22 -35
- package/lib/provider/amino/AminoTypesMap.js +27 -1
- package/lib/provider/amino/types/gov.js +71 -29
- package/lib/provider/amino/types/grant.js +37 -13
- package/lib/provider/amino/types/ibc.js +2 -3
- package/lib/provider/amino/types/order.js +9 -2
- package/lib/provider/amino/utils.js +21 -23
- package/lib/provider/keplr/KeplrAccount.js +122 -134
- package/lib/provider/leap/LeapAccount.js +90 -106
- package/lib/provider/ledger/ledger.js +166 -207
- package/lib/provider/metamask/MetaMask.js +288 -346
- package/lib/provider/rainbowKit/RainbowKitAccount.js +128 -162
- package/lib/util/address.js +3 -4
- package/lib/util/alliance.js +2 -2
- package/lib/util/api.js +23 -36
- package/lib/util/blockchain.js +1 -2
- package/lib/util/bytes.d.ts +2 -0
- package/lib/util/bytes.js +10 -0
- package/lib/util/eip712.js +5 -5
- package/lib/util/ethermint.js +90 -77
- package/lib/util/fetch.js +1 -1
- package/lib/util/generic.js +34 -42
- package/lib/util/grant.js +12 -3
- package/lib/util/ibc.js +10 -12
- package/lib/util/index.d.ts +1 -0
- package/lib/util/index.js +2 -1
- package/lib/util/ledger.js +19 -34
- package/lib/util/legacyEIP712.js +5 -2
- package/lib/util/network.js +1 -2
- package/lib/util/provider.js +7 -18
- package/lib/util/tx.d.ts +4 -18
- package/lib/util/tx.js +10 -10
- package/lib/util/type.js +1 -1
- package/lib/wallet/CarbonSigner.js +74 -113
- package/lib/wallet/CarbonSigningClient.js +107 -116
- package/lib/wallet/CarbonWallet.js +497 -501
- package/lib/websocket/connector.js +27 -53
- package/package.json +3 -3
- package/lib/clients/N3Client.d.ts +0 -73
- package/lib/clients/N3Client.js +0 -285
- package/lib/clients/NEOClient.d.ts +0 -57
- package/lib/clients/NEOClient.js +0 -337
- package/lib/clients/ZILClient.d.ts +0 -106
- package/lib/clients/ZILClient.js +0 -437
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/BIP44.d.ts +0 -5
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/BIP44.js +0 -26
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.d.ts +0 -40
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +0 -62
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.d.ts +0 -3
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/index.js +0 -21
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.d.ts +0 -42
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +0 -181
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.d.ts +0 -24
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +0 -150
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.d.ts +0 -59
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +0 -180
- package/lib/provider/account/NeoLedgerAccount/index.d.ts +0 -1
- package/lib/provider/account/NeoLedgerAccount/index.js +0 -17
- package/lib/provider/account/index.d.ts +0 -1
- package/lib/provider/account/index.js +0 -17
- package/lib/provider/o3/O3Types.d.ts +0 -84
- package/lib/provider/o3/O3Types.js +0 -41
- package/lib/provider/o3/O3Wallet.d.ts +0 -29
- package/lib/provider/o3/O3Wallet.js +0 -242
- package/lib/provider/o3/index.d.ts +0 -2
- package/lib/provider/o3/index.js +0 -32
- package/lib/provider/zilpay/Zilpay.d.ts +0 -33
- package/lib/provider/zilpay/Zilpay.js +0 -82
- package/lib/provider/zilpay/index.d.ts +0 -1
- package/lib/provider/zilpay/index.js +0 -17
package/lib/CarbonSDK.js
CHANGED
|
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
27
|
};
|
|
@@ -69,23 +60,22 @@ const DEFAULT_SDK_INIT_OPTS = {
|
|
|
69
60
|
*/
|
|
70
61
|
class CarbonSDK {
|
|
71
62
|
constructor(opts) {
|
|
72
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
73
63
|
this.initialized = false;
|
|
74
|
-
this.network =
|
|
75
|
-
this.configOverride =
|
|
64
|
+
this.network = opts.network ?? constant_1.DEFAULT_NETWORK;
|
|
65
|
+
this.configOverride = opts.config ?? {};
|
|
76
66
|
this.networkConfig = util_1.GenericUtils.overrideConfig(constant_1.NetworkConfigs[this.network], this.configOverride);
|
|
77
|
-
this.useTmAbciQuery =
|
|
67
|
+
this.useTmAbciQuery = opts.useTmAbciQuery ?? false;
|
|
78
68
|
this.gasFee = opts.gasFee;
|
|
79
69
|
this.tmClient = opts.tmClient;
|
|
80
70
|
this.wallet = opts.wallet;
|
|
81
|
-
this.chainId =
|
|
82
|
-
this.evmChainId =
|
|
71
|
+
this.chainId = opts.chainId ?? constant_1.CarbonChainIDs[this.network] ?? constant_1.CarbonChainIDs[constant_1.Network.MainNet];
|
|
72
|
+
this.evmChainId = opts.evmChainId ?? constant_1.CarbonEvmChainIDs[this.network] ?? constant_1.CarbonEvmChainIDs[constant_1.Network.MainNet];
|
|
83
73
|
let carbonQueryClient;
|
|
84
74
|
if (!opts.query) {
|
|
85
75
|
let grpcClient;
|
|
86
76
|
if (opts.useTmAbciQuery !== true && this.networkConfig.grpcUrl) {
|
|
87
77
|
const transport = typeof window === "undefined" ? (0, grpc_web_node_http_transport_1.NodeHttpTransport)() : undefined;
|
|
88
|
-
grpcClient =
|
|
78
|
+
grpcClient = opts.grpcQueryClient ?? new GrpcQueryClient_1.default(this.networkConfig.restUrl, {
|
|
89
79
|
transport,
|
|
90
80
|
});
|
|
91
81
|
}
|
|
@@ -94,10 +84,10 @@ class CarbonSDK {
|
|
|
94
84
|
grpcClient,
|
|
95
85
|
});
|
|
96
86
|
}
|
|
97
|
-
this.query = (
|
|
98
|
-
this.insights =
|
|
99
|
-
this.token =
|
|
100
|
-
this.hydrogen =
|
|
87
|
+
this.query = (opts.query ?? carbonQueryClient);
|
|
88
|
+
this.insights = opts.insights ?? new clients_1.InsightsQueryClient(this.networkConfig);
|
|
89
|
+
this.token = opts.token ?? clients_1.TokenClient.instance(this.query, this);
|
|
90
|
+
this.hydrogen = opts.hydrogen ?? new clients_1.HydrogenClient(this.networkConfig, this.token);
|
|
101
91
|
this.admin = new modules_1.AdminModule(this);
|
|
102
92
|
this.alliance = new modules_1.AllianceModule(this);
|
|
103
93
|
this.order = new modules_1.OrderModule(this);
|
|
@@ -125,131 +115,104 @@ class CarbonSDK {
|
|
|
125
115
|
this.bridge = new modules_1.BridgeModule(this);
|
|
126
116
|
this.otc = new modules_1.OTCModule(this);
|
|
127
117
|
}
|
|
128
|
-
static instance(opts = DEFAULT_SDK_INIT_OPTS) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const sdk = new CarbonSDK({ network, config: configOverride, tmClient, defaultTimeoutBlocks, chainId, useTmAbciQuery: opts.useTmAbciQuery });
|
|
147
|
-
if (!normalInit)
|
|
148
|
-
return sdk;
|
|
149
|
-
if (opts.wallet) {
|
|
150
|
-
yield sdk.connect(opts.wallet);
|
|
151
|
-
}
|
|
152
|
-
if (opts.skipInit !== true) {
|
|
153
|
-
yield sdk.initialize();
|
|
154
|
-
}
|
|
118
|
+
static async instance(opts = DEFAULT_SDK_INIT_OPTS) {
|
|
119
|
+
const network = opts.network ?? constant_1.DEFAULT_NETWORK;
|
|
120
|
+
const configOverride = opts.config ?? {};
|
|
121
|
+
const defaultTimeoutBlocks = opts.defaultTimeoutBlocks;
|
|
122
|
+
const networkConfig = util_1.GenericUtils.overrideConfig(constant_1.NetworkConfigs[network], configOverride);
|
|
123
|
+
const tmClient = opts.tmClient ?? new tendermint_rpc_1.Tendermint37Client(new clients.BatchQueryClient(networkConfig.tmRpcUrl)); // fallback tmClient
|
|
124
|
+
let chainId = networkConfig.chainId; // fallback chain ID
|
|
125
|
+
let normalInit = true;
|
|
126
|
+
try {
|
|
127
|
+
chainId = (await tmClient.status())?.nodeInfo.network;
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
console.warn("tm client init failed");
|
|
131
|
+
console.error(error);
|
|
132
|
+
normalInit = false;
|
|
133
|
+
}
|
|
134
|
+
const sdk = new CarbonSDK({ network, config: configOverride, tmClient, defaultTimeoutBlocks, chainId, useTmAbciQuery: opts.useTmAbciQuery });
|
|
135
|
+
if (!normalInit)
|
|
155
136
|
return sdk;
|
|
137
|
+
if (opts.wallet) {
|
|
138
|
+
await sdk.connect(opts.wallet);
|
|
139
|
+
}
|
|
140
|
+
if (opts.skipInit !== true) {
|
|
141
|
+
await sdk.initialize();
|
|
142
|
+
}
|
|
143
|
+
return sdk;
|
|
144
|
+
}
|
|
145
|
+
static async instanceWithWallet(wallet, sdkOpts = DEFAULT_SDK_INIT_OPTS) {
|
|
146
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
147
|
+
return sdk.connect(wallet);
|
|
148
|
+
}
|
|
149
|
+
static async instanceWithPrivateKey(privateKey, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
150
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
151
|
+
return sdk.connectWithPrivateKey(privateKey, walletOpts);
|
|
152
|
+
}
|
|
153
|
+
static async instanceWithMnemonic(mnemonic, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
154
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
155
|
+
return sdk.connectWithMnemonic(mnemonic, walletOpts);
|
|
156
|
+
}
|
|
157
|
+
static async instanceWithSigner(signer, publicKeyBase64, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
158
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
159
|
+
return sdk.connectWithSigner(signer, publicKeyBase64, walletOpts);
|
|
160
|
+
}
|
|
161
|
+
static async instanceWithLedger(ledger, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
162
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
163
|
+
return sdk.connectWithLedger(ledger, walletOpts);
|
|
164
|
+
}
|
|
165
|
+
static async instanceWithKeplr(keplr, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
166
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
167
|
+
return sdk.connectWithKeplr(keplr, walletOpts);
|
|
168
|
+
}
|
|
169
|
+
static async instanceWithLeap(leap, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
170
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
171
|
+
return sdk.connectWithLeap(leap, walletOpts);
|
|
172
|
+
}
|
|
173
|
+
static async instanceWithMetamask(metamask, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
174
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
175
|
+
return sdk.connectWithMetamask(metamask, walletOpts);
|
|
176
|
+
}
|
|
177
|
+
static async instanceWithRainbowKit(rainbowKit, sdkOpts = DEFAULT_SDK_INIT_OPTS, rainbowKitWalletOpts, walletOpts) {
|
|
178
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
179
|
+
return sdk.connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, walletOpts);
|
|
180
|
+
}
|
|
181
|
+
static async instanceViewOnly(bech32Address, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
182
|
+
const sdk = await CarbonSDK.instance(sdkOpts);
|
|
183
|
+
return sdk.connectViewOnly(bech32Address, walletOpts);
|
|
184
|
+
}
|
|
185
|
+
async initialize() {
|
|
186
|
+
const fees = await this.getGasFee();
|
|
187
|
+
const chainId = await this.query.chain.getChainId();
|
|
188
|
+
this.chainId = chainId;
|
|
189
|
+
this.gasFee = fees;
|
|
190
|
+
await this.token.initialize();
|
|
191
|
+
if (this.wallet) {
|
|
192
|
+
await this.wallet.initialize(this.query, fees);
|
|
193
|
+
}
|
|
194
|
+
this.initialized = true;
|
|
195
|
+
return this;
|
|
196
|
+
}
|
|
197
|
+
async getGasFee() {
|
|
198
|
+
if (this.gasFee)
|
|
199
|
+
return this.gasFee;
|
|
200
|
+
const queryClient = this.query;
|
|
201
|
+
const { msgGasCosts } = await queryClient.fee.MsgGasCostAll({
|
|
202
|
+
pagination: constant_1.PAGINATE_10K,
|
|
156
203
|
});
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
static instanceWithPrivateKey(privateKey, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
165
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
167
|
-
return sdk.connectWithPrivateKey(privateKey, walletOpts);
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
static instanceWithMnemonic(mnemonic, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
171
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
173
|
-
return sdk.connectWithMnemonic(mnemonic, walletOpts);
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
static instanceWithSigner(signer, publicKeyBase64, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
177
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
179
|
-
return sdk.connectWithSigner(signer, publicKeyBase64, walletOpts);
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
static instanceWithLedger(ledger, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
183
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
184
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
185
|
-
return sdk.connectWithLedger(ledger, walletOpts);
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
static instanceWithKeplr(keplr, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
189
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
191
|
-
return sdk.connectWithKeplr(keplr, walletOpts);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
static instanceWithLeap(leap, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
195
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
197
|
-
return sdk.connectWithLeap(leap, walletOpts);
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
static instanceWithMetamask(metamask, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
201
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
203
|
-
return sdk.connectWithMetamask(metamask, walletOpts);
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
static instanceWithRainbowKit(rainbowKit, sdkOpts = DEFAULT_SDK_INIT_OPTS, rainbowKitWalletOpts, walletOpts) {
|
|
207
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
209
|
-
return sdk.connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, walletOpts);
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
static instanceViewOnly(bech32Address, sdkOpts = DEFAULT_SDK_INIT_OPTS, walletOpts) {
|
|
213
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
-
const sdk = yield CarbonSDK.instance(sdkOpts);
|
|
215
|
-
return sdk.connectViewOnly(bech32Address, walletOpts);
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
initialize() {
|
|
219
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
-
const fees = yield this.getGasFee();
|
|
221
|
-
const chainId = yield this.query.chain.getChainId();
|
|
222
|
-
this.chainId = chainId;
|
|
223
|
-
this.gasFee = fees;
|
|
224
|
-
yield this.token.initialize();
|
|
225
|
-
if (this.wallet) {
|
|
226
|
-
yield this.wallet.initialize(this.query, fees);
|
|
227
|
-
}
|
|
228
|
-
this.initialized = true;
|
|
229
|
-
return this;
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
getGasFee() {
|
|
233
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
-
if (this.gasFee)
|
|
235
|
-
return this.gasFee;
|
|
236
|
-
const queryClient = this.query;
|
|
237
|
-
const { msgGasCosts } = yield queryClient.fee.MsgGasCostAll({
|
|
238
|
-
pagination: constant_1.PAGINATE_10K,
|
|
239
|
-
});
|
|
240
|
-
const txGasCosts = msgGasCosts.reduce((result, item) => {
|
|
241
|
-
result[item.msgType] = (0, number_1.bnOrZero)(item.gasCost);
|
|
242
|
-
return result;
|
|
243
|
-
}, {});
|
|
244
|
-
const { minGasPrices } = yield queryClient.fee.MinGasPriceAll({
|
|
245
|
-
pagination: constant_1.PAGINATE_10K,
|
|
246
|
-
});
|
|
247
|
-
const txGasPrices = minGasPrices.reduce((result, item) => {
|
|
248
|
-
result[item.denom] = (0, number_1.bnOrZero)(item.gasPrice).shiftedBy(-18); // sdk.Dec shifting
|
|
249
|
-
return result;
|
|
250
|
-
}, {});
|
|
251
|
-
return new GasFee_1.default(txGasCosts, txGasPrices);
|
|
204
|
+
const txGasCosts = msgGasCosts.reduce((result, item) => {
|
|
205
|
+
result[item.msgType] = (0, number_1.bnOrZero)(item.gasCost);
|
|
206
|
+
return result;
|
|
207
|
+
}, {});
|
|
208
|
+
const { minGasPrices } = await queryClient.fee.MinGasPriceAll({
|
|
209
|
+
pagination: constant_1.PAGINATE_10K,
|
|
252
210
|
});
|
|
211
|
+
const txGasPrices = minGasPrices.reduce((result, item) => {
|
|
212
|
+
result[item.denom] = (0, number_1.bnOrZero)(item.gasPrice).shiftedBy(-18); // sdk.Dec shifting
|
|
213
|
+
return result;
|
|
214
|
+
}, {});
|
|
215
|
+
return new GasFee_1.default(txGasCosts, txGasPrices);
|
|
253
216
|
}
|
|
254
217
|
clone() {
|
|
255
218
|
return new CarbonSDK(this.generateOpts());
|
|
@@ -270,155 +233,170 @@ class CarbonSDK {
|
|
|
270
233
|
insights: this.insights,
|
|
271
234
|
};
|
|
272
235
|
}
|
|
273
|
-
connect(wallet, opts) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
try
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
throw new Error(errorTyped.message);
|
|
291
|
-
}
|
|
236
|
+
async connect(wallet, opts) {
|
|
237
|
+
if (!wallet.initialized) {
|
|
238
|
+
try {
|
|
239
|
+
// Perform initialize function as per normal, but add try-catch statement to check err message
|
|
240
|
+
const overrideConfig = {
|
|
241
|
+
chainId: this.chainId,
|
|
242
|
+
evmChainId: this.evmChainId,
|
|
243
|
+
};
|
|
244
|
+
const gasFee = await this.getGasFee();
|
|
245
|
+
await wallet.initialize(this.query, gasFee, overrideConfig, opts);
|
|
246
|
+
}
|
|
247
|
+
catch (err) {
|
|
248
|
+
const errorTyped = err;
|
|
249
|
+
// In the case where account does not exist on chain, still allow wallet connection.
|
|
250
|
+
// Else, throw an error as per normal
|
|
251
|
+
if (!errorTyped.message.includes("Account does not exist on chain. Send some tokens there before trying to query sequence.")) {
|
|
252
|
+
throw new Error(errorTyped.message);
|
|
292
253
|
}
|
|
293
254
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
255
|
+
}
|
|
256
|
+
this.wallet = wallet;
|
|
257
|
+
return this;
|
|
297
258
|
}
|
|
298
259
|
disconnect() {
|
|
299
|
-
|
|
300
|
-
if ((_a = this.wallet) === null || _a === void 0 ? void 0 : _a.isSigner(wallet_1.CarbonSignerTypes.Ledger)) {
|
|
260
|
+
if (this.wallet?.isSigner(wallet_1.CarbonSignerTypes.Ledger)) {
|
|
301
261
|
this.wallet.signer.ledger.disconnect();
|
|
302
262
|
}
|
|
303
263
|
const opts = this.generateOpts();
|
|
304
264
|
delete opts.wallet;
|
|
305
265
|
return new CarbonSDK(opts);
|
|
306
266
|
}
|
|
307
|
-
connectWithPrivateKey(privateKey, opts) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
267
|
+
async connectWithPrivateKey(privateKey, opts) {
|
|
268
|
+
const wallet = wallet_1.CarbonWallet.withPrivateKey(privateKey, {
|
|
269
|
+
...opts,
|
|
270
|
+
network: this.network,
|
|
271
|
+
config: this.configOverride,
|
|
311
272
|
});
|
|
273
|
+
return this.connect(wallet, opts);
|
|
312
274
|
}
|
|
313
|
-
connectWithMnemonic(mnemonic, opts) {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
275
|
+
async connectWithMnemonic(mnemonic, opts) {
|
|
276
|
+
const wallet = wallet_1.CarbonWallet.withMnemonic(mnemonic, {
|
|
277
|
+
...opts,
|
|
278
|
+
network: this.network,
|
|
279
|
+
config: this.configOverride,
|
|
317
280
|
});
|
|
281
|
+
return this.connect(wallet, opts);
|
|
318
282
|
}
|
|
319
|
-
connectWithSigner(signer, publicKeyBase64, opts) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
283
|
+
async connectWithSigner(signer, publicKeyBase64, opts) {
|
|
284
|
+
const wallet = wallet_1.CarbonWallet.withSigner(signer, publicKeyBase64, {
|
|
285
|
+
...opts,
|
|
286
|
+
network: this.network,
|
|
287
|
+
config: this.configOverride,
|
|
323
288
|
});
|
|
289
|
+
return this.connect(wallet, opts);
|
|
324
290
|
}
|
|
325
|
-
connectWithLedger(ledger, opts) {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
291
|
+
async connectWithLedger(ledger, opts) {
|
|
292
|
+
const publicKeyBuffer = await ledger.getPubKey();
|
|
293
|
+
const publicKeyBase64 = publicKeyBuffer.toString("base64");
|
|
294
|
+
const wallet = wallet_1.CarbonWallet.withLedger(ledger, publicKeyBase64, {
|
|
295
|
+
...opts,
|
|
296
|
+
network: this.network,
|
|
297
|
+
config: this.configOverride,
|
|
331
298
|
});
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
299
|
+
return this.connect(wallet, opts);
|
|
300
|
+
}
|
|
301
|
+
async connectWithKeplr(keplr, opts) {
|
|
302
|
+
const chainInfo = await provider_1.KeplrAccount.getChainInfo(this);
|
|
303
|
+
const chainId = chainInfo.chainId;
|
|
304
|
+
await keplr.experimentalSuggestChain(chainInfo);
|
|
305
|
+
const keplrKey = await keplr.getKey(chainId);
|
|
306
|
+
await keplr.enable(chainId);
|
|
307
|
+
const wallet = wallet_1.CarbonWallet.withKeplr(keplr, chainInfo, keplrKey, {
|
|
308
|
+
...opts,
|
|
309
|
+
network: this.network,
|
|
310
|
+
config: this.configOverride,
|
|
342
311
|
});
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
312
|
+
return this.connect(wallet, opts);
|
|
313
|
+
}
|
|
314
|
+
async connectWithLeap(leap, opts) {
|
|
315
|
+
const chainId = this.chainId;
|
|
316
|
+
const chainInfo = await provider_1.LeapAccount.getChainInfo(this);
|
|
317
|
+
await leap.experimentalSuggestChain(chainInfo);
|
|
318
|
+
const leapKey = await leap.getKey(chainId);
|
|
319
|
+
await leap.enable(chainId);
|
|
320
|
+
const wallet = wallet_1.CarbonWallet.withLeap(leap, chainId, leapKey, {
|
|
321
|
+
...opts,
|
|
322
|
+
network: this.network,
|
|
323
|
+
config: this.configOverride,
|
|
353
324
|
});
|
|
325
|
+
return this.connect(wallet, opts);
|
|
354
326
|
}
|
|
355
|
-
connectWithMetamask(metamask, opts, evmWalletOpts) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
grant_type: auth_1.GrantType.SignatureEth,
|
|
377
|
-
message: message,
|
|
378
|
-
public_key: Buffer.from(pubKey, 'base64').toString('hex'),
|
|
379
|
-
signature: signature,
|
|
380
|
-
};
|
|
381
|
-
yield wallet.reloadJwtToken(authRequest, opts === null || opts === void 0 ? void 0 : opts.authMessage);
|
|
382
|
-
}
|
|
383
|
-
return this.connect(wallet, opts);
|
|
327
|
+
async connectWithMetamask(metamask, opts, evmWalletOpts) {
|
|
328
|
+
const evmChainId = this.evmChainId;
|
|
329
|
+
const addressOptions = {
|
|
330
|
+
network: this.networkConfig.network,
|
|
331
|
+
bech32Prefix: this.networkConfig.Bech32Prefix,
|
|
332
|
+
};
|
|
333
|
+
const noJwtProvided = opts?.enableJwtAuth && !opts?.jwt;
|
|
334
|
+
const signMessageRequired = !evmWalletOpts?.publicKeyBase64 || noJwtProvided;
|
|
335
|
+
let pubKey = evmWalletOpts?.publicKeyBase64;
|
|
336
|
+
let message;
|
|
337
|
+
let signature;
|
|
338
|
+
if (signMessageRequired) {
|
|
339
|
+
const result = await MetaMask_1.MetaMask.signAndRecoverPubKey(metamask, opts?.enableJwtAuth, opts?.authMessage);
|
|
340
|
+
pubKey = result.publicKey;
|
|
341
|
+
message = result.message;
|
|
342
|
+
signature = result.signature;
|
|
343
|
+
}
|
|
344
|
+
const wallet = wallet_1.CarbonWallet.withMetamask(metamask, evmChainId, pubKey, addressOptions, {
|
|
345
|
+
...opts,
|
|
346
|
+
network: this.network,
|
|
347
|
+
config: this.configOverride,
|
|
384
348
|
});
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
bech32Prefix: this.networkConfig.Bech32Prefix,
|
|
349
|
+
if (noJwtProvided) {
|
|
350
|
+
const authRequest = {
|
|
351
|
+
grant_type: auth_1.GrantType.SignatureEth,
|
|
352
|
+
message: message,
|
|
353
|
+
public_key: Buffer.from(pubKey, 'base64').toString('hex'),
|
|
354
|
+
signature: signature,
|
|
392
355
|
};
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
356
|
+
await wallet.reloadJwtToken(authRequest, opts?.authMessage);
|
|
357
|
+
}
|
|
358
|
+
return this.connect(wallet, opts);
|
|
359
|
+
}
|
|
360
|
+
async connectWithRainbowKit(rainbowKit, rainbowKitWalletOpts, opts) {
|
|
361
|
+
const evmChainId = this.evmChainId;
|
|
362
|
+
const addressOptions = {
|
|
363
|
+
network: this.networkConfig.network,
|
|
364
|
+
bech32Prefix: this.networkConfig.Bech32Prefix,
|
|
365
|
+
};
|
|
366
|
+
const noJwtProvided = opts?.enableJwtAuth && !opts?.jwt;
|
|
367
|
+
const signMessageRequired = !rainbowKitWalletOpts?.publicKeyBase64 || noJwtProvided;
|
|
368
|
+
let pubKey = rainbowKitWalletOpts?.publicKeyBase64;
|
|
369
|
+
let message;
|
|
370
|
+
let signature;
|
|
371
|
+
if (signMessageRequired) {
|
|
372
|
+
const result = await RainbowKitAccount_1.default.signAndRecoverPubKey(rainbowKit, opts?.enableJwtAuth, opts?.authMessage);
|
|
373
|
+
pubKey = result.publicKey;
|
|
374
|
+
message = result.message;
|
|
375
|
+
signature = result.signature;
|
|
376
|
+
}
|
|
377
|
+
const wallet = wallet_1.CarbonWallet.withRainbowKit(rainbowKit, evmChainId, pubKey, addressOptions, rainbowKitWalletOpts.walletProvider, {
|
|
378
|
+
...opts,
|
|
379
|
+
network: this.network,
|
|
380
|
+
config: this.configOverride,
|
|
415
381
|
});
|
|
382
|
+
if (noJwtProvided) {
|
|
383
|
+
const authRequest = {
|
|
384
|
+
grant_type: auth_1.GrantType.SignatureEth,
|
|
385
|
+
message: message,
|
|
386
|
+
public_key: Buffer.from(pubKey, 'base64').toString('hex'),
|
|
387
|
+
signature: signature,
|
|
388
|
+
};
|
|
389
|
+
await wallet.reloadJwtToken(authRequest, opts?.authMessage);
|
|
390
|
+
}
|
|
391
|
+
return this.connect(wallet, opts);
|
|
416
392
|
}
|
|
417
|
-
connectViewOnly(bech32Address, opts) {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
393
|
+
async connectViewOnly(bech32Address, opts) {
|
|
394
|
+
const wallet = wallet_1.CarbonWallet.withAddress(bech32Address, {
|
|
395
|
+
...opts,
|
|
396
|
+
network: this.network,
|
|
397
|
+
config: this.configOverride,
|
|
421
398
|
});
|
|
399
|
+
return this.connect(wallet, opts);
|
|
422
400
|
}
|
|
423
401
|
getConfig() {
|
|
424
402
|
return this.networkConfig;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const json_rpc_1 = require("@cosmjs/json-rpc");
|
|
13
4
|
const http_1 = require("@cosmjs/tendermint-rpc/build/rpcclients/http");
|
|
@@ -21,11 +12,10 @@ const defaultBatchQueryClientOptions = {
|
|
|
21
12
|
};
|
|
22
13
|
class BatchQueryClient {
|
|
23
14
|
constructor(endpoint, options = {}) {
|
|
24
|
-
var _a, _b;
|
|
25
15
|
this.queue = [];
|
|
26
16
|
this.options = {
|
|
27
|
-
batchSizeLimit:
|
|
28
|
-
dispatchInterval:
|
|
17
|
+
batchSizeLimit: options.batchSizeLimit ?? defaultBatchQueryClientOptions.batchSizeLimit,
|
|
18
|
+
dispatchInterval: options.dispatchInterval ?? defaultBatchQueryClientOptions.dispatchInterval,
|
|
29
19
|
};
|
|
30
20
|
if (typeof endpoint === "string") {
|
|
31
21
|
// accept host.name:port and assume http protocol
|
|
@@ -42,15 +32,13 @@ class BatchQueryClient {
|
|
|
42
32
|
this.timer && clearInterval(this.timer);
|
|
43
33
|
this.timer = undefined;
|
|
44
34
|
}
|
|
45
|
-
execute(request) {
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
});
|
|
35
|
+
async execute(request) {
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
this.queue.push({ request, resolve, reject });
|
|
38
|
+
if (this.queue.length >= this.options.batchSizeLimit) {
|
|
39
|
+
// this train is full, let's go
|
|
40
|
+
this.tick();
|
|
41
|
+
}
|
|
54
42
|
});
|
|
55
43
|
}
|
|
56
44
|
validate() {
|