@bze/bzejs 3.2.0 → 4.0.0
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/README.md +18 -1
- package/dist/bze/bundle.d.ts +5982 -3068
- package/dist/bze/bundle.js +144 -93
- package/dist/bze/burner/burned_coins.d.ts +60 -0
- package/dist/bze/burner/burned_coins.js +92 -1
- package/dist/bze/burner/genesis.d.ts +4 -1
- package/dist/bze/burner/genesis.js +20 -4
- package/dist/bze/burner/params.d.ts +22 -0
- package/dist/bze/burner/params.js +29 -4
- package/dist/bze/dao/events.d.ts +1208 -0
- package/dist/bze/dao/events.js +1840 -0
- package/dist/bze/dao/genesis.d.ts +307 -0
- package/dist/bze/dao/genesis.js +435 -0
- package/dist/bze/dao/module/module.d.ts +64 -0
- package/dist/{cosmos/orm/module/v1alpha1 → bze/dao/module}/module.js +27 -23
- package/dist/bze/dao/params.d.ts +210 -0
- package/dist/bze/dao/params.js +268 -0
- package/dist/bze/dao/query.d.ts +1607 -0
- package/dist/bze/dao/query.js +2368 -0
- package/dist/bze/dao/query.lcd.d.ts +20 -0
- package/dist/bze/dao/query.lcd.js +125 -0
- package/dist/bze/dao/query.rpc.func.d.ts +88 -0
- package/dist/bze/dao/query.rpc.func.js +165 -0
- package/dist/bze/dao/store.d.ts +946 -0
- package/dist/bze/dao/store.js +1546 -0
- package/dist/bze/dao/tx.d.ts +2014 -0
- package/dist/bze/dao/tx.js +2823 -0
- package/dist/bze/dao/tx.registry.d.ts +191 -0
- package/dist/bze/dao/tx.registry.js +283 -0
- package/dist/bze/dao/tx.rpc.func.d.ts +124 -0
- package/dist/bze/dao/tx.rpc.func.js +159 -0
- package/dist/bze/guardian/module/module.d.ts +64 -0
- package/dist/bze/guardian/module/module.js +84 -0
- package/dist/bze/guardian/v1/events.d.ts +632 -0
- package/dist/bze/guardian/v1/events.js +985 -0
- package/dist/bze/guardian/v1/genesis.d.ts +85 -0
- package/dist/bze/guardian/v1/genesis.js +118 -0
- package/dist/bze/guardian/v1/params.d.ts +68 -0
- package/dist/bze/guardian/v1/params.js +91 -0
- package/dist/bze/guardian/v1/query.d.ts +472 -0
- package/dist/bze/guardian/v1/query.js +598 -0
- package/dist/bze/guardian/v1/query.lcd.d.ts +12 -0
- package/dist/bze/guardian/v1/query.lcd.js +34 -0
- package/dist/bze/guardian/v1/query.rpc.func.d.ts +29 -0
- package/dist/bze/guardian/v1/query.rpc.func.js +58 -0
- package/dist/bze/guardian/v1/tx.d.ts +1487 -0
- package/dist/bze/guardian/v1/tx.js +1870 -0
- package/dist/bze/guardian/v1/tx.registry.d.ts +143 -0
- package/dist/bze/guardian/v1/tx.registry.js +211 -0
- package/dist/bze/guardian/v1/tx.rpc.func.d.ts +91 -0
- package/dist/bze/guardian/v1/tx.rpc.func.js +118 -0
- package/dist/bze/lcd.d.ts +4 -3
- package/dist/bze/lcd.js +8 -5
- package/dist/bze/rewards/events.d.ts +79 -0
- package/dist/bze/rewards/events.js +109 -5
- package/dist/bze/tokenfactory/denom_authority.d.ts +13 -0
- package/dist/bze/tokenfactory/denom_authority.js +16 -4
- package/dist/bze/tokenfactory/denom_config.d.ts +92 -0
- package/dist/bze/tokenfactory/denom_config.js +111 -0
- package/dist/bze/tokenfactory/events.d.ts +122 -0
- package/dist/bze/tokenfactory/events.js +207 -1
- package/dist/bze/tokenfactory/genesis.d.ts +10 -0
- package/dist/bze/tokenfactory/genesis.js +15 -1
- package/dist/bze/tokenfactory/query.d.ts +107 -0
- package/dist/bze/tokenfactory/query.js +163 -1
- package/dist/bze/tokenfactory/query.lcd.d.ts +2 -1
- package/dist/bze/tokenfactory/query.lcd.js +12 -0
- package/dist/bze/tokenfactory/query.rpc.func.d.ts +8 -1
- package/dist/bze/tokenfactory/query.rpc.func.js +14 -1
- package/dist/bze/tokenfactory/tx.d.ts +396 -0
- package/dist/bze/tokenfactory/tx.js +542 -1
- package/dist/bze/tokenfactory/tx.registry.d.ts +37 -1
- package/dist/bze/tokenfactory/tx.registry.js +55 -1
- package/dist/bze/tokenfactory/tx.rpc.func.d.ts +25 -1
- package/dist/bze/tokenfactory/tx.rpc.func.js +31 -1
- package/dist/bze/tradebin/events.d.ts +312 -174
- package/dist/bze/tradebin/events.js +509 -321
- package/dist/bze/tradebin/genesis.d.ts +1 -4
- package/dist/bze/tradebin/genesis.js +3 -19
- package/dist/bze/tradebin/query.d.ts +109 -0
- package/dist/bze/tradebin/query.js +170 -1
- package/dist/bze/tradebin/query.lcd.d.ts +2 -1
- package/dist/bze/tradebin/query.lcd.js +13 -0
- package/dist/bze/tradebin/query.rpc.func.d.ts +9 -1
- package/dist/bze/tradebin/query.rpc.func.js +15 -1
- package/dist/bze/tradebin/store.d.ts +78 -77
- package/dist/bze/tradebin/store.js +120 -179
- package/dist/bze/tradebin/tx.d.ts +204 -0
- package/dist/bze/tradebin/tx.js +286 -1
- package/dist/bze/tradebin/tx.registry.d.ts +13 -1
- package/dist/bze/tradebin/tx.registry.js +19 -1
- package/dist/bze/tradebin/tx.rpc.func.d.ts +8 -1
- package/dist/bze/tradebin/tx.rpc.func.js +10 -1
- package/dist/bze/tradebin/v2/params.d.ts +54 -12
- package/dist/bze/tradebin/v2/params.js +61 -36
- package/dist/bze/txfeecollector/events.d.ts +185 -0
- package/dist/bze/txfeecollector/events.js +222 -1
- package/dist/cosmos/app/runtime/v1alpha1/module.d.ts +28 -2
- package/dist/cosmos/app/runtime/v1alpha1/module.js +34 -4
- package/dist/cosmos/auth/module/v1/module.d.ts +13 -0
- package/dist/cosmos/auth/module/v1/module.js +16 -4
- package/dist/cosmos/auth/v1beta1/auth.d.ts +0 -8
- package/dist/cosmos/auth/v1beta1/auth.js +0 -2
- package/dist/cosmos/auth/v1beta1/query.d.ts +0 -116
- package/dist/cosmos/auth/v1beta1/query.js +0 -28
- package/dist/cosmos/auth/v1beta1/query.lcd.js +7 -21
- package/dist/cosmos/auth/v1beta1/query.rpc.func.d.ts +0 -14
- package/dist/cosmos/auth/v1beta1/query.rpc.func.js +0 -14
- package/dist/cosmos/auth/v1beta1/tx.d.ts +0 -16
- package/dist/cosmos/auth/v1beta1/tx.js +0 -4
- package/dist/cosmos/auth/v1beta1/tx.rpc.func.d.ts +0 -2
- package/dist/cosmos/auth/v1beta1/tx.rpc.func.js +0 -2
- package/dist/cosmos/authz/v1beta1/query.lcd.js +2 -6
- package/dist/cosmos/authz/v1beta1/query.rpc.func.d.ts +0 -4
- package/dist/cosmos/authz/v1beta1/query.rpc.func.js +0 -4
- package/dist/cosmos/bank/v1beta1/authz.d.ts +0 -12
- package/dist/cosmos/bank/v1beta1/authz.js +0 -2
- package/dist/cosmos/bank/v1beta1/bank.d.ts +0 -16
- package/dist/cosmos/bank/v1beta1/genesis.d.ts +0 -4
- package/dist/cosmos/bank/v1beta1/query.d.ts +0 -92
- package/dist/cosmos/bank/v1beta1/query.js +0 -20
- package/dist/cosmos/bank/v1beta1/query.lcd.d.ts +2 -2
- package/dist/cosmos/bank/v1beta1/query.lcd.js +29 -30
- package/dist/cosmos/bank/v1beta1/query.rpc.func.d.ts +9 -19
- package/dist/cosmos/bank/v1beta1/query.rpc.func.js +15 -25
- package/dist/cosmos/bank/v1beta1/tx.d.ts +0 -32
- package/dist/cosmos/bank/v1beta1/tx.js +0 -8
- package/dist/cosmos/bank/v1beta1/tx.rpc.func.d.ts +0 -4
- package/dist/cosmos/bank/v1beta1/tx.rpc.func.js +0 -4
- package/dist/cosmos/base/abci/v1beta1/abci.d.ts +0 -12
- package/dist/cosmos/base/query/v1beta1/pagination.d.ts +0 -4
- package/dist/cosmos/base/tendermint/v1beta1/query.d.ts +0 -18
- package/dist/cosmos/base/tendermint/v1beta1/query.lcd.js +1 -3
- package/dist/cosmos/base/tendermint/v1beta1/query.rpc.func.d.ts +0 -2
- package/dist/cosmos/base/tendermint/v1beta1/query.rpc.func.js +0 -2
- package/dist/cosmos/bundle.d.ts +8277 -10119
- package/dist/cosmos/bundle.js +366 -415
- package/dist/cosmos/consensus/v1/tx.d.ts +0 -6
- package/dist/cosmos/consensus/v1/tx.rpc.func.d.ts +0 -2
- package/dist/cosmos/consensus/v1/tx.rpc.func.js +0 -2
- package/dist/cosmos/distribution/v1beta1/query.lcd.js +3 -1
- package/dist/cosmos/distribution/v1beta1/query.rpc.func.d.ts +2 -0
- package/dist/cosmos/distribution/v1beta1/query.rpc.func.js +2 -0
- package/dist/cosmos/distribution/v1beta1/tx.d.ts +0 -60
- package/dist/cosmos/distribution/v1beta1/tx.js +0 -12
- package/dist/cosmos/distribution/v1beta1/tx.rpc.func.d.ts +3 -5
- package/dist/cosmos/distribution/v1beta1/tx.rpc.func.js +3 -5
- package/dist/cosmos/feegrant/v1beta1/query.d.ts +0 -16
- package/dist/cosmos/feegrant/v1beta1/query.js +0 -4
- package/dist/cosmos/feegrant/v1beta1/query.lcd.js +1 -3
- package/dist/cosmos/feegrant/v1beta1/query.rpc.func.d.ts +0 -2
- package/dist/cosmos/feegrant/v1beta1/query.rpc.func.js +0 -2
- package/dist/cosmos/feegrant/v1beta1/tx.d.ts +0 -16
- package/dist/cosmos/feegrant/v1beta1/tx.js +0 -4
- package/dist/cosmos/feegrant/v1beta1/tx.rpc.func.d.ts +0 -2
- package/dist/cosmos/feegrant/v1beta1/tx.rpc.func.js +0 -2
- package/dist/cosmos/gov/v1/genesis.d.ts +0 -8
- package/dist/cosmos/gov/v1/gov.d.ts +0 -48
- package/dist/cosmos/gov/v1/gov.js +0 -2
- package/dist/cosmos/gov/v1/query.d.ts +0 -4
- package/dist/cosmos/gov/v1/tx.d.ts +0 -44
- package/dist/cosmos/gov/v1/tx.js +0 -8
- package/dist/cosmos/gov/v1/tx.rpc.func.d.ts +0 -4
- package/dist/cosmos/gov/v1/tx.rpc.func.js +0 -4
- package/dist/cosmos/gov/v1beta1/gov.d.ts +0 -12
- package/dist/cosmos/gov/v1beta1/gov.js +0 -2
- package/dist/cosmos/gov/v1beta1/tx.d.ts +0 -16
- package/dist/cosmos/gov/v1beta1/tx.js +0 -4
- package/dist/cosmos/gov/v1beta1/tx.rpc.func.d.ts +0 -2
- package/dist/cosmos/gov/v1beta1/tx.rpc.func.js +0 -2
- package/dist/cosmos/lcd.d.ts +0 -3
- package/dist/cosmos/lcd.js +0 -5
- package/dist/cosmos/mint/v1beta1/tx.d.ts +0 -16
- package/dist/cosmos/mint/v1beta1/tx.js +0 -4
- package/dist/cosmos/mint/v1beta1/tx.rpc.func.d.ts +0 -2
- package/dist/cosmos/mint/v1beta1/tx.rpc.func.js +0 -2
- package/dist/cosmos/params/v1beta1/query.d.ts +0 -24
- package/dist/cosmos/params/v1beta1/query.js +0 -6
- package/dist/cosmos/params/v1beta1/query.lcd.js +1 -3
- package/dist/cosmos/params/v1beta1/query.rpc.func.d.ts +0 -2
- package/dist/cosmos/params/v1beta1/query.rpc.func.js +0 -2
- package/dist/cosmos/staking/v1beta1/authz.d.ts +1 -13
- package/dist/cosmos/staking/v1beta1/authz.js +1 -7
- package/dist/cosmos/staking/v1beta1/staking.d.ts +0 -4
- package/dist/cosmos/staking/v1beta1/tx.d.ts +0 -36
- package/dist/cosmos/staking/v1beta1/tx.js +0 -8
- package/dist/cosmos/staking/v1beta1/tx.rpc.func.d.ts +0 -3
- package/dist/cosmos/staking/v1beta1/tx.rpc.func.js +0 -3
- package/dist/cosmos/store/snapshots/v1/snapshot.d.ts +0 -40
- package/dist/cosmos/store/snapshots/v1/snapshot.js +0 -10
- package/dist/cosmos/store/v1beta1/listening.d.ts +0 -8
- package/dist/cosmos/store/v1beta1/listening.js +0 -2
- package/dist/cosmos/tx/v1beta1/service.d.ts +0 -88
- package/dist/cosmos/tx/v1beta1/service.js +0 -20
- package/dist/cosmos/tx/v1beta1/service.lcd.js +1 -3
- package/dist/cosmos/tx/v1beta1/service.rpc.func.d.ts +0 -10
- package/dist/cosmos/tx/v1beta1/service.rpc.func.js +0 -10
- package/dist/cosmos/tx/v1beta1/tx.d.ts +76 -46
- package/dist/cosmos/tx/v1beta1/tx.js +28 -9
- package/dist/cosmos/upgrade/v1beta1/query.d.ts +0 -38
- package/dist/cosmos/upgrade/v1beta1/query.js +0 -8
- package/dist/cosmos/upgrade/v1beta1/query.lcd.js +2 -6
- package/dist/cosmos/upgrade/v1beta1/query.rpc.func.d.ts +0 -4
- package/dist/cosmos/upgrade/v1beta1/query.rpc.func.js +0 -4
- package/dist/cosmos/upgrade/v1beta1/tx.d.ts +0 -32
- package/dist/cosmos/upgrade/v1beta1/tx.js +0 -8
- package/dist/cosmos/upgrade/v1beta1/tx.rpc.func.d.ts +0 -4
- package/dist/cosmos/upgrade/v1beta1/tx.rpc.func.js +0 -4
- package/dist/cosmos/upgrade/v1beta1/upgrade.d.ts +0 -8
- package/dist/cosmos/upgrade/v1beta1/upgrade.js +0 -2
- package/dist/cosmos/vesting/v1beta1/tx.d.ts +0 -32
- package/dist/cosmos/vesting/v1beta1/tx.js +0 -8
- package/dist/cosmos/vesting/v1beta1/tx.rpc.func.d.ts +0 -4
- package/dist/cosmos/vesting/v1beta1/tx.rpc.func.js +0 -4
- package/dist/cosmos/vesting/v1beta1/vesting.d.ts +0 -8
- package/dist/cosmos/vesting/v1beta1/vesting.js +0 -2
- package/dist/cosmos_proto/bundle.d.ts +30 -30
- package/dist/cosmos_proto/bundle.js +2 -2
- package/dist/esm/bze/bundle.js +144 -93
- package/dist/esm/bze/burner/burned_coins.js +91 -0
- package/dist/esm/bze/burner/genesis.js +21 -5
- package/dist/esm/bze/burner/params.js +29 -4
- package/dist/esm/bze/dao/events.js +1837 -0
- package/dist/esm/bze/dao/genesis.js +432 -0
- package/dist/esm/{cosmos/orm/module/v1alpha1 → bze/dao/module}/module.js +27 -23
- package/dist/esm/bze/dao/params.js +265 -0
- package/dist/esm/bze/dao/query.js +2363 -0
- package/dist/esm/bze/dao/query.lcd.js +121 -0
- package/dist/esm/bze/dao/query.rpc.func.js +162 -0
- package/dist/esm/bze/dao/store.js +1533 -0
- package/dist/esm/bze/dao/tx.js +2820 -0
- package/dist/esm/bze/dao/tx.registry.js +280 -0
- package/dist/esm/bze/dao/tx.rpc.func.js +156 -0
- package/dist/esm/bze/guardian/module/module.js +81 -0
- package/dist/esm/bze/guardian/v1/events.js +982 -0
- package/dist/esm/bze/guardian/v1/genesis.js +115 -0
- package/dist/esm/bze/guardian/v1/params.js +88 -0
- package/dist/esm/bze/guardian/v1/query.js +595 -0
- package/dist/esm/bze/guardian/v1/query.lcd.js +30 -0
- package/dist/esm/bze/guardian/v1/query.rpc.func.js +55 -0
- package/dist/esm/bze/guardian/v1/tx.js +1867 -0
- package/dist/esm/bze/guardian/v1/tx.registry.js +208 -0
- package/dist/esm/bze/guardian/v1/tx.rpc.func.js +115 -0
- package/dist/esm/bze/lcd.js +8 -5
- package/dist/esm/bze/rewards/events.js +108 -4
- package/dist/esm/bze/tokenfactory/denom_authority.js +16 -4
- package/dist/esm/bze/tokenfactory/denom_config.js +108 -0
- package/dist/esm/bze/tokenfactory/events.js +206 -0
- package/dist/esm/bze/tokenfactory/genesis.js +15 -1
- package/dist/esm/bze/tokenfactory/query.js +162 -0
- package/dist/esm/bze/tokenfactory/query.lcd.js +12 -0
- package/dist/esm/bze/tokenfactory/query.rpc.func.js +14 -1
- package/dist/esm/bze/tokenfactory/tx.js +541 -0
- package/dist/esm/bze/tokenfactory/tx.registry.js +56 -2
- package/dist/esm/bze/tokenfactory/tx.rpc.func.js +31 -1
- package/dist/esm/bze/tradebin/events.js +508 -320
- package/dist/esm/bze/tradebin/genesis.js +4 -20
- package/dist/esm/bze/tradebin/query.js +169 -0
- package/dist/esm/bze/tradebin/query.lcd.js +13 -0
- package/dist/esm/bze/tradebin/query.rpc.func.js +15 -1
- package/dist/esm/bze/tradebin/store.js +119 -178
- package/dist/esm/bze/tradebin/tx.js +285 -0
- package/dist/esm/bze/tradebin/tx.registry.js +20 -2
- package/dist/esm/bze/tradebin/tx.rpc.func.js +10 -1
- package/dist/esm/bze/tradebin/v2/params.js +61 -36
- package/dist/esm/bze/txfeecollector/events.js +221 -0
- package/dist/esm/cosmos/app/runtime/v1alpha1/module.js +34 -4
- package/dist/esm/cosmos/auth/module/v1/module.js +16 -4
- package/dist/esm/cosmos/auth/v1beta1/auth.js +0 -2
- package/dist/esm/cosmos/auth/v1beta1/query.js +0 -28
- package/dist/esm/cosmos/auth/v1beta1/query.lcd.js +7 -21
- package/dist/esm/cosmos/auth/v1beta1/query.rpc.func.js +0 -14
- package/dist/esm/cosmos/auth/v1beta1/tx.js +0 -4
- package/dist/esm/cosmos/auth/v1beta1/tx.rpc.func.js +0 -2
- package/dist/esm/cosmos/authz/v1beta1/query.lcd.js +2 -6
- package/dist/esm/cosmos/authz/v1beta1/query.rpc.func.js +0 -4
- package/dist/esm/cosmos/bank/v1beta1/authz.js +0 -2
- package/dist/esm/cosmos/bank/v1beta1/query.js +0 -20
- package/dist/esm/cosmos/bank/v1beta1/query.lcd.js +29 -30
- package/dist/esm/cosmos/bank/v1beta1/query.rpc.func.js +15 -25
- package/dist/esm/cosmos/bank/v1beta1/tx.js +0 -8
- package/dist/esm/cosmos/bank/v1beta1/tx.rpc.func.js +0 -4
- package/dist/esm/cosmos/base/tendermint/v1beta1/query.lcd.js +1 -3
- package/dist/esm/cosmos/base/tendermint/v1beta1/query.rpc.func.js +0 -2
- package/dist/esm/cosmos/bundle.js +366 -415
- package/dist/esm/cosmos/consensus/v1/tx.rpc.func.js +0 -2
- package/dist/esm/cosmos/distribution/v1beta1/query.lcd.js +3 -1
- package/dist/esm/cosmos/distribution/v1beta1/query.rpc.func.js +2 -0
- package/dist/esm/cosmos/distribution/v1beta1/tx.js +0 -12
- package/dist/esm/cosmos/distribution/v1beta1/tx.rpc.func.js +3 -5
- package/dist/esm/cosmos/feegrant/v1beta1/query.js +0 -4
- package/dist/esm/cosmos/feegrant/v1beta1/query.lcd.js +1 -3
- package/dist/esm/cosmos/feegrant/v1beta1/query.rpc.func.js +0 -2
- package/dist/esm/cosmos/feegrant/v1beta1/tx.js +0 -4
- package/dist/esm/cosmos/feegrant/v1beta1/tx.rpc.func.js +0 -2
- package/dist/esm/cosmos/gov/v1/gov.js +0 -2
- package/dist/esm/cosmos/gov/v1/tx.js +0 -8
- package/dist/esm/cosmos/gov/v1/tx.rpc.func.js +0 -4
- package/dist/esm/cosmos/gov/v1beta1/gov.js +0 -2
- package/dist/esm/cosmos/gov/v1beta1/tx.js +0 -4
- package/dist/esm/cosmos/gov/v1beta1/tx.rpc.func.js +0 -2
- package/dist/esm/cosmos/lcd.js +0 -5
- package/dist/esm/cosmos/mint/v1beta1/tx.js +0 -4
- package/dist/esm/cosmos/mint/v1beta1/tx.rpc.func.js +0 -2
- package/dist/esm/cosmos/params/v1beta1/query.js +0 -6
- package/dist/esm/cosmos/params/v1beta1/query.lcd.js +1 -3
- package/dist/esm/cosmos/params/v1beta1/query.rpc.func.js +0 -2
- package/dist/esm/cosmos/staking/v1beta1/authz.js +1 -7
- package/dist/esm/cosmos/staking/v1beta1/tx.js +0 -8
- package/dist/esm/cosmos/staking/v1beta1/tx.rpc.func.js +0 -3
- package/dist/esm/cosmos/store/snapshots/v1/snapshot.js +0 -10
- package/dist/esm/cosmos/store/v1beta1/listening.js +0 -2
- package/dist/esm/cosmos/tx/v1beta1/service.js +0 -20
- package/dist/esm/cosmos/tx/v1beta1/service.lcd.js +1 -3
- package/dist/esm/cosmos/tx/v1beta1/service.rpc.func.js +0 -10
- package/dist/esm/cosmos/tx/v1beta1/tx.js +29 -10
- package/dist/esm/cosmos/upgrade/v1beta1/query.js +0 -8
- package/dist/esm/cosmos/upgrade/v1beta1/query.lcd.js +2 -6
- package/dist/esm/cosmos/upgrade/v1beta1/query.rpc.func.js +0 -4
- package/dist/esm/cosmos/upgrade/v1beta1/tx.js +0 -8
- package/dist/esm/cosmos/upgrade/v1beta1/tx.rpc.func.js +0 -4
- package/dist/esm/cosmos/upgrade/v1beta1/upgrade.js +0 -2
- package/dist/esm/cosmos/vesting/v1beta1/tx.js +0 -8
- package/dist/esm/cosmos/vesting/v1beta1/tx.rpc.func.js +0 -4
- package/dist/esm/cosmos/vesting/v1beta1/vesting.js +0 -2
- package/dist/esm/cosmos_proto/bundle.js +2 -2
- package/dist/esm/gogoproto/bundle.js +2 -2
- package/dist/esm/google/bundle.js +8 -8
- package/dist/esm/ibc/applications/transfer/v1/tx.js +4 -16
- package/dist/esm/ibc/bundle.js +93 -121
- package/dist/esm/ibc/core/client/v1/tx.js +187 -0
- package/dist/esm/ibc/core/client/v1/tx.registry.js +20 -2
- package/dist/esm/ibc/core/client/v1/tx.rpc.func.js +10 -1
- package/dist/esm/ibc/lcd.js +0 -10
- package/dist/esm/ibc/lightclients/wasm/v1/wasm.js +93 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/ratelimit/bundle.js +35 -0
- package/dist/esm/ratelimit/lcd.js +106 -0
- package/dist/esm/ratelimit/module/v1/module.js +81 -0
- package/dist/esm/{ibc/applications/rate_limiting → ratelimit}/v1/genesis.js +49 -27
- package/dist/esm/ratelimit/v1/params.js +68 -0
- package/dist/esm/{ibc/applications/rate_limiting → ratelimit}/v1/query.js +105 -195
- package/dist/esm/{ibc/applications/rate_limiting → ratelimit}/v1/query.lcd.js +10 -10
- package/dist/esm/ratelimit/v1/query.rpc.func.js +83 -0
- package/dist/esm/{ibc/applications/rate_limiting/v1/rate_limiting.js → ratelimit/v1/ratelimit.js} +29 -73
- package/dist/esm/{ibc/applications/rate_limiting → ratelimit}/v1/tx.js +77 -109
- package/dist/esm/{ibc/applications/rate_limiting → ratelimit}/v1/tx.registry.js +13 -13
- package/dist/esm/{ibc/applications/rate_limiting → ratelimit}/v1/tx.rpc.func.js +9 -9
- package/dist/esm/tendermint/bundle.js +20 -20
- package/dist/gogoproto/bundle.js +2 -2
- package/dist/google/bundle.d.ts +550 -550
- package/dist/google/bundle.js +8 -8
- package/dist/ibc/applications/transfer/v1/tx.d.ts +0 -19
- package/dist/ibc/applications/transfer/v1/tx.js +4 -16
- package/dist/ibc/bundle.d.ts +506 -1065
- package/dist/ibc/bundle.js +93 -121
- package/dist/ibc/core/client/v1/tx.d.ts +155 -0
- package/dist/ibc/core/client/v1/tx.js +188 -1
- package/dist/ibc/core/client/v1/tx.registry.d.ts +13 -1
- package/dist/ibc/core/client/v1/tx.registry.js +19 -1
- package/dist/ibc/core/client/v1/tx.rpc.func.d.ts +8 -1
- package/dist/ibc/core/client/v1/tx.rpc.func.js +10 -1
- package/dist/ibc/lcd.d.ts +0 -6
- package/dist/ibc/lcd.js +0 -10
- package/dist/ibc/lightclients/wasm/v1/wasm.d.ts +75 -0
- package/dist/ibc/lightclients/wasm/v1/wasm.js +94 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/ratelimit/bundle.d.ts +625 -0
- package/dist/ratelimit/bundle.js +71 -0
- package/dist/ratelimit/lcd.d.ts +63 -0
- package/dist/ratelimit/lcd.js +143 -0
- package/dist/ratelimit/module/v1/module.d.ts +64 -0
- package/dist/ratelimit/module/v1/module.js +84 -0
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/genesis.d.ts +19 -14
- package/dist/ratelimit/v1/genesis.js +182 -0
- package/dist/ratelimit/v1/params.d.ts +55 -0
- package/dist/ratelimit/v1/params.js +71 -0
- package/dist/ratelimit/v1/query.d.ts +656 -0
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/query.js +142 -232
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/query.lcd.d.ts +3 -3
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/query.lcd.js +10 -10
- package/dist/ratelimit/v1/query.rpc.func.d.ts +45 -0
- package/dist/ratelimit/v1/query.rpc.func.js +86 -0
- package/dist/{ibc/applications/rate_limiting/v1/rate_limiting.d.ts → ratelimit/v1/ratelimit.d.ts} +62 -82
- package/dist/{ibc/applications/rate_limiting/v1/rate_limiting.js → ratelimit/v1/ratelimit.js} +29 -73
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/tx.d.ts +97 -121
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/tx.js +77 -109
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/tx.registry.d.ts +1 -1
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/tx.registry.js +13 -13
- package/dist/ratelimit/v1/tx.rpc.func.d.ts +29 -0
- package/dist/{ibc/applications/rate_limiting → ratelimit}/v1/tx.rpc.func.js +9 -9
- package/dist/tendermint/bundle.d.ts +1120 -1120
- package/dist/tendermint/bundle.js +20 -20
- package/package.json +10 -5
- package/dist/cosmos/group/module/v1/module.d.ts +0 -80
- package/dist/cosmos/group/module/v1/module.js +0 -104
- package/dist/cosmos/group/v1/events.d.ts +0 -771
- package/dist/cosmos/group/v1/events.js +0 -1031
- package/dist/cosmos/group/v1/genesis.d.ts +0 -136
- package/dist/cosmos/group/v1/genesis.js +0 -201
- package/dist/cosmos/group/v1/query.d.ts +0 -2001
- package/dist/cosmos/group/v1/query.js +0 -2787
- package/dist/cosmos/group/v1/query.lcd.d.ts +0 -22
- package/dist/cosmos/group/v1/query.lcd.js +0 -158
- package/dist/cosmos/group/v1/query.rpc.func.d.ts +0 -105
- package/dist/cosmos/group/v1/query.rpc.func.js +0 -194
- package/dist/cosmos/group/v1/tx.d.ts +0 -2124
- package/dist/cosmos/group/v1/tx.js +0 -2821
- package/dist/cosmos/group/v1/tx.registry.d.ts +0 -179
- package/dist/cosmos/group/v1/tx.registry.js +0 -265
- package/dist/cosmos/group/v1/tx.rpc.func.d.ts +0 -99
- package/dist/cosmos/group/v1/tx.rpc.func.js +0 -132
- package/dist/cosmos/group/v1/types.d.ts +0 -1297
- package/dist/cosmos/group/v1/types.js +0 -1677
- package/dist/cosmos/orm/module/v1alpha1/module.d.ts +0 -65
- package/dist/cosmos/orm/query/v1alpha1/query.d.ts +0 -622
- package/dist/cosmos/orm/query/v1alpha1/query.js +0 -835
- package/dist/cosmos/orm/query/v1alpha1/query.rpc.func.d.ts +0 -15
- package/dist/cosmos/orm/query/v1alpha1/query.rpc.func.js +0 -32
- package/dist/esm/cosmos/group/module/v1/module.js +0 -101
- package/dist/esm/cosmos/group/v1/events.js +0 -1028
- package/dist/esm/cosmos/group/v1/genesis.js +0 -198
- package/dist/esm/cosmos/group/v1/query.js +0 -2784
- package/dist/esm/cosmos/group/v1/query.lcd.js +0 -154
- package/dist/esm/cosmos/group/v1/query.rpc.func.js +0 -191
- package/dist/esm/cosmos/group/v1/tx.js +0 -2816
- package/dist/esm/cosmos/group/v1/tx.registry.js +0 -262
- package/dist/esm/cosmos/group/v1/tx.rpc.func.js +0 -129
- package/dist/esm/cosmos/group/v1/types.js +0 -1668
- package/dist/esm/cosmos/orm/query/v1alpha1/query.js +0 -832
- package/dist/esm/cosmos/orm/query/v1alpha1/query.rpc.func.js +0 -29
- package/dist/esm/ibc/applications/packet_forward_middleware/v1/genesis.js +0 -409
- package/dist/esm/ibc/applications/rate_limiting/v1/query.rpc.func.js +0 -83
- package/dist/ibc/applications/packet_forward_middleware/v1/genesis.d.ts +0 -225
- package/dist/ibc/applications/packet_forward_middleware/v1/genesis.js +0 -412
- package/dist/ibc/applications/rate_limiting/v1/genesis.js +0 -160
- package/dist/ibc/applications/rate_limiting/v1/query.d.ts +0 -704
- package/dist/ibc/applications/rate_limiting/v1/query.rpc.func.d.ts +0 -45
- package/dist/ibc/applications/rate_limiting/v1/query.rpc.func.js +0 -86
- package/dist/ibc/applications/rate_limiting/v1/tx.rpc.func.d.ts +0 -29
|
@@ -0,0 +1,1546 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemberRecord = exports.JoinRecord = exports.Ballot = exports.BallotShare = exports.Proposal = exports.Dao = exports.StakeElectorate = exports.DaoConfig = exports.ProposalStatusAmino = exports.ProposalStatusSDKType = exports.ProposalStatus = exports.VoteOptionAmino = exports.VoteOptionSDKType = exports.VoteOption = exports.FundsDestinationAmino = exports.FundsDestinationSDKType = exports.FundsDestination = exports.DepositRefundPolicyAmino = exports.DepositRefundPolicySDKType = exports.DepositRefundPolicy = exports.DaoTypeAmino = exports.DaoTypeSDKType = exports.DaoType = void 0;
|
|
4
|
+
exports.daoTypeFromJSON = daoTypeFromJSON;
|
|
5
|
+
exports.daoTypeToJSON = daoTypeToJSON;
|
|
6
|
+
exports.depositRefundPolicyFromJSON = depositRefundPolicyFromJSON;
|
|
7
|
+
exports.depositRefundPolicyToJSON = depositRefundPolicyToJSON;
|
|
8
|
+
exports.fundsDestinationFromJSON = fundsDestinationFromJSON;
|
|
9
|
+
exports.fundsDestinationToJSON = fundsDestinationToJSON;
|
|
10
|
+
exports.voteOptionFromJSON = voteOptionFromJSON;
|
|
11
|
+
exports.voteOptionToJSON = voteOptionToJSON;
|
|
12
|
+
exports.proposalStatusFromJSON = proposalStatusFromJSON;
|
|
13
|
+
exports.proposalStatusToJSON = proposalStatusToJSON;
|
|
14
|
+
//@ts-nocheck
|
|
15
|
+
const duration_1 = require("../../google/protobuf/duration");
|
|
16
|
+
const coin_1 = require("../../cosmos/base/v1beta1/coin");
|
|
17
|
+
const any_1 = require("../../google/protobuf/any");
|
|
18
|
+
const helpers_1 = require("../../helpers");
|
|
19
|
+
const binary_1 = require("../../binary");
|
|
20
|
+
const math_1 = require("@interchainjs/math");
|
|
21
|
+
const registry_1 = require("../../registry");
|
|
22
|
+
/** DaoType is the kind of electorate a DAO has. The two kinds are never mixed. */
|
|
23
|
+
var DaoType;
|
|
24
|
+
(function (DaoType) {
|
|
25
|
+
/** DAO_TYPE_STATIC_LIST - DAO_TYPE_STATIC_LIST is a fixed list of member addresses, one vote each. */
|
|
26
|
+
DaoType[DaoType["DAO_TYPE_STATIC_LIST"] = 0] = "DAO_TYPE_STATIC_LIST";
|
|
27
|
+
/** DAO_TYPE_STAKE - DAO_TYPE_STAKE is an electorate of staking rewards and/or one Denom Reward. */
|
|
28
|
+
DaoType[DaoType["DAO_TYPE_STAKE"] = 1] = "DAO_TYPE_STAKE";
|
|
29
|
+
DaoType[DaoType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
30
|
+
})(DaoType || (exports.DaoType = DaoType = {}));
|
|
31
|
+
exports.DaoTypeSDKType = DaoType;
|
|
32
|
+
exports.DaoTypeAmino = DaoType;
|
|
33
|
+
function daoTypeFromJSON(object) {
|
|
34
|
+
switch (object) {
|
|
35
|
+
case 0:
|
|
36
|
+
case "DAO_TYPE_STATIC_LIST":
|
|
37
|
+
return DaoType.DAO_TYPE_STATIC_LIST;
|
|
38
|
+
case 1:
|
|
39
|
+
case "DAO_TYPE_STAKE":
|
|
40
|
+
return DaoType.DAO_TYPE_STAKE;
|
|
41
|
+
case -1:
|
|
42
|
+
case "UNRECOGNIZED":
|
|
43
|
+
default:
|
|
44
|
+
return DaoType.UNRECOGNIZED;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function daoTypeToJSON(object) {
|
|
48
|
+
switch (object) {
|
|
49
|
+
case DaoType.DAO_TYPE_STATIC_LIST:
|
|
50
|
+
return "DAO_TYPE_STATIC_LIST";
|
|
51
|
+
case DaoType.DAO_TYPE_STAKE:
|
|
52
|
+
return "DAO_TYPE_STAKE";
|
|
53
|
+
case DaoType.UNRECOGNIZED:
|
|
54
|
+
default:
|
|
55
|
+
return "UNRECOGNIZED";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** DepositRefundPolicy decides when a proposal deposit goes back to the proposer. */
|
|
59
|
+
var DepositRefundPolicy;
|
|
60
|
+
(function (DepositRefundPolicy) {
|
|
61
|
+
/** ALWAYS - ALWAYS refunds the deposit whatever the outcome. */
|
|
62
|
+
DepositRefundPolicy[DepositRefundPolicy["ALWAYS"] = 0] = "ALWAYS";
|
|
63
|
+
/** ONLY_PASSED - ONLY_PASSED refunds the deposit only when the proposal passed. */
|
|
64
|
+
DepositRefundPolicy[DepositRefundPolicy["ONLY_PASSED"] = 1] = "ONLY_PASSED";
|
|
65
|
+
/** NEVER - NEVER keeps the deposit. */
|
|
66
|
+
DepositRefundPolicy[DepositRefundPolicy["NEVER"] = 2] = "NEVER";
|
|
67
|
+
DepositRefundPolicy[DepositRefundPolicy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
68
|
+
})(DepositRefundPolicy || (exports.DepositRefundPolicy = DepositRefundPolicy = {}));
|
|
69
|
+
exports.DepositRefundPolicySDKType = DepositRefundPolicy;
|
|
70
|
+
exports.DepositRefundPolicyAmino = DepositRefundPolicy;
|
|
71
|
+
function depositRefundPolicyFromJSON(object) {
|
|
72
|
+
switch (object) {
|
|
73
|
+
case 0:
|
|
74
|
+
case "ALWAYS":
|
|
75
|
+
return DepositRefundPolicy.ALWAYS;
|
|
76
|
+
case 1:
|
|
77
|
+
case "ONLY_PASSED":
|
|
78
|
+
return DepositRefundPolicy.ONLY_PASSED;
|
|
79
|
+
case 2:
|
|
80
|
+
case "NEVER":
|
|
81
|
+
return DepositRefundPolicy.NEVER;
|
|
82
|
+
case -1:
|
|
83
|
+
case "UNRECOGNIZED":
|
|
84
|
+
default:
|
|
85
|
+
return DepositRefundPolicy.UNRECOGNIZED;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function depositRefundPolicyToJSON(object) {
|
|
89
|
+
switch (object) {
|
|
90
|
+
case DepositRefundPolicy.ALWAYS:
|
|
91
|
+
return "ALWAYS";
|
|
92
|
+
case DepositRefundPolicy.ONLY_PASSED:
|
|
93
|
+
return "ONLY_PASSED";
|
|
94
|
+
case DepositRefundPolicy.NEVER:
|
|
95
|
+
return "NEVER";
|
|
96
|
+
case DepositRefundPolicy.UNRECOGNIZED:
|
|
97
|
+
default:
|
|
98
|
+
return "UNRECOGNIZED";
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** FundsDestination is where kept proposal funds (cost, kept deposits) go. */
|
|
102
|
+
var FundsDestination;
|
|
103
|
+
(function (FundsDestination) {
|
|
104
|
+
/** BURN - BURN sends the funds to the burner. */
|
|
105
|
+
FundsDestination[FundsDestination["BURN"] = 0] = "BURN";
|
|
106
|
+
/** TREASURY - TREASURY sends the funds to the DAO's own account. */
|
|
107
|
+
FundsDestination[FundsDestination["TREASURY"] = 1] = "TREASURY";
|
|
108
|
+
FundsDestination[FundsDestination["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
109
|
+
})(FundsDestination || (exports.FundsDestination = FundsDestination = {}));
|
|
110
|
+
exports.FundsDestinationSDKType = FundsDestination;
|
|
111
|
+
exports.FundsDestinationAmino = FundsDestination;
|
|
112
|
+
function fundsDestinationFromJSON(object) {
|
|
113
|
+
switch (object) {
|
|
114
|
+
case 0:
|
|
115
|
+
case "BURN":
|
|
116
|
+
return FundsDestination.BURN;
|
|
117
|
+
case 1:
|
|
118
|
+
case "TREASURY":
|
|
119
|
+
return FundsDestination.TREASURY;
|
|
120
|
+
case -1:
|
|
121
|
+
case "UNRECOGNIZED":
|
|
122
|
+
default:
|
|
123
|
+
return FundsDestination.UNRECOGNIZED;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function fundsDestinationToJSON(object) {
|
|
127
|
+
switch (object) {
|
|
128
|
+
case FundsDestination.BURN:
|
|
129
|
+
return "BURN";
|
|
130
|
+
case FundsDestination.TREASURY:
|
|
131
|
+
return "TREASURY";
|
|
132
|
+
case FundsDestination.UNRECOGNIZED:
|
|
133
|
+
default:
|
|
134
|
+
return "UNRECOGNIZED";
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* VoteOption is a voter's choice on a proposal. The zero value is
|
|
139
|
+
* UNSPECIFIED, what an omitted option decodes to, so it can never be counted
|
|
140
|
+
* as a vote.
|
|
141
|
+
*/
|
|
142
|
+
var VoteOption;
|
|
143
|
+
(function (VoteOption) {
|
|
144
|
+
VoteOption[VoteOption["VOTE_OPTION_UNSPECIFIED"] = 0] = "VOTE_OPTION_UNSPECIFIED";
|
|
145
|
+
VoteOption[VoteOption["YES"] = 1] = "YES";
|
|
146
|
+
VoteOption[VoteOption["NO"] = 2] = "NO";
|
|
147
|
+
VoteOption[VoteOption["ABSTAIN"] = 3] = "ABSTAIN";
|
|
148
|
+
VoteOption[VoteOption["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
149
|
+
})(VoteOption || (exports.VoteOption = VoteOption = {}));
|
|
150
|
+
exports.VoteOptionSDKType = VoteOption;
|
|
151
|
+
exports.VoteOptionAmino = VoteOption;
|
|
152
|
+
function voteOptionFromJSON(object) {
|
|
153
|
+
switch (object) {
|
|
154
|
+
case 0:
|
|
155
|
+
case "VOTE_OPTION_UNSPECIFIED":
|
|
156
|
+
return VoteOption.VOTE_OPTION_UNSPECIFIED;
|
|
157
|
+
case 1:
|
|
158
|
+
case "YES":
|
|
159
|
+
return VoteOption.YES;
|
|
160
|
+
case 2:
|
|
161
|
+
case "NO":
|
|
162
|
+
return VoteOption.NO;
|
|
163
|
+
case 3:
|
|
164
|
+
case "ABSTAIN":
|
|
165
|
+
return VoteOption.ABSTAIN;
|
|
166
|
+
case -1:
|
|
167
|
+
case "UNRECOGNIZED":
|
|
168
|
+
default:
|
|
169
|
+
return VoteOption.UNRECOGNIZED;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function voteOptionToJSON(object) {
|
|
173
|
+
switch (object) {
|
|
174
|
+
case VoteOption.VOTE_OPTION_UNSPECIFIED:
|
|
175
|
+
return "VOTE_OPTION_UNSPECIFIED";
|
|
176
|
+
case VoteOption.YES:
|
|
177
|
+
return "YES";
|
|
178
|
+
case VoteOption.NO:
|
|
179
|
+
return "NO";
|
|
180
|
+
case VoteOption.ABSTAIN:
|
|
181
|
+
return "ABSTAIN";
|
|
182
|
+
case VoteOption.UNRECOGNIZED:
|
|
183
|
+
default:
|
|
184
|
+
return "UNRECOGNIZED";
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** ProposalStatus is the lifecycle state of a proposal. */
|
|
188
|
+
var ProposalStatus;
|
|
189
|
+
(function (ProposalStatus) {
|
|
190
|
+
/** VOTING - VOTING is open for votes, until voting_end or an early decision. */
|
|
191
|
+
ProposalStatus[ProposalStatus["VOTING"] = 0] = "VOTING";
|
|
192
|
+
/** REJECTED - REJECTED did not pass. */
|
|
193
|
+
ProposalStatus[ProposalStatus["REJECTED"] = 1] = "REJECTED";
|
|
194
|
+
/** EXECUTED - EXECUTED passed and its messages ran. */
|
|
195
|
+
ProposalStatus[ProposalStatus["EXECUTED"] = 2] = "EXECUTED";
|
|
196
|
+
/** EXECUTION_FAILED - EXECUTION_FAILED passed but its messages failed; it can be retried. */
|
|
197
|
+
ProposalStatus[ProposalStatus["EXECUTION_FAILED"] = 3] = "EXECUTION_FAILED";
|
|
198
|
+
/** EXPIRED - EXPIRED passed but was not executed within the execution window. */
|
|
199
|
+
ProposalStatus[ProposalStatus["EXPIRED"] = 4] = "EXPIRED";
|
|
200
|
+
/** CANCELLED - CANCELLED was withdrawn by its proposer. */
|
|
201
|
+
ProposalStatus[ProposalStatus["CANCELLED"] = 5] = "CANCELLED";
|
|
202
|
+
ProposalStatus[ProposalStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
203
|
+
})(ProposalStatus || (exports.ProposalStatus = ProposalStatus = {}));
|
|
204
|
+
exports.ProposalStatusSDKType = ProposalStatus;
|
|
205
|
+
exports.ProposalStatusAmino = ProposalStatus;
|
|
206
|
+
function proposalStatusFromJSON(object) {
|
|
207
|
+
switch (object) {
|
|
208
|
+
case 0:
|
|
209
|
+
case "VOTING":
|
|
210
|
+
return ProposalStatus.VOTING;
|
|
211
|
+
case 1:
|
|
212
|
+
case "REJECTED":
|
|
213
|
+
return ProposalStatus.REJECTED;
|
|
214
|
+
case 2:
|
|
215
|
+
case "EXECUTED":
|
|
216
|
+
return ProposalStatus.EXECUTED;
|
|
217
|
+
case 3:
|
|
218
|
+
case "EXECUTION_FAILED":
|
|
219
|
+
return ProposalStatus.EXECUTION_FAILED;
|
|
220
|
+
case 4:
|
|
221
|
+
case "EXPIRED":
|
|
222
|
+
return ProposalStatus.EXPIRED;
|
|
223
|
+
case 5:
|
|
224
|
+
case "CANCELLED":
|
|
225
|
+
return ProposalStatus.CANCELLED;
|
|
226
|
+
case -1:
|
|
227
|
+
case "UNRECOGNIZED":
|
|
228
|
+
default:
|
|
229
|
+
return ProposalStatus.UNRECOGNIZED;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function proposalStatusToJSON(object) {
|
|
233
|
+
switch (object) {
|
|
234
|
+
case ProposalStatus.VOTING:
|
|
235
|
+
return "VOTING";
|
|
236
|
+
case ProposalStatus.REJECTED:
|
|
237
|
+
return "REJECTED";
|
|
238
|
+
case ProposalStatus.EXECUTED:
|
|
239
|
+
return "EXECUTED";
|
|
240
|
+
case ProposalStatus.EXECUTION_FAILED:
|
|
241
|
+
return "EXECUTION_FAILED";
|
|
242
|
+
case ProposalStatus.EXPIRED:
|
|
243
|
+
return "EXPIRED";
|
|
244
|
+
case ProposalStatus.CANCELLED:
|
|
245
|
+
return "CANCELLED";
|
|
246
|
+
case ProposalStatus.UNRECOGNIZED:
|
|
247
|
+
default:
|
|
248
|
+
return "UNRECOGNIZED";
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
function createBaseDaoConfig() {
|
|
252
|
+
return {
|
|
253
|
+
minQuorum: "",
|
|
254
|
+
threshold: "",
|
|
255
|
+
votingPeriod: duration_1.Duration.fromPartial({}),
|
|
256
|
+
allowExpedite: false,
|
|
257
|
+
expeditedPeriod: duration_1.Duration.fromPartial({}),
|
|
258
|
+
expediteQuorum: "",
|
|
259
|
+
expediteThreshold: "",
|
|
260
|
+
openSubmission: false,
|
|
261
|
+
proposalCost: undefined,
|
|
262
|
+
proposalDeposit: undefined,
|
|
263
|
+
depositRefundPolicy: 0,
|
|
264
|
+
costDestination: 0,
|
|
265
|
+
keptDepositDestination: 0
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* DaoConfig holds the voting rules of a DAO.
|
|
270
|
+
* @name DaoConfig
|
|
271
|
+
* @package bze.dao
|
|
272
|
+
* @see proto type: bze.dao.DaoConfig
|
|
273
|
+
*/
|
|
274
|
+
exports.DaoConfig = {
|
|
275
|
+
typeUrl: "/bze.dao.DaoConfig",
|
|
276
|
+
is(o) {
|
|
277
|
+
return o && (o.$typeUrl === exports.DaoConfig.typeUrl || typeof o.minQuorum === "string" && typeof o.threshold === "string" && duration_1.Duration.is(o.votingPeriod) && typeof o.allowExpedite === "boolean" && duration_1.Duration.is(o.expeditedPeriod) && typeof o.expediteQuorum === "string" && typeof o.expediteThreshold === "string" && typeof o.openSubmission === "boolean" && (0, helpers_1.isSet)(o.depositRefundPolicy) && (0, helpers_1.isSet)(o.costDestination) && (0, helpers_1.isSet)(o.keptDepositDestination));
|
|
278
|
+
},
|
|
279
|
+
isSDK(o) {
|
|
280
|
+
return o && (o.$typeUrl === exports.DaoConfig.typeUrl || typeof o.min_quorum === "string" && typeof o.threshold === "string" && duration_1.Duration.isSDK(o.voting_period) && typeof o.allow_expedite === "boolean" && duration_1.Duration.isSDK(o.expedited_period) && typeof o.expedite_quorum === "string" && typeof o.expedite_threshold === "string" && typeof o.open_submission === "boolean" && (0, helpers_1.isSet)(o.deposit_refund_policy) && (0, helpers_1.isSet)(o.cost_destination) && (0, helpers_1.isSet)(o.kept_deposit_destination));
|
|
281
|
+
},
|
|
282
|
+
isAmino(o) {
|
|
283
|
+
return o && (o.$typeUrl === exports.DaoConfig.typeUrl || typeof o.min_quorum === "string" && typeof o.threshold === "string" && duration_1.Duration.isAmino(o.voting_period) && typeof o.allow_expedite === "boolean" && duration_1.Duration.isAmino(o.expedited_period) && typeof o.expedite_quorum === "string" && typeof o.expedite_threshold === "string" && typeof o.open_submission === "boolean" && (0, helpers_1.isSet)(o.deposit_refund_policy) && (0, helpers_1.isSet)(o.cost_destination) && (0, helpers_1.isSet)(o.kept_deposit_destination));
|
|
284
|
+
},
|
|
285
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
286
|
+
if (message.minQuorum !== "") {
|
|
287
|
+
writer.uint32(10).string(math_1.Decimal.fromUserInput(message.minQuorum, 18).atomics);
|
|
288
|
+
}
|
|
289
|
+
if (message.threshold !== "") {
|
|
290
|
+
writer.uint32(18).string(math_1.Decimal.fromUserInput(message.threshold, 18).atomics);
|
|
291
|
+
}
|
|
292
|
+
if (message.votingPeriod !== undefined) {
|
|
293
|
+
duration_1.Duration.encode(message.votingPeriod, writer.uint32(26).fork()).ldelim();
|
|
294
|
+
}
|
|
295
|
+
if (message.allowExpedite === true) {
|
|
296
|
+
writer.uint32(32).bool(message.allowExpedite);
|
|
297
|
+
}
|
|
298
|
+
if (message.expeditedPeriod !== undefined) {
|
|
299
|
+
duration_1.Duration.encode(message.expeditedPeriod, writer.uint32(42).fork()).ldelim();
|
|
300
|
+
}
|
|
301
|
+
if (message.expediteQuorum !== "") {
|
|
302
|
+
writer.uint32(50).string(math_1.Decimal.fromUserInput(message.expediteQuorum, 18).atomics);
|
|
303
|
+
}
|
|
304
|
+
if (message.expediteThreshold !== "") {
|
|
305
|
+
writer.uint32(58).string(math_1.Decimal.fromUserInput(message.expediteThreshold, 18).atomics);
|
|
306
|
+
}
|
|
307
|
+
if (message.openSubmission === true) {
|
|
308
|
+
writer.uint32(64).bool(message.openSubmission);
|
|
309
|
+
}
|
|
310
|
+
if (message.proposalCost !== undefined) {
|
|
311
|
+
coin_1.Coin.encode(message.proposalCost, writer.uint32(74).fork()).ldelim();
|
|
312
|
+
}
|
|
313
|
+
if (message.proposalDeposit !== undefined) {
|
|
314
|
+
coin_1.Coin.encode(message.proposalDeposit, writer.uint32(82).fork()).ldelim();
|
|
315
|
+
}
|
|
316
|
+
if (message.depositRefundPolicy !== 0) {
|
|
317
|
+
writer.uint32(88).int32(message.depositRefundPolicy);
|
|
318
|
+
}
|
|
319
|
+
if (message.costDestination !== 0) {
|
|
320
|
+
writer.uint32(96).int32(message.costDestination);
|
|
321
|
+
}
|
|
322
|
+
if (message.keptDepositDestination !== 0) {
|
|
323
|
+
writer.uint32(104).int32(message.keptDepositDestination);
|
|
324
|
+
}
|
|
325
|
+
return writer;
|
|
326
|
+
},
|
|
327
|
+
decode(input, length) {
|
|
328
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
329
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
330
|
+
const message = createBaseDaoConfig();
|
|
331
|
+
while (reader.pos < end) {
|
|
332
|
+
const tag = reader.uint32();
|
|
333
|
+
switch (tag >>> 3) {
|
|
334
|
+
case 1:
|
|
335
|
+
message.minQuorum = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
336
|
+
break;
|
|
337
|
+
case 2:
|
|
338
|
+
message.threshold = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
339
|
+
break;
|
|
340
|
+
case 3:
|
|
341
|
+
message.votingPeriod = duration_1.Duration.decode(reader, reader.uint32());
|
|
342
|
+
break;
|
|
343
|
+
case 4:
|
|
344
|
+
message.allowExpedite = reader.bool();
|
|
345
|
+
break;
|
|
346
|
+
case 5:
|
|
347
|
+
message.expeditedPeriod = duration_1.Duration.decode(reader, reader.uint32());
|
|
348
|
+
break;
|
|
349
|
+
case 6:
|
|
350
|
+
message.expediteQuorum = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
351
|
+
break;
|
|
352
|
+
case 7:
|
|
353
|
+
message.expediteThreshold = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
354
|
+
break;
|
|
355
|
+
case 8:
|
|
356
|
+
message.openSubmission = reader.bool();
|
|
357
|
+
break;
|
|
358
|
+
case 9:
|
|
359
|
+
message.proposalCost = coin_1.Coin.decode(reader, reader.uint32());
|
|
360
|
+
break;
|
|
361
|
+
case 10:
|
|
362
|
+
message.proposalDeposit = coin_1.Coin.decode(reader, reader.uint32());
|
|
363
|
+
break;
|
|
364
|
+
case 11:
|
|
365
|
+
message.depositRefundPolicy = reader.int32();
|
|
366
|
+
break;
|
|
367
|
+
case 12:
|
|
368
|
+
message.costDestination = reader.int32();
|
|
369
|
+
break;
|
|
370
|
+
case 13:
|
|
371
|
+
message.keptDepositDestination = reader.int32();
|
|
372
|
+
break;
|
|
373
|
+
default:
|
|
374
|
+
reader.skipType(tag & 7);
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return message;
|
|
379
|
+
},
|
|
380
|
+
fromPartial(object) {
|
|
381
|
+
const message = createBaseDaoConfig();
|
|
382
|
+
message.minQuorum = object.minQuorum ?? "";
|
|
383
|
+
message.threshold = object.threshold ?? "";
|
|
384
|
+
message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null ? duration_1.Duration.fromPartial(object.votingPeriod) : undefined;
|
|
385
|
+
message.allowExpedite = object.allowExpedite ?? false;
|
|
386
|
+
message.expeditedPeriod = object.expeditedPeriod !== undefined && object.expeditedPeriod !== null ? duration_1.Duration.fromPartial(object.expeditedPeriod) : undefined;
|
|
387
|
+
message.expediteQuorum = object.expediteQuorum ?? "";
|
|
388
|
+
message.expediteThreshold = object.expediteThreshold ?? "";
|
|
389
|
+
message.openSubmission = object.openSubmission ?? false;
|
|
390
|
+
message.proposalCost = object.proposalCost !== undefined && object.proposalCost !== null ? coin_1.Coin.fromPartial(object.proposalCost) : undefined;
|
|
391
|
+
message.proposalDeposit = object.proposalDeposit !== undefined && object.proposalDeposit !== null ? coin_1.Coin.fromPartial(object.proposalDeposit) : undefined;
|
|
392
|
+
message.depositRefundPolicy = object.depositRefundPolicy ?? 0;
|
|
393
|
+
message.costDestination = object.costDestination ?? 0;
|
|
394
|
+
message.keptDepositDestination = object.keptDepositDestination ?? 0;
|
|
395
|
+
return message;
|
|
396
|
+
},
|
|
397
|
+
fromAmino(object) {
|
|
398
|
+
const message = createBaseDaoConfig();
|
|
399
|
+
if (object.min_quorum !== undefined && object.min_quorum !== null) {
|
|
400
|
+
message.minQuorum = object.min_quorum;
|
|
401
|
+
}
|
|
402
|
+
if (object.threshold !== undefined && object.threshold !== null) {
|
|
403
|
+
message.threshold = object.threshold;
|
|
404
|
+
}
|
|
405
|
+
if (object.voting_period !== undefined && object.voting_period !== null) {
|
|
406
|
+
message.votingPeriod = duration_1.Duration.fromAmino(object.voting_period);
|
|
407
|
+
}
|
|
408
|
+
if (object.allow_expedite !== undefined && object.allow_expedite !== null) {
|
|
409
|
+
message.allowExpedite = object.allow_expedite;
|
|
410
|
+
}
|
|
411
|
+
if (object.expedited_period !== undefined && object.expedited_period !== null) {
|
|
412
|
+
message.expeditedPeriod = duration_1.Duration.fromAmino(object.expedited_period);
|
|
413
|
+
}
|
|
414
|
+
if (object.expedite_quorum !== undefined && object.expedite_quorum !== null) {
|
|
415
|
+
message.expediteQuorum = object.expedite_quorum;
|
|
416
|
+
}
|
|
417
|
+
if (object.expedite_threshold !== undefined && object.expedite_threshold !== null) {
|
|
418
|
+
message.expediteThreshold = object.expedite_threshold;
|
|
419
|
+
}
|
|
420
|
+
if (object.open_submission !== undefined && object.open_submission !== null) {
|
|
421
|
+
message.openSubmission = object.open_submission;
|
|
422
|
+
}
|
|
423
|
+
if (object.proposal_cost !== undefined && object.proposal_cost !== null) {
|
|
424
|
+
message.proposalCost = coin_1.Coin.fromAmino(object.proposal_cost);
|
|
425
|
+
}
|
|
426
|
+
if (object.proposal_deposit !== undefined && object.proposal_deposit !== null) {
|
|
427
|
+
message.proposalDeposit = coin_1.Coin.fromAmino(object.proposal_deposit);
|
|
428
|
+
}
|
|
429
|
+
if (object.deposit_refund_policy !== undefined && object.deposit_refund_policy !== null) {
|
|
430
|
+
message.depositRefundPolicy = object.deposit_refund_policy;
|
|
431
|
+
}
|
|
432
|
+
if (object.cost_destination !== undefined && object.cost_destination !== null) {
|
|
433
|
+
message.costDestination = object.cost_destination;
|
|
434
|
+
}
|
|
435
|
+
if (object.kept_deposit_destination !== undefined && object.kept_deposit_destination !== null) {
|
|
436
|
+
message.keptDepositDestination = object.kept_deposit_destination;
|
|
437
|
+
}
|
|
438
|
+
return message;
|
|
439
|
+
},
|
|
440
|
+
toAmino(message) {
|
|
441
|
+
const obj = {};
|
|
442
|
+
obj.min_quorum = message.minQuorum === "" ? undefined : math_1.Decimal.fromUserInput(message.minQuorum, 18).atomics;
|
|
443
|
+
obj.threshold = message.threshold === "" ? undefined : math_1.Decimal.fromUserInput(message.threshold, 18).atomics;
|
|
444
|
+
obj.voting_period = message.votingPeriod ? duration_1.Duration.toAmino(message.votingPeriod) : undefined;
|
|
445
|
+
obj.allow_expedite = message.allowExpedite === false ? undefined : message.allowExpedite;
|
|
446
|
+
obj.expedited_period = message.expeditedPeriod ? duration_1.Duration.toAmino(message.expeditedPeriod) : undefined;
|
|
447
|
+
obj.expedite_quorum = message.expediteQuorum === "" ? undefined : math_1.Decimal.fromUserInput(message.expediteQuorum, 18).atomics;
|
|
448
|
+
obj.expedite_threshold = message.expediteThreshold === "" ? undefined : math_1.Decimal.fromUserInput(message.expediteThreshold, 18).atomics;
|
|
449
|
+
obj.open_submission = message.openSubmission === false ? undefined : message.openSubmission;
|
|
450
|
+
obj.proposal_cost = message.proposalCost ? coin_1.Coin.toAmino(message.proposalCost) : undefined;
|
|
451
|
+
obj.proposal_deposit = message.proposalDeposit ? coin_1.Coin.toAmino(message.proposalDeposit) : undefined;
|
|
452
|
+
obj.deposit_refund_policy = message.depositRefundPolicy === 0 ? undefined : message.depositRefundPolicy;
|
|
453
|
+
obj.cost_destination = message.costDestination === 0 ? undefined : message.costDestination;
|
|
454
|
+
obj.kept_deposit_destination = message.keptDepositDestination === 0 ? undefined : message.keptDepositDestination;
|
|
455
|
+
return obj;
|
|
456
|
+
},
|
|
457
|
+
fromAminoMsg(object) {
|
|
458
|
+
return exports.DaoConfig.fromAmino(object.value);
|
|
459
|
+
},
|
|
460
|
+
fromProtoMsg(message) {
|
|
461
|
+
return exports.DaoConfig.decode(message.value);
|
|
462
|
+
},
|
|
463
|
+
toProto(message) {
|
|
464
|
+
return exports.DaoConfig.encode(message).finish();
|
|
465
|
+
},
|
|
466
|
+
toProtoMsg(message) {
|
|
467
|
+
return {
|
|
468
|
+
typeUrl: "/bze.dao.DaoConfig",
|
|
469
|
+
value: exports.DaoConfig.encode(message).finish()
|
|
470
|
+
};
|
|
471
|
+
},
|
|
472
|
+
registerTypeUrl() {
|
|
473
|
+
if (!registry_1.GlobalDecoderRegistry.registerExistingTypeUrl(exports.DaoConfig.typeUrl)) {
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
coin_1.Coin.registerTypeUrl();
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
function createBaseStakeElectorate() {
|
|
480
|
+
return {
|
|
481
|
+
srIds: [],
|
|
482
|
+
drDenom: ""
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* StakeElectorate lists the reward programs whose stakers vote in a stake DAO.
|
|
487
|
+
* @name StakeElectorate
|
|
488
|
+
* @package bze.dao
|
|
489
|
+
* @see proto type: bze.dao.StakeElectorate
|
|
490
|
+
*/
|
|
491
|
+
exports.StakeElectorate = {
|
|
492
|
+
typeUrl: "/bze.dao.StakeElectorate",
|
|
493
|
+
is(o) {
|
|
494
|
+
return o && (o.$typeUrl === exports.StakeElectorate.typeUrl || Array.isArray(o.srIds) && (!o.srIds.length || typeof o.srIds[0] === "string") && typeof o.drDenom === "string");
|
|
495
|
+
},
|
|
496
|
+
isSDK(o) {
|
|
497
|
+
return o && (o.$typeUrl === exports.StakeElectorate.typeUrl || Array.isArray(o.sr_ids) && (!o.sr_ids.length || typeof o.sr_ids[0] === "string") && typeof o.dr_denom === "string");
|
|
498
|
+
},
|
|
499
|
+
isAmino(o) {
|
|
500
|
+
return o && (o.$typeUrl === exports.StakeElectorate.typeUrl || Array.isArray(o.sr_ids) && (!o.sr_ids.length || typeof o.sr_ids[0] === "string") && typeof o.dr_denom === "string");
|
|
501
|
+
},
|
|
502
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
503
|
+
for (const v of message.srIds) {
|
|
504
|
+
writer.uint32(10).string(v);
|
|
505
|
+
}
|
|
506
|
+
if (message.drDenom !== "") {
|
|
507
|
+
writer.uint32(18).string(message.drDenom);
|
|
508
|
+
}
|
|
509
|
+
return writer;
|
|
510
|
+
},
|
|
511
|
+
decode(input, length) {
|
|
512
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
513
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
514
|
+
const message = createBaseStakeElectorate();
|
|
515
|
+
while (reader.pos < end) {
|
|
516
|
+
const tag = reader.uint32();
|
|
517
|
+
switch (tag >>> 3) {
|
|
518
|
+
case 1:
|
|
519
|
+
message.srIds.push(reader.string());
|
|
520
|
+
break;
|
|
521
|
+
case 2:
|
|
522
|
+
message.drDenom = reader.string();
|
|
523
|
+
break;
|
|
524
|
+
default:
|
|
525
|
+
reader.skipType(tag & 7);
|
|
526
|
+
break;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return message;
|
|
530
|
+
},
|
|
531
|
+
fromPartial(object) {
|
|
532
|
+
const message = createBaseStakeElectorate();
|
|
533
|
+
message.srIds = object.srIds?.map(e => e) || [];
|
|
534
|
+
message.drDenom = object.drDenom ?? "";
|
|
535
|
+
return message;
|
|
536
|
+
},
|
|
537
|
+
fromAmino(object) {
|
|
538
|
+
const message = createBaseStakeElectorate();
|
|
539
|
+
message.srIds = object.sr_ids?.map(e => e) || [];
|
|
540
|
+
if (object.dr_denom !== undefined && object.dr_denom !== null) {
|
|
541
|
+
message.drDenom = object.dr_denom;
|
|
542
|
+
}
|
|
543
|
+
return message;
|
|
544
|
+
},
|
|
545
|
+
toAmino(message) {
|
|
546
|
+
const obj = {};
|
|
547
|
+
if (message.srIds) {
|
|
548
|
+
obj.sr_ids = message.srIds.map(e => e);
|
|
549
|
+
}
|
|
550
|
+
else {
|
|
551
|
+
obj.sr_ids = message.srIds;
|
|
552
|
+
}
|
|
553
|
+
obj.dr_denom = message.drDenom === "" ? undefined : message.drDenom;
|
|
554
|
+
return obj;
|
|
555
|
+
},
|
|
556
|
+
fromAminoMsg(object) {
|
|
557
|
+
return exports.StakeElectorate.fromAmino(object.value);
|
|
558
|
+
},
|
|
559
|
+
fromProtoMsg(message) {
|
|
560
|
+
return exports.StakeElectorate.decode(message.value);
|
|
561
|
+
},
|
|
562
|
+
toProto(message) {
|
|
563
|
+
return exports.StakeElectorate.encode(message).finish();
|
|
564
|
+
},
|
|
565
|
+
toProtoMsg(message) {
|
|
566
|
+
return {
|
|
567
|
+
typeUrl: "/bze.dao.StakeElectorate",
|
|
568
|
+
value: exports.StakeElectorate.encode(message).finish()
|
|
569
|
+
};
|
|
570
|
+
},
|
|
571
|
+
registerTypeUrl() { }
|
|
572
|
+
};
|
|
573
|
+
function createBaseDao() {
|
|
574
|
+
return {
|
|
575
|
+
id: BigInt(0),
|
|
576
|
+
address: "",
|
|
577
|
+
admin: "",
|
|
578
|
+
pendingAdmin: "",
|
|
579
|
+
type: 0,
|
|
580
|
+
name: "",
|
|
581
|
+
description: "",
|
|
582
|
+
config: exports.DaoConfig.fromPartial({}),
|
|
583
|
+
members: [],
|
|
584
|
+
electorate: undefined,
|
|
585
|
+
createdAt: BigInt(0),
|
|
586
|
+
adminSeq: BigInt(0),
|
|
587
|
+
pendingAdminSeq: BigInt(0)
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Dao is a DAO record.
|
|
592
|
+
* @name Dao
|
|
593
|
+
* @package bze.dao
|
|
594
|
+
* @see proto type: bze.dao.Dao
|
|
595
|
+
*/
|
|
596
|
+
exports.Dao = {
|
|
597
|
+
typeUrl: "/bze.dao.Dao",
|
|
598
|
+
is(o) {
|
|
599
|
+
return o && (o.$typeUrl === exports.Dao.typeUrl || typeof o.id === "bigint" && typeof o.address === "string" && typeof o.admin === "string" && typeof o.pendingAdmin === "string" && (0, helpers_1.isSet)(o.type) && typeof o.name === "string" && typeof o.description === "string" && exports.DaoConfig.is(o.config) && Array.isArray(o.members) && (!o.members.length || typeof o.members[0] === "string") && typeof o.createdAt === "bigint" && typeof o.adminSeq === "bigint" && typeof o.pendingAdminSeq === "bigint");
|
|
600
|
+
},
|
|
601
|
+
isSDK(o) {
|
|
602
|
+
return o && (o.$typeUrl === exports.Dao.typeUrl || typeof o.id === "bigint" && typeof o.address === "string" && typeof o.admin === "string" && typeof o.pending_admin === "string" && (0, helpers_1.isSet)(o.type) && typeof o.name === "string" && typeof o.description === "string" && exports.DaoConfig.isSDK(o.config) && Array.isArray(o.members) && (!o.members.length || typeof o.members[0] === "string") && typeof o.created_at === "bigint" && typeof o.admin_seq === "bigint" && typeof o.pending_admin_seq === "bigint");
|
|
603
|
+
},
|
|
604
|
+
isAmino(o) {
|
|
605
|
+
return o && (o.$typeUrl === exports.Dao.typeUrl || typeof o.id === "bigint" && typeof o.address === "string" && typeof o.admin === "string" && typeof o.pending_admin === "string" && (0, helpers_1.isSet)(o.type) && typeof o.name === "string" && typeof o.description === "string" && exports.DaoConfig.isAmino(o.config) && Array.isArray(o.members) && (!o.members.length || typeof o.members[0] === "string") && typeof o.created_at === "bigint" && typeof o.admin_seq === "bigint" && typeof o.pending_admin_seq === "bigint");
|
|
606
|
+
},
|
|
607
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
608
|
+
if (message.id !== BigInt(0)) {
|
|
609
|
+
writer.uint32(8).uint64(message.id);
|
|
610
|
+
}
|
|
611
|
+
if (message.address !== "") {
|
|
612
|
+
writer.uint32(18).string(message.address);
|
|
613
|
+
}
|
|
614
|
+
if (message.admin !== "") {
|
|
615
|
+
writer.uint32(26).string(message.admin);
|
|
616
|
+
}
|
|
617
|
+
if (message.pendingAdmin !== "") {
|
|
618
|
+
writer.uint32(34).string(message.pendingAdmin);
|
|
619
|
+
}
|
|
620
|
+
if (message.type !== 0) {
|
|
621
|
+
writer.uint32(40).int32(message.type);
|
|
622
|
+
}
|
|
623
|
+
if (message.name !== "") {
|
|
624
|
+
writer.uint32(50).string(message.name);
|
|
625
|
+
}
|
|
626
|
+
if (message.description !== "") {
|
|
627
|
+
writer.uint32(58).string(message.description);
|
|
628
|
+
}
|
|
629
|
+
if (message.config !== undefined) {
|
|
630
|
+
exports.DaoConfig.encode(message.config, writer.uint32(66).fork()).ldelim();
|
|
631
|
+
}
|
|
632
|
+
for (const v of message.members) {
|
|
633
|
+
writer.uint32(74).string(v);
|
|
634
|
+
}
|
|
635
|
+
if (message.electorate !== undefined) {
|
|
636
|
+
exports.StakeElectorate.encode(message.electorate, writer.uint32(82).fork()).ldelim();
|
|
637
|
+
}
|
|
638
|
+
if (message.createdAt !== BigInt(0)) {
|
|
639
|
+
writer.uint32(88).int64(message.createdAt);
|
|
640
|
+
}
|
|
641
|
+
if (message.adminSeq !== BigInt(0)) {
|
|
642
|
+
writer.uint32(96).uint64(message.adminSeq);
|
|
643
|
+
}
|
|
644
|
+
if (message.pendingAdminSeq !== BigInt(0)) {
|
|
645
|
+
writer.uint32(104).uint64(message.pendingAdminSeq);
|
|
646
|
+
}
|
|
647
|
+
return writer;
|
|
648
|
+
},
|
|
649
|
+
decode(input, length) {
|
|
650
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
651
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
652
|
+
const message = createBaseDao();
|
|
653
|
+
while (reader.pos < end) {
|
|
654
|
+
const tag = reader.uint32();
|
|
655
|
+
switch (tag >>> 3) {
|
|
656
|
+
case 1:
|
|
657
|
+
message.id = reader.uint64();
|
|
658
|
+
break;
|
|
659
|
+
case 2:
|
|
660
|
+
message.address = reader.string();
|
|
661
|
+
break;
|
|
662
|
+
case 3:
|
|
663
|
+
message.admin = reader.string();
|
|
664
|
+
break;
|
|
665
|
+
case 4:
|
|
666
|
+
message.pendingAdmin = reader.string();
|
|
667
|
+
break;
|
|
668
|
+
case 5:
|
|
669
|
+
message.type = reader.int32();
|
|
670
|
+
break;
|
|
671
|
+
case 6:
|
|
672
|
+
message.name = reader.string();
|
|
673
|
+
break;
|
|
674
|
+
case 7:
|
|
675
|
+
message.description = reader.string();
|
|
676
|
+
break;
|
|
677
|
+
case 8:
|
|
678
|
+
message.config = exports.DaoConfig.decode(reader, reader.uint32());
|
|
679
|
+
break;
|
|
680
|
+
case 9:
|
|
681
|
+
message.members.push(reader.string());
|
|
682
|
+
break;
|
|
683
|
+
case 10:
|
|
684
|
+
message.electorate = exports.StakeElectorate.decode(reader, reader.uint32());
|
|
685
|
+
break;
|
|
686
|
+
case 11:
|
|
687
|
+
message.createdAt = reader.int64();
|
|
688
|
+
break;
|
|
689
|
+
case 12:
|
|
690
|
+
message.adminSeq = reader.uint64();
|
|
691
|
+
break;
|
|
692
|
+
case 13:
|
|
693
|
+
message.pendingAdminSeq = reader.uint64();
|
|
694
|
+
break;
|
|
695
|
+
default:
|
|
696
|
+
reader.skipType(tag & 7);
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return message;
|
|
701
|
+
},
|
|
702
|
+
fromPartial(object) {
|
|
703
|
+
const message = createBaseDao();
|
|
704
|
+
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
705
|
+
message.address = object.address ?? "";
|
|
706
|
+
message.admin = object.admin ?? "";
|
|
707
|
+
message.pendingAdmin = object.pendingAdmin ?? "";
|
|
708
|
+
message.type = object.type ?? 0;
|
|
709
|
+
message.name = object.name ?? "";
|
|
710
|
+
message.description = object.description ?? "";
|
|
711
|
+
message.config = object.config !== undefined && object.config !== null ? exports.DaoConfig.fromPartial(object.config) : undefined;
|
|
712
|
+
message.members = object.members?.map(e => e) || [];
|
|
713
|
+
message.electorate = object.electorate !== undefined && object.electorate !== null ? exports.StakeElectorate.fromPartial(object.electorate) : undefined;
|
|
714
|
+
message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? BigInt(object.createdAt.toString()) : BigInt(0);
|
|
715
|
+
message.adminSeq = object.adminSeq !== undefined && object.adminSeq !== null ? BigInt(object.adminSeq.toString()) : BigInt(0);
|
|
716
|
+
message.pendingAdminSeq = object.pendingAdminSeq !== undefined && object.pendingAdminSeq !== null ? BigInt(object.pendingAdminSeq.toString()) : BigInt(0);
|
|
717
|
+
return message;
|
|
718
|
+
},
|
|
719
|
+
fromAmino(object) {
|
|
720
|
+
const message = createBaseDao();
|
|
721
|
+
if (object.id !== undefined && object.id !== null) {
|
|
722
|
+
message.id = BigInt(object.id);
|
|
723
|
+
}
|
|
724
|
+
if (object.address !== undefined && object.address !== null) {
|
|
725
|
+
message.address = object.address;
|
|
726
|
+
}
|
|
727
|
+
if (object.admin !== undefined && object.admin !== null) {
|
|
728
|
+
message.admin = object.admin;
|
|
729
|
+
}
|
|
730
|
+
if (object.pending_admin !== undefined && object.pending_admin !== null) {
|
|
731
|
+
message.pendingAdmin = object.pending_admin;
|
|
732
|
+
}
|
|
733
|
+
if (object.type !== undefined && object.type !== null) {
|
|
734
|
+
message.type = object.type;
|
|
735
|
+
}
|
|
736
|
+
if (object.name !== undefined && object.name !== null) {
|
|
737
|
+
message.name = object.name;
|
|
738
|
+
}
|
|
739
|
+
if (object.description !== undefined && object.description !== null) {
|
|
740
|
+
message.description = object.description;
|
|
741
|
+
}
|
|
742
|
+
if (object.config !== undefined && object.config !== null) {
|
|
743
|
+
message.config = exports.DaoConfig.fromAmino(object.config);
|
|
744
|
+
}
|
|
745
|
+
message.members = object.members?.map(e => e) || [];
|
|
746
|
+
if (object.electorate !== undefined && object.electorate !== null) {
|
|
747
|
+
message.electorate = exports.StakeElectorate.fromAmino(object.electorate);
|
|
748
|
+
}
|
|
749
|
+
if (object.created_at !== undefined && object.created_at !== null) {
|
|
750
|
+
message.createdAt = BigInt(object.created_at);
|
|
751
|
+
}
|
|
752
|
+
if (object.admin_seq !== undefined && object.admin_seq !== null) {
|
|
753
|
+
message.adminSeq = BigInt(object.admin_seq);
|
|
754
|
+
}
|
|
755
|
+
if (object.pending_admin_seq !== undefined && object.pending_admin_seq !== null) {
|
|
756
|
+
message.pendingAdminSeq = BigInt(object.pending_admin_seq);
|
|
757
|
+
}
|
|
758
|
+
return message;
|
|
759
|
+
},
|
|
760
|
+
toAmino(message) {
|
|
761
|
+
const obj = {};
|
|
762
|
+
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
763
|
+
obj.address = message.address === "" ? undefined : message.address;
|
|
764
|
+
obj.admin = message.admin === "" ? undefined : message.admin;
|
|
765
|
+
obj.pending_admin = message.pendingAdmin === "" ? undefined : message.pendingAdmin;
|
|
766
|
+
obj.type = message.type === 0 ? undefined : message.type;
|
|
767
|
+
obj.name = message.name === "" ? undefined : message.name;
|
|
768
|
+
obj.description = message.description === "" ? undefined : message.description;
|
|
769
|
+
obj.config = message.config ? exports.DaoConfig.toAmino(message.config) : undefined;
|
|
770
|
+
if (message.members) {
|
|
771
|
+
obj.members = message.members.map(e => e);
|
|
772
|
+
}
|
|
773
|
+
else {
|
|
774
|
+
obj.members = message.members;
|
|
775
|
+
}
|
|
776
|
+
obj.electorate = message.electorate ? exports.StakeElectorate.toAmino(message.electorate) : undefined;
|
|
777
|
+
obj.created_at = message.createdAt !== BigInt(0) ? message.createdAt?.toString() : undefined;
|
|
778
|
+
obj.admin_seq = message.adminSeq !== BigInt(0) ? message.adminSeq?.toString() : undefined;
|
|
779
|
+
obj.pending_admin_seq = message.pendingAdminSeq !== BigInt(0) ? message.pendingAdminSeq?.toString() : undefined;
|
|
780
|
+
return obj;
|
|
781
|
+
},
|
|
782
|
+
fromAminoMsg(object) {
|
|
783
|
+
return exports.Dao.fromAmino(object.value);
|
|
784
|
+
},
|
|
785
|
+
fromProtoMsg(message) {
|
|
786
|
+
return exports.Dao.decode(message.value);
|
|
787
|
+
},
|
|
788
|
+
toProto(message) {
|
|
789
|
+
return exports.Dao.encode(message).finish();
|
|
790
|
+
},
|
|
791
|
+
toProtoMsg(message) {
|
|
792
|
+
return {
|
|
793
|
+
typeUrl: "/bze.dao.Dao",
|
|
794
|
+
value: exports.Dao.encode(message).finish()
|
|
795
|
+
};
|
|
796
|
+
},
|
|
797
|
+
registerTypeUrl() {
|
|
798
|
+
if (!registry_1.GlobalDecoderRegistry.registerExistingTypeUrl(exports.Dao.typeUrl)) {
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
exports.DaoConfig.registerTypeUrl();
|
|
802
|
+
exports.StakeElectorate.registerTypeUrl();
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
function createBaseProposal() {
|
|
806
|
+
return {
|
|
807
|
+
id: BigInt(0),
|
|
808
|
+
daoId: BigInt(0),
|
|
809
|
+
proposer: "",
|
|
810
|
+
title: "",
|
|
811
|
+
summary: "",
|
|
812
|
+
msgs: [],
|
|
813
|
+
expedited: false,
|
|
814
|
+
status: 0,
|
|
815
|
+
submitHeight: BigInt(0),
|
|
816
|
+
submitTime: BigInt(0),
|
|
817
|
+
votingEnd: BigInt(0),
|
|
818
|
+
pinnedConfig: exports.DaoConfig.fromPartial({}),
|
|
819
|
+
pinnedElectorate: undefined,
|
|
820
|
+
pinnedDenominator: "",
|
|
821
|
+
pinnedDeposit: undefined,
|
|
822
|
+
yes: "",
|
|
823
|
+
no: "",
|
|
824
|
+
abstain: "",
|
|
825
|
+
cleanupCursor: ""
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Proposal is a DAO proposal. It pins the DAO's config, electorate and quorum
|
|
830
|
+
* denominator at submission, so later DAO changes never move an open vote.
|
|
831
|
+
* @name Proposal
|
|
832
|
+
* @package bze.dao
|
|
833
|
+
* @see proto type: bze.dao.Proposal
|
|
834
|
+
*/
|
|
835
|
+
exports.Proposal = {
|
|
836
|
+
typeUrl: "/bze.dao.Proposal",
|
|
837
|
+
is(o) {
|
|
838
|
+
return o && (o.$typeUrl === exports.Proposal.typeUrl || typeof o.id === "bigint" && typeof o.daoId === "bigint" && typeof o.proposer === "string" && typeof o.title === "string" && typeof o.summary === "string" && Array.isArray(o.msgs) && (!o.msgs.length || any_1.Any.is(o.msgs[0])) && typeof o.expedited === "boolean" && (0, helpers_1.isSet)(o.status) && typeof o.submitHeight === "bigint" && typeof o.submitTime === "bigint" && typeof o.votingEnd === "bigint" && exports.DaoConfig.is(o.pinnedConfig) && typeof o.pinnedDenominator === "string" && typeof o.yes === "string" && typeof o.no === "string" && typeof o.abstain === "string" && typeof o.cleanupCursor === "string");
|
|
839
|
+
},
|
|
840
|
+
isSDK(o) {
|
|
841
|
+
return o && (o.$typeUrl === exports.Proposal.typeUrl || typeof o.id === "bigint" && typeof o.dao_id === "bigint" && typeof o.proposer === "string" && typeof o.title === "string" && typeof o.summary === "string" && Array.isArray(o.msgs) && (!o.msgs.length || any_1.Any.isSDK(o.msgs[0])) && typeof o.expedited === "boolean" && (0, helpers_1.isSet)(o.status) && typeof o.submit_height === "bigint" && typeof o.submit_time === "bigint" && typeof o.voting_end === "bigint" && exports.DaoConfig.isSDK(o.pinned_config) && typeof o.pinned_denominator === "string" && typeof o.yes === "string" && typeof o.no === "string" && typeof o.abstain === "string" && typeof o.cleanup_cursor === "string");
|
|
842
|
+
},
|
|
843
|
+
isAmino(o) {
|
|
844
|
+
return o && (o.$typeUrl === exports.Proposal.typeUrl || typeof o.id === "bigint" && typeof o.dao_id === "bigint" && typeof o.proposer === "string" && typeof o.title === "string" && typeof o.summary === "string" && Array.isArray(o.msgs) && (!o.msgs.length || any_1.Any.isAmino(o.msgs[0])) && typeof o.expedited === "boolean" && (0, helpers_1.isSet)(o.status) && typeof o.submit_height === "bigint" && typeof o.submit_time === "bigint" && typeof o.voting_end === "bigint" && exports.DaoConfig.isAmino(o.pinned_config) && typeof o.pinned_denominator === "string" && typeof o.yes === "string" && typeof o.no === "string" && typeof o.abstain === "string" && typeof o.cleanup_cursor === "string");
|
|
845
|
+
},
|
|
846
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
847
|
+
if (message.id !== BigInt(0)) {
|
|
848
|
+
writer.uint32(8).uint64(message.id);
|
|
849
|
+
}
|
|
850
|
+
if (message.daoId !== BigInt(0)) {
|
|
851
|
+
writer.uint32(16).uint64(message.daoId);
|
|
852
|
+
}
|
|
853
|
+
if (message.proposer !== "") {
|
|
854
|
+
writer.uint32(26).string(message.proposer);
|
|
855
|
+
}
|
|
856
|
+
if (message.title !== "") {
|
|
857
|
+
writer.uint32(34).string(message.title);
|
|
858
|
+
}
|
|
859
|
+
if (message.summary !== "") {
|
|
860
|
+
writer.uint32(42).string(message.summary);
|
|
861
|
+
}
|
|
862
|
+
for (const v of message.msgs) {
|
|
863
|
+
any_1.Any.encode(registry_1.GlobalDecoderRegistry.wrapAny(v), writer.uint32(50).fork()).ldelim();
|
|
864
|
+
}
|
|
865
|
+
if (message.expedited === true) {
|
|
866
|
+
writer.uint32(56).bool(message.expedited);
|
|
867
|
+
}
|
|
868
|
+
if (message.status !== 0) {
|
|
869
|
+
writer.uint32(64).int32(message.status);
|
|
870
|
+
}
|
|
871
|
+
if (message.submitHeight !== BigInt(0)) {
|
|
872
|
+
writer.uint32(72).int64(message.submitHeight);
|
|
873
|
+
}
|
|
874
|
+
if (message.submitTime !== BigInt(0)) {
|
|
875
|
+
writer.uint32(80).int64(message.submitTime);
|
|
876
|
+
}
|
|
877
|
+
if (message.votingEnd !== BigInt(0)) {
|
|
878
|
+
writer.uint32(88).int64(message.votingEnd);
|
|
879
|
+
}
|
|
880
|
+
if (message.pinnedConfig !== undefined) {
|
|
881
|
+
exports.DaoConfig.encode(message.pinnedConfig, writer.uint32(98).fork()).ldelim();
|
|
882
|
+
}
|
|
883
|
+
if (message.pinnedElectorate !== undefined) {
|
|
884
|
+
exports.StakeElectorate.encode(message.pinnedElectorate, writer.uint32(106).fork()).ldelim();
|
|
885
|
+
}
|
|
886
|
+
if (message.pinnedDenominator !== "") {
|
|
887
|
+
writer.uint32(114).string(message.pinnedDenominator);
|
|
888
|
+
}
|
|
889
|
+
if (message.pinnedDeposit !== undefined) {
|
|
890
|
+
coin_1.Coin.encode(message.pinnedDeposit, writer.uint32(122).fork()).ldelim();
|
|
891
|
+
}
|
|
892
|
+
if (message.yes !== "") {
|
|
893
|
+
writer.uint32(130).string(message.yes);
|
|
894
|
+
}
|
|
895
|
+
if (message.no !== "") {
|
|
896
|
+
writer.uint32(138).string(message.no);
|
|
897
|
+
}
|
|
898
|
+
if (message.abstain !== "") {
|
|
899
|
+
writer.uint32(146).string(message.abstain);
|
|
900
|
+
}
|
|
901
|
+
if (message.cleanupCursor !== "") {
|
|
902
|
+
writer.uint32(154).string(message.cleanupCursor);
|
|
903
|
+
}
|
|
904
|
+
return writer;
|
|
905
|
+
},
|
|
906
|
+
decode(input, length) {
|
|
907
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
908
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
909
|
+
const message = createBaseProposal();
|
|
910
|
+
while (reader.pos < end) {
|
|
911
|
+
const tag = reader.uint32();
|
|
912
|
+
switch (tag >>> 3) {
|
|
913
|
+
case 1:
|
|
914
|
+
message.id = reader.uint64();
|
|
915
|
+
break;
|
|
916
|
+
case 2:
|
|
917
|
+
message.daoId = reader.uint64();
|
|
918
|
+
break;
|
|
919
|
+
case 3:
|
|
920
|
+
message.proposer = reader.string();
|
|
921
|
+
break;
|
|
922
|
+
case 4:
|
|
923
|
+
message.title = reader.string();
|
|
924
|
+
break;
|
|
925
|
+
case 5:
|
|
926
|
+
message.summary = reader.string();
|
|
927
|
+
break;
|
|
928
|
+
case 6:
|
|
929
|
+
message.msgs.push(registry_1.GlobalDecoderRegistry.unwrapAny(reader));
|
|
930
|
+
break;
|
|
931
|
+
case 7:
|
|
932
|
+
message.expedited = reader.bool();
|
|
933
|
+
break;
|
|
934
|
+
case 8:
|
|
935
|
+
message.status = reader.int32();
|
|
936
|
+
break;
|
|
937
|
+
case 9:
|
|
938
|
+
message.submitHeight = reader.int64();
|
|
939
|
+
break;
|
|
940
|
+
case 10:
|
|
941
|
+
message.submitTime = reader.int64();
|
|
942
|
+
break;
|
|
943
|
+
case 11:
|
|
944
|
+
message.votingEnd = reader.int64();
|
|
945
|
+
break;
|
|
946
|
+
case 12:
|
|
947
|
+
message.pinnedConfig = exports.DaoConfig.decode(reader, reader.uint32());
|
|
948
|
+
break;
|
|
949
|
+
case 13:
|
|
950
|
+
message.pinnedElectorate = exports.StakeElectorate.decode(reader, reader.uint32());
|
|
951
|
+
break;
|
|
952
|
+
case 14:
|
|
953
|
+
message.pinnedDenominator = reader.string();
|
|
954
|
+
break;
|
|
955
|
+
case 15:
|
|
956
|
+
message.pinnedDeposit = coin_1.Coin.decode(reader, reader.uint32());
|
|
957
|
+
break;
|
|
958
|
+
case 16:
|
|
959
|
+
message.yes = reader.string();
|
|
960
|
+
break;
|
|
961
|
+
case 17:
|
|
962
|
+
message.no = reader.string();
|
|
963
|
+
break;
|
|
964
|
+
case 18:
|
|
965
|
+
message.abstain = reader.string();
|
|
966
|
+
break;
|
|
967
|
+
case 19:
|
|
968
|
+
message.cleanupCursor = reader.string();
|
|
969
|
+
break;
|
|
970
|
+
default:
|
|
971
|
+
reader.skipType(tag & 7);
|
|
972
|
+
break;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
return message;
|
|
976
|
+
},
|
|
977
|
+
fromPartial(object) {
|
|
978
|
+
const message = createBaseProposal();
|
|
979
|
+
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
980
|
+
message.daoId = object.daoId !== undefined && object.daoId !== null ? BigInt(object.daoId.toString()) : BigInt(0);
|
|
981
|
+
message.proposer = object.proposer ?? "";
|
|
982
|
+
message.title = object.title ?? "";
|
|
983
|
+
message.summary = object.summary ?? "";
|
|
984
|
+
message.msgs = object.msgs?.map(e => registry_1.GlobalDecoderRegistry.fromPartial(e)) || [];
|
|
985
|
+
message.expedited = object.expedited ?? false;
|
|
986
|
+
message.status = object.status ?? 0;
|
|
987
|
+
message.submitHeight = object.submitHeight !== undefined && object.submitHeight !== null ? BigInt(object.submitHeight.toString()) : BigInt(0);
|
|
988
|
+
message.submitTime = object.submitTime !== undefined && object.submitTime !== null ? BigInt(object.submitTime.toString()) : BigInt(0);
|
|
989
|
+
message.votingEnd = object.votingEnd !== undefined && object.votingEnd !== null ? BigInt(object.votingEnd.toString()) : BigInt(0);
|
|
990
|
+
message.pinnedConfig = object.pinnedConfig !== undefined && object.pinnedConfig !== null ? exports.DaoConfig.fromPartial(object.pinnedConfig) : undefined;
|
|
991
|
+
message.pinnedElectorate = object.pinnedElectorate !== undefined && object.pinnedElectorate !== null ? exports.StakeElectorate.fromPartial(object.pinnedElectorate) : undefined;
|
|
992
|
+
message.pinnedDenominator = object.pinnedDenominator ?? "";
|
|
993
|
+
message.pinnedDeposit = object.pinnedDeposit !== undefined && object.pinnedDeposit !== null ? coin_1.Coin.fromPartial(object.pinnedDeposit) : undefined;
|
|
994
|
+
message.yes = object.yes ?? "";
|
|
995
|
+
message.no = object.no ?? "";
|
|
996
|
+
message.abstain = object.abstain ?? "";
|
|
997
|
+
message.cleanupCursor = object.cleanupCursor ?? "";
|
|
998
|
+
return message;
|
|
999
|
+
},
|
|
1000
|
+
fromAmino(object) {
|
|
1001
|
+
const message = createBaseProposal();
|
|
1002
|
+
if (object.id !== undefined && object.id !== null) {
|
|
1003
|
+
message.id = BigInt(object.id);
|
|
1004
|
+
}
|
|
1005
|
+
if (object.dao_id !== undefined && object.dao_id !== null) {
|
|
1006
|
+
message.daoId = BigInt(object.dao_id);
|
|
1007
|
+
}
|
|
1008
|
+
if (object.proposer !== undefined && object.proposer !== null) {
|
|
1009
|
+
message.proposer = object.proposer;
|
|
1010
|
+
}
|
|
1011
|
+
if (object.title !== undefined && object.title !== null) {
|
|
1012
|
+
message.title = object.title;
|
|
1013
|
+
}
|
|
1014
|
+
if (object.summary !== undefined && object.summary !== null) {
|
|
1015
|
+
message.summary = object.summary;
|
|
1016
|
+
}
|
|
1017
|
+
message.msgs = object.msgs?.map(e => registry_1.GlobalDecoderRegistry.fromAminoMsg(e)) || [];
|
|
1018
|
+
if (object.expedited !== undefined && object.expedited !== null) {
|
|
1019
|
+
message.expedited = object.expedited;
|
|
1020
|
+
}
|
|
1021
|
+
if (object.status !== undefined && object.status !== null) {
|
|
1022
|
+
message.status = object.status;
|
|
1023
|
+
}
|
|
1024
|
+
if (object.submit_height !== undefined && object.submit_height !== null) {
|
|
1025
|
+
message.submitHeight = BigInt(object.submit_height);
|
|
1026
|
+
}
|
|
1027
|
+
if (object.submit_time !== undefined && object.submit_time !== null) {
|
|
1028
|
+
message.submitTime = BigInt(object.submit_time);
|
|
1029
|
+
}
|
|
1030
|
+
if (object.voting_end !== undefined && object.voting_end !== null) {
|
|
1031
|
+
message.votingEnd = BigInt(object.voting_end);
|
|
1032
|
+
}
|
|
1033
|
+
if (object.pinned_config !== undefined && object.pinned_config !== null) {
|
|
1034
|
+
message.pinnedConfig = exports.DaoConfig.fromAmino(object.pinned_config);
|
|
1035
|
+
}
|
|
1036
|
+
if (object.pinned_electorate !== undefined && object.pinned_electorate !== null) {
|
|
1037
|
+
message.pinnedElectorate = exports.StakeElectorate.fromAmino(object.pinned_electorate);
|
|
1038
|
+
}
|
|
1039
|
+
if (object.pinned_denominator !== undefined && object.pinned_denominator !== null) {
|
|
1040
|
+
message.pinnedDenominator = object.pinned_denominator;
|
|
1041
|
+
}
|
|
1042
|
+
if (object.pinned_deposit !== undefined && object.pinned_deposit !== null) {
|
|
1043
|
+
message.pinnedDeposit = coin_1.Coin.fromAmino(object.pinned_deposit);
|
|
1044
|
+
}
|
|
1045
|
+
if (object.yes !== undefined && object.yes !== null) {
|
|
1046
|
+
message.yes = object.yes;
|
|
1047
|
+
}
|
|
1048
|
+
if (object.no !== undefined && object.no !== null) {
|
|
1049
|
+
message.no = object.no;
|
|
1050
|
+
}
|
|
1051
|
+
if (object.abstain !== undefined && object.abstain !== null) {
|
|
1052
|
+
message.abstain = object.abstain;
|
|
1053
|
+
}
|
|
1054
|
+
if (object.cleanup_cursor !== undefined && object.cleanup_cursor !== null) {
|
|
1055
|
+
message.cleanupCursor = object.cleanup_cursor;
|
|
1056
|
+
}
|
|
1057
|
+
return message;
|
|
1058
|
+
},
|
|
1059
|
+
toAmino(message) {
|
|
1060
|
+
const obj = {};
|
|
1061
|
+
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
1062
|
+
obj.dao_id = message.daoId !== BigInt(0) ? message.daoId?.toString() : undefined;
|
|
1063
|
+
obj.proposer = message.proposer === "" ? undefined : message.proposer;
|
|
1064
|
+
obj.title = message.title === "" ? undefined : message.title;
|
|
1065
|
+
obj.summary = message.summary === "" ? undefined : message.summary;
|
|
1066
|
+
if (message.msgs) {
|
|
1067
|
+
obj.msgs = message.msgs.map(e => e ? registry_1.GlobalDecoderRegistry.toAminoMsg(e) : undefined);
|
|
1068
|
+
}
|
|
1069
|
+
else {
|
|
1070
|
+
obj.msgs = message.msgs;
|
|
1071
|
+
}
|
|
1072
|
+
obj.expedited = message.expedited === false ? undefined : message.expedited;
|
|
1073
|
+
obj.status = message.status === 0 ? undefined : message.status;
|
|
1074
|
+
obj.submit_height = message.submitHeight !== BigInt(0) ? message.submitHeight?.toString() : undefined;
|
|
1075
|
+
obj.submit_time = message.submitTime !== BigInt(0) ? message.submitTime?.toString() : undefined;
|
|
1076
|
+
obj.voting_end = message.votingEnd !== BigInt(0) ? message.votingEnd?.toString() : undefined;
|
|
1077
|
+
obj.pinned_config = message.pinnedConfig ? exports.DaoConfig.toAmino(message.pinnedConfig) : undefined;
|
|
1078
|
+
obj.pinned_electorate = message.pinnedElectorate ? exports.StakeElectorate.toAmino(message.pinnedElectorate) : undefined;
|
|
1079
|
+
obj.pinned_denominator = message.pinnedDenominator === "" ? undefined : message.pinnedDenominator;
|
|
1080
|
+
obj.pinned_deposit = message.pinnedDeposit ? coin_1.Coin.toAmino(message.pinnedDeposit) : undefined;
|
|
1081
|
+
obj.yes = message.yes === "" ? undefined : message.yes;
|
|
1082
|
+
obj.no = message.no === "" ? undefined : message.no;
|
|
1083
|
+
obj.abstain = message.abstain === "" ? undefined : message.abstain;
|
|
1084
|
+
obj.cleanup_cursor = message.cleanupCursor === "" ? undefined : message.cleanupCursor;
|
|
1085
|
+
return obj;
|
|
1086
|
+
},
|
|
1087
|
+
fromAminoMsg(object) {
|
|
1088
|
+
return exports.Proposal.fromAmino(object.value);
|
|
1089
|
+
},
|
|
1090
|
+
fromProtoMsg(message) {
|
|
1091
|
+
return exports.Proposal.decode(message.value);
|
|
1092
|
+
},
|
|
1093
|
+
toProto(message) {
|
|
1094
|
+
return exports.Proposal.encode(message).finish();
|
|
1095
|
+
},
|
|
1096
|
+
toProtoMsg(message) {
|
|
1097
|
+
return {
|
|
1098
|
+
typeUrl: "/bze.dao.Proposal",
|
|
1099
|
+
value: exports.Proposal.encode(message).finish()
|
|
1100
|
+
};
|
|
1101
|
+
},
|
|
1102
|
+
registerTypeUrl() {
|
|
1103
|
+
if (!registry_1.GlobalDecoderRegistry.registerExistingTypeUrl(exports.Proposal.typeUrl)) {
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
exports.DaoConfig.registerTypeUrl();
|
|
1107
|
+
exports.StakeElectorate.registerTypeUrl();
|
|
1108
|
+
coin_1.Coin.registerTypeUrl();
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
function createBaseBallotShare() {
|
|
1112
|
+
return {
|
|
1113
|
+
source: "",
|
|
1114
|
+
amount: ""
|
|
1115
|
+
};
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* BallotShare is the weight one electorate source gives a ballot.
|
|
1119
|
+
* @name BallotShare
|
|
1120
|
+
* @package bze.dao
|
|
1121
|
+
* @see proto type: bze.dao.BallotShare
|
|
1122
|
+
*/
|
|
1123
|
+
exports.BallotShare = {
|
|
1124
|
+
typeUrl: "/bze.dao.BallotShare",
|
|
1125
|
+
is(o) {
|
|
1126
|
+
return o && (o.$typeUrl === exports.BallotShare.typeUrl || typeof o.source === "string" && typeof o.amount === "string");
|
|
1127
|
+
},
|
|
1128
|
+
isSDK(o) {
|
|
1129
|
+
return o && (o.$typeUrl === exports.BallotShare.typeUrl || typeof o.source === "string" && typeof o.amount === "string");
|
|
1130
|
+
},
|
|
1131
|
+
isAmino(o) {
|
|
1132
|
+
return o && (o.$typeUrl === exports.BallotShare.typeUrl || typeof o.source === "string" && typeof o.amount === "string");
|
|
1133
|
+
},
|
|
1134
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
1135
|
+
if (message.source !== "") {
|
|
1136
|
+
writer.uint32(10).string(message.source);
|
|
1137
|
+
}
|
|
1138
|
+
if (message.amount !== "") {
|
|
1139
|
+
writer.uint32(18).string(message.amount);
|
|
1140
|
+
}
|
|
1141
|
+
return writer;
|
|
1142
|
+
},
|
|
1143
|
+
decode(input, length) {
|
|
1144
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1145
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1146
|
+
const message = createBaseBallotShare();
|
|
1147
|
+
while (reader.pos < end) {
|
|
1148
|
+
const tag = reader.uint32();
|
|
1149
|
+
switch (tag >>> 3) {
|
|
1150
|
+
case 1:
|
|
1151
|
+
message.source = reader.string();
|
|
1152
|
+
break;
|
|
1153
|
+
case 2:
|
|
1154
|
+
message.amount = reader.string();
|
|
1155
|
+
break;
|
|
1156
|
+
default:
|
|
1157
|
+
reader.skipType(tag & 7);
|
|
1158
|
+
break;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
return message;
|
|
1162
|
+
},
|
|
1163
|
+
fromPartial(object) {
|
|
1164
|
+
const message = createBaseBallotShare();
|
|
1165
|
+
message.source = object.source ?? "";
|
|
1166
|
+
message.amount = object.amount ?? "";
|
|
1167
|
+
return message;
|
|
1168
|
+
},
|
|
1169
|
+
fromAmino(object) {
|
|
1170
|
+
const message = createBaseBallotShare();
|
|
1171
|
+
if (object.source !== undefined && object.source !== null) {
|
|
1172
|
+
message.source = object.source;
|
|
1173
|
+
}
|
|
1174
|
+
if (object.amount !== undefined && object.amount !== null) {
|
|
1175
|
+
message.amount = object.amount;
|
|
1176
|
+
}
|
|
1177
|
+
return message;
|
|
1178
|
+
},
|
|
1179
|
+
toAmino(message) {
|
|
1180
|
+
const obj = {};
|
|
1181
|
+
obj.source = message.source === "" ? undefined : message.source;
|
|
1182
|
+
obj.amount = message.amount === "" ? undefined : message.amount;
|
|
1183
|
+
return obj;
|
|
1184
|
+
},
|
|
1185
|
+
fromAminoMsg(object) {
|
|
1186
|
+
return exports.BallotShare.fromAmino(object.value);
|
|
1187
|
+
},
|
|
1188
|
+
fromProtoMsg(message) {
|
|
1189
|
+
return exports.BallotShare.decode(message.value);
|
|
1190
|
+
},
|
|
1191
|
+
toProto(message) {
|
|
1192
|
+
return exports.BallotShare.encode(message).finish();
|
|
1193
|
+
},
|
|
1194
|
+
toProtoMsg(message) {
|
|
1195
|
+
return {
|
|
1196
|
+
typeUrl: "/bze.dao.BallotShare",
|
|
1197
|
+
value: exports.BallotShare.encode(message).finish()
|
|
1198
|
+
};
|
|
1199
|
+
},
|
|
1200
|
+
registerTypeUrl() { }
|
|
1201
|
+
};
|
|
1202
|
+
function createBaseBallot() {
|
|
1203
|
+
return {
|
|
1204
|
+
proposalId: BigInt(0),
|
|
1205
|
+
voter: "",
|
|
1206
|
+
option: 0,
|
|
1207
|
+
weight: "",
|
|
1208
|
+
shares: []
|
|
1209
|
+
};
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* Ballot is a voter's vote on a proposal.
|
|
1213
|
+
* @name Ballot
|
|
1214
|
+
* @package bze.dao
|
|
1215
|
+
* @see proto type: bze.dao.Ballot
|
|
1216
|
+
*/
|
|
1217
|
+
exports.Ballot = {
|
|
1218
|
+
typeUrl: "/bze.dao.Ballot",
|
|
1219
|
+
is(o) {
|
|
1220
|
+
return o && (o.$typeUrl === exports.Ballot.typeUrl || typeof o.proposalId === "bigint" && typeof o.voter === "string" && (0, helpers_1.isSet)(o.option) && typeof o.weight === "string" && Array.isArray(o.shares) && (!o.shares.length || exports.BallotShare.is(o.shares[0])));
|
|
1221
|
+
},
|
|
1222
|
+
isSDK(o) {
|
|
1223
|
+
return o && (o.$typeUrl === exports.Ballot.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && (0, helpers_1.isSet)(o.option) && typeof o.weight === "string" && Array.isArray(o.shares) && (!o.shares.length || exports.BallotShare.isSDK(o.shares[0])));
|
|
1224
|
+
},
|
|
1225
|
+
isAmino(o) {
|
|
1226
|
+
return o && (o.$typeUrl === exports.Ballot.typeUrl || typeof o.proposal_id === "bigint" && typeof o.voter === "string" && (0, helpers_1.isSet)(o.option) && typeof o.weight === "string" && Array.isArray(o.shares) && (!o.shares.length || exports.BallotShare.isAmino(o.shares[0])));
|
|
1227
|
+
},
|
|
1228
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
1229
|
+
if (message.proposalId !== BigInt(0)) {
|
|
1230
|
+
writer.uint32(8).uint64(message.proposalId);
|
|
1231
|
+
}
|
|
1232
|
+
if (message.voter !== "") {
|
|
1233
|
+
writer.uint32(18).string(message.voter);
|
|
1234
|
+
}
|
|
1235
|
+
if (message.option !== 0) {
|
|
1236
|
+
writer.uint32(24).int32(message.option);
|
|
1237
|
+
}
|
|
1238
|
+
if (message.weight !== "") {
|
|
1239
|
+
writer.uint32(34).string(message.weight);
|
|
1240
|
+
}
|
|
1241
|
+
for (const v of message.shares) {
|
|
1242
|
+
exports.BallotShare.encode(v, writer.uint32(42).fork()).ldelim();
|
|
1243
|
+
}
|
|
1244
|
+
return writer;
|
|
1245
|
+
},
|
|
1246
|
+
decode(input, length) {
|
|
1247
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1248
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1249
|
+
const message = createBaseBallot();
|
|
1250
|
+
while (reader.pos < end) {
|
|
1251
|
+
const tag = reader.uint32();
|
|
1252
|
+
switch (tag >>> 3) {
|
|
1253
|
+
case 1:
|
|
1254
|
+
message.proposalId = reader.uint64();
|
|
1255
|
+
break;
|
|
1256
|
+
case 2:
|
|
1257
|
+
message.voter = reader.string();
|
|
1258
|
+
break;
|
|
1259
|
+
case 3:
|
|
1260
|
+
message.option = reader.int32();
|
|
1261
|
+
break;
|
|
1262
|
+
case 4:
|
|
1263
|
+
message.weight = reader.string();
|
|
1264
|
+
break;
|
|
1265
|
+
case 5:
|
|
1266
|
+
message.shares.push(exports.BallotShare.decode(reader, reader.uint32()));
|
|
1267
|
+
break;
|
|
1268
|
+
default:
|
|
1269
|
+
reader.skipType(tag & 7);
|
|
1270
|
+
break;
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
return message;
|
|
1274
|
+
},
|
|
1275
|
+
fromPartial(object) {
|
|
1276
|
+
const message = createBaseBallot();
|
|
1277
|
+
message.proposalId = object.proposalId !== undefined && object.proposalId !== null ? BigInt(object.proposalId.toString()) : BigInt(0);
|
|
1278
|
+
message.voter = object.voter ?? "";
|
|
1279
|
+
message.option = object.option ?? 0;
|
|
1280
|
+
message.weight = object.weight ?? "";
|
|
1281
|
+
message.shares = object.shares?.map(e => exports.BallotShare.fromPartial(e)) || [];
|
|
1282
|
+
return message;
|
|
1283
|
+
},
|
|
1284
|
+
fromAmino(object) {
|
|
1285
|
+
const message = createBaseBallot();
|
|
1286
|
+
if (object.proposal_id !== undefined && object.proposal_id !== null) {
|
|
1287
|
+
message.proposalId = BigInt(object.proposal_id);
|
|
1288
|
+
}
|
|
1289
|
+
if (object.voter !== undefined && object.voter !== null) {
|
|
1290
|
+
message.voter = object.voter;
|
|
1291
|
+
}
|
|
1292
|
+
if (object.option !== undefined && object.option !== null) {
|
|
1293
|
+
message.option = object.option;
|
|
1294
|
+
}
|
|
1295
|
+
if (object.weight !== undefined && object.weight !== null) {
|
|
1296
|
+
message.weight = object.weight;
|
|
1297
|
+
}
|
|
1298
|
+
message.shares = object.shares?.map(e => exports.BallotShare.fromAmino(e)) || [];
|
|
1299
|
+
return message;
|
|
1300
|
+
},
|
|
1301
|
+
toAmino(message) {
|
|
1302
|
+
const obj = {};
|
|
1303
|
+
obj.proposal_id = message.proposalId !== BigInt(0) ? message.proposalId?.toString() : undefined;
|
|
1304
|
+
obj.voter = message.voter === "" ? undefined : message.voter;
|
|
1305
|
+
obj.option = message.option === 0 ? undefined : message.option;
|
|
1306
|
+
obj.weight = message.weight === "" ? undefined : message.weight;
|
|
1307
|
+
if (message.shares) {
|
|
1308
|
+
obj.shares = message.shares.map(e => e ? exports.BallotShare.toAmino(e) : undefined);
|
|
1309
|
+
}
|
|
1310
|
+
else {
|
|
1311
|
+
obj.shares = message.shares;
|
|
1312
|
+
}
|
|
1313
|
+
return obj;
|
|
1314
|
+
},
|
|
1315
|
+
fromAminoMsg(object) {
|
|
1316
|
+
return exports.Ballot.fromAmino(object.value);
|
|
1317
|
+
},
|
|
1318
|
+
fromProtoMsg(message) {
|
|
1319
|
+
return exports.Ballot.decode(message.value);
|
|
1320
|
+
},
|
|
1321
|
+
toProto(message) {
|
|
1322
|
+
return exports.Ballot.encode(message).finish();
|
|
1323
|
+
},
|
|
1324
|
+
toProtoMsg(message) {
|
|
1325
|
+
return {
|
|
1326
|
+
typeUrl: "/bze.dao.Ballot",
|
|
1327
|
+
value: exports.Ballot.encode(message).finish()
|
|
1328
|
+
};
|
|
1329
|
+
},
|
|
1330
|
+
registerTypeUrl() {
|
|
1331
|
+
if (!registry_1.GlobalDecoderRegistry.registerExistingTypeUrl(exports.Ballot.typeUrl)) {
|
|
1332
|
+
return;
|
|
1333
|
+
}
|
|
1334
|
+
exports.BallotShare.registerTypeUrl();
|
|
1335
|
+
}
|
|
1336
|
+
};
|
|
1337
|
+
function createBaseJoinRecord() {
|
|
1338
|
+
return {
|
|
1339
|
+
source: "",
|
|
1340
|
+
address: "",
|
|
1341
|
+
height: BigInt(0)
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
/**
|
|
1345
|
+
* JoinRecord is the height an address joined an electorate source while the
|
|
1346
|
+
* source was pinned. Stake joined at or after a proposal's submit height does
|
|
1347
|
+
* not vote on it.
|
|
1348
|
+
* @name JoinRecord
|
|
1349
|
+
* @package bze.dao
|
|
1350
|
+
* @see proto type: bze.dao.JoinRecord
|
|
1351
|
+
*/
|
|
1352
|
+
exports.JoinRecord = {
|
|
1353
|
+
typeUrl: "/bze.dao.JoinRecord",
|
|
1354
|
+
is(o) {
|
|
1355
|
+
return o && (o.$typeUrl === exports.JoinRecord.typeUrl || typeof o.source === "string" && typeof o.address === "string" && typeof o.height === "bigint");
|
|
1356
|
+
},
|
|
1357
|
+
isSDK(o) {
|
|
1358
|
+
return o && (o.$typeUrl === exports.JoinRecord.typeUrl || typeof o.source === "string" && typeof o.address === "string" && typeof o.height === "bigint");
|
|
1359
|
+
},
|
|
1360
|
+
isAmino(o) {
|
|
1361
|
+
return o && (o.$typeUrl === exports.JoinRecord.typeUrl || typeof o.source === "string" && typeof o.address === "string" && typeof o.height === "bigint");
|
|
1362
|
+
},
|
|
1363
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
1364
|
+
if (message.source !== "") {
|
|
1365
|
+
writer.uint32(10).string(message.source);
|
|
1366
|
+
}
|
|
1367
|
+
if (message.address !== "") {
|
|
1368
|
+
writer.uint32(18).string(message.address);
|
|
1369
|
+
}
|
|
1370
|
+
if (message.height !== BigInt(0)) {
|
|
1371
|
+
writer.uint32(24).int64(message.height);
|
|
1372
|
+
}
|
|
1373
|
+
return writer;
|
|
1374
|
+
},
|
|
1375
|
+
decode(input, length) {
|
|
1376
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1377
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1378
|
+
const message = createBaseJoinRecord();
|
|
1379
|
+
while (reader.pos < end) {
|
|
1380
|
+
const tag = reader.uint32();
|
|
1381
|
+
switch (tag >>> 3) {
|
|
1382
|
+
case 1:
|
|
1383
|
+
message.source = reader.string();
|
|
1384
|
+
break;
|
|
1385
|
+
case 2:
|
|
1386
|
+
message.address = reader.string();
|
|
1387
|
+
break;
|
|
1388
|
+
case 3:
|
|
1389
|
+
message.height = reader.int64();
|
|
1390
|
+
break;
|
|
1391
|
+
default:
|
|
1392
|
+
reader.skipType(tag & 7);
|
|
1393
|
+
break;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
return message;
|
|
1397
|
+
},
|
|
1398
|
+
fromPartial(object) {
|
|
1399
|
+
const message = createBaseJoinRecord();
|
|
1400
|
+
message.source = object.source ?? "";
|
|
1401
|
+
message.address = object.address ?? "";
|
|
1402
|
+
message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0);
|
|
1403
|
+
return message;
|
|
1404
|
+
},
|
|
1405
|
+
fromAmino(object) {
|
|
1406
|
+
const message = createBaseJoinRecord();
|
|
1407
|
+
if (object.source !== undefined && object.source !== null) {
|
|
1408
|
+
message.source = object.source;
|
|
1409
|
+
}
|
|
1410
|
+
if (object.address !== undefined && object.address !== null) {
|
|
1411
|
+
message.address = object.address;
|
|
1412
|
+
}
|
|
1413
|
+
if (object.height !== undefined && object.height !== null) {
|
|
1414
|
+
message.height = BigInt(object.height);
|
|
1415
|
+
}
|
|
1416
|
+
return message;
|
|
1417
|
+
},
|
|
1418
|
+
toAmino(message) {
|
|
1419
|
+
const obj = {};
|
|
1420
|
+
obj.source = message.source === "" ? undefined : message.source;
|
|
1421
|
+
obj.address = message.address === "" ? undefined : message.address;
|
|
1422
|
+
obj.height = message.height !== BigInt(0) ? message.height?.toString() : undefined;
|
|
1423
|
+
return obj;
|
|
1424
|
+
},
|
|
1425
|
+
fromAminoMsg(object) {
|
|
1426
|
+
return exports.JoinRecord.fromAmino(object.value);
|
|
1427
|
+
},
|
|
1428
|
+
fromProtoMsg(message) {
|
|
1429
|
+
return exports.JoinRecord.decode(message.value);
|
|
1430
|
+
},
|
|
1431
|
+
toProto(message) {
|
|
1432
|
+
return exports.JoinRecord.encode(message).finish();
|
|
1433
|
+
},
|
|
1434
|
+
toProtoMsg(message) {
|
|
1435
|
+
return {
|
|
1436
|
+
typeUrl: "/bze.dao.JoinRecord",
|
|
1437
|
+
value: exports.JoinRecord.encode(message).finish()
|
|
1438
|
+
};
|
|
1439
|
+
},
|
|
1440
|
+
registerTypeUrl() { }
|
|
1441
|
+
};
|
|
1442
|
+
function createBaseMemberRecord() {
|
|
1443
|
+
return {
|
|
1444
|
+
daoId: BigInt(0),
|
|
1445
|
+
address: "",
|
|
1446
|
+
height: BigInt(0)
|
|
1447
|
+
};
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* MemberRecord is the height an address was added to a static-list DAO by
|
|
1451
|
+
* MsgUpdateMembers. A member added at or after a proposal's submit height does
|
|
1452
|
+
* not vote on it; members listed at creation have no record.
|
|
1453
|
+
* @name MemberRecord
|
|
1454
|
+
* @package bze.dao
|
|
1455
|
+
* @see proto type: bze.dao.MemberRecord
|
|
1456
|
+
*/
|
|
1457
|
+
exports.MemberRecord = {
|
|
1458
|
+
typeUrl: "/bze.dao.MemberRecord",
|
|
1459
|
+
is(o) {
|
|
1460
|
+
return o && (o.$typeUrl === exports.MemberRecord.typeUrl || typeof o.daoId === "bigint" && typeof o.address === "string" && typeof o.height === "bigint");
|
|
1461
|
+
},
|
|
1462
|
+
isSDK(o) {
|
|
1463
|
+
return o && (o.$typeUrl === exports.MemberRecord.typeUrl || typeof o.dao_id === "bigint" && typeof o.address === "string" && typeof o.height === "bigint");
|
|
1464
|
+
},
|
|
1465
|
+
isAmino(o) {
|
|
1466
|
+
return o && (o.$typeUrl === exports.MemberRecord.typeUrl || typeof o.dao_id === "bigint" && typeof o.address === "string" && typeof o.height === "bigint");
|
|
1467
|
+
},
|
|
1468
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
1469
|
+
if (message.daoId !== BigInt(0)) {
|
|
1470
|
+
writer.uint32(8).uint64(message.daoId);
|
|
1471
|
+
}
|
|
1472
|
+
if (message.address !== "") {
|
|
1473
|
+
writer.uint32(18).string(message.address);
|
|
1474
|
+
}
|
|
1475
|
+
if (message.height !== BigInt(0)) {
|
|
1476
|
+
writer.uint32(24).int64(message.height);
|
|
1477
|
+
}
|
|
1478
|
+
return writer;
|
|
1479
|
+
},
|
|
1480
|
+
decode(input, length) {
|
|
1481
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1482
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1483
|
+
const message = createBaseMemberRecord();
|
|
1484
|
+
while (reader.pos < end) {
|
|
1485
|
+
const tag = reader.uint32();
|
|
1486
|
+
switch (tag >>> 3) {
|
|
1487
|
+
case 1:
|
|
1488
|
+
message.daoId = reader.uint64();
|
|
1489
|
+
break;
|
|
1490
|
+
case 2:
|
|
1491
|
+
message.address = reader.string();
|
|
1492
|
+
break;
|
|
1493
|
+
case 3:
|
|
1494
|
+
message.height = reader.int64();
|
|
1495
|
+
break;
|
|
1496
|
+
default:
|
|
1497
|
+
reader.skipType(tag & 7);
|
|
1498
|
+
break;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
return message;
|
|
1502
|
+
},
|
|
1503
|
+
fromPartial(object) {
|
|
1504
|
+
const message = createBaseMemberRecord();
|
|
1505
|
+
message.daoId = object.daoId !== undefined && object.daoId !== null ? BigInt(object.daoId.toString()) : BigInt(0);
|
|
1506
|
+
message.address = object.address ?? "";
|
|
1507
|
+
message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0);
|
|
1508
|
+
return message;
|
|
1509
|
+
},
|
|
1510
|
+
fromAmino(object) {
|
|
1511
|
+
const message = createBaseMemberRecord();
|
|
1512
|
+
if (object.dao_id !== undefined && object.dao_id !== null) {
|
|
1513
|
+
message.daoId = BigInt(object.dao_id);
|
|
1514
|
+
}
|
|
1515
|
+
if (object.address !== undefined && object.address !== null) {
|
|
1516
|
+
message.address = object.address;
|
|
1517
|
+
}
|
|
1518
|
+
if (object.height !== undefined && object.height !== null) {
|
|
1519
|
+
message.height = BigInt(object.height);
|
|
1520
|
+
}
|
|
1521
|
+
return message;
|
|
1522
|
+
},
|
|
1523
|
+
toAmino(message) {
|
|
1524
|
+
const obj = {};
|
|
1525
|
+
obj.dao_id = message.daoId !== BigInt(0) ? message.daoId?.toString() : undefined;
|
|
1526
|
+
obj.address = message.address === "" ? undefined : message.address;
|
|
1527
|
+
obj.height = message.height !== BigInt(0) ? message.height?.toString() : undefined;
|
|
1528
|
+
return obj;
|
|
1529
|
+
},
|
|
1530
|
+
fromAminoMsg(object) {
|
|
1531
|
+
return exports.MemberRecord.fromAmino(object.value);
|
|
1532
|
+
},
|
|
1533
|
+
fromProtoMsg(message) {
|
|
1534
|
+
return exports.MemberRecord.decode(message.value);
|
|
1535
|
+
},
|
|
1536
|
+
toProto(message) {
|
|
1537
|
+
return exports.MemberRecord.encode(message).finish();
|
|
1538
|
+
},
|
|
1539
|
+
toProtoMsg(message) {
|
|
1540
|
+
return {
|
|
1541
|
+
typeUrl: "/bze.dao.MemberRecord",
|
|
1542
|
+
value: exports.MemberRecord.encode(message).finish()
|
|
1543
|
+
};
|
|
1544
|
+
},
|
|
1545
|
+
registerTypeUrl() { }
|
|
1546
|
+
};
|