@zoguxprotocol/proto 0.1.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/LICENSE +800 -0
- package/README.md +14 -0
- package/package.json +48 -0
- package/src/codegen/amino/amino.ts +1 -0
- package/src/codegen/amino/bundle.ts +3 -0
- package/src/codegen/cosmos/app/runtime/v1alpha1/module.ts +277 -0
- package/src/codegen/cosmos/app/v1alpha1/config.ts +265 -0
- package/src/codegen/cosmos/app/v1alpha1/module.ts +274 -0
- package/src/codegen/cosmos/app/v1alpha1/query.rpc.Query.ts +35 -0
- package/src/codegen/cosmos/app/v1alpha1/query.ts +99 -0
- package/src/codegen/cosmos/auth/module/v1/module.ts +159 -0
- package/src/codegen/cosmos/auth/v1beta1/auth.ts +365 -0
- package/src/codegen/cosmos/auth/v1beta1/genesis.ts +74 -0
- package/src/codegen/cosmos/auth/v1beta1/query.lcd.ts +130 -0
- package/src/codegen/cosmos/auth/v1beta1/query.rpc.Query.ts +194 -0
- package/src/codegen/cosmos/auth/v1beta1/query.ts +1221 -0
- package/src/codegen/cosmos/auth/v1beta1/tx.rpc.msg.ts +29 -0
- package/src/codegen/cosmos/auth/v1beta1/tx.ts +135 -0
- package/src/codegen/cosmos/authz/module/v1/module.ts +42 -0
- package/src/codegen/cosmos/authz/v1beta1/authz.ts +298 -0
- package/src/codegen/cosmos/authz/v1beta1/event.ts +170 -0
- package/src/codegen/cosmos/authz/v1beta1/genesis.ts +58 -0
- package/src/codegen/cosmos/authz/v1beta1/query.lcd.ts +79 -0
- package/src/codegen/cosmos/authz/v1beta1/query.rpc.Query.ts +71 -0
- package/src/codegen/cosmos/authz/v1beta1/query.ts +447 -0
- package/src/codegen/cosmos/authz/v1beta1/tx.rpc.msg.ts +56 -0
- package/src/codegen/cosmos/authz/v1beta1/tx.ts +390 -0
- package/src/codegen/cosmos/bank/module/v1/module.ts +76 -0
- package/src/codegen/cosmos/bank/v1beta1/authz.ts +87 -0
- package/src/codegen/cosmos/bank/v1beta1/bank.ts +630 -0
- package/src/codegen/cosmos/bank/v1beta1/genesis.ts +199 -0
- package/src/codegen/cosmos/bank/v1beta1/query.lcd.ts +237 -0
- package/src/codegen/cosmos/bank/v1beta1/query.rpc.Query.ts +243 -0
- package/src/codegen/cosmos/bank/v1beta1/query.ts +1727 -0
- package/src/codegen/cosmos/bank/v1beta1/tx.rpc.msg.ts +66 -0
- package/src/codegen/cosmos/bank/v1beta1/tx.ts +519 -0
- package/src/codegen/cosmos/base/abci/v1beta1/abci.ts +1147 -0
- package/src/codegen/cosmos/base/node/v1beta1/query.lcd.ts +30 -0
- package/src/codegen/cosmos/base/node/v1beta1/query.rpc.Service.ts +49 -0
- package/src/codegen/cosmos/base/node/v1beta1/query.ts +276 -0
- package/src/codegen/cosmos/base/query/v1beta1/pagination.ts +243 -0
- package/src/codegen/cosmos/base/reflection/v1beta1/reflection.ts +221 -0
- package/src/codegen/cosmos/base/reflection/v2alpha1/reflection.ts +1630 -0
- package/src/codegen/cosmos/base/tendermint/v1beta1/query.lcd.ts +113 -0
- package/src/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.ts +127 -0
- package/src/codegen/cosmos/base/tendermint/v1beta1/query.ts +1486 -0
- package/src/codegen/cosmos/base/tendermint/v1beta1/types.ts +335 -0
- package/src/codegen/cosmos/base/v1beta1/coin.ts +278 -0
- package/src/codegen/cosmos/bundle.ts +578 -0
- package/src/codegen/cosmos/circuit/module/v1/module.ts +58 -0
- package/src/codegen/cosmos/circuit/v1/query.lcd.ts +49 -0
- package/src/codegen/cosmos/circuit/v1/query.rpc.Query.ts +65 -0
- package/src/codegen/cosmos/circuit/v1/query.ts +334 -0
- package/src/codegen/cosmos/circuit/v1/tx.rpc.msg.ts +50 -0
- package/src/codegen/cosmos/circuit/v1/tx.ts +409 -0
- package/src/codegen/cosmos/circuit/v1/types.ts +290 -0
- package/src/codegen/cosmos/consensus/module/v1/module.ts +58 -0
- package/src/codegen/cosmos/consensus/v1/query.lcd.ts +22 -0
- package/src/codegen/cosmos/consensus/v1/query.rpc.Query.ts +35 -0
- package/src/codegen/cosmos/consensus/v1/query.ts +103 -0
- package/src/codegen/cosmos/consensus/v1/tx.rpc.msg.ts +29 -0
- package/src/codegen/cosmos/consensus/v1/tx.ts +163 -0
- package/src/codegen/cosmos/crisis/module/v1/module.ts +72 -0
- package/src/codegen/cosmos/crisis/v1beta1/genesis.ts +62 -0
- package/src/codegen/cosmos/crisis/v1beta1/tx.rpc.msg.ts +39 -0
- package/src/codegen/cosmos/crisis/v1beta1/tx.ts +255 -0
- package/src/codegen/cosmos/crypto/ed25519/keys.ts +130 -0
- package/src/codegen/cosmos/crypto/hd/v1/hd.ts +117 -0
- package/src/codegen/cosmos/crypto/keyring/v1/record.ts +326 -0
- package/src/codegen/cosmos/crypto/multisig/keys.ts +78 -0
- package/src/codegen/cosmos/crypto/multisig/v1beta1/multisig.ts +142 -0
- package/src/codegen/cosmos/crypto/secp256k1/keys.ts +124 -0
- package/src/codegen/cosmos/crypto/secp256r1/keys.ts +117 -0
- package/src/codegen/cosmos/distribution/module/v1/module.ts +71 -0
- package/src/codegen/cosmos/distribution/v1beta1/distribution.ts +977 -0
- package/src/codegen/cosmos/distribution/v1beta1/genesis.ts +752 -0
- package/src/codegen/cosmos/distribution/v1beta1/query.lcd.ts +112 -0
- package/src/codegen/cosmos/distribution/v1beta1/query.rpc.Query.ts +164 -0
- package/src/codegen/cosmos/distribution/v1beta1/query.ts +1300 -0
- package/src/codegen/cosmos/distribution/v1beta1/tx.rpc.msg.ts +113 -0
- package/src/codegen/cosmos/distribution/v1beta1/tx.ts +907 -0
- package/src/codegen/cosmos/evidence/module/v1/module.ts +42 -0
- package/src/codegen/cosmos/evidence/v1beta1/evidence.ts +107 -0
- package/src/codegen/cosmos/evidence/v1beta1/genesis.ts +59 -0
- package/src/codegen/cosmos/evidence/v1beta1/query.lcd.ts +49 -0
- package/src/codegen/cosmos/evidence/v1beta1/query.rpc.Query.ts +51 -0
- package/src/codegen/cosmos/evidence/v1beta1/query.ts +278 -0
- package/src/codegen/cosmos/evidence/v1beta1/tx.rpc.msg.ts +27 -0
- package/src/codegen/cosmos/evidence/v1beta1/tx.ts +135 -0
- package/src/codegen/cosmos/feegrant/module/v1/module.ts +42 -0
- package/src/codegen/cosmos/feegrant/v1beta1/feegrant.ts +368 -0
- package/src/codegen/cosmos/feegrant/v1beta1/genesis.ts +58 -0
- package/src/codegen/cosmos/feegrant/v1beta1/query.lcd.ts +57 -0
- package/src/codegen/cosmos/feegrant/v1beta1/query.rpc.Query.ts +67 -0
- package/src/codegen/cosmos/feegrant/v1beta1/query.ts +424 -0
- package/src/codegen/cosmos/feegrant/v1beta1/tx.rpc.msg.ts +54 -0
- package/src/codegen/cosmos/feegrant/v1beta1/tx.ts +355 -0
- package/src/codegen/cosmos/genutil/module/v1/module.ts +42 -0
- package/src/codegen/cosmos/genutil/v1beta1/genesis.ts +58 -0
- package/src/codegen/cosmos/gov/module/v1/module.ts +75 -0
- package/src/codegen/cosmos/gov/v1/genesis.ts +203 -0
- package/src/codegen/cosmos/gov/v1/gov.ts +1353 -0
- package/src/codegen/cosmos/gov/v1/query.lcd.ts +123 -0
- package/src/codegen/cosmos/gov/v1/query.rpc.Query.ts +147 -0
- package/src/codegen/cosmos/gov/v1/query.ts +1210 -0
- package/src/codegen/cosmos/gov/v1/tx.rpc.msg.ts +96 -0
- package/src/codegen/cosmos/gov/v1/tx.ts +1040 -0
- package/src/codegen/cosmos/gov/v1beta1/genesis.ts +143 -0
- package/src/codegen/cosmos/gov/v1beta1/gov.ts +1020 -0
- package/src/codegen/cosmos/gov/v1beta1/query.lcd.ts +115 -0
- package/src/codegen/cosmos/gov/v1beta1/query.rpc.Query.ts +133 -0
- package/src/codegen/cosmos/gov/v1beta1/query.ts +1076 -0
- package/src/codegen/cosmos/gov/v1beta1/tx.rpc.msg.ts +58 -0
- package/src/codegen/cosmos/gov/v1beta1/tx.ts +539 -0
- package/src/codegen/cosmos/group/module/v1/module.ts +79 -0
- package/src/codegen/cosmos/group/v1/events.ts +633 -0
- package/src/codegen/cosmos/group/v1/genesis.ts +166 -0
- package/src/codegen/cosmos/group/v1/query.lcd.ts +207 -0
- package/src/codegen/cosmos/group/v1/query.rpc.Query.ts +229 -0
- package/src/codegen/cosmos/group/v1/query.ts +1840 -0
- package/src/codegen/cosmos/group/v1/tx.rpc.msg.ts +154 -0
- package/src/codegen/cosmos/group/v1/tx.ts +2004 -0
- package/src/codegen/cosmos/group/v1/types.ts +1528 -0
- package/src/codegen/cosmos/lcd.ts +114 -0
- package/src/codegen/cosmos/mint/module/v1/module.ts +71 -0
- package/src/codegen/cosmos/mint/v1beta1/genesis.ts +73 -0
- package/src/codegen/cosmos/mint/v1beta1/mint.ts +198 -0
- package/src/codegen/cosmos/mint/v1beta1/query.lcd.ts +38 -0
- package/src/codegen/cosmos/mint/v1beta1/query.rpc.Query.ts +63 -0
- package/src/codegen/cosmos/mint/v1beta1/query.ts +309 -0
- package/src/codegen/cosmos/mint/v1beta1/tx.rpc.msg.ts +29 -0
- package/src/codegen/cosmos/mint/v1beta1/tx.ts +135 -0
- package/src/codegen/cosmos/msg/textual/v1/textual.ts +1 -0
- package/src/codegen/cosmos/msg/v1/msg.ts +1 -0
- package/src/codegen/cosmos/nft/module/v1/module.ts +42 -0
- package/src/codegen/cosmos/nft/v1beta1/event.ts +268 -0
- package/src/codegen/cosmos/nft/v1beta1/genesis.ts +143 -0
- package/src/codegen/cosmos/nft/v1beta1/nft.ts +255 -0
- package/src/codegen/cosmos/nft/v1beta1/query.lcd.ts +98 -0
- package/src/codegen/cosmos/nft/v1beta1/query.rpc.Query.ts +124 -0
- package/src/codegen/cosmos/nft/v1beta1/query.ts +886 -0
- package/src/codegen/cosmos/nft/v1beta1/tx.rpc.msg.ts +24 -0
- package/src/codegen/cosmos/nft/v1beta1/tx.ts +140 -0
- package/src/codegen/cosmos/orm/module/v1alpha1/module.ts +50 -0
- package/src/codegen/cosmos/orm/query/v1alpha1/query.rpc.Query.ts +49 -0
- package/src/codegen/cosmos/orm/query/v1alpha1/query.ts +640 -0
- package/src/codegen/cosmos/orm/v1/orm.ts +356 -0
- package/src/codegen/cosmos/orm/v1alpha1/schema.ts +232 -0
- package/src/codegen/cosmos/params/module/v1/module.ts +42 -0
- package/src/codegen/cosmos/params/v1beta1/params.ts +166 -0
- package/src/codegen/cosmos/params/v1beta1/query.lcd.ts +45 -0
- package/src/codegen/cosmos/params/v1beta1/query.rpc.Query.ts +56 -0
- package/src/codegen/cosmos/params/v1beta1/query.ts +321 -0
- package/src/codegen/cosmos/query/v1/query.ts +1 -0
- package/src/codegen/cosmos/reflection/v1/reflection.ts +99 -0
- package/src/codegen/cosmos/rpc.query.ts +82 -0
- package/src/codegen/cosmos/rpc.tx.ts +61 -0
- package/src/codegen/cosmos/slashing/module/v1/module.ts +58 -0
- package/src/codegen/cosmos/slashing/v1beta1/genesis.ts +309 -0
- package/src/codegen/cosmos/slashing/v1beta1/query.lcd.ts +49 -0
- package/src/codegen/cosmos/slashing/v1beta1/query.rpc.Query.ts +65 -0
- package/src/codegen/cosmos/slashing/v1beta1/query.ts +358 -0
- package/src/codegen/cosmos/slashing/v1beta1/slashing.ts +249 -0
- package/src/codegen/cosmos/slashing/v1beta1/tx.rpc.msg.ts +43 -0
- package/src/codegen/cosmos/slashing/v1beta1/tx.ts +230 -0
- package/src/codegen/cosmos/staking/module/v1/module.ts +104 -0
- package/src/codegen/cosmos/staking/v1beta1/authz.ts +244 -0
- package/src/codegen/cosmos/staking/v1beta1/genesis.ts +233 -0
- package/src/codegen/cosmos/staking/v1beta1/query.lcd.ts +220 -0
- package/src/codegen/cosmos/staking/v1beta1/query.rpc.Query.ts +260 -0
- package/src/codegen/cosmos/staking/v1beta1/query.ts +1910 -0
- package/src/codegen/cosmos/staking/v1beta1/staking.ts +2075 -0
- package/src/codegen/cosmos/staking/v1beta1/tx.rpc.msg.ts +102 -0
- package/src/codegen/cosmos/staking/v1beta1/tx.ts +1039 -0
- package/src/codegen/cosmos/store/internal/kv/v1beta1/kv.ts +124 -0
- package/src/codegen/cosmos/store/snapshots/v1/snapshot.ts +564 -0
- package/src/codegen/cosmos/store/streaming/abci/grpc.ts +231 -0
- package/src/codegen/cosmos/store/v1beta1/commit_info.ts +234 -0
- package/src/codegen/cosmos/store/v1beta1/listening.ts +196 -0
- package/src/codegen/cosmos/tx/config/v1/config.ts +78 -0
- package/src/codegen/cosmos/tx/signing/v1beta1/signing.ts +487 -0
- package/src/codegen/cosmos/tx/v1beta1/service.lcd.ts +77 -0
- package/src/codegen/cosmos/tx/v1beta1/service.rpc.Service.ts +167 -0
- package/src/codegen/cosmos/tx/v1beta1/service.ts +1536 -0
- package/src/codegen/cosmos/tx/v1beta1/tx.ts +1331 -0
- package/src/codegen/cosmos/upgrade/module/v1/module.ts +58 -0
- package/src/codegen/cosmos/upgrade/v1beta1/query.lcd.ts +71 -0
- package/src/codegen/cosmos/upgrade/v1beta1/query.rpc.Query.ts +106 -0
- package/src/codegen/cosmos/upgrade/v1beta1/query.ts +617 -0
- package/src/codegen/cosmos/upgrade/v1beta1/tx.rpc.msg.ts +43 -0
- package/src/codegen/cosmos/upgrade/v1beta1/tx.ts +241 -0
- package/src/codegen/cosmos/upgrade/v1beta1/upgrade.ts +403 -0
- package/src/codegen/cosmos/vesting/module/v1/module.ts +42 -0
- package/src/codegen/cosmos/vesting/v1beta1/tx.rpc.msg.ts +57 -0
- package/src/codegen/cosmos/vesting/v1beta1/tx.ts +445 -0
- package/src/codegen/cosmos/vesting/v1beta1/vesting.ts +473 -0
- package/src/codegen/cosmos_proto/bundle.ts +3 -0
- package/src/codegen/cosmos_proto/cosmos.ts +255 -0
- package/src/codegen/gogoproto/bundle.ts +3 -0
- package/src/codegen/gogoproto/gogo.ts +1 -0
- package/src/codegen/google/api/annotations.ts +1 -0
- package/src/codegen/google/api/http.ts +920 -0
- package/src/codegen/google/bundle.ts +16 -0
- package/src/codegen/google/protobuf/any.ts +260 -0
- package/src/codegen/google/protobuf/descriptor.ts +3697 -0
- package/src/codegen/google/protobuf/duration.ts +201 -0
- package/src/codegen/google/protobuf/timestamp.ts +247 -0
- package/src/codegen/helpers.ts +242 -0
- package/src/codegen/index.ts +13 -0
- package/src/codegen/tendermint/abci/types.ts +4487 -0
- package/src/codegen/tendermint/bundle.ts +32 -0
- package/src/codegen/tendermint/crypto/keys.ts +69 -0
- package/src/codegen/tendermint/crypto/proof.ts +372 -0
- package/src/codegen/tendermint/libs/bits/types.ts +77 -0
- package/src/codegen/tendermint/p2p/types.ts +350 -0
- package/src/codegen/tendermint/types/block.ts +91 -0
- package/src/codegen/tendermint/types/evidence.ts +325 -0
- package/src/codegen/tendermint/types/params.ts +544 -0
- package/src/codegen/tendermint/types/types.ts +1558 -0
- package/src/codegen/tendermint/types/validator.ts +286 -0
- package/src/codegen/tendermint/version/types.ts +152 -0
- package/src/codegen/zogux/accountplus/accountplus.ts +152 -0
- package/src/codegen/zogux/accountplus/genesis.ts +186 -0
- package/src/codegen/zogux/accountplus/models.ts +103 -0
- package/src/codegen/zogux/accountplus/params.ts +62 -0
- package/src/codegen/zogux/accountplus/query.lcd.ts +46 -0
- package/src/codegen/zogux/accountplus/query.rpc.Query.ts +77 -0
- package/src/codegen/zogux/accountplus/query.ts +455 -0
- package/src/codegen/zogux/accountplus/tx.rpc.msg.ts +47 -0
- package/src/codegen/zogux/accountplus/tx.ts +460 -0
- package/src/codegen/zogux/affiliates/affiliates.ts +425 -0
- package/src/codegen/zogux/affiliates/genesis.ts +73 -0
- package/src/codegen/zogux/affiliates/query.lcd.ts +62 -0
- package/src/codegen/zogux/affiliates/query.rpc.Query.ts +105 -0
- package/src/codegen/zogux/affiliates/query.ts +747 -0
- package/src/codegen/zogux/affiliates/tx.rpc.msg.ts +64 -0
- package/src/codegen/zogux/affiliates/tx.ts +553 -0
- package/src/codegen/zogux/assets/asset.ts +167 -0
- package/src/codegen/zogux/assets/genesis.ts +58 -0
- package/src/codegen/zogux/assets/query.lcd.ts +41 -0
- package/src/codegen/zogux/assets/query.rpc.Query.ts +51 -0
- package/src/codegen/zogux/assets/query.ts +238 -0
- package/src/codegen/zogux/assets/tx.ts +1 -0
- package/src/codegen/zogux/blocktime/blocktime.ts +203 -0
- package/src/codegen/zogux/blocktime/genesis.ts +58 -0
- package/src/codegen/zogux/blocktime/params.ts +125 -0
- package/src/codegen/zogux/blocktime/query.lcd.ts +38 -0
- package/src/codegen/zogux/blocktime/query.rpc.Query.ts +77 -0
- package/src/codegen/zogux/blocktime/query.ts +428 -0
- package/src/codegen/zogux/blocktime/tx.rpc.msg.ts +34 -0
- package/src/codegen/zogux/blocktime/tx.ts +233 -0
- package/src/codegen/zogux/bridge/bridge_event.ts +171 -0
- package/src/codegen/zogux/bridge/bridge_event_info.ts +81 -0
- package/src/codegen/zogux/bridge/events.ts +434 -0
- package/src/codegen/zogux/bridge/genesis.ts +131 -0
- package/src/codegen/zogux/bridge/params.ts +404 -0
- package/src/codegen/zogux/bridge/query.lcd.ts +162 -0
- package/src/codegen/zogux/bridge/query.rpc.Query.ts +249 -0
- package/src/codegen/zogux/bridge/query.ts +1342 -0
- package/src/codegen/zogux/bridge/token.ts +1030 -0
- package/src/codegen/zogux/bridge/tss.ts +883 -0
- package/src/codegen/zogux/bridge/tx.rpc.msg.ts +159 -0
- package/src/codegen/zogux/bridge/tx.ts +542 -0
- package/src/codegen/zogux/bridge/withdrawal.ts +306 -0
- package/src/codegen/zogux/bundle.ts +441 -0
- package/src/codegen/zogux/clob/block_rate_limit_config.ts +216 -0
- package/src/codegen/zogux/clob/clob_pair.ts +396 -0
- package/src/codegen/zogux/clob/equity_tier_limit_config.ts +154 -0
- package/src/codegen/zogux/clob/finalize_block.ts +65 -0
- package/src/codegen/zogux/clob/genesis.ts +97 -0
- package/src/codegen/zogux/clob/liquidations.ts +288 -0
- package/src/codegen/zogux/clob/liquidations_config.ts +358 -0
- package/src/codegen/zogux/clob/matches.ts +552 -0
- package/src/codegen/zogux/clob/mev.ts +525 -0
- package/src/codegen/zogux/clob/operation.ts +200 -0
- package/src/codegen/zogux/clob/order.ts +1538 -0
- package/src/codegen/zogux/clob/order_removals.ts +228 -0
- package/src/codegen/zogux/clob/process_proposer_matches_events.ts +176 -0
- package/src/codegen/zogux/clob/query.lcd.ts +81 -0
- package/src/codegen/zogux/clob/query.rpc.Query.ts +166 -0
- package/src/codegen/zogux/clob/query.ts +1945 -0
- package/src/codegen/zogux/clob/streaming.ts +96 -0
- package/src/codegen/zogux/clob/tx.rpc.msg.ts +131 -0
- package/src/codegen/zogux/clob/tx.ts +1472 -0
- package/src/codegen/zogux/daemons/bridge/bridge.ts +104 -0
- package/src/codegen/zogux/daemons/liquidation/liquidation.ts +156 -0
- package/src/codegen/zogux/daemons/pricefeed/price_feed.ts +244 -0
- package/src/codegen/zogux/delaymsg/block_message_ids.ts +79 -0
- package/src/codegen/zogux/delaymsg/delayed_message.ts +87 -0
- package/src/codegen/zogux/delaymsg/genesis.ts +73 -0
- package/src/codegen/zogux/delaymsg/query.lcd.ts +38 -0
- package/src/codegen/zogux/delaymsg/query.rpc.Query.ts +63 -0
- package/src/codegen/zogux/delaymsg/query.ts +364 -0
- package/src/codegen/zogux/delaymsg/tx.rpc.msg.ts +27 -0
- package/src/codegen/zogux/delaymsg/tx.ts +142 -0
- package/src/codegen/zogux/epochs/epoch_info.ts +167 -0
- package/src/codegen/zogux/epochs/genesis.ts +58 -0
- package/src/codegen/zogux/epochs/query.lcd.ts +41 -0
- package/src/codegen/zogux/epochs/query.rpc.Query.ts +51 -0
- package/src/codegen/zogux/epochs/query.ts +237 -0
- package/src/codegen/zogux/feetiers/genesis.ts +74 -0
- package/src/codegen/zogux/feetiers/params.ts +184 -0
- package/src/codegen/zogux/feetiers/per_market_fee_discount.ts +111 -0
- package/src/codegen/zogux/feetiers/query.lcd.ts +71 -0
- package/src/codegen/zogux/feetiers/query.rpc.Query.ts +108 -0
- package/src/codegen/zogux/feetiers/query.ts +715 -0
- package/src/codegen/zogux/feetiers/staking_tier.ts +151 -0
- package/src/codegen/zogux/feetiers/tx.rpc.msg.ts +47 -0
- package/src/codegen/zogux/feetiers/tx.ts +351 -0
- package/src/codegen/zogux/govplus/genesis.ts +42 -0
- package/src/codegen/zogux/govplus/query.rpc.Query.ts +18 -0
- package/src/codegen/zogux/govplus/query.ts +1 -0
- package/src/codegen/zogux/govplus/tx.rpc.msg.ts +27 -0
- package/src/codegen/zogux/govplus/tx.ts +173 -0
- package/src/codegen/zogux/indexer/events/events.ts +4292 -0
- package/src/codegen/zogux/indexer/indexer_manager/event.ts +428 -0
- package/src/codegen/zogux/indexer/off_chain_updates/off_chain_updates.ts +594 -0
- package/src/codegen/zogux/indexer/protocol/v1/clob.ts +887 -0
- package/src/codegen/zogux/indexer/protocol/v1/perpetual.ts +52 -0
- package/src/codegen/zogux/indexer/protocol/v1/subaccount.ts +281 -0
- package/src/codegen/zogux/indexer/protocol/v1/vault.ts +69 -0
- package/src/codegen/zogux/indexer/redis/redis_order.ts +190 -0
- package/src/codegen/zogux/indexer/shared/removal_reason.ts +216 -0
- package/src/codegen/zogux/indexer/socks/messages.ts +656 -0
- package/src/codegen/zogux/lcd.ts +176 -0
- package/src/codegen/zogux/listing/genesis.ts +76 -0
- package/src/codegen/zogux/listing/params.ts +89 -0
- package/src/codegen/zogux/listing/query.lcd.ts +30 -0
- package/src/codegen/zogux/listing/query.rpc.Query.ts +49 -0
- package/src/codegen/zogux/listing/query.ts +194 -0
- package/src/codegen/zogux/listing/tx.rpc.msg.ts +57 -0
- package/src/codegen/zogux/listing/tx.ts +483 -0
- package/src/codegen/zogux/perpetuals/genesis.ts +83 -0
- package/src/codegen/zogux/perpetuals/params.ts +97 -0
- package/src/codegen/zogux/perpetuals/perpetual.ts +660 -0
- package/src/codegen/zogux/perpetuals/query.lcd.ts +91 -0
- package/src/codegen/zogux/perpetuals/query.rpc.Query.ts +123 -0
- package/src/codegen/zogux/perpetuals/query.ts +765 -0
- package/src/codegen/zogux/perpetuals/tx.rpc.msg.ts +70 -0
- package/src/codegen/zogux/perpetuals/tx.ts +649 -0
- package/src/codegen/zogux/prices/genesis.ts +71 -0
- package/src/codegen/zogux/prices/market_param.ts +162 -0
- package/src/codegen/zogux/prices/market_price.ts +95 -0
- package/src/codegen/zogux/prices/query.lcd.ts +75 -0
- package/src/codegen/zogux/prices/query.rpc.Query.ts +95 -0
- package/src/codegen/zogux/prices/query.ts +630 -0
- package/src/codegen/zogux/prices/streaming.ts +87 -0
- package/src/codegen/zogux/prices/tx.rpc.msg.ts +50 -0
- package/src/codegen/zogux/prices/tx.ts +405 -0
- package/src/codegen/zogux/ratelimit/capacity.ts +147 -0
- package/src/codegen/zogux/ratelimit/genesis.ts +59 -0
- package/src/codegen/zogux/ratelimit/limit_params.ts +174 -0
- package/src/codegen/zogux/ratelimit/pending_send_packet.ts +75 -0
- package/src/codegen/zogux/ratelimit/query.lcd.ts +46 -0
- package/src/codegen/zogux/ratelimit/query.rpc.Query.ts +63 -0
- package/src/codegen/zogux/ratelimit/query.ts +333 -0
- package/src/codegen/zogux/ratelimit/tx.rpc.msg.ts +24 -0
- package/src/codegen/zogux/ratelimit/tx.ts +112 -0
- package/src/codegen/zogux/revshare/genesis.ts +58 -0
- package/src/codegen/zogux/revshare/params.ts +93 -0
- package/src/codegen/zogux/revshare/query.lcd.ts +47 -0
- package/src/codegen/zogux/revshare/query.rpc.Query.ts +80 -0
- package/src/codegen/zogux/revshare/query.ts +415 -0
- package/src/codegen/zogux/revshare/revshare.ts +266 -0
- package/src/codegen/zogux/revshare/tx.rpc.msg.ts +60 -0
- package/src/codegen/zogux/revshare/tx.ts +462 -0
- package/src/codegen/zogux/rewards/genesis.ts +59 -0
- package/src/codegen/zogux/rewards/params.ts +122 -0
- package/src/codegen/zogux/rewards/query.lcd.ts +22 -0
- package/src/codegen/zogux/rewards/query.rpc.Query.ts +35 -0
- package/src/codegen/zogux/rewards/query.ts +98 -0
- package/src/codegen/zogux/rewards/reward_share.ts +75 -0
- package/src/codegen/zogux/rewards/tx.rpc.msg.ts +24 -0
- package/src/codegen/zogux/rewards/tx.ts +112 -0
- package/src/codegen/zogux/rpc.query.ts +106 -0
- package/src/codegen/zogux/rpc.tx.ts +82 -0
- package/src/codegen/zogux/sending/genesis.ts +42 -0
- package/src/codegen/zogux/sending/query.rpc.Query.ts +18 -0
- package/src/codegen/zogux/sending/query.ts +1 -0
- package/src/codegen/zogux/sending/transfer.ts +420 -0
- package/src/codegen/zogux/sending/tx.rpc.msg.ts +64 -0
- package/src/codegen/zogux/sending/tx.ts +237 -0
- package/src/codegen/zogux/stats/genesis.ts +59 -0
- package/src/codegen/zogux/stats/params.ts +59 -0
- package/src/codegen/zogux/stats/query.lcd.ts +54 -0
- package/src/codegen/zogux/stats/query.rpc.Query.ts +77 -0
- package/src/codegen/zogux/stats/query.ts +412 -0
- package/src/codegen/zogux/stats/stats.ts +593 -0
- package/src/codegen/zogux/stats/tx.rpc.msg.ts +24 -0
- package/src/codegen/zogux/stats/tx.ts +112 -0
- package/src/codegen/zogux/subaccounts/asset_position.ts +96 -0
- package/src/codegen/zogux/subaccounts/genesis.ts +58 -0
- package/src/codegen/zogux/subaccounts/leverage.ts +134 -0
- package/src/codegen/zogux/subaccounts/perpetual_position.ts +109 -0
- package/src/codegen/zogux/subaccounts/query.lcd.ts +58 -0
- package/src/codegen/zogux/subaccounts/query.rpc.Query.ts +82 -0
- package/src/codegen/zogux/subaccounts/query.ts +527 -0
- package/src/codegen/zogux/subaccounts/streaming.ts +266 -0
- package/src/codegen/zogux/subaccounts/subaccount.ts +190 -0
- package/src/codegen/zogux/token/genesis.ts +73 -0
- package/src/codegen/zogux/token/params.ts +196 -0
- package/src/codegen/zogux/token/query.lcd.ts +38 -0
- package/src/codegen/zogux/token/query.rpc.Query.ts +63 -0
- package/src/codegen/zogux/token/query.ts +342 -0
- package/src/codegen/zogux/token/tx.rpc.msg.ts +84 -0
- package/src/codegen/zogux/token/tx.ts +828 -0
- package/src/codegen/zogux/vault/genesis.ts +433 -0
- package/src/codegen/zogux/vault/params.ts +523 -0
- package/src/codegen/zogux/vault/query.lcd.ts +91 -0
- package/src/codegen/zogux/vault/query.rpc.Query.ts +137 -0
- package/src/codegen/zogux/vault/query.ts +1162 -0
- package/src/codegen/zogux/vault/share.ts +271 -0
- package/src/codegen/zogux/vault/tx.rpc.msg.ts +97 -0
- package/src/codegen/zogux/vault/tx.ts +1189 -0
- package/src/codegen/zogux/vault/vault.ts +185 -0
- package/src/codegen/zogux/vest/genesis.ts +59 -0
- package/src/codegen/zogux/vest/query.lcd.ts +30 -0
- package/src/codegen/zogux/vest/query.rpc.Query.ts +35 -0
- package/src/codegen/zogux/vest/query.ts +114 -0
- package/src/codegen/zogux/vest/tx.rpc.msg.ts +34 -0
- package/src/codegen/zogux/vest/tx.ts +223 -0
- package/src/codegen/zogux/vest/vest_entry.ts +127 -0
|
@@ -0,0 +1,1538 @@
|
|
|
1
|
+
import { SubaccountId, SubaccountIdSDKType } from "../subaccounts/subaccount";
|
|
2
|
+
import { PerpetualLiquidationInfo, PerpetualLiquidationInfoSDKType } from "./liquidations";
|
|
3
|
+
import * as _m0 from "protobufjs/minimal";
|
|
4
|
+
import { DeepPartial, Long } from "../../helpers";
|
|
5
|
+
/**
|
|
6
|
+
* Represents the side of the orderbook the order will be placed on.
|
|
7
|
+
* Note that Side.SIDE_UNSPECIFIED is an invalid order and cannot be
|
|
8
|
+
* placed on the orderbook.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export enum Order_Side {
|
|
12
|
+
/** SIDE_UNSPECIFIED - Default value. This value is invalid and unused. */
|
|
13
|
+
SIDE_UNSPECIFIED = 0,
|
|
14
|
+
|
|
15
|
+
/** SIDE_BUY - SIDE_BUY is used to represent a BUY order. */
|
|
16
|
+
SIDE_BUY = 1,
|
|
17
|
+
|
|
18
|
+
/** SIDE_SELL - SIDE_SELL is used to represent a SELL order. */
|
|
19
|
+
SIDE_SELL = 2,
|
|
20
|
+
UNRECOGNIZED = -1,
|
|
21
|
+
}
|
|
22
|
+
export const Order_SideSDKType = Order_Side;
|
|
23
|
+
export function order_SideFromJSON(object: any): Order_Side {
|
|
24
|
+
switch (object) {
|
|
25
|
+
case 0:
|
|
26
|
+
case "SIDE_UNSPECIFIED":
|
|
27
|
+
return Order_Side.SIDE_UNSPECIFIED;
|
|
28
|
+
|
|
29
|
+
case 1:
|
|
30
|
+
case "SIDE_BUY":
|
|
31
|
+
return Order_Side.SIDE_BUY;
|
|
32
|
+
|
|
33
|
+
case 2:
|
|
34
|
+
case "SIDE_SELL":
|
|
35
|
+
return Order_Side.SIDE_SELL;
|
|
36
|
+
|
|
37
|
+
case -1:
|
|
38
|
+
case "UNRECOGNIZED":
|
|
39
|
+
default:
|
|
40
|
+
return Order_Side.UNRECOGNIZED;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export function order_SideToJSON(object: Order_Side): string {
|
|
44
|
+
switch (object) {
|
|
45
|
+
case Order_Side.SIDE_UNSPECIFIED:
|
|
46
|
+
return "SIDE_UNSPECIFIED";
|
|
47
|
+
|
|
48
|
+
case Order_Side.SIDE_BUY:
|
|
49
|
+
return "SIDE_BUY";
|
|
50
|
+
|
|
51
|
+
case Order_Side.SIDE_SELL:
|
|
52
|
+
return "SIDE_SELL";
|
|
53
|
+
|
|
54
|
+
case Order_Side.UNRECOGNIZED:
|
|
55
|
+
default:
|
|
56
|
+
return "UNRECOGNIZED";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* TimeInForce indicates how long an order will remain active before it
|
|
61
|
+
* is executed or expires.
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
export enum Order_TimeInForce {
|
|
65
|
+
/**
|
|
66
|
+
* TIME_IN_FORCE_UNSPECIFIED - TIME_IN_FORCE_UNSPECIFIED represents the default behavior where an
|
|
67
|
+
* order will first match with existing orders on the book, and any
|
|
68
|
+
* remaining size will be added to the book as a maker order.
|
|
69
|
+
*/
|
|
70
|
+
TIME_IN_FORCE_UNSPECIFIED = 0,
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* TIME_IN_FORCE_IOC - TIME_IN_FORCE_IOC enforces that an order only be matched with
|
|
74
|
+
* maker orders on the book. If the order has remaining size after
|
|
75
|
+
* matching with existing orders on the book, the remaining size
|
|
76
|
+
* is not placed on the book.
|
|
77
|
+
*/
|
|
78
|
+
TIME_IN_FORCE_IOC = 1,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* TIME_IN_FORCE_POST_ONLY - TIME_IN_FORCE_POST_ONLY enforces that an order only be placed
|
|
82
|
+
* on the book as a maker order. Note this means that validators will cancel
|
|
83
|
+
* any newly-placed post only orders that would cross with other maker
|
|
84
|
+
* orders.
|
|
85
|
+
*/
|
|
86
|
+
TIME_IN_FORCE_POST_ONLY = 2,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* TIME_IN_FORCE_FILL_OR_KILL - TIME_IN_FORCE_FILL_OR_KILL has been deprecated and will be removed in
|
|
90
|
+
* future versions.
|
|
91
|
+
*/
|
|
92
|
+
TIME_IN_FORCE_FILL_OR_KILL = 3,
|
|
93
|
+
UNRECOGNIZED = -1,
|
|
94
|
+
}
|
|
95
|
+
export const Order_TimeInForceSDKType = Order_TimeInForce;
|
|
96
|
+
export function order_TimeInForceFromJSON(object: any): Order_TimeInForce {
|
|
97
|
+
switch (object) {
|
|
98
|
+
case 0:
|
|
99
|
+
case "TIME_IN_FORCE_UNSPECIFIED":
|
|
100
|
+
return Order_TimeInForce.TIME_IN_FORCE_UNSPECIFIED;
|
|
101
|
+
|
|
102
|
+
case 1:
|
|
103
|
+
case "TIME_IN_FORCE_IOC":
|
|
104
|
+
return Order_TimeInForce.TIME_IN_FORCE_IOC;
|
|
105
|
+
|
|
106
|
+
case 2:
|
|
107
|
+
case "TIME_IN_FORCE_POST_ONLY":
|
|
108
|
+
return Order_TimeInForce.TIME_IN_FORCE_POST_ONLY;
|
|
109
|
+
|
|
110
|
+
case 3:
|
|
111
|
+
case "TIME_IN_FORCE_FILL_OR_KILL":
|
|
112
|
+
return Order_TimeInForce.TIME_IN_FORCE_FILL_OR_KILL;
|
|
113
|
+
|
|
114
|
+
case -1:
|
|
115
|
+
case "UNRECOGNIZED":
|
|
116
|
+
default:
|
|
117
|
+
return Order_TimeInForce.UNRECOGNIZED;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export function order_TimeInForceToJSON(object: Order_TimeInForce): string {
|
|
121
|
+
switch (object) {
|
|
122
|
+
case Order_TimeInForce.TIME_IN_FORCE_UNSPECIFIED:
|
|
123
|
+
return "TIME_IN_FORCE_UNSPECIFIED";
|
|
124
|
+
|
|
125
|
+
case Order_TimeInForce.TIME_IN_FORCE_IOC:
|
|
126
|
+
return "TIME_IN_FORCE_IOC";
|
|
127
|
+
|
|
128
|
+
case Order_TimeInForce.TIME_IN_FORCE_POST_ONLY:
|
|
129
|
+
return "TIME_IN_FORCE_POST_ONLY";
|
|
130
|
+
|
|
131
|
+
case Order_TimeInForce.TIME_IN_FORCE_FILL_OR_KILL:
|
|
132
|
+
return "TIME_IN_FORCE_FILL_OR_KILL";
|
|
133
|
+
|
|
134
|
+
case Order_TimeInForce.UNRECOGNIZED:
|
|
135
|
+
default:
|
|
136
|
+
return "UNRECOGNIZED";
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export enum Order_ConditionType {
|
|
140
|
+
/**
|
|
141
|
+
* CONDITION_TYPE_UNSPECIFIED - CONDITION_TYPE_UNSPECIFIED represents the default behavior where an
|
|
142
|
+
* order will be placed immediately on the orderbook.
|
|
143
|
+
*/
|
|
144
|
+
CONDITION_TYPE_UNSPECIFIED = 0,
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* CONDITION_TYPE_STOP_LOSS - CONDITION_TYPE_STOP_LOSS represents a stop order. A stop order will
|
|
148
|
+
* trigger when the oracle price moves at or above the trigger price for
|
|
149
|
+
* buys, and at or below the trigger price for sells.
|
|
150
|
+
*/
|
|
151
|
+
CONDITION_TYPE_STOP_LOSS = 1,
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* CONDITION_TYPE_TAKE_PROFIT - CONDITION_TYPE_TAKE_PROFIT represents a take profit order. A take profit
|
|
155
|
+
* order will trigger when the oracle price moves at or below the trigger
|
|
156
|
+
* price for buys and at or above the trigger price for sells.
|
|
157
|
+
*/
|
|
158
|
+
CONDITION_TYPE_TAKE_PROFIT = 2,
|
|
159
|
+
UNRECOGNIZED = -1,
|
|
160
|
+
}
|
|
161
|
+
export const Order_ConditionTypeSDKType = Order_ConditionType;
|
|
162
|
+
export function order_ConditionTypeFromJSON(object: any): Order_ConditionType {
|
|
163
|
+
switch (object) {
|
|
164
|
+
case 0:
|
|
165
|
+
case "CONDITION_TYPE_UNSPECIFIED":
|
|
166
|
+
return Order_ConditionType.CONDITION_TYPE_UNSPECIFIED;
|
|
167
|
+
|
|
168
|
+
case 1:
|
|
169
|
+
case "CONDITION_TYPE_STOP_LOSS":
|
|
170
|
+
return Order_ConditionType.CONDITION_TYPE_STOP_LOSS;
|
|
171
|
+
|
|
172
|
+
case 2:
|
|
173
|
+
case "CONDITION_TYPE_TAKE_PROFIT":
|
|
174
|
+
return Order_ConditionType.CONDITION_TYPE_TAKE_PROFIT;
|
|
175
|
+
|
|
176
|
+
case -1:
|
|
177
|
+
case "UNRECOGNIZED":
|
|
178
|
+
default:
|
|
179
|
+
return Order_ConditionType.UNRECOGNIZED;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
export function order_ConditionTypeToJSON(object: Order_ConditionType): string {
|
|
183
|
+
switch (object) {
|
|
184
|
+
case Order_ConditionType.CONDITION_TYPE_UNSPECIFIED:
|
|
185
|
+
return "CONDITION_TYPE_UNSPECIFIED";
|
|
186
|
+
|
|
187
|
+
case Order_ConditionType.CONDITION_TYPE_STOP_LOSS:
|
|
188
|
+
return "CONDITION_TYPE_STOP_LOSS";
|
|
189
|
+
|
|
190
|
+
case Order_ConditionType.CONDITION_TYPE_TAKE_PROFIT:
|
|
191
|
+
return "CONDITION_TYPE_TAKE_PROFIT";
|
|
192
|
+
|
|
193
|
+
case Order_ConditionType.UNRECOGNIZED:
|
|
194
|
+
default:
|
|
195
|
+
return "UNRECOGNIZED";
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/** OrderId refers to a single order belonging to a Subaccount. */
|
|
199
|
+
|
|
200
|
+
export interface OrderId {
|
|
201
|
+
/**
|
|
202
|
+
* The subaccount ID that opened this order.
|
|
203
|
+
* Note that this field has `gogoproto.nullable = false` so that it is
|
|
204
|
+
* generated as a value instead of a pointer. This is because the `OrderId`
|
|
205
|
+
* proto is used as a key within maps, and map comparisons will compare
|
|
206
|
+
* pointers for equality (when the desired behavior is to compare the values).
|
|
207
|
+
*/
|
|
208
|
+
subaccountId?: SubaccountId;
|
|
209
|
+
/**
|
|
210
|
+
* The client ID of this order, unique with respect to the specific
|
|
211
|
+
* sub account (I.E., the same subaccount can't have two orders with
|
|
212
|
+
* the same ClientId).
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
clientId: number;
|
|
216
|
+
/**
|
|
217
|
+
* order_flags represent order flags for the order. This field is invalid if
|
|
218
|
+
* it's greater than 257. Each bit represents a different flag.
|
|
219
|
+
*
|
|
220
|
+
* The following are the valid orderId flags:
|
|
221
|
+
* ShortTerm = uint32(0)
|
|
222
|
+
* Conditional = uint32(32)
|
|
223
|
+
* LongTerm = uint32(64)
|
|
224
|
+
* Twap = uint32(128)
|
|
225
|
+
* TwapSuborder = uint32(256) (for internal use only)
|
|
226
|
+
*
|
|
227
|
+
* If both bits are set or bits other than the 2nd and 3rd are set, the order
|
|
228
|
+
* ID is invalid.
|
|
229
|
+
*/
|
|
230
|
+
|
|
231
|
+
orderFlags: number;
|
|
232
|
+
/** ID of the CLOB the order is created for. */
|
|
233
|
+
|
|
234
|
+
clobPairId: number;
|
|
235
|
+
}
|
|
236
|
+
/** OrderId refers to a single order belonging to a Subaccount. */
|
|
237
|
+
|
|
238
|
+
export interface OrderIdSDKType {
|
|
239
|
+
subaccount_id?: SubaccountIdSDKType;
|
|
240
|
+
client_id: number;
|
|
241
|
+
order_flags: number;
|
|
242
|
+
clob_pair_id: number;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* OrdersFilledDuringLatestBlock represents a list of `OrderIds` that were
|
|
246
|
+
* filled by any non-zero amount in the latest block.
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
export interface OrdersFilledDuringLatestBlock {
|
|
250
|
+
/**
|
|
251
|
+
* A list of unique order_ids that were filled by any non-zero amount in the
|
|
252
|
+
* latest block.
|
|
253
|
+
*/
|
|
254
|
+
orderIds: OrderId[];
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* OrdersFilledDuringLatestBlock represents a list of `OrderIds` that were
|
|
258
|
+
* filled by any non-zero amount in the latest block.
|
|
259
|
+
*/
|
|
260
|
+
|
|
261
|
+
export interface OrdersFilledDuringLatestBlockSDKType {
|
|
262
|
+
order_ids: OrderIdSDKType[];
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* PotentiallyPrunableOrders represents a list of orders that may be prunable
|
|
266
|
+
* from state at a future block height.
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
export interface PotentiallyPrunableOrders {
|
|
270
|
+
/**
|
|
271
|
+
* A list of unique order_ids that may potentially be pruned from state at a
|
|
272
|
+
* future block height.
|
|
273
|
+
*/
|
|
274
|
+
orderIds: OrderId[];
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* PotentiallyPrunableOrders represents a list of orders that may be prunable
|
|
278
|
+
* from state at a future block height.
|
|
279
|
+
*/
|
|
280
|
+
|
|
281
|
+
export interface PotentiallyPrunableOrdersSDKType {
|
|
282
|
+
order_ids: OrderIdSDKType[];
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* OrderFillState represents the fill amount of an order according to on-chain
|
|
286
|
+
* state. This proto includes both the current on-chain fill amount of the
|
|
287
|
+
* order, as well as the block at which this information can be pruned from
|
|
288
|
+
* state.
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
export interface OrderFillState {
|
|
292
|
+
/** The current fillAmount of the order according to on-chain state. */
|
|
293
|
+
fillAmount: Long;
|
|
294
|
+
/**
|
|
295
|
+
* The block height at which the fillAmount state for this order can be
|
|
296
|
+
* pruned.
|
|
297
|
+
*/
|
|
298
|
+
|
|
299
|
+
prunableBlockHeight: number;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* OrderFillState represents the fill amount of an order according to on-chain
|
|
303
|
+
* state. This proto includes both the current on-chain fill amount of the
|
|
304
|
+
* order, as well as the block at which this information can be pruned from
|
|
305
|
+
* state.
|
|
306
|
+
*/
|
|
307
|
+
|
|
308
|
+
export interface OrderFillStateSDKType {
|
|
309
|
+
fill_amount: Long;
|
|
310
|
+
prunable_block_height: number;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* StatefulOrderTimeSliceValue represents the type of the value of the
|
|
314
|
+
* `StatefulOrdersTimeSlice` in state. The `StatefulOrdersTimeSlice`
|
|
315
|
+
* in state consists of key/value pairs where the keys are UTF-8-encoded
|
|
316
|
+
* `RFC3339NANO` timestamp strings with right-padded zeroes and no
|
|
317
|
+
* time zone info, and the values are of type `StatefulOrderTimeSliceValue`.
|
|
318
|
+
* This `StatefulOrderTimeSliceValue` in state is used for managing stateful
|
|
319
|
+
* order expiration. Stateful order expirations can be for either long term
|
|
320
|
+
* or conditional orders.
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
export interface StatefulOrderTimeSliceValue {
|
|
324
|
+
/**
|
|
325
|
+
* A unique list of order_ids that expire at this timestamp, sorted in
|
|
326
|
+
* ascending order by block height and transaction index of each stateful
|
|
327
|
+
* order.
|
|
328
|
+
*/
|
|
329
|
+
orderIds: OrderId[];
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* StatefulOrderTimeSliceValue represents the type of the value of the
|
|
333
|
+
* `StatefulOrdersTimeSlice` in state. The `StatefulOrdersTimeSlice`
|
|
334
|
+
* in state consists of key/value pairs where the keys are UTF-8-encoded
|
|
335
|
+
* `RFC3339NANO` timestamp strings with right-padded zeroes and no
|
|
336
|
+
* time zone info, and the values are of type `StatefulOrderTimeSliceValue`.
|
|
337
|
+
* This `StatefulOrderTimeSliceValue` in state is used for managing stateful
|
|
338
|
+
* order expiration. Stateful order expirations can be for either long term
|
|
339
|
+
* or conditional orders.
|
|
340
|
+
*/
|
|
341
|
+
|
|
342
|
+
export interface StatefulOrderTimeSliceValueSDKType {
|
|
343
|
+
order_ids: OrderIdSDKType[];
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* LongTermOrderPlacement represents the placement of a stateful order in
|
|
347
|
+
* state. It stores the stateful order itself and the `EthBlockHeight` and
|
|
348
|
+
* `TransactionIndex` at which the order was placed.
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
export interface LongTermOrderPlacement {
|
|
352
|
+
order?: Order;
|
|
353
|
+
/**
|
|
354
|
+
* The block height and transaction index at which the order was placed.
|
|
355
|
+
* Used for ordering by time priority when the chain is restarted.
|
|
356
|
+
*/
|
|
357
|
+
|
|
358
|
+
placementIndex?: TransactionOrdering;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* LongTermOrderPlacement represents the placement of a stateful order in
|
|
362
|
+
* state. It stores the stateful order itself and the `EthBlockHeight` and
|
|
363
|
+
* `TransactionIndex` at which the order was placed.
|
|
364
|
+
*/
|
|
365
|
+
|
|
366
|
+
export interface LongTermOrderPlacementSDKType {
|
|
367
|
+
order?: OrderSDKType;
|
|
368
|
+
placement_index?: TransactionOrderingSDKType;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* TwapOrderPlacement represents the placement of a TWAP order in
|
|
372
|
+
* the TWAP Order State. It will store the original parent TWAP order as
|
|
373
|
+
* well as maintain the state of the remaining legs and quantums
|
|
374
|
+
* to be executed.
|
|
375
|
+
*/
|
|
376
|
+
|
|
377
|
+
export interface TwapOrderPlacement {
|
|
378
|
+
order?: Order;
|
|
379
|
+
/** The number of legs remaining to be executed. */
|
|
380
|
+
|
|
381
|
+
remainingLegs: number;
|
|
382
|
+
/** The number of quantums remaining to be executed. */
|
|
383
|
+
|
|
384
|
+
remainingQuantums: Long;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* TwapOrderPlacement represents the placement of a TWAP order in
|
|
388
|
+
* the TWAP Order State. It will store the original parent TWAP order as
|
|
389
|
+
* well as maintain the state of the remaining legs and quantums
|
|
390
|
+
* to be executed.
|
|
391
|
+
*/
|
|
392
|
+
|
|
393
|
+
export interface TwapOrderPlacementSDKType {
|
|
394
|
+
order?: OrderSDKType;
|
|
395
|
+
remaining_legs: number;
|
|
396
|
+
remaining_quantums: Long;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* ConditionalOrderPlacement represents the placement of a conditional order in
|
|
400
|
+
* state. It stores the stateful order itself, the `EthBlockHeight` and
|
|
401
|
+
* `TransactionIndex` at which the order was placed and triggered.
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
export interface ConditionalOrderPlacement {
|
|
405
|
+
order?: Order;
|
|
406
|
+
/** The block height and transaction index at which the order was placed. */
|
|
407
|
+
|
|
408
|
+
placementIndex?: TransactionOrdering;
|
|
409
|
+
/**
|
|
410
|
+
* The block height and transaction index at which the order was triggered.
|
|
411
|
+
* Set to be nil if the transaction has not been triggered.
|
|
412
|
+
* Used for ordering by time priority when the chain is restarted.
|
|
413
|
+
*/
|
|
414
|
+
|
|
415
|
+
triggerIndex?: TransactionOrdering;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* ConditionalOrderPlacement represents the placement of a conditional order in
|
|
419
|
+
* state. It stores the stateful order itself, the `EthBlockHeight` and
|
|
420
|
+
* `TransactionIndex` at which the order was placed and triggered.
|
|
421
|
+
*/
|
|
422
|
+
|
|
423
|
+
export interface ConditionalOrderPlacementSDKType {
|
|
424
|
+
order?: OrderSDKType;
|
|
425
|
+
placement_index?: TransactionOrderingSDKType;
|
|
426
|
+
trigger_index?: TransactionOrderingSDKType;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Order represents a single order belonging to a `Subaccount`
|
|
430
|
+
* for a particular `ClobPair`.
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
export interface Order {
|
|
434
|
+
/** The unique ID of this order. Meant to be unique across all orders. */
|
|
435
|
+
orderId?: OrderId;
|
|
436
|
+
side: Order_Side;
|
|
437
|
+
/**
|
|
438
|
+
* The size of this order in base quantums. Must be a multiple of
|
|
439
|
+
* `ClobPair.StepBaseQuantums` (where `ClobPair.Id = orderId.ClobPairId`).
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
quantums: Long;
|
|
443
|
+
/**
|
|
444
|
+
* The price level that this order will be placed at on the orderbook,
|
|
445
|
+
* in subticks. Must be a multiple of ClobPair.SubticksPerTick
|
|
446
|
+
* (where `ClobPair.Id = orderId.ClobPairId`).
|
|
447
|
+
*/
|
|
448
|
+
|
|
449
|
+
subticks: Long;
|
|
450
|
+
/**
|
|
451
|
+
* The last block this order can be executed at (after which it will be
|
|
452
|
+
* unfillable). Used only for Short-Term orders. If this value is non-zero
|
|
453
|
+
* then the order is assumed to be a Short-Term order.
|
|
454
|
+
*/
|
|
455
|
+
|
|
456
|
+
goodTilBlock?: number;
|
|
457
|
+
/**
|
|
458
|
+
* good_til_block_time represents the unix timestamp (in seconds) at which a
|
|
459
|
+
* stateful order will be considered expired. The
|
|
460
|
+
* good_til_block_time is always evaluated against the previous block's
|
|
461
|
+
* `BlockTime` instead of the block in which the order is committed. If this
|
|
462
|
+
* value is non-zero then the order is assumed to be a stateful or
|
|
463
|
+
* conditional order.
|
|
464
|
+
*/
|
|
465
|
+
|
|
466
|
+
goodTilBlockTime?: number;
|
|
467
|
+
/** The time in force of this order. */
|
|
468
|
+
|
|
469
|
+
timeInForce: Order_TimeInForce;
|
|
470
|
+
/**
|
|
471
|
+
* Enforces that the order can only reduce the size of an existing position.
|
|
472
|
+
* If a ReduceOnly order would change the side of the existing position,
|
|
473
|
+
* its size is reduced to that of the remaining size of the position.
|
|
474
|
+
* If existing orders on the book with ReduceOnly
|
|
475
|
+
* would already close the position, the least aggressive (out-of-the-money)
|
|
476
|
+
* ReduceOnly orders are resized and canceled first.
|
|
477
|
+
*/
|
|
478
|
+
|
|
479
|
+
reduceOnly: boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Set of bit flags set arbitrarily by clients and ignored by the protocol.
|
|
482
|
+
* Used by indexer to infer information about a placed order.
|
|
483
|
+
*/
|
|
484
|
+
|
|
485
|
+
clientMetadata: number;
|
|
486
|
+
conditionType: Order_ConditionType;
|
|
487
|
+
/**
|
|
488
|
+
* conditional_order_trigger_subticks represents the price at which this order
|
|
489
|
+
* will be triggered. If the condition_type is CONDITION_TYPE_UNSPECIFIED,
|
|
490
|
+
* this value is enforced to be 0. If this value is nonzero, condition_type
|
|
491
|
+
* cannot be CONDITION_TYPE_UNSPECIFIED. Value is in subticks.
|
|
492
|
+
* Must be a multiple of ClobPair.SubticksPerTick (where `ClobPair.Id =
|
|
493
|
+
* orderId.ClobPairId`).
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
conditionalOrderTriggerSubticks: Long;
|
|
497
|
+
/**
|
|
498
|
+
* twap_parameters represent the configuration for a TWAP order. This must be
|
|
499
|
+
* set for twap orders and will be ignored for all other order types.
|
|
500
|
+
*/
|
|
501
|
+
|
|
502
|
+
twapParameters?: TwapParameters;
|
|
503
|
+
/**
|
|
504
|
+
* builder_code_parameters is the metadata for the
|
|
505
|
+
* partner or builder of an order specifying the fees charged.
|
|
506
|
+
*/
|
|
507
|
+
|
|
508
|
+
builderCodeParameters?: BuilderCodeParameters;
|
|
509
|
+
/**
|
|
510
|
+
* order_router_address is the address of the order router that placed the
|
|
511
|
+
* order.
|
|
512
|
+
*/
|
|
513
|
+
|
|
514
|
+
orderRouterAddress: string;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Order represents a single order belonging to a `Subaccount`
|
|
518
|
+
* for a particular `ClobPair`.
|
|
519
|
+
*/
|
|
520
|
+
|
|
521
|
+
export interface OrderSDKType {
|
|
522
|
+
order_id?: OrderIdSDKType;
|
|
523
|
+
side: Order_Side;
|
|
524
|
+
quantums: Long;
|
|
525
|
+
subticks: Long;
|
|
526
|
+
good_til_block?: number;
|
|
527
|
+
good_til_block_time?: number;
|
|
528
|
+
time_in_force: Order_TimeInForce;
|
|
529
|
+
reduce_only: boolean;
|
|
530
|
+
client_metadata: number;
|
|
531
|
+
condition_type: Order_ConditionType;
|
|
532
|
+
conditional_order_trigger_subticks: Long;
|
|
533
|
+
twap_parameters?: TwapParametersSDKType;
|
|
534
|
+
builder_code_parameters?: BuilderCodeParametersSDKType;
|
|
535
|
+
order_router_address: string;
|
|
536
|
+
}
|
|
537
|
+
/** TwapParameters represents the necessary configuration for a TWAP order. */
|
|
538
|
+
|
|
539
|
+
export interface TwapParameters {
|
|
540
|
+
/**
|
|
541
|
+
* Duration of the TWAP order execution in seconds. Must be in the range
|
|
542
|
+
* [300 (5 minutes), 86400 (24 hours)].
|
|
543
|
+
*/
|
|
544
|
+
duration: number;
|
|
545
|
+
/**
|
|
546
|
+
* Interval in seconds for each suborder to execute. Must be a
|
|
547
|
+
* whole number, a factor of the duration, and in the range
|
|
548
|
+
* [30 (30 seconds), 3600 (1 hour)].
|
|
549
|
+
*/
|
|
550
|
+
|
|
551
|
+
interval: number;
|
|
552
|
+
/**
|
|
553
|
+
* Price tolerance in ppm for each suborder. This will be applied to
|
|
554
|
+
* the oracle price each time a suborder is triggered. Must be
|
|
555
|
+
* be in the range [0, 1_000_000).
|
|
556
|
+
*/
|
|
557
|
+
|
|
558
|
+
priceTolerance: number;
|
|
559
|
+
}
|
|
560
|
+
/** TwapParameters represents the necessary configuration for a TWAP order. */
|
|
561
|
+
|
|
562
|
+
export interface TwapParametersSDKType {
|
|
563
|
+
duration: number;
|
|
564
|
+
interval: number;
|
|
565
|
+
price_tolerance: number;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* BuilderCodeParameters represents the metadata for the partner or builder of
|
|
569
|
+
* an order. This allows them to specify a fee for providing there service which
|
|
570
|
+
* will be paid out in the event of an order fill.
|
|
571
|
+
*/
|
|
572
|
+
|
|
573
|
+
export interface BuilderCodeParameters {
|
|
574
|
+
/** The address of the builder to which the fee will be paid. */
|
|
575
|
+
builderAddress: string;
|
|
576
|
+
/** The fee enforced on the order in ppm. */
|
|
577
|
+
|
|
578
|
+
feePpm: number;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* BuilderCodeParameters represents the metadata for the partner or builder of
|
|
582
|
+
* an order. This allows them to specify a fee for providing there service which
|
|
583
|
+
* will be paid out in the event of an order fill.
|
|
584
|
+
*/
|
|
585
|
+
|
|
586
|
+
export interface BuilderCodeParametersSDKType {
|
|
587
|
+
builder_address: string;
|
|
588
|
+
fee_ppm: number;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* TransactionOrdering represents a unique location in the block where a
|
|
592
|
+
* transaction was placed. This proto includes both block height and the
|
|
593
|
+
* transaction index that the specific transaction was placed. This information
|
|
594
|
+
* is used for ordering by time priority when the chain is restarted.
|
|
595
|
+
*/
|
|
596
|
+
|
|
597
|
+
export interface TransactionOrdering {
|
|
598
|
+
/** Block height in which the transaction was placed. */
|
|
599
|
+
blockHeight: number;
|
|
600
|
+
/** Within the block, the unique transaction index. */
|
|
601
|
+
|
|
602
|
+
transactionIndex: number;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* TransactionOrdering represents a unique location in the block where a
|
|
606
|
+
* transaction was placed. This proto includes both block height and the
|
|
607
|
+
* transaction index that the specific transaction was placed. This information
|
|
608
|
+
* is used for ordering by time priority when the chain is restarted.
|
|
609
|
+
*/
|
|
610
|
+
|
|
611
|
+
export interface TransactionOrderingSDKType {
|
|
612
|
+
block_height: number;
|
|
613
|
+
transaction_index: number;
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* StreamLiquidationOrder represents an protocol-generated IOC liquidation
|
|
617
|
+
* order. Used in full node streaming.
|
|
618
|
+
*/
|
|
619
|
+
|
|
620
|
+
export interface StreamLiquidationOrder {
|
|
621
|
+
/** Information about this liquidation order. */
|
|
622
|
+
liquidationInfo?: PerpetualLiquidationInfo;
|
|
623
|
+
/**
|
|
624
|
+
* CLOB pair ID of the CLOB pair the liquidation order will be matched
|
|
625
|
+
* against.
|
|
626
|
+
*/
|
|
627
|
+
|
|
628
|
+
clobPairId: number;
|
|
629
|
+
/**
|
|
630
|
+
* True if this is a buy order liquidating a short position, false if vice
|
|
631
|
+
* versa.
|
|
632
|
+
*/
|
|
633
|
+
|
|
634
|
+
isBuy: boolean;
|
|
635
|
+
/** The number of base quantums for this liquidation order. */
|
|
636
|
+
|
|
637
|
+
quantums: Long;
|
|
638
|
+
/** The subticks this liquidation order will be submitted at. */
|
|
639
|
+
|
|
640
|
+
subticks: Long;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* StreamLiquidationOrder represents an protocol-generated IOC liquidation
|
|
644
|
+
* order. Used in full node streaming.
|
|
645
|
+
*/
|
|
646
|
+
|
|
647
|
+
export interface StreamLiquidationOrderSDKType {
|
|
648
|
+
liquidation_info?: PerpetualLiquidationInfoSDKType;
|
|
649
|
+
clob_pair_id: number;
|
|
650
|
+
is_buy: boolean;
|
|
651
|
+
quantums: Long;
|
|
652
|
+
subticks: Long;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
function createBaseOrderId(): OrderId {
|
|
656
|
+
return {
|
|
657
|
+
subaccountId: undefined,
|
|
658
|
+
clientId: 0,
|
|
659
|
+
orderFlags: 0,
|
|
660
|
+
clobPairId: 0
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
export const OrderId = {
|
|
665
|
+
encode(message: OrderId, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
666
|
+
if (message.subaccountId !== undefined) {
|
|
667
|
+
SubaccountId.encode(message.subaccountId, writer.uint32(10).fork()).ldelim();
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
if (message.clientId !== 0) {
|
|
671
|
+
writer.uint32(21).fixed32(message.clientId);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
if (message.orderFlags !== 0) {
|
|
675
|
+
writer.uint32(24).uint32(message.orderFlags);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
if (message.clobPairId !== 0) {
|
|
679
|
+
writer.uint32(32).uint32(message.clobPairId);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
return writer;
|
|
683
|
+
},
|
|
684
|
+
|
|
685
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): OrderId {
|
|
686
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
687
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
688
|
+
const message = createBaseOrderId();
|
|
689
|
+
|
|
690
|
+
while (reader.pos < end) {
|
|
691
|
+
const tag = reader.uint32();
|
|
692
|
+
|
|
693
|
+
switch (tag >>> 3) {
|
|
694
|
+
case 1:
|
|
695
|
+
message.subaccountId = SubaccountId.decode(reader, reader.uint32());
|
|
696
|
+
break;
|
|
697
|
+
|
|
698
|
+
case 2:
|
|
699
|
+
message.clientId = reader.fixed32();
|
|
700
|
+
break;
|
|
701
|
+
|
|
702
|
+
case 3:
|
|
703
|
+
message.orderFlags = reader.uint32();
|
|
704
|
+
break;
|
|
705
|
+
|
|
706
|
+
case 4:
|
|
707
|
+
message.clobPairId = reader.uint32();
|
|
708
|
+
break;
|
|
709
|
+
|
|
710
|
+
default:
|
|
711
|
+
reader.skipType(tag & 7);
|
|
712
|
+
break;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
return message;
|
|
717
|
+
},
|
|
718
|
+
|
|
719
|
+
fromPartial(object: DeepPartial<OrderId>): OrderId {
|
|
720
|
+
const message = createBaseOrderId();
|
|
721
|
+
message.subaccountId = object.subaccountId !== undefined && object.subaccountId !== null ? SubaccountId.fromPartial(object.subaccountId) : undefined;
|
|
722
|
+
message.clientId = object.clientId ?? 0;
|
|
723
|
+
message.orderFlags = object.orderFlags ?? 0;
|
|
724
|
+
message.clobPairId = object.clobPairId ?? 0;
|
|
725
|
+
return message;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
function createBaseOrdersFilledDuringLatestBlock(): OrdersFilledDuringLatestBlock {
|
|
731
|
+
return {
|
|
732
|
+
orderIds: []
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export const OrdersFilledDuringLatestBlock = {
|
|
737
|
+
encode(message: OrdersFilledDuringLatestBlock, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
738
|
+
for (const v of message.orderIds) {
|
|
739
|
+
OrderId.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
return writer;
|
|
743
|
+
},
|
|
744
|
+
|
|
745
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): OrdersFilledDuringLatestBlock {
|
|
746
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
747
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
748
|
+
const message = createBaseOrdersFilledDuringLatestBlock();
|
|
749
|
+
|
|
750
|
+
while (reader.pos < end) {
|
|
751
|
+
const tag = reader.uint32();
|
|
752
|
+
|
|
753
|
+
switch (tag >>> 3) {
|
|
754
|
+
case 1:
|
|
755
|
+
message.orderIds.push(OrderId.decode(reader, reader.uint32()));
|
|
756
|
+
break;
|
|
757
|
+
|
|
758
|
+
default:
|
|
759
|
+
reader.skipType(tag & 7);
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
return message;
|
|
765
|
+
},
|
|
766
|
+
|
|
767
|
+
fromPartial(object: DeepPartial<OrdersFilledDuringLatestBlock>): OrdersFilledDuringLatestBlock {
|
|
768
|
+
const message = createBaseOrdersFilledDuringLatestBlock();
|
|
769
|
+
message.orderIds = object.orderIds?.map(e => OrderId.fromPartial(e)) || [];
|
|
770
|
+
return message;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
function createBasePotentiallyPrunableOrders(): PotentiallyPrunableOrders {
|
|
776
|
+
return {
|
|
777
|
+
orderIds: []
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export const PotentiallyPrunableOrders = {
|
|
782
|
+
encode(message: PotentiallyPrunableOrders, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
783
|
+
for (const v of message.orderIds) {
|
|
784
|
+
OrderId.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
return writer;
|
|
788
|
+
},
|
|
789
|
+
|
|
790
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): PotentiallyPrunableOrders {
|
|
791
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
792
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
793
|
+
const message = createBasePotentiallyPrunableOrders();
|
|
794
|
+
|
|
795
|
+
while (reader.pos < end) {
|
|
796
|
+
const tag = reader.uint32();
|
|
797
|
+
|
|
798
|
+
switch (tag >>> 3) {
|
|
799
|
+
case 1:
|
|
800
|
+
message.orderIds.push(OrderId.decode(reader, reader.uint32()));
|
|
801
|
+
break;
|
|
802
|
+
|
|
803
|
+
default:
|
|
804
|
+
reader.skipType(tag & 7);
|
|
805
|
+
break;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
return message;
|
|
810
|
+
},
|
|
811
|
+
|
|
812
|
+
fromPartial(object: DeepPartial<PotentiallyPrunableOrders>): PotentiallyPrunableOrders {
|
|
813
|
+
const message = createBasePotentiallyPrunableOrders();
|
|
814
|
+
message.orderIds = object.orderIds?.map(e => OrderId.fromPartial(e)) || [];
|
|
815
|
+
return message;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
};
|
|
819
|
+
|
|
820
|
+
function createBaseOrderFillState(): OrderFillState {
|
|
821
|
+
return {
|
|
822
|
+
fillAmount: Long.UZERO,
|
|
823
|
+
prunableBlockHeight: 0
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
export const OrderFillState = {
|
|
828
|
+
encode(message: OrderFillState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
829
|
+
if (!message.fillAmount.isZero()) {
|
|
830
|
+
writer.uint32(8).uint64(message.fillAmount);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
if (message.prunableBlockHeight !== 0) {
|
|
834
|
+
writer.uint32(16).uint32(message.prunableBlockHeight);
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
return writer;
|
|
838
|
+
},
|
|
839
|
+
|
|
840
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): OrderFillState {
|
|
841
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
842
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
843
|
+
const message = createBaseOrderFillState();
|
|
844
|
+
|
|
845
|
+
while (reader.pos < end) {
|
|
846
|
+
const tag = reader.uint32();
|
|
847
|
+
|
|
848
|
+
switch (tag >>> 3) {
|
|
849
|
+
case 1:
|
|
850
|
+
message.fillAmount = (reader.uint64() as Long);
|
|
851
|
+
break;
|
|
852
|
+
|
|
853
|
+
case 2:
|
|
854
|
+
message.prunableBlockHeight = reader.uint32();
|
|
855
|
+
break;
|
|
856
|
+
|
|
857
|
+
default:
|
|
858
|
+
reader.skipType(tag & 7);
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
return message;
|
|
864
|
+
},
|
|
865
|
+
|
|
866
|
+
fromPartial(object: DeepPartial<OrderFillState>): OrderFillState {
|
|
867
|
+
const message = createBaseOrderFillState();
|
|
868
|
+
message.fillAmount = object.fillAmount !== undefined && object.fillAmount !== null ? Long.fromValue(object.fillAmount) : Long.UZERO;
|
|
869
|
+
message.prunableBlockHeight = object.prunableBlockHeight ?? 0;
|
|
870
|
+
return message;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
function createBaseStatefulOrderTimeSliceValue(): StatefulOrderTimeSliceValue {
|
|
876
|
+
return {
|
|
877
|
+
orderIds: []
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export const StatefulOrderTimeSliceValue = {
|
|
882
|
+
encode(message: StatefulOrderTimeSliceValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
883
|
+
for (const v of message.orderIds) {
|
|
884
|
+
OrderId.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
return writer;
|
|
888
|
+
},
|
|
889
|
+
|
|
890
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): StatefulOrderTimeSliceValue {
|
|
891
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
892
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
893
|
+
const message = createBaseStatefulOrderTimeSliceValue();
|
|
894
|
+
|
|
895
|
+
while (reader.pos < end) {
|
|
896
|
+
const tag = reader.uint32();
|
|
897
|
+
|
|
898
|
+
switch (tag >>> 3) {
|
|
899
|
+
case 1:
|
|
900
|
+
message.orderIds.push(OrderId.decode(reader, reader.uint32()));
|
|
901
|
+
break;
|
|
902
|
+
|
|
903
|
+
default:
|
|
904
|
+
reader.skipType(tag & 7);
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
return message;
|
|
910
|
+
},
|
|
911
|
+
|
|
912
|
+
fromPartial(object: DeepPartial<StatefulOrderTimeSliceValue>): StatefulOrderTimeSliceValue {
|
|
913
|
+
const message = createBaseStatefulOrderTimeSliceValue();
|
|
914
|
+
message.orderIds = object.orderIds?.map(e => OrderId.fromPartial(e)) || [];
|
|
915
|
+
return message;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
function createBaseLongTermOrderPlacement(): LongTermOrderPlacement {
|
|
921
|
+
return {
|
|
922
|
+
order: undefined,
|
|
923
|
+
placementIndex: undefined
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export const LongTermOrderPlacement = {
|
|
928
|
+
encode(message: LongTermOrderPlacement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
929
|
+
if (message.order !== undefined) {
|
|
930
|
+
Order.encode(message.order, writer.uint32(10).fork()).ldelim();
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
if (message.placementIndex !== undefined) {
|
|
934
|
+
TransactionOrdering.encode(message.placementIndex, writer.uint32(18).fork()).ldelim();
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
return writer;
|
|
938
|
+
},
|
|
939
|
+
|
|
940
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LongTermOrderPlacement {
|
|
941
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
942
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
943
|
+
const message = createBaseLongTermOrderPlacement();
|
|
944
|
+
|
|
945
|
+
while (reader.pos < end) {
|
|
946
|
+
const tag = reader.uint32();
|
|
947
|
+
|
|
948
|
+
switch (tag >>> 3) {
|
|
949
|
+
case 1:
|
|
950
|
+
message.order = Order.decode(reader, reader.uint32());
|
|
951
|
+
break;
|
|
952
|
+
|
|
953
|
+
case 2:
|
|
954
|
+
message.placementIndex = TransactionOrdering.decode(reader, reader.uint32());
|
|
955
|
+
break;
|
|
956
|
+
|
|
957
|
+
default:
|
|
958
|
+
reader.skipType(tag & 7);
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
return message;
|
|
964
|
+
},
|
|
965
|
+
|
|
966
|
+
fromPartial(object: DeepPartial<LongTermOrderPlacement>): LongTermOrderPlacement {
|
|
967
|
+
const message = createBaseLongTermOrderPlacement();
|
|
968
|
+
message.order = object.order !== undefined && object.order !== null ? Order.fromPartial(object.order) : undefined;
|
|
969
|
+
message.placementIndex = object.placementIndex !== undefined && object.placementIndex !== null ? TransactionOrdering.fromPartial(object.placementIndex) : undefined;
|
|
970
|
+
return message;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
function createBaseTwapOrderPlacement(): TwapOrderPlacement {
|
|
976
|
+
return {
|
|
977
|
+
order: undefined,
|
|
978
|
+
remainingLegs: 0,
|
|
979
|
+
remainingQuantums: Long.UZERO
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export const TwapOrderPlacement = {
|
|
984
|
+
encode(message: TwapOrderPlacement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
985
|
+
if (message.order !== undefined) {
|
|
986
|
+
Order.encode(message.order, writer.uint32(10).fork()).ldelim();
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
if (message.remainingLegs !== 0) {
|
|
990
|
+
writer.uint32(16).uint32(message.remainingLegs);
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
if (!message.remainingQuantums.isZero()) {
|
|
994
|
+
writer.uint32(24).uint64(message.remainingQuantums);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
return writer;
|
|
998
|
+
},
|
|
999
|
+
|
|
1000
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): TwapOrderPlacement {
|
|
1001
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1002
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1003
|
+
const message = createBaseTwapOrderPlacement();
|
|
1004
|
+
|
|
1005
|
+
while (reader.pos < end) {
|
|
1006
|
+
const tag = reader.uint32();
|
|
1007
|
+
|
|
1008
|
+
switch (tag >>> 3) {
|
|
1009
|
+
case 1:
|
|
1010
|
+
message.order = Order.decode(reader, reader.uint32());
|
|
1011
|
+
break;
|
|
1012
|
+
|
|
1013
|
+
case 2:
|
|
1014
|
+
message.remainingLegs = reader.uint32();
|
|
1015
|
+
break;
|
|
1016
|
+
|
|
1017
|
+
case 3:
|
|
1018
|
+
message.remainingQuantums = (reader.uint64() as Long);
|
|
1019
|
+
break;
|
|
1020
|
+
|
|
1021
|
+
default:
|
|
1022
|
+
reader.skipType(tag & 7);
|
|
1023
|
+
break;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
return message;
|
|
1028
|
+
},
|
|
1029
|
+
|
|
1030
|
+
fromPartial(object: DeepPartial<TwapOrderPlacement>): TwapOrderPlacement {
|
|
1031
|
+
const message = createBaseTwapOrderPlacement();
|
|
1032
|
+
message.order = object.order !== undefined && object.order !== null ? Order.fromPartial(object.order) : undefined;
|
|
1033
|
+
message.remainingLegs = object.remainingLegs ?? 0;
|
|
1034
|
+
message.remainingQuantums = object.remainingQuantums !== undefined && object.remainingQuantums !== null ? Long.fromValue(object.remainingQuantums) : Long.UZERO;
|
|
1035
|
+
return message;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
function createBaseConditionalOrderPlacement(): ConditionalOrderPlacement {
|
|
1041
|
+
return {
|
|
1042
|
+
order: undefined,
|
|
1043
|
+
placementIndex: undefined,
|
|
1044
|
+
triggerIndex: undefined
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
export const ConditionalOrderPlacement = {
|
|
1049
|
+
encode(message: ConditionalOrderPlacement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1050
|
+
if (message.order !== undefined) {
|
|
1051
|
+
Order.encode(message.order, writer.uint32(10).fork()).ldelim();
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
if (message.placementIndex !== undefined) {
|
|
1055
|
+
TransactionOrdering.encode(message.placementIndex, writer.uint32(18).fork()).ldelim();
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
if (message.triggerIndex !== undefined) {
|
|
1059
|
+
TransactionOrdering.encode(message.triggerIndex, writer.uint32(26).fork()).ldelim();
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
return writer;
|
|
1063
|
+
},
|
|
1064
|
+
|
|
1065
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ConditionalOrderPlacement {
|
|
1066
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1067
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1068
|
+
const message = createBaseConditionalOrderPlacement();
|
|
1069
|
+
|
|
1070
|
+
while (reader.pos < end) {
|
|
1071
|
+
const tag = reader.uint32();
|
|
1072
|
+
|
|
1073
|
+
switch (tag >>> 3) {
|
|
1074
|
+
case 1:
|
|
1075
|
+
message.order = Order.decode(reader, reader.uint32());
|
|
1076
|
+
break;
|
|
1077
|
+
|
|
1078
|
+
case 2:
|
|
1079
|
+
message.placementIndex = TransactionOrdering.decode(reader, reader.uint32());
|
|
1080
|
+
break;
|
|
1081
|
+
|
|
1082
|
+
case 3:
|
|
1083
|
+
message.triggerIndex = TransactionOrdering.decode(reader, reader.uint32());
|
|
1084
|
+
break;
|
|
1085
|
+
|
|
1086
|
+
default:
|
|
1087
|
+
reader.skipType(tag & 7);
|
|
1088
|
+
break;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
return message;
|
|
1093
|
+
},
|
|
1094
|
+
|
|
1095
|
+
fromPartial(object: DeepPartial<ConditionalOrderPlacement>): ConditionalOrderPlacement {
|
|
1096
|
+
const message = createBaseConditionalOrderPlacement();
|
|
1097
|
+
message.order = object.order !== undefined && object.order !== null ? Order.fromPartial(object.order) : undefined;
|
|
1098
|
+
message.placementIndex = object.placementIndex !== undefined && object.placementIndex !== null ? TransactionOrdering.fromPartial(object.placementIndex) : undefined;
|
|
1099
|
+
message.triggerIndex = object.triggerIndex !== undefined && object.triggerIndex !== null ? TransactionOrdering.fromPartial(object.triggerIndex) : undefined;
|
|
1100
|
+
return message;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
function createBaseOrder(): Order {
|
|
1106
|
+
return {
|
|
1107
|
+
orderId: undefined,
|
|
1108
|
+
side: 0,
|
|
1109
|
+
quantums: Long.UZERO,
|
|
1110
|
+
subticks: Long.UZERO,
|
|
1111
|
+
goodTilBlock: undefined,
|
|
1112
|
+
goodTilBlockTime: undefined,
|
|
1113
|
+
timeInForce: 0,
|
|
1114
|
+
reduceOnly: false,
|
|
1115
|
+
clientMetadata: 0,
|
|
1116
|
+
conditionType: 0,
|
|
1117
|
+
conditionalOrderTriggerSubticks: Long.UZERO,
|
|
1118
|
+
twapParameters: undefined,
|
|
1119
|
+
builderCodeParameters: undefined,
|
|
1120
|
+
orderRouterAddress: ""
|
|
1121
|
+
};
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
export const Order = {
|
|
1125
|
+
encode(message: Order, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1126
|
+
if (message.orderId !== undefined) {
|
|
1127
|
+
OrderId.encode(message.orderId, writer.uint32(10).fork()).ldelim();
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
if (message.side !== 0) {
|
|
1131
|
+
writer.uint32(16).int32(message.side);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
if (!message.quantums.isZero()) {
|
|
1135
|
+
writer.uint32(24).uint64(message.quantums);
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
if (!message.subticks.isZero()) {
|
|
1139
|
+
writer.uint32(32).uint64(message.subticks);
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
if (message.goodTilBlock !== undefined) {
|
|
1143
|
+
writer.uint32(40).uint32(message.goodTilBlock);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
if (message.goodTilBlockTime !== undefined) {
|
|
1147
|
+
writer.uint32(53).fixed32(message.goodTilBlockTime);
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
if (message.timeInForce !== 0) {
|
|
1151
|
+
writer.uint32(56).int32(message.timeInForce);
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
if (message.reduceOnly === true) {
|
|
1155
|
+
writer.uint32(64).bool(message.reduceOnly);
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
if (message.clientMetadata !== 0) {
|
|
1159
|
+
writer.uint32(72).uint32(message.clientMetadata);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
if (message.conditionType !== 0) {
|
|
1163
|
+
writer.uint32(80).int32(message.conditionType);
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
if (!message.conditionalOrderTriggerSubticks.isZero()) {
|
|
1167
|
+
writer.uint32(88).uint64(message.conditionalOrderTriggerSubticks);
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
if (message.twapParameters !== undefined) {
|
|
1171
|
+
TwapParameters.encode(message.twapParameters, writer.uint32(98).fork()).ldelim();
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
if (message.builderCodeParameters !== undefined) {
|
|
1175
|
+
BuilderCodeParameters.encode(message.builderCodeParameters, writer.uint32(106).fork()).ldelim();
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
if (message.orderRouterAddress !== "") {
|
|
1179
|
+
writer.uint32(114).string(message.orderRouterAddress);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
return writer;
|
|
1183
|
+
},
|
|
1184
|
+
|
|
1185
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Order {
|
|
1186
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1187
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1188
|
+
const message = createBaseOrder();
|
|
1189
|
+
|
|
1190
|
+
while (reader.pos < end) {
|
|
1191
|
+
const tag = reader.uint32();
|
|
1192
|
+
|
|
1193
|
+
switch (tag >>> 3) {
|
|
1194
|
+
case 1:
|
|
1195
|
+
message.orderId = OrderId.decode(reader, reader.uint32());
|
|
1196
|
+
break;
|
|
1197
|
+
|
|
1198
|
+
case 2:
|
|
1199
|
+
message.side = (reader.int32() as any);
|
|
1200
|
+
break;
|
|
1201
|
+
|
|
1202
|
+
case 3:
|
|
1203
|
+
message.quantums = (reader.uint64() as Long);
|
|
1204
|
+
break;
|
|
1205
|
+
|
|
1206
|
+
case 4:
|
|
1207
|
+
message.subticks = (reader.uint64() as Long);
|
|
1208
|
+
break;
|
|
1209
|
+
|
|
1210
|
+
case 5:
|
|
1211
|
+
message.goodTilBlock = reader.uint32();
|
|
1212
|
+
break;
|
|
1213
|
+
|
|
1214
|
+
case 6:
|
|
1215
|
+
message.goodTilBlockTime = reader.fixed32();
|
|
1216
|
+
break;
|
|
1217
|
+
|
|
1218
|
+
case 7:
|
|
1219
|
+
message.timeInForce = (reader.int32() as any);
|
|
1220
|
+
break;
|
|
1221
|
+
|
|
1222
|
+
case 8:
|
|
1223
|
+
message.reduceOnly = reader.bool();
|
|
1224
|
+
break;
|
|
1225
|
+
|
|
1226
|
+
case 9:
|
|
1227
|
+
message.clientMetadata = reader.uint32();
|
|
1228
|
+
break;
|
|
1229
|
+
|
|
1230
|
+
case 10:
|
|
1231
|
+
message.conditionType = (reader.int32() as any);
|
|
1232
|
+
break;
|
|
1233
|
+
|
|
1234
|
+
case 11:
|
|
1235
|
+
message.conditionalOrderTriggerSubticks = (reader.uint64() as Long);
|
|
1236
|
+
break;
|
|
1237
|
+
|
|
1238
|
+
case 12:
|
|
1239
|
+
message.twapParameters = TwapParameters.decode(reader, reader.uint32());
|
|
1240
|
+
break;
|
|
1241
|
+
|
|
1242
|
+
case 13:
|
|
1243
|
+
message.builderCodeParameters = BuilderCodeParameters.decode(reader, reader.uint32());
|
|
1244
|
+
break;
|
|
1245
|
+
|
|
1246
|
+
case 14:
|
|
1247
|
+
message.orderRouterAddress = reader.string();
|
|
1248
|
+
break;
|
|
1249
|
+
|
|
1250
|
+
default:
|
|
1251
|
+
reader.skipType(tag & 7);
|
|
1252
|
+
break;
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
return message;
|
|
1257
|
+
},
|
|
1258
|
+
|
|
1259
|
+
fromPartial(object: DeepPartial<Order>): Order {
|
|
1260
|
+
const message = createBaseOrder();
|
|
1261
|
+
message.orderId = object.orderId !== undefined && object.orderId !== null ? OrderId.fromPartial(object.orderId) : undefined;
|
|
1262
|
+
message.side = object.side ?? 0;
|
|
1263
|
+
message.quantums = object.quantums !== undefined && object.quantums !== null ? Long.fromValue(object.quantums) : Long.UZERO;
|
|
1264
|
+
message.subticks = object.subticks !== undefined && object.subticks !== null ? Long.fromValue(object.subticks) : Long.UZERO;
|
|
1265
|
+
message.goodTilBlock = object.goodTilBlock ?? undefined;
|
|
1266
|
+
message.goodTilBlockTime = object.goodTilBlockTime ?? undefined;
|
|
1267
|
+
message.timeInForce = object.timeInForce ?? 0;
|
|
1268
|
+
message.reduceOnly = object.reduceOnly ?? false;
|
|
1269
|
+
message.clientMetadata = object.clientMetadata ?? 0;
|
|
1270
|
+
message.conditionType = object.conditionType ?? 0;
|
|
1271
|
+
message.conditionalOrderTriggerSubticks = object.conditionalOrderTriggerSubticks !== undefined && object.conditionalOrderTriggerSubticks !== null ? Long.fromValue(object.conditionalOrderTriggerSubticks) : Long.UZERO;
|
|
1272
|
+
message.twapParameters = object.twapParameters !== undefined && object.twapParameters !== null ? TwapParameters.fromPartial(object.twapParameters) : undefined;
|
|
1273
|
+
message.builderCodeParameters = object.builderCodeParameters !== undefined && object.builderCodeParameters !== null ? BuilderCodeParameters.fromPartial(object.builderCodeParameters) : undefined;
|
|
1274
|
+
message.orderRouterAddress = object.orderRouterAddress ?? "";
|
|
1275
|
+
return message;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
};
|
|
1279
|
+
|
|
1280
|
+
function createBaseTwapParameters(): TwapParameters {
|
|
1281
|
+
return {
|
|
1282
|
+
duration: 0,
|
|
1283
|
+
interval: 0,
|
|
1284
|
+
priceTolerance: 0
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
export const TwapParameters = {
|
|
1289
|
+
encode(message: TwapParameters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1290
|
+
if (message.duration !== 0) {
|
|
1291
|
+
writer.uint32(8).uint32(message.duration);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
if (message.interval !== 0) {
|
|
1295
|
+
writer.uint32(16).uint32(message.interval);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
if (message.priceTolerance !== 0) {
|
|
1299
|
+
writer.uint32(24).uint32(message.priceTolerance);
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
return writer;
|
|
1303
|
+
},
|
|
1304
|
+
|
|
1305
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): TwapParameters {
|
|
1306
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1307
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1308
|
+
const message = createBaseTwapParameters();
|
|
1309
|
+
|
|
1310
|
+
while (reader.pos < end) {
|
|
1311
|
+
const tag = reader.uint32();
|
|
1312
|
+
|
|
1313
|
+
switch (tag >>> 3) {
|
|
1314
|
+
case 1:
|
|
1315
|
+
message.duration = reader.uint32();
|
|
1316
|
+
break;
|
|
1317
|
+
|
|
1318
|
+
case 2:
|
|
1319
|
+
message.interval = reader.uint32();
|
|
1320
|
+
break;
|
|
1321
|
+
|
|
1322
|
+
case 3:
|
|
1323
|
+
message.priceTolerance = reader.uint32();
|
|
1324
|
+
break;
|
|
1325
|
+
|
|
1326
|
+
default:
|
|
1327
|
+
reader.skipType(tag & 7);
|
|
1328
|
+
break;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
return message;
|
|
1333
|
+
},
|
|
1334
|
+
|
|
1335
|
+
fromPartial(object: DeepPartial<TwapParameters>): TwapParameters {
|
|
1336
|
+
const message = createBaseTwapParameters();
|
|
1337
|
+
message.duration = object.duration ?? 0;
|
|
1338
|
+
message.interval = object.interval ?? 0;
|
|
1339
|
+
message.priceTolerance = object.priceTolerance ?? 0;
|
|
1340
|
+
return message;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
};
|
|
1344
|
+
|
|
1345
|
+
function createBaseBuilderCodeParameters(): BuilderCodeParameters {
|
|
1346
|
+
return {
|
|
1347
|
+
builderAddress: "",
|
|
1348
|
+
feePpm: 0
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
export const BuilderCodeParameters = {
|
|
1353
|
+
encode(message: BuilderCodeParameters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1354
|
+
if (message.builderAddress !== "") {
|
|
1355
|
+
writer.uint32(10).string(message.builderAddress);
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
if (message.feePpm !== 0) {
|
|
1359
|
+
writer.uint32(16).uint32(message.feePpm);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
return writer;
|
|
1363
|
+
},
|
|
1364
|
+
|
|
1365
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BuilderCodeParameters {
|
|
1366
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1367
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1368
|
+
const message = createBaseBuilderCodeParameters();
|
|
1369
|
+
|
|
1370
|
+
while (reader.pos < end) {
|
|
1371
|
+
const tag = reader.uint32();
|
|
1372
|
+
|
|
1373
|
+
switch (tag >>> 3) {
|
|
1374
|
+
case 1:
|
|
1375
|
+
message.builderAddress = reader.string();
|
|
1376
|
+
break;
|
|
1377
|
+
|
|
1378
|
+
case 2:
|
|
1379
|
+
message.feePpm = reader.uint32();
|
|
1380
|
+
break;
|
|
1381
|
+
|
|
1382
|
+
default:
|
|
1383
|
+
reader.skipType(tag & 7);
|
|
1384
|
+
break;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
return message;
|
|
1389
|
+
},
|
|
1390
|
+
|
|
1391
|
+
fromPartial(object: DeepPartial<BuilderCodeParameters>): BuilderCodeParameters {
|
|
1392
|
+
const message = createBaseBuilderCodeParameters();
|
|
1393
|
+
message.builderAddress = object.builderAddress ?? "";
|
|
1394
|
+
message.feePpm = object.feePpm ?? 0;
|
|
1395
|
+
return message;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
function createBaseTransactionOrdering(): TransactionOrdering {
|
|
1401
|
+
return {
|
|
1402
|
+
blockHeight: 0,
|
|
1403
|
+
transactionIndex: 0
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
export const TransactionOrdering = {
|
|
1408
|
+
encode(message: TransactionOrdering, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1409
|
+
if (message.blockHeight !== 0) {
|
|
1410
|
+
writer.uint32(8).uint32(message.blockHeight);
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
if (message.transactionIndex !== 0) {
|
|
1414
|
+
writer.uint32(16).uint32(message.transactionIndex);
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
return writer;
|
|
1418
|
+
},
|
|
1419
|
+
|
|
1420
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): TransactionOrdering {
|
|
1421
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1422
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1423
|
+
const message = createBaseTransactionOrdering();
|
|
1424
|
+
|
|
1425
|
+
while (reader.pos < end) {
|
|
1426
|
+
const tag = reader.uint32();
|
|
1427
|
+
|
|
1428
|
+
switch (tag >>> 3) {
|
|
1429
|
+
case 1:
|
|
1430
|
+
message.blockHeight = reader.uint32();
|
|
1431
|
+
break;
|
|
1432
|
+
|
|
1433
|
+
case 2:
|
|
1434
|
+
message.transactionIndex = reader.uint32();
|
|
1435
|
+
break;
|
|
1436
|
+
|
|
1437
|
+
default:
|
|
1438
|
+
reader.skipType(tag & 7);
|
|
1439
|
+
break;
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
return message;
|
|
1444
|
+
},
|
|
1445
|
+
|
|
1446
|
+
fromPartial(object: DeepPartial<TransactionOrdering>): TransactionOrdering {
|
|
1447
|
+
const message = createBaseTransactionOrdering();
|
|
1448
|
+
message.blockHeight = object.blockHeight ?? 0;
|
|
1449
|
+
message.transactionIndex = object.transactionIndex ?? 0;
|
|
1450
|
+
return message;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1455
|
+
function createBaseStreamLiquidationOrder(): StreamLiquidationOrder {
|
|
1456
|
+
return {
|
|
1457
|
+
liquidationInfo: undefined,
|
|
1458
|
+
clobPairId: 0,
|
|
1459
|
+
isBuy: false,
|
|
1460
|
+
quantums: Long.UZERO,
|
|
1461
|
+
subticks: Long.UZERO
|
|
1462
|
+
};
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
export const StreamLiquidationOrder = {
|
|
1466
|
+
encode(message: StreamLiquidationOrder, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1467
|
+
if (message.liquidationInfo !== undefined) {
|
|
1468
|
+
PerpetualLiquidationInfo.encode(message.liquidationInfo, writer.uint32(10).fork()).ldelim();
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
if (message.clobPairId !== 0) {
|
|
1472
|
+
writer.uint32(16).uint32(message.clobPairId);
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
if (message.isBuy === true) {
|
|
1476
|
+
writer.uint32(24).bool(message.isBuy);
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
if (!message.quantums.isZero()) {
|
|
1480
|
+
writer.uint32(32).uint64(message.quantums);
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
if (!message.subticks.isZero()) {
|
|
1484
|
+
writer.uint32(40).uint64(message.subticks);
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
return writer;
|
|
1488
|
+
},
|
|
1489
|
+
|
|
1490
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): StreamLiquidationOrder {
|
|
1491
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1492
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1493
|
+
const message = createBaseStreamLiquidationOrder();
|
|
1494
|
+
|
|
1495
|
+
while (reader.pos < end) {
|
|
1496
|
+
const tag = reader.uint32();
|
|
1497
|
+
|
|
1498
|
+
switch (tag >>> 3) {
|
|
1499
|
+
case 1:
|
|
1500
|
+
message.liquidationInfo = PerpetualLiquidationInfo.decode(reader, reader.uint32());
|
|
1501
|
+
break;
|
|
1502
|
+
|
|
1503
|
+
case 2:
|
|
1504
|
+
message.clobPairId = reader.uint32();
|
|
1505
|
+
break;
|
|
1506
|
+
|
|
1507
|
+
case 3:
|
|
1508
|
+
message.isBuy = reader.bool();
|
|
1509
|
+
break;
|
|
1510
|
+
|
|
1511
|
+
case 4:
|
|
1512
|
+
message.quantums = (reader.uint64() as Long);
|
|
1513
|
+
break;
|
|
1514
|
+
|
|
1515
|
+
case 5:
|
|
1516
|
+
message.subticks = (reader.uint64() as Long);
|
|
1517
|
+
break;
|
|
1518
|
+
|
|
1519
|
+
default:
|
|
1520
|
+
reader.skipType(tag & 7);
|
|
1521
|
+
break;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
return message;
|
|
1526
|
+
},
|
|
1527
|
+
|
|
1528
|
+
fromPartial(object: DeepPartial<StreamLiquidationOrder>): StreamLiquidationOrder {
|
|
1529
|
+
const message = createBaseStreamLiquidationOrder();
|
|
1530
|
+
message.liquidationInfo = object.liquidationInfo !== undefined && object.liquidationInfo !== null ? PerpetualLiquidationInfo.fromPartial(object.liquidationInfo) : undefined;
|
|
1531
|
+
message.clobPairId = object.clobPairId ?? 0;
|
|
1532
|
+
message.isBuy = object.isBuy ?? false;
|
|
1533
|
+
message.quantums = object.quantums !== undefined && object.quantums !== null ? Long.fromValue(object.quantums) : Long.UZERO;
|
|
1534
|
+
message.subticks = object.subticks !== undefined && object.subticks !== null ? Long.fromValue(object.subticks) : Long.UZERO;
|
|
1535
|
+
return message;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
};
|