decentralcardgame-cardchain-client-ts 0.0.31 → 0.0.33
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/index.d.ts +78 -78
- package/lib/index.js +25 -25
- package/package.json +12 -1
- package/cardchain.cardchain/index.ts +0 -6
- package/cardchain.cardchain/module.ts +0 -1869
- package/cardchain.cardchain/registry.ts +0 -111
- package/cardchain.cardchain/rest.ts +0 -655
- package/cardchain.cardchain/types.ts +0 -63
- package/cardchain.featureflag/index.ts +0 -6
- package/cardchain.featureflag/module.ts +0 -165
- package/cardchain.featureflag/registry.ts +0 -11
- package/cardchain.featureflag/rest.ts +0 -256
- package/cardchain.featureflag/types.ts +0 -9
- package/client.ts +0 -164
- package/cosmos.auth.v1beta1/index.ts +0 -6
- package/cosmos.auth.v1beta1/module.ts +0 -136
- package/cosmos.auth.v1beta1/registry.ts +0 -9
- package/cosmos.auth.v1beta1/rest.ts +0 -403
- package/cosmos.auth.v1beta1/types.ts +0 -13
- package/cosmos.authz.v1beta1/index.ts +0 -6
- package/cosmos.authz.v1beta1/module.ts +0 -206
- package/cosmos.authz.v1beta1/registry.ts +0 -13
- package/cosmos.authz.v1beta1/rest.ts +0 -256
- package/cosmos.authz.v1beta1/types.ts +0 -17
- package/cosmos.bank.v1beta1/index.ts +0 -6
- package/cosmos.bank.v1beta1/module.ts +0 -247
- package/cosmos.bank.v1beta1/registry.ts +0 -15
- package/cosmos.bank.v1beta1/rest.ts +0 -466
- package/cosmos.bank.v1beta1/types.ts +0 -25
- package/cosmos.base.node.v1beta1/index.ts +0 -6
- package/cosmos.base.node.v1beta1/module.ts +0 -95
- package/cosmos.base.node.v1beta1/registry.ts +0 -7
- package/cosmos.base.node.v1beta1/rest.ts +0 -235
- package/cosmos.base.node.v1beta1/types.ts +0 -5
- package/cosmos.base.tendermint.v1beta1/index.ts +0 -6
- package/cosmos.base.tendermint.v1beta1/module.ts +0 -109
- package/cosmos.base.tendermint.v1beta1/registry.ts +0 -7
- package/cosmos.base.tendermint.v1beta1/rest.ts +0 -340
- package/cosmos.base.tendermint.v1beta1/types.ts +0 -19
- package/cosmos.circuit.v1/index.ts +0 -6
- package/cosmos.circuit.v1/module.ts +0 -198
- package/cosmos.circuit.v1/registry.ts +0 -13
- package/cosmos.circuit.v1/rest.ts +0 -256
- package/cosmos.circuit.v1/types.ts +0 -9
- package/cosmos.consensus.v1/index.ts +0 -6
- package/cosmos.consensus.v1/module.ts +0 -128
- package/cosmos.consensus.v1/registry.ts +0 -9
- package/cosmos.consensus.v1/rest.ts +0 -214
- package/cosmos.consensus.v1/types.ts +0 -5
- package/cosmos.crisis.v1beta1/index.ts +0 -6
- package/cosmos.crisis.v1beta1/module.ts +0 -161
- package/cosmos.crisis.v1beta1/registry.ts +0 -11
- package/cosmos.crisis.v1beta1/rest.ts +0 -193
- package/cosmos.crisis.v1beta1/types.ts +0 -5
- package/cosmos.distribution.v1beta1/index.ts +0 -6
- package/cosmos.distribution.v1beta1/module.ts +0 -364
- package/cosmos.distribution.v1beta1/registry.ts +0 -21
- package/cosmos.distribution.v1beta1/rest.ts +0 -403
- package/cosmos.distribution.v1beta1/types.ts +0 -43
- package/cosmos.evidence.v1beta1/index.ts +0 -6
- package/cosmos.evidence.v1beta1/module.ts +0 -130
- package/cosmos.evidence.v1beta1/registry.ts +0 -9
- package/cosmos.evidence.v1beta1/rest.ts +0 -235
- package/cosmos.evidence.v1beta1/types.ts +0 -7
- package/cosmos.feegrant.v1beta1/index.ts +0 -6
- package/cosmos.feegrant.v1beta1/module.ts +0 -202
- package/cosmos.feegrant.v1beta1/registry.ts +0 -13
- package/cosmos.feegrant.v1beta1/rest.ts +0 -256
- package/cosmos.feegrant.v1beta1/types.ts +0 -13
- package/cosmos.gov.v1/index.ts +0 -6
- package/cosmos.gov.v1/module.ts +0 -344
- package/cosmos.gov.v1/registry.ts +0 -21
- package/cosmos.gov.v1/rest.ts +0 -382
- package/cosmos.gov.v1/types.ts +0 -23
- package/cosmos.gov.v1beta1/index.ts +0 -6
- package/cosmos.gov.v1beta1/module.ts +0 -245
- package/cosmos.gov.v1beta1/registry.ts +0 -15
- package/cosmos.gov.v1beta1/rest.ts +0 -361
- package/cosmos.gov.v1beta1/types.ts +0 -23
- package/cosmos.group.v1/index.ts +0 -6
- package/cosmos.group.v1/module.ts +0 -599
- package/cosmos.group.v1/registry.ts +0 -35
- package/cosmos.group.v1/rest.ts +0 -487
- package/cosmos.group.v1/types.ts +0 -47
- package/cosmos.mint.v1beta1/index.ts +0 -6
- package/cosmos.mint.v1beta1/module.ts +0 -132
- package/cosmos.mint.v1beta1/registry.ts +0 -9
- package/cosmos.mint.v1beta1/rest.ts +0 -256
- package/cosmos.mint.v1beta1/types.ts +0 -9
- package/cosmos.nft.v1beta1/index.ts +0 -6
- package/cosmos.nft.v1beta1/module.ts +0 -140
- package/cosmos.nft.v1beta1/registry.ts +0 -9
- package/cosmos.nft.v1beta1/rest.ts +0 -340
- package/cosmos.nft.v1beta1/types.ts +0 -17
- package/cosmos.params.v1beta1/index.ts +0 -6
- package/cosmos.params.v1beta1/module.ts +0 -101
- package/cosmos.params.v1beta1/registry.ts +0 -7
- package/cosmos.params.v1beta1/rest.ts +0 -235
- package/cosmos.params.v1beta1/types.ts +0 -11
- package/cosmos.slashing.v1beta1/index.ts +0 -6
- package/cosmos.slashing.v1beta1/module.ts +0 -171
- package/cosmos.slashing.v1beta1/registry.ts +0 -11
- package/cosmos.slashing.v1beta1/rest.ts +0 -256
- package/cosmos.slashing.v1beta1/types.ts +0 -15
- package/cosmos.staking.v1beta1/index.ts +0 -6
- package/cosmos.staking.v1beta1/module.ts +0 -374
- package/cosmos.staking.v1beta1/registry.ts +0 -21
- package/cosmos.staking.v1beta1/rest.ts +0 -487
- package/cosmos.staking.v1beta1/types.ts +0 -53
- package/cosmos.tx.v1beta1/index.ts +0 -6
- package/cosmos.tx.v1beta1/module.ts +0 -121
- package/cosmos.tx.v1beta1/registry.ts +0 -7
- package/cosmos.tx.v1beta1/rest.ts +0 -382
- package/cosmos.tx.v1beta1/types.ts +0 -31
- package/cosmos.upgrade.v1beta1/index.ts +0 -6
- package/cosmos.upgrade.v1beta1/module.ts +0 -169
- package/cosmos.upgrade.v1beta1/registry.ts +0 -11
- package/cosmos.upgrade.v1beta1/rest.ts +0 -298
- package/cosmos.upgrade.v1beta1/types.ts +0 -13
- package/cosmos.vesting.v1beta1/index.ts +0 -6
- package/cosmos.vesting.v1beta1/module.ts +0 -206
- package/cosmos.vesting.v1beta1/registry.ts +0 -13
- package/cosmos.vesting.v1beta1/rest.ts +0 -193
- package/cosmos.vesting.v1beta1/types.ts +0 -17
- package/env.ts +0 -7
- package/helpers.ts +0 -32
- package/ibc.applications.fee.v1/index.ts +0 -6
- package/ibc.applications.fee.v1/module.ts +0 -247
- package/ibc.applications.fee.v1/registry.ts +0 -15
- package/ibc.applications.fee.v1/rest.ts +0 -403
- package/ibc.applications.fee.v1/types.ts +0 -25
- package/ibc.applications.interchain_accounts.controller.v1/index.ts +0 -6
- package/ibc.applications.interchain_accounts.controller.v1/module.ts +0 -196
- package/ibc.applications.interchain_accounts.controller.v1/registry.ts +0 -13
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +0 -235
- package/ibc.applications.interchain_accounts.controller.v1/types.ts +0 -7
- package/ibc.applications.interchain_accounts.host.v1/index.ts +0 -6
- package/ibc.applications.interchain_accounts.host.v1/module.ts +0 -165
- package/ibc.applications.interchain_accounts.host.v1/registry.ts +0 -11
- package/ibc.applications.interchain_accounts.host.v1/rest.ts +0 -214
- package/ibc.applications.interchain_accounts.host.v1/types.ts +0 -9
- package/ibc.applications.transfer.v1/index.ts +0 -6
- package/ibc.applications.transfer.v1/module.ts +0 -169
- package/ibc.applications.transfer.v1/registry.ts +0 -11
- package/ibc.applications.transfer.v1/rest.ts +0 -319
- package/ibc.applications.transfer.v1/types.ts +0 -13
- package/ibc.core.channel.v1/index.ts +0 -6
- package/ibc.core.channel.v1/module.ts +0 -748
- package/ibc.core.channel.v1/registry.ts +0 -45
- package/ibc.core.channel.v1/rest.ts +0 -550
- package/ibc.core.channel.v1/types.ts +0 -31
- package/ibc.core.client.v1/index.ts +0 -6
- package/ibc.core.client.v1/module.ts +0 -344
- package/ibc.core.client.v1/registry.ts +0 -21
- package/ibc.core.client.v1/rest.ts +0 -403
- package/ibc.core.client.v1/types.ts +0 -23
- package/ibc.core.connection.v1/index.ts +0 -6
- package/ibc.core.connection.v1/module.ts +0 -274
- package/ibc.core.connection.v1/registry.ts +0 -17
- package/ibc.core.connection.v1/rest.ts +0 -319
- package/ibc.core.connection.v1/types.ts +0 -19
- package/index.ts +0 -81
- package/modules.ts +0 -5
- package/tsconfig.json +0 -13
- package/types/amino/amino.ts +0 -9
- package/types/capability/v1/capability.ts +0 -263
- package/types/capability/v1/genesis.ts +0 -220
- package/types/cardchain/cardchain/card.ts +0 -712
- package/types/cardchain/cardchain/card_content.ts +0 -116
- package/types/cardchain/cardchain/card_with_image.ts +0 -134
- package/types/cardchain/cardchain/council.ts +0 -502
- package/types/cardchain/cardchain/encounter.ts +0 -307
- package/types/cardchain/cardchain/encounter_with_image.ts +0 -119
- package/types/cardchain/cardchain/genesis.ts +0 -403
- package/types/cardchain/cardchain/image.ts +0 -122
- package/types/cardchain/cardchain/match.ts +0 -453
- package/types/cardchain/cardchain/module/module.ts +0 -99
- package/types/cardchain/cardchain/params.ts +0 -544
- package/types/cardchain/cardchain/query.ts +0 -3786
- package/types/cardchain/cardchain/running_average.ts +0 -116
- package/types/cardchain/cardchain/sell_offer.ts +0 -224
- package/types/cardchain/cardchain/server.ts +0 -144
- package/types/cardchain/cardchain/set.ts +0 -537
- package/types/cardchain/cardchain/set_with_artwork.ts +0 -142
- package/types/cardchain/cardchain/tx.ts +0 -8053
- package/types/cardchain/cardchain/user.ts +0 -955
- package/types/cardchain/cardchain/voting.ts +0 -328
- package/types/cardchain/cardchain/voting_results.ts +0 -227
- package/types/cardchain/cardchain/zealy.ts +0 -116
- package/types/cardchain/featureflag/flag.ts +0 -133
- package/types/cardchain/featureflag/genesis.ts +0 -226
- package/types/cardchain/featureflag/module/module.ts +0 -99
- package/types/cardchain/featureflag/params.ts +0 -78
- package/types/cardchain/featureflag/query.ts +0 -445
- package/types/cardchain/featureflag/tx.ts +0 -373
- package/types/cosmos/app/runtime/v1alpha1/module.ts +0 -389
- package/types/cosmos/app/v1alpha1/config.ts +0 -346
- package/types/cosmos/app/v1alpha1/module.ts +0 -348
- package/types/cosmos/app/v1alpha1/query.ts +0 -175
- package/types/cosmos/auth/module/v1/module.ts +0 -229
- package/types/cosmos/auth/v1beta1/auth.ts +0 -531
- package/types/cosmos/auth/v1beta1/genesis.ts +0 -125
- package/types/cosmos/auth/v1beta1/query.ts +0 -1564
- package/types/cosmos/auth/v1beta1/tx.ts +0 -213
- package/types/cosmos/authz/module/v1/module.ts +0 -78
- package/types/cosmos/authz/v1beta1/authz.ts +0 -411
- package/types/cosmos/authz/v1beta1/event.ts +0 -241
- package/types/cosmos/authz/v1beta1/genesis.ts +0 -101
- package/types/cosmos/authz/v1beta1/query.ts +0 -643
- package/types/cosmos/authz/v1beta1/tx.ts +0 -574
- package/types/cosmos/autocli/v1/options.ts +0 -1049
- package/types/cosmos/autocli/v1/query.ts +0 -291
- package/types/cosmos/bank/module/v1/module.ts +0 -150
- package/types/cosmos/bank/v1beta1/authz.ts +0 -129
- package/types/cosmos/bank/v1beta1/bank.ts +0 -775
- package/types/cosmos/bank/v1beta1/genesis.ts +0 -277
- package/types/cosmos/bank/v1beta1/query.ts +0 -2424
- package/types/cosmos/bank/v1beta1/tx.ts +0 -697
- package/types/cosmos/base/abci/v1beta1/abci.ts +0 -1469
- package/types/cosmos/base/node/v1beta1/query.ts +0 -485
- package/types/cosmos/base/query/v1beta1/pagination.ts +0 -336
- package/types/cosmos/base/reflection/v1beta1/reflection.ts +0 -328
- package/types/cosmos/base/reflection/v2alpha1/reflection.ts +0 -2092
- package/types/cosmos/base/tendermint/v1beta1/query.ts +0 -2025
- package/types/cosmos/base/tendermint/v1beta1/types.ts +0 -548
- package/types/cosmos/base/v1beta1/coin.ts +0 -209
- package/types/cosmos/circuit/module/v1/module.ts +0 -99
- package/types/cosmos/circuit/v1/query.ts +0 -476
- package/types/cosmos/circuit/v1/tx.ts +0 -576
- package/types/cosmos/circuit/v1/types.ts +0 -362
- package/types/cosmos/consensus/module/v1/module.ts +0 -99
- package/types/cosmos/consensus/v1/query.ts +0 -181
- package/types/cosmos/consensus/v1/tx.ts +0 -271
- package/types/cosmos/crisis/module/v1/module.ts +0 -119
- package/types/cosmos/crisis/v1beta1/genesis.ts +0 -105
- package/types/cosmos/crisis/v1beta1/tx.ts +0 -367
- package/types/cosmos/crypto/ed25519/keys.ts +0 -195
- package/types/cosmos/crypto/hd/v1/hd.ts +0 -178
- package/types/cosmos/crypto/keyring/v1/record.ts +0 -440
- package/types/cosmos/crypto/multisig/keys.ts +0 -124
- package/types/cosmos/crypto/multisig/v1beta1/multisig.ts +0 -218
- package/types/cosmos/crypto/secp256k1/keys.ts +0 -192
- package/types/cosmos/crypto/secp256r1/keys.ts +0 -193
- package/types/cosmos/distribution/module/v1/module.ts +0 -118
- package/types/cosmos/distribution/v1beta1/distribution.ts +0 -1177
- package/types/cosmos/distribution/v1beta1/genesis.ts +0 -1028
- package/types/cosmos/distribution/v1beta1/query.ts +0 -1700
- package/types/cosmos/distribution/v1beta1/tx.ts +0 -1178
- package/types/cosmos/evidence/module/v1/module.ts +0 -78
- package/types/cosmos/evidence/v1beta1/evidence.ts +0 -194
- package/types/cosmos/evidence/v1beta1/genesis.ts +0 -98
- package/types/cosmos/evidence/v1beta1/query.ts +0 -414
- package/types/cosmos/evidence/v1beta1/tx.ts +0 -243
- package/types/cosmos/feegrant/module/v1/module.ts +0 -78
- package/types/cosmos/feegrant/v1beta1/feegrant.ts +0 -513
- package/types/cosmos/feegrant/v1beta1/genesis.ts +0 -101
- package/types/cosmos/feegrant/v1beta1/query.ts +0 -597
- package/types/cosmos/feegrant/v1beta1/tx.ts +0 -496
- package/types/cosmos/genutil/module/v1/module.ts +0 -78
- package/types/cosmos/genutil/v1beta1/genesis.ts +0 -122
- package/types/cosmos/gov/module/v1/module.ts +0 -133
- package/types/cosmos/gov/v1/genesis.ts +0 -313
- package/types/cosmos/gov/v1/gov.ts +0 -1712
- package/types/cosmos/gov/v1/query.ts +0 -1605
- package/types/cosmos/gov/v1/tx.ts +0 -1387
- package/types/cosmos/gov/v1beta1/genesis.ts +0 -241
- package/types/cosmos/gov/v1beta1/gov.ts +0 -1273
- package/types/cosmos/gov/v1beta1/query.ts +0 -1441
- package/types/cosmos/gov/v1beta1/tx.ts +0 -738
- package/types/cosmos/group/module/v1/module.ts +0 -141
- package/types/cosmos/group/v1/events.ts +0 -795
- package/types/cosmos/group/v1/genesis.ts +0 -265
- package/types/cosmos/group/v1/query.ts +0 -2441
- package/types/cosmos/group/v1/tx.ts +0 -2631
- package/types/cosmos/group/v1/types.ts +0 -1850
- package/types/cosmos/ics23/v1/proofs.ts +0 -1731
- package/types/cosmos/mint/module/v1/module.ts +0 -118
- package/types/cosmos/mint/v1beta1/genesis.ts +0 -126
- package/types/cosmos/mint/v1beta1/mint.ts +0 -293
- package/types/cosmos/mint/v1beta1/query.ts +0 -453
- package/types/cosmos/mint/v1beta1/tx.ts +0 -213
- package/types/cosmos/msg/textual/v1/textual.ts +0 -9
- package/types/cosmos/msg/v1/msg.ts +0 -9
- package/types/cosmos/nft/module/v1/module.ts +0 -78
- package/types/cosmos/nft/v1beta1/event.ts +0 -359
- package/types/cosmos/nft/v1beta1/genesis.ts +0 -204
- package/types/cosmos/nft/v1beta1/nft.ts +0 -348
- package/types/cosmos/nft/v1beta1/query.ts +0 -1173
- package/types/cosmos/nft/v1beta1/tx.ts +0 -228
- package/types/cosmos/orm/module/v1alpha1/module.ts +0 -82
- package/types/cosmos/orm/query/v1alpha1/query.ts +0 -933
- package/types/cosmos/orm/v1/orm.ts +0 -453
- package/types/cosmos/orm/v1alpha1/schema.ts +0 -321
- package/types/cosmos/params/module/v1/module.ts +0 -78
- package/types/cosmos/params/v1beta1/params.ts +0 -236
- package/types/cosmos/params/v1beta1/query.ts +0 -439
- package/types/cosmos/query/v1/query.ts +0 -9
- package/types/cosmos/reflection/v1/reflection.ts +0 -179
- package/types/cosmos/slashing/module/v1/module.ts +0 -99
- package/types/cosmos/slashing/v1beta1/genesis.ts +0 -424
- package/types/cosmos/slashing/v1beta1/query.ts +0 -487
- package/types/cosmos/slashing/v1beta1/slashing.ts +0 -422
- package/types/cosmos/slashing/v1beta1/tx.ts +0 -336
- package/types/cosmos/staking/module/v1/module.ts +0 -161
- package/types/cosmos/staking/v1beta1/authz.ts +0 -306
- package/types/cosmos/staking/v1beta1/genesis.ts +0 -377
- package/types/cosmos/staking/v1beta1/query.ts +0 -2540
- package/types/cosmos/staking/v1beta1/staking.ts +0 -2576
- package/types/cosmos/staking/v1beta1/tx.ts +0 -1433
- package/types/cosmos/store/internal/kv/v1beta1/kv.ts +0 -205
- package/types/cosmos/store/snapshots/v1/snapshot.ts +0 -746
- package/types/cosmos/store/streaming/abci/grpc.ts +0 -367
- package/types/cosmos/store/v1beta1/commit_info.ts +0 -370
- package/types/cosmos/store/v1beta1/listening.ts +0 -301
- package/types/cosmos/tx/config/v1/config.ts +0 -125
- package/types/cosmos/tx/signing/v1beta1/signing.ts +0 -630
- package/types/cosmos/tx/v1beta1/service.ts +0 -1889
- package/types/cosmos/tx/v1beta1/tx.ts +0 -1657
- package/types/cosmos/upgrade/module/v1/module.ts +0 -99
- package/types/cosmos/upgrade/v1beta1/query.ts +0 -819
- package/types/cosmos/upgrade/v1beta1/tx.ts +0 -340
- package/types/cosmos/upgrade/v1beta1/upgrade.ts +0 -525
- package/types/cosmos/vesting/module/v1/module.ts +0 -78
- package/types/cosmos/vesting/v1beta1/tx.ts +0 -640
- package/types/cosmos/vesting/v1beta1/vesting.ts +0 -624
- package/types/cosmos_proto/cosmos.ts +0 -307
- package/types/gogoproto/gogo.ts +0 -9
- package/types/google/api/annotations.ts +0 -9
- package/types/google/api/http.ts +0 -770
- package/types/google/protobuf/any.ts +0 -259
- package/types/google/protobuf/descriptor.ts +0 -6642
- package/types/google/protobuf/duration.ts +0 -200
- package/types/google/protobuf/timestamp.ts +0 -229
- package/types/ibc/applications/fee/v1/ack.ts +0 -166
- package/types/ibc/applications/fee/v1/fee.ts +0 -403
- package/types/ibc/applications/fee/v1/genesis.ts +0 -571
- package/types/ibc/applications/fee/v1/metadata.ts +0 -122
- package/types/ibc/applications/fee/v1/query.ts +0 -1757
- package/types/ibc/applications/fee/v1/tx.ts +0 -781
- package/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +0 -104
- package/types/ibc/applications/interchain_accounts/controller/v1/query.ts +0 -333
- package/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +0 -619
- package/types/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +0 -590
- package/types/ibc/applications/interchain_accounts/host/v1/host.ts +0 -242
- package/types/ibc/applications/interchain_accounts/host/v1/query.ts +0 -175
- package/types/ibc/applications/interchain_accounts/host/v1/tx.ts +0 -416
- package/types/ibc/applications/interchain_accounts/v1/account.ts +0 -120
- package/types/ibc/applications/interchain_accounts/v1/metadata.ts +0 -199
- package/types/ibc/applications/interchain_accounts/v1/packet.ts +0 -264
- package/types/ibc/applications/transfer/v1/authz.ts +0 -254
- package/types/ibc/applications/transfer/v1/genesis.ts +0 -165
- package/types/ibc/applications/transfer/v1/query.ts +0 -934
- package/types/ibc/applications/transfer/v1/transfer.ts +0 -220
- package/types/ibc/applications/transfer/v1/tx.ts +0 -505
- package/types/ibc/applications/transfer/v2/packet.ts +0 -177
- package/types/ibc/core/channel/v1/channel.ts +0 -1358
- package/types/ibc/core/channel/v1/genesis.ts +0 -377
- package/types/ibc/core/channel/v1/query.ts +0 -3781
- package/types/ibc/core/channel/v1/tx.ts +0 -4424
- package/types/ibc/core/channel/v1/upgrade.ts +0 -348
- package/types/ibc/core/client/v1/client.ts +0 -753
- package/types/ibc/core/client/v1/genesis.ts +0 -423
- package/types/ibc/core/client/v1/query.ts +0 -1898
- package/types/ibc/core/client/v1/tx.ts +0 -1301
- package/types/ibc/core/commitment/v1/commitment.ts +0 -336
- package/types/ibc/core/connection/v1/connection.ts +0 -840
- package/types/ibc/core/connection/v1/genesis.ts +0 -172
- package/types/ibc/core/connection/v1/query.ts +0 -1243
- package/types/ibc/core/connection/v1/tx.ts +0 -1352
- package/types/ibc/core/types/v1/genesis.ts +0 -150
- package/types/ibc/lightclients/localhost/v2/localhost.ts +0 -102
- package/types/ibc/lightclients/solomachine/v2/solomachine.ts +0 -1765
- package/types/ibc/lightclients/solomachine/v3/solomachine.ts +0 -945
- package/types/ibc/lightclients/tendermint/v1/tendermint.ts +0 -853
- package/types/ibc/lightclients/wasm/v1/genesis.ts +0 -192
- package/types/ibc/lightclients/wasm/v1/query.ts +0 -377
- package/types/ibc/lightclients/wasm/v1/tx.ts +0 -550
- package/types/ibc/lightclients/wasm/v1/wasm.ts +0 -370
- package/types/tendermint/abci/types.ts +0 -6103
- package/types/tendermint/crypto/keys.ts +0 -142
- package/types/tendermint/crypto/proof.ts +0 -533
- package/types/tendermint/libs/bits/types.ts +0 -139
- package/types/tendermint/p2p/types.ts +0 -544
- package/types/tendermint/types/block.ts +0 -158
- package/types/tendermint/types/evidence.ts +0 -502
- package/types/tendermint/types/params.ts +0 -701
- package/types/tendermint/types/types.ts +0 -2133
- package/types/tendermint/types/validator.ts +0 -424
- package/types/tendermint/version/types.ts +0 -218
- package/types.d.ts +0 -21
|
@@ -1,466 +0,0 @@
|
|
|
1
|
-
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
|
|
2
|
-
import { QueryBalanceResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
3
|
-
import { QueryAllBalancesResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
4
|
-
import { QuerySpendableBalancesResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
5
|
-
import { QuerySpendableBalanceByDenomResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
6
|
-
import { QueryTotalSupplyResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
7
|
-
import { QuerySupplyOfResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
8
|
-
import { QueryParamsResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
9
|
-
import { QueryDenomMetadataResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
10
|
-
import { QueryDenomMetadataByQueryStringResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
11
|
-
import { QueryDenomsMetadataResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
12
|
-
import { QueryDenomOwnersResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
13
|
-
import { QueryDenomOwnersByQueryResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
14
|
-
import { QuerySendEnabledResponse } from "../types/cosmos/bank/v1beta1/query";
|
|
15
|
-
|
|
16
|
-
import { QueryBalanceRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
17
|
-
import { QueryAllBalancesRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
18
|
-
import { QuerySpendableBalancesRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
19
|
-
import { QuerySpendableBalanceByDenomRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
20
|
-
import { QueryTotalSupplyRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
21
|
-
import { QuerySupplyOfRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
22
|
-
import { QueryParamsRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
23
|
-
import { QueryDenomMetadataRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
24
|
-
import { QueryDenomMetadataByQueryStringRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
25
|
-
import { QueryDenomsMetadataRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
26
|
-
import { QueryDenomOwnersRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
27
|
-
import { QueryDenomOwnersByQueryRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
28
|
-
import { QuerySendEnabledRequest } from "../types/cosmos/bank/v1beta1/query";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
import type {SnakeCasedPropertiesDeep} from 'type-fest';
|
|
32
|
-
|
|
33
|
-
export type QueryParamsType = Record<string | number, any>;
|
|
34
|
-
|
|
35
|
-
export type FlattenObject<TValue> = CollapseEntries<CreateObjectEntries<TValue, TValue>>;
|
|
36
|
-
|
|
37
|
-
type Entry = { key: string; value: unknown };
|
|
38
|
-
type EmptyEntry<TValue> = { key: ''; value: TValue };
|
|
39
|
-
type ExcludedTypes = Date | Set<unknown> | Map<unknown, unknown>;
|
|
40
|
-
type ArrayEncoder = `[${bigint}]`;
|
|
41
|
-
|
|
42
|
-
type EscapeArrayKey<TKey extends string> = TKey extends `${infer TKeyBefore}.${ArrayEncoder}${infer TKeyAfter}`
|
|
43
|
-
? EscapeArrayKey<`${TKeyBefore}${ArrayEncoder}${TKeyAfter}`>
|
|
44
|
-
: TKey;
|
|
45
|
-
|
|
46
|
-
// Transforms entries to one flattened type
|
|
47
|
-
type CollapseEntries<TEntry extends Entry> = {
|
|
48
|
-
[E in TEntry as EscapeArrayKey<E['key']>]: E['value'];
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// Transforms array type to object
|
|
52
|
-
type CreateArrayEntry<TValue, TValueInitial> = OmitItself<
|
|
53
|
-
TValue extends unknown[] ? { [k: ArrayEncoder]: TValue[number] } : TValue,
|
|
54
|
-
TValueInitial
|
|
55
|
-
>;
|
|
56
|
-
|
|
57
|
-
// Omit the type that references itself
|
|
58
|
-
type OmitItself<TValue, TValueInitial> = TValue extends TValueInitial
|
|
59
|
-
? EmptyEntry<TValue>
|
|
60
|
-
: OmitExcludedTypes<TValue, TValueInitial>;
|
|
61
|
-
|
|
62
|
-
// Omit the type that is listed in ExcludedTypes union
|
|
63
|
-
type OmitExcludedTypes<TValue, TValueInitial> = TValue extends ExcludedTypes
|
|
64
|
-
? EmptyEntry<TValue>
|
|
65
|
-
: CreateObjectEntries<TValue, TValueInitial>;
|
|
66
|
-
|
|
67
|
-
type CreateObjectEntries<TValue, TValueInitial> = TValue extends object
|
|
68
|
-
? {
|
|
69
|
-
// Checks that Key is of type string
|
|
70
|
-
[TKey in keyof TValue]-?: TKey extends string
|
|
71
|
-
? // Nested key can be an object, run recursively to the bottom
|
|
72
|
-
CreateArrayEntry<TValue[TKey], TValueInitial> extends infer TNestedValue
|
|
73
|
-
? TNestedValue extends Entry
|
|
74
|
-
? TNestedValue['key'] extends ''
|
|
75
|
-
? {
|
|
76
|
-
key: TKey;
|
|
77
|
-
value: TNestedValue['value'];
|
|
78
|
-
}
|
|
79
|
-
:
|
|
80
|
-
| {
|
|
81
|
-
key: `${TKey}.${TNestedValue['key']}`;
|
|
82
|
-
value: TNestedValue['value'];
|
|
83
|
-
}
|
|
84
|
-
| {
|
|
85
|
-
key: TKey;
|
|
86
|
-
value: TValue[TKey];
|
|
87
|
-
}
|
|
88
|
-
: never
|
|
89
|
-
: never
|
|
90
|
-
: never;
|
|
91
|
-
}[keyof TValue] // Builds entry for each key
|
|
92
|
-
: EmptyEntry<TValue>;
|
|
93
|
-
|
|
94
|
-
export type ChangeProtoToJSPrimitives<T extends object> = {
|
|
95
|
-
[key in keyof T]: T[key] extends Uint8Array | Date ? string : T[key] extends object ? ChangeProtoToJSPrimitives<T[key]>: T[key];
|
|
96
|
-
// ^^^^ This line is used to convert Uint8Array to string, if you want to keep Uint8Array as is, you can remove this line
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "params" | "url" | "responseType"> {
|
|
100
|
-
/** set parameter to `true` for call `securityWorker` for this request */
|
|
101
|
-
secure?: boolean;
|
|
102
|
-
/** request path */
|
|
103
|
-
path: string;
|
|
104
|
-
/** content type of request body */
|
|
105
|
-
type?: ContentType;
|
|
106
|
-
/** query params */
|
|
107
|
-
query?: QueryParamsType;
|
|
108
|
-
/** format of response (i.e. response.json() -> format: "json") */
|
|
109
|
-
format?: ResponseType;
|
|
110
|
-
/** request body */
|
|
111
|
-
body?: unknown;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
|
|
115
|
-
|
|
116
|
-
export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, "data" | "cancelToken"> {
|
|
117
|
-
securityWorker?: (
|
|
118
|
-
securityData: SecurityDataType | null,
|
|
119
|
-
) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
|
|
120
|
-
secure?: boolean;
|
|
121
|
-
format?: ResponseType;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export enum ContentType {
|
|
125
|
-
Json = "application/json",
|
|
126
|
-
FormData = "multipart/form-data",
|
|
127
|
-
UrlEncoded = "application/x-www-form-urlencoded",
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export class HttpClient<SecurityDataType = unknown> {
|
|
131
|
-
public instance: AxiosInstance;
|
|
132
|
-
private securityData: SecurityDataType | null = null;
|
|
133
|
-
private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
|
|
134
|
-
private secure?: boolean;
|
|
135
|
-
private format?: ResponseType;
|
|
136
|
-
|
|
137
|
-
constructor({ securityWorker, secure, format, ...axiosConfig }: ApiConfig<SecurityDataType> = {}) {
|
|
138
|
-
this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || "" });
|
|
139
|
-
this.secure = secure;
|
|
140
|
-
this.format = format;
|
|
141
|
-
this.securityWorker = securityWorker;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
public setSecurityData = (data: SecurityDataType | null) => {
|
|
145
|
-
this.securityData = data;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
private mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig {
|
|
149
|
-
return {
|
|
150
|
-
...this.instance.defaults,
|
|
151
|
-
...params1,
|
|
152
|
-
...(params2 || {}),
|
|
153
|
-
headers: {
|
|
154
|
-
...(this.instance.defaults.headers ),
|
|
155
|
-
...(params1.headers || {}),
|
|
156
|
-
...((params2 && params2.headers) || {}),
|
|
157
|
-
},
|
|
158
|
-
} as AxiosRequestConfig;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
private createFormData(input: Record<string, unknown>): FormData {
|
|
162
|
-
return Object.keys(input || {}).reduce((formData, key) => {
|
|
163
|
-
const property = input[key];
|
|
164
|
-
formData.append(
|
|
165
|
-
key,
|
|
166
|
-
property instanceof Blob
|
|
167
|
-
? property
|
|
168
|
-
: typeof property === "object" && property !== null
|
|
169
|
-
? JSON.stringify(property)
|
|
170
|
-
: `${property}`,
|
|
171
|
-
);
|
|
172
|
-
return formData;
|
|
173
|
-
}, new FormData());
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
public request = async <T = any>({
|
|
177
|
-
secure,
|
|
178
|
-
path,
|
|
179
|
-
type,
|
|
180
|
-
query,
|
|
181
|
-
format,
|
|
182
|
-
body,
|
|
183
|
-
...params
|
|
184
|
-
}: FullRequestParams): Promise<AxiosResponse<T>> => {
|
|
185
|
-
const secureParams =
|
|
186
|
-
((typeof secure === "boolean" ? secure : this.secure) &&
|
|
187
|
-
this.securityWorker &&
|
|
188
|
-
(await this.securityWorker(this.securityData))) ||
|
|
189
|
-
{};
|
|
190
|
-
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
191
|
-
const responseFormat = (format && this.format) || void 0;
|
|
192
|
-
|
|
193
|
-
if (type === ContentType.FormData && body && body !== null && typeof body === "object") {
|
|
194
|
-
requestParams.headers.common = { Accept: "*/*" };
|
|
195
|
-
requestParams.headers.post = {};
|
|
196
|
-
requestParams.headers.put = {};
|
|
197
|
-
|
|
198
|
-
body = this.createFormData(body as Record<string, unknown>);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return this.instance.request({
|
|
202
|
-
...requestParams,
|
|
203
|
-
headers: {
|
|
204
|
-
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
|
|
205
|
-
...(requestParams.headers || {}),
|
|
206
|
-
},
|
|
207
|
-
params: query,
|
|
208
|
-
responseType: responseFormat,
|
|
209
|
-
data: body,
|
|
210
|
-
url: path,
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* @title cosmos.bank.v1beta1
|
|
217
|
-
*/
|
|
218
|
-
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
219
|
-
/**
|
|
220
|
-
* QueryBalance
|
|
221
|
-
*
|
|
222
|
-
* @tags Query
|
|
223
|
-
* @name queryBalance
|
|
224
|
-
* @request GET:/cosmos/bank/v1beta1/balances/{address}/by_denom
|
|
225
|
-
*/
|
|
226
|
-
queryBalance = (address: string,
|
|
227
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryBalanceRequest>>>,"address">,
|
|
228
|
-
params: RequestParams = {},
|
|
229
|
-
) =>
|
|
230
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryBalanceResponse>>>({
|
|
231
|
-
path: `/cosmos/bank/v1beta1/balances/${address}/by_denom`,
|
|
232
|
-
method: "GET",
|
|
233
|
-
query: query,
|
|
234
|
-
format: "json",
|
|
235
|
-
...params,
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* QueryAllBalances
|
|
240
|
-
*
|
|
241
|
-
* @tags Query
|
|
242
|
-
* @name queryAllBalances
|
|
243
|
-
* @request GET:/cosmos/bank/v1beta1/balances/{address}
|
|
244
|
-
*/
|
|
245
|
-
queryAllBalances = (address: string,
|
|
246
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryAllBalancesRequest>>>,"address">,
|
|
247
|
-
params: RequestParams = {},
|
|
248
|
-
) =>
|
|
249
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryAllBalancesResponse>>>({
|
|
250
|
-
path: `/cosmos/bank/v1beta1/balances/${address}`,
|
|
251
|
-
method: "GET",
|
|
252
|
-
query: query,
|
|
253
|
-
format: "json",
|
|
254
|
-
...params,
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* QuerySpendableBalances
|
|
259
|
-
*
|
|
260
|
-
* @tags Query
|
|
261
|
-
* @name querySpendableBalances
|
|
262
|
-
* @request GET:/cosmos/bank/v1beta1/spendable_balances/{address}
|
|
263
|
-
*/
|
|
264
|
-
querySpendableBalances = (address: string,
|
|
265
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QuerySpendableBalancesRequest>>>,"address">,
|
|
266
|
-
params: RequestParams = {},
|
|
267
|
-
) =>
|
|
268
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QuerySpendableBalancesResponse>>>({
|
|
269
|
-
path: `/cosmos/bank/v1beta1/spendable_balances/${address}`,
|
|
270
|
-
method: "GET",
|
|
271
|
-
query: query,
|
|
272
|
-
format: "json",
|
|
273
|
-
...params,
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* QuerySpendableBalanceByDenom
|
|
278
|
-
*
|
|
279
|
-
* @tags Query
|
|
280
|
-
* @name querySpendableBalanceByDenom
|
|
281
|
-
* @request GET:/cosmos/bank/v1beta1/spendable_balances/{address}/by_denom
|
|
282
|
-
*/
|
|
283
|
-
querySpendableBalanceByDenom = (address: string,
|
|
284
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QuerySpendableBalanceByDenomRequest>>>,"address">,
|
|
285
|
-
params: RequestParams = {},
|
|
286
|
-
) =>
|
|
287
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QuerySpendableBalanceByDenomResponse>>>({
|
|
288
|
-
path: `/cosmos/bank/v1beta1/spendable_balances/${address}/by_denom`,
|
|
289
|
-
method: "GET",
|
|
290
|
-
query: query,
|
|
291
|
-
format: "json",
|
|
292
|
-
...params,
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* QueryTotalSupply
|
|
297
|
-
*
|
|
298
|
-
* @tags Query
|
|
299
|
-
* @name queryTotalSupply
|
|
300
|
-
* @request GET:/cosmos/bank/v1beta1/supply
|
|
301
|
-
*/
|
|
302
|
-
queryTotalSupply = (
|
|
303
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryTotalSupplyRequest>>>,"">,
|
|
304
|
-
params: RequestParams = {},
|
|
305
|
-
) =>
|
|
306
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryTotalSupplyResponse>>>({
|
|
307
|
-
path: `/cosmos/bank/v1beta1/supply`,
|
|
308
|
-
method: "GET",
|
|
309
|
-
query: query,
|
|
310
|
-
format: "json",
|
|
311
|
-
...params,
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* QuerySupplyOf
|
|
316
|
-
*
|
|
317
|
-
* @tags Query
|
|
318
|
-
* @name querySupplyOf
|
|
319
|
-
* @request GET:/cosmos/bank/v1beta1/supply/by_denom
|
|
320
|
-
*/
|
|
321
|
-
querySupplyOf = (
|
|
322
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QuerySupplyOfRequest>>>,"">,
|
|
323
|
-
params: RequestParams = {},
|
|
324
|
-
) =>
|
|
325
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QuerySupplyOfResponse>>>({
|
|
326
|
-
path: `/cosmos/bank/v1beta1/supply/by_denom`,
|
|
327
|
-
method: "GET",
|
|
328
|
-
query: query,
|
|
329
|
-
format: "json",
|
|
330
|
-
...params,
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* QueryParams
|
|
335
|
-
*
|
|
336
|
-
* @tags Query
|
|
337
|
-
* @name queryParams
|
|
338
|
-
* @request GET:/cosmos/bank/v1beta1/params
|
|
339
|
-
*/
|
|
340
|
-
queryParams = (
|
|
341
|
-
query?: Record<string, any>,
|
|
342
|
-
params: RequestParams = {},
|
|
343
|
-
) =>
|
|
344
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryParamsResponse>>>({
|
|
345
|
-
path: `/cosmos/bank/v1beta1/params`,
|
|
346
|
-
method: "GET",
|
|
347
|
-
query: query,
|
|
348
|
-
format: "json",
|
|
349
|
-
...params,
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* QueryDenomMetadata
|
|
354
|
-
*
|
|
355
|
-
* @tags Query
|
|
356
|
-
* @name queryDenomMetadata
|
|
357
|
-
* @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom}
|
|
358
|
-
*/
|
|
359
|
-
queryDenomMetadata = (denom: string,
|
|
360
|
-
query?: Record<string, any>,
|
|
361
|
-
params: RequestParams = {},
|
|
362
|
-
) =>
|
|
363
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomMetadataResponse>>>({
|
|
364
|
-
path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`,
|
|
365
|
-
method: "GET",
|
|
366
|
-
query: query,
|
|
367
|
-
format: "json",
|
|
368
|
-
...params,
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* QueryDenomMetadataByQueryString
|
|
373
|
-
*
|
|
374
|
-
* @tags Query
|
|
375
|
-
* @name queryDenomMetadataByQueryString
|
|
376
|
-
* @request GET:/cosmos/bank/v1beta1/denoms_metadata_by_query_string
|
|
377
|
-
*/
|
|
378
|
-
queryDenomMetadataByQueryString = (
|
|
379
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomMetadataByQueryStringRequest>>>,"">,
|
|
380
|
-
params: RequestParams = {},
|
|
381
|
-
) =>
|
|
382
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomMetadataByQueryStringResponse>>>({
|
|
383
|
-
path: `/cosmos/bank/v1beta1/denoms_metadata_by_query_string`,
|
|
384
|
-
method: "GET",
|
|
385
|
-
query: query,
|
|
386
|
-
format: "json",
|
|
387
|
-
...params,
|
|
388
|
-
});
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* QueryDenomsMetadata
|
|
392
|
-
*
|
|
393
|
-
* @tags Query
|
|
394
|
-
* @name queryDenomsMetadata
|
|
395
|
-
* @request GET:/cosmos/bank/v1beta1/denoms_metadata
|
|
396
|
-
*/
|
|
397
|
-
queryDenomsMetadata = (
|
|
398
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomsMetadataRequest>>>,"">,
|
|
399
|
-
params: RequestParams = {},
|
|
400
|
-
) =>
|
|
401
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomsMetadataResponse>>>({
|
|
402
|
-
path: `/cosmos/bank/v1beta1/denoms_metadata`,
|
|
403
|
-
method: "GET",
|
|
404
|
-
query: query,
|
|
405
|
-
format: "json",
|
|
406
|
-
...params,
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* QueryDenomOwners
|
|
411
|
-
*
|
|
412
|
-
* @tags Query
|
|
413
|
-
* @name queryDenomOwners
|
|
414
|
-
* @request GET:/cosmos/bank/v1beta1/denom_owners/{denom}
|
|
415
|
-
*/
|
|
416
|
-
queryDenomOwners = (denom: string,
|
|
417
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomOwnersRequest>>>,"denom">,
|
|
418
|
-
params: RequestParams = {},
|
|
419
|
-
) =>
|
|
420
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomOwnersResponse>>>({
|
|
421
|
-
path: `/cosmos/bank/v1beta1/denom_owners/${denom}`,
|
|
422
|
-
method: "GET",
|
|
423
|
-
query: query,
|
|
424
|
-
format: "json",
|
|
425
|
-
...params,
|
|
426
|
-
});
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* QueryDenomOwnersByQuery
|
|
430
|
-
*
|
|
431
|
-
* @tags Query
|
|
432
|
-
* @name queryDenomOwnersByQuery
|
|
433
|
-
* @request GET:/cosmos/bank/v1beta1/denom_owners_by_query
|
|
434
|
-
*/
|
|
435
|
-
queryDenomOwnersByQuery = (
|
|
436
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomOwnersByQueryRequest>>>,"">,
|
|
437
|
-
params: RequestParams = {},
|
|
438
|
-
) =>
|
|
439
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDenomOwnersByQueryResponse>>>({
|
|
440
|
-
path: `/cosmos/bank/v1beta1/denom_owners_by_query`,
|
|
441
|
-
method: "GET",
|
|
442
|
-
query: query,
|
|
443
|
-
format: "json",
|
|
444
|
-
...params,
|
|
445
|
-
});
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* QuerySendEnabled
|
|
449
|
-
*
|
|
450
|
-
* @tags Query
|
|
451
|
-
* @name querySendEnabled
|
|
452
|
-
* @request GET:/cosmos/bank/v1beta1/send_enabled
|
|
453
|
-
*/
|
|
454
|
-
querySendEnabled = (
|
|
455
|
-
query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QuerySendEnabledRequest>>>,"">,
|
|
456
|
-
params: RequestParams = {},
|
|
457
|
-
) =>
|
|
458
|
-
this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QuerySendEnabledResponse>>>({
|
|
459
|
-
path: `/cosmos/bank/v1beta1/send_enabled`,
|
|
460
|
-
method: "GET",
|
|
461
|
-
query: query,
|
|
462
|
-
format: "json",
|
|
463
|
-
...params,
|
|
464
|
-
});
|
|
465
|
-
|
|
466
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SendAuthorization } from "../types/cosmos/bank/v1beta1/authz"
|
|
2
|
-
import { Params } from "../types/cosmos/bank/v1beta1/bank"
|
|
3
|
-
import { SendEnabled } from "../types/cosmos/bank/v1beta1/bank"
|
|
4
|
-
import { Input } from "../types/cosmos/bank/v1beta1/bank"
|
|
5
|
-
import { Output } from "../types/cosmos/bank/v1beta1/bank"
|
|
6
|
-
import { Supply } from "../types/cosmos/bank/v1beta1/bank"
|
|
7
|
-
import { DenomUnit } from "../types/cosmos/bank/v1beta1/bank"
|
|
8
|
-
import { Metadata } from "../types/cosmos/bank/v1beta1/bank"
|
|
9
|
-
import { Balance } from "../types/cosmos/bank/v1beta1/genesis"
|
|
10
|
-
import { DenomOwner } from "../types/cosmos/bank/v1beta1/query"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
SendAuthorization,
|
|
15
|
-
Params,
|
|
16
|
-
SendEnabled,
|
|
17
|
-
Input,
|
|
18
|
-
Output,
|
|
19
|
-
Supply,
|
|
20
|
-
DenomUnit,
|
|
21
|
-
Metadata,
|
|
22
|
-
Balance,
|
|
23
|
-
DenomOwner,
|
|
24
|
-
|
|
25
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
// Generated by Ignite ignite.com/cli
|
|
2
|
-
|
|
3
|
-
import { SigningStargateClient, DeliverTxResponse, StdFee } from "@cosmjs/stargate";
|
|
4
|
-
import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
|
|
5
|
-
import { msgTypes } from './registry';
|
|
6
|
-
import { IgniteClient } from "../client"
|
|
7
|
-
import { MissingWalletError } from "../helpers"
|
|
8
|
-
import { Api } from "./rest";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export { };
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const registry = new Registry(msgTypes);
|
|
16
|
-
|
|
17
|
-
type Field = {
|
|
18
|
-
name: string;
|
|
19
|
-
type: unknown;
|
|
20
|
-
}
|
|
21
|
-
function getStructure(template) {
|
|
22
|
-
const structure: {fields: Field[]} = { fields: [] }
|
|
23
|
-
for (let [key, value] of Object.entries(template)) {
|
|
24
|
-
let field = { name: key, type: typeof value }
|
|
25
|
-
structure.fields.push(field)
|
|
26
|
-
}
|
|
27
|
-
return structure
|
|
28
|
-
}
|
|
29
|
-
const defaultFee = {
|
|
30
|
-
amount: [],
|
|
31
|
-
gas: "200000",
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
interface TxClientOptions {
|
|
35
|
-
addr: string
|
|
36
|
-
prefix: string
|
|
37
|
-
signer?: OfflineSigner
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
41
|
-
|
|
42
|
-
return {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
interface QueryClientOptions {
|
|
49
|
-
addr: string
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
|
|
53
|
-
return new Api({ baseURL: addr });
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
class SDKModule {
|
|
57
|
-
public query: ReturnType<typeof queryClient>;
|
|
58
|
-
public tx: ReturnType<typeof txClient>;
|
|
59
|
-
public structure: Record<string,unknown>;
|
|
60
|
-
public registry: Array<[string, GeneratedType]> = [];
|
|
61
|
-
|
|
62
|
-
constructor(client: IgniteClient) {
|
|
63
|
-
|
|
64
|
-
this.query = queryClient({ addr: client.env.apiURL });
|
|
65
|
-
this.updateTX(client);
|
|
66
|
-
this.structure = {
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
client.on('signer-changed',(signer) => {
|
|
70
|
-
this.updateTX(client);
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
updateTX(client: IgniteClient) {
|
|
74
|
-
const methods = txClient({
|
|
75
|
-
signer: client.signer,
|
|
76
|
-
addr: client.env.rpcURL,
|
|
77
|
-
prefix: client.env.prefix ?? "cosmos",
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
this.tx = methods;
|
|
81
|
-
for (let m in methods) {
|
|
82
|
-
this.tx[m] = methods[m].bind(this.tx);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const IgntModule = (test: IgniteClient) => {
|
|
88
|
-
return {
|
|
89
|
-
module: {
|
|
90
|
-
CosmosBaseNodeV_1Beta_1: new SDKModule(test)
|
|
91
|
-
},
|
|
92
|
-
registry: msgTypes
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
export default IgntModule;
|