@typus/typus-perp-sdk 1.1.32-codegen-exp3 → 1.1.32-testnet-exp1
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/dist/src/_dependencies/source/0x1/ascii/structs.d.ts +88 -0
- package/dist/src/_dependencies/source/0x1/ascii/structs.js +398 -0
- package/dist/src/_dependencies/source/0x1/index.d.ts +3 -0
- package/dist/src/_dependencies/source/0x1/index.js +6 -0
- package/dist/src/_dependencies/source/0x1/option/structs.d.ts +50 -0
- package/dist/src/_dependencies/source/0x1/option/structs.js +271 -0
- package/dist/src/_dependencies/source/0x1/string/structs.d.ts +48 -0
- package/dist/src/_dependencies/source/0x1/string/structs.js +256 -0
- package/dist/src/_dependencies/source/0x1/type-name/structs.d.ts +49 -0
- package/dist/src/_dependencies/source/0x1/type-name/structs.js +223 -0
- package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +54 -0
- package/dist/src/_dependencies/source/0x2/bag/structs.js +229 -0
- package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +84 -0
- package/dist/src/_dependencies/source/0x2/balance/structs.js +386 -0
- package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +406 -0
- package/dist/src/_dependencies/source/0x2/coin/structs.js +1247 -0
- package/dist/src/_dependencies/source/0x2/index.d.ts +3 -0
- package/dist/src/_dependencies/source/0x2/index.js +6 -0
- package/dist/src/_dependencies/source/0x2/linked-table/structs.d.ts +132 -0
- package/dist/src/_dependencies/source/0x2/linked-table/structs.js +438 -0
- package/dist/src/_dependencies/source/0x2/object/structs.d.ts +86 -0
- package/dist/src/_dependencies/source/0x2/object/structs.js +364 -0
- package/dist/src/_dependencies/source/0x2/object-table/structs.d.ts +54 -0
- package/dist/src/_dependencies/source/0x2/object-table/structs.js +248 -0
- package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +44 -0
- package/dist/src/_dependencies/source/0x2/sui/structs.js +222 -0
- package/dist/src/_dependencies/source/0x2/table/structs.d.ts +54 -0
- package/dist/src/_dependencies/source/0x2/table/structs.js +248 -0
- package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +59 -0
- package/dist/src/_dependencies/source/0x2/table-vec/structs.js +274 -0
- package/dist/src/_dependencies/source/0x2/token/structs.d.ts +421 -0
- package/dist/src/_dependencies/source/0x2/token/structs.js +1095 -0
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +348 -0
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +1091 -0
- package/dist/src/_dependencies/source/0x2/url/structs.d.ts +49 -0
- package/dist/src/_dependencies/source/0x2/url/structs.js +223 -0
- package/dist/src/_dependencies/source/0x2/vec-map/structs.d.ts +106 -0
- package/dist/src/_dependencies/source/0x2/vec-map/structs.js +446 -0
- package/dist/src/_dependencies/source/0x2/vec-set/structs.d.ts +49 -0
- package/dist/src/_dependencies/source/0x2/vec-set/structs.js +270 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +422 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.js +1084 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +130 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.js +456 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +208 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.js +653 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +362 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.js +899 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.d.ts +8 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.js +11 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.d.ts +2 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.js +102 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.d.ts +202 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.js +632 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +600 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.js +1459 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.d.ts +136 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.js +438 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.d.ts +127 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.js +430 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +957 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.js +2261 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +244 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.js +733 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +294 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.js +892 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +73 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.js +263 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +294 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.js +591 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +64 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.js +258 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +756 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.js +1721 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +44 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.js +222 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.d.ts +3 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.js +6 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.d.ts +2 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.js +89 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.d.ts +135 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.js +444 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.d.ts +2106 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.js +4952 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +390 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.js +844 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.d.ts +6 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.js +9 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.d.ts +2 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.js +69 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.d.ts +89 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.js +376 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +386 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.js +881 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +59 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.js +274 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +974 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.js +2387 -0
- package/dist/src/_framework/init-loader.d.ts +2 -0
- package/dist/src/{generated/typus_perp/treasury_caps.js → _framework/init-loader.js} +10 -17
- package/dist/src/_framework/loader.d.ts +17 -0
- package/dist/src/_framework/loader.js +108 -0
- package/dist/src/_framework/reified.d.ts +108 -0
- package/dist/src/_framework/reified.js +237 -0
- package/dist/src/_framework/util.d.ts +35 -0
- package/dist/src/_framework/util.js +396 -0
- package/dist/src/_framework/vector.d.ts +42 -0
- package/dist/src/_framework/vector.js +112 -0
- package/dist/src/api/sentio.js +538 -604
- package/dist/src/fetch.d.ts +36 -577
- package/dist/src/fetch.js +665 -367
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +39 -20
- package/dist/src/pyth.js +1 -0
- package/dist/src/typus_perp/admin/functions.d.ts +59 -0
- package/dist/src/typus_perp/admin/functions.js +122 -0
- package/dist/src/typus_perp/admin/structs.d.ts +467 -0
- package/dist/src/typus_perp/admin/structs.js +1065 -0
- package/dist/src/typus_perp/competition/functions.d.ts +24 -0
- package/dist/src/typus_perp/competition/functions.js +38 -0
- package/dist/src/typus_perp/competition/structs.d.ts +80 -0
- package/dist/src/typus_perp/competition/structs.js +288 -0
- package/dist/src/typus_perp/error/functions.d.ts +73 -0
- package/dist/src/typus_perp/error/functions.js +363 -0
- package/dist/src/typus_perp/escrow/functions.d.ts +17 -0
- package/dist/src/typus_perp/escrow/functions.js +36 -0
- package/dist/src/typus_perp/escrow/structs.d.ts +160 -0
- package/dist/src/typus_perp/escrow/structs.js +324 -0
- package/dist/src/typus_perp/index.d.ts +1 -0
- package/dist/src/typus_perp/index.js +7 -0
- package/dist/src/typus_perp/init.d.ts +2 -0
- package/dist/src/typus_perp/init.js +118 -0
- package/dist/src/typus_perp/lending/functions.d.ts +15 -0
- package/dist/src/typus_perp/lending/functions.js +22 -0
- package/dist/src/typus_perp/lp-pool/functions.d.ts +460 -0
- package/dist/src/typus_perp/lp-pool/functions.js +732 -0
- package/dist/src/typus_perp/lp-pool/structs.d.ts +3705 -0
- package/dist/src/typus_perp/lp-pool/structs.js +6789 -0
- package/dist/src/typus_perp/math/functions.d.ts +29 -0
- package/dist/src/typus_perp/math/functions.js +61 -0
- package/dist/src/typus_perp/position/functions.d.ts +379 -0
- package/dist/src/typus_perp/position/functions.js +713 -0
- package/dist/src/typus_perp/position/structs.d.ts +905 -0
- package/dist/src/typus_perp/position/structs.js +1450 -0
- package/dist/src/typus_perp/symbol/functions.d.ts +9 -0
- package/dist/src/typus_perp/symbol/functions.js +24 -0
- package/dist/src/typus_perp/symbol/structs.d.ts +70 -0
- package/dist/src/typus_perp/symbol/structs.js +235 -0
- package/dist/src/typus_perp/tlp/functions.d.ts +19 -0
- package/dist/src/typus_perp/tlp/functions.js +40 -0
- package/dist/src/typus_perp/tlp/structs.d.ts +89 -0
- package/dist/src/typus_perp/tlp/structs.js +365 -0
- package/dist/src/typus_perp/token-interface/functions.d.ts +11 -0
- package/dist/src/typus_perp/token-interface/functions.js +22 -0
- package/dist/src/typus_perp/trading/functions.d.ts +812 -0
- package/dist/src/typus_perp/trading/functions.js +1218 -0
- package/dist/src/typus_perp/trading/structs.d.ts +3060 -0
- package/dist/src/typus_perp/trading/structs.js +5813 -0
- package/dist/src/typus_perp/treasury-caps/functions.d.ts +9 -0
- package/dist/src/typus_perp/treasury-caps/functions.js +36 -0
- package/dist/src/typus_perp/treasury-caps/structs.d.ts +49 -0
- package/dist/src/typus_perp/treasury-caps/structs.js +223 -0
- package/dist/src/typus_perp/user-account/functions.d.ts +36 -0
- package/dist/src/typus_perp/user-account/functions.js +70 -0
- package/dist/src/typus_perp/user-account/structs.d.ts +148 -0
- package/dist/src/typus_perp/user-account/structs.js +448 -0
- package/dist/src/typus_stake_pool/admin/functions.d.ts +49 -0
- package/dist/src/typus_stake_pool/admin/functions.js +105 -0
- package/dist/src/typus_stake_pool/admin/structs.d.ts +365 -0
- package/dist/src/typus_stake_pool/admin/structs.js +789 -0
- package/dist/src/typus_stake_pool/index.d.ts +1 -0
- package/dist/src/typus_stake_pool/index.js +7 -0
- package/dist/src/typus_stake_pool/init.d.ts +2 -0
- package/dist/src/typus_stake_pool/init.js +69 -0
- package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +229 -0
- package/dist/src/typus_stake_pool/stake-pool/functions.js +380 -0
- package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +2199 -0
- package/dist/src/typus_stake_pool/stake-pool/structs.js +4653 -0
- package/dist/src/user/history.js +685 -614
- package/dist/src/user/order.d.ts +11 -16
- package/dist/src/user/order.js +302 -171
- package/dist/src/user/orderWithBidReceipt.d.ts +6 -8
- package/dist/src/user/orderWithBidReceipt.js +225 -127
- package/dist/src/user/tlp.d.ts +24 -25
- package/dist/src/user/tlp.js +468 -317
- package/package.json +3 -11
- package/dist/src/client.d.ts +0 -27
- package/dist/src/client.js +0 -108
- package/dist/src/generated/typus_perp/admin.d.ts +0 -117
- package/dist/src/generated/typus_perp/admin.js +0 -110
- package/dist/src/generated/typus_perp/competition.d.ts +0 -22
- package/dist/src/generated/typus_perp/competition.js +0 -58
- package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +0 -17
- package/dist/src/generated/typus_perp/deps/std/type_name.js +0 -25
- package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +0 -12
- package/dist/src/generated/typus_perp/deps/sui/balance.js +0 -20
- package/dist/src/generated/typus_perp/deps/sui/object.d.ts +0 -8
- package/dist/src/generated/typus_perp/deps/sui/object.js +0 -16
- package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +0 -19
- package/dist/src/generated/typus_perp/deps/sui/object_table.js +0 -59
- package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +0 -18
- package/dist/src/generated/typus_perp/deps/sui/vec_set.js +0 -25
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +0 -30
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +0 -67
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +0 -32
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +0 -71
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +0 -23
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +0 -61
- package/dist/src/generated/typus_perp/escrow.d.ts +0 -59
- package/dist/src/generated/typus_perp/escrow.js +0 -76
- package/dist/src/generated/typus_perp/lending.d.ts +0 -47
- package/dist/src/generated/typus_perp/lending.js +0 -50
- package/dist/src/generated/typus_perp/lp_pool.d.ts +0 -2327
- package/dist/src/generated/typus_perp/lp_pool.js +0 -1956
- package/dist/src/generated/typus_perp/math.d.ts +0 -95
- package/dist/src/generated/typus_perp/math.js +0 -97
- package/dist/src/generated/typus_perp/position.d.ts +0 -234
- package/dist/src/generated/typus_perp/position.js +0 -204
- package/dist/src/generated/typus_perp/symbol.d.ts +0 -18
- package/dist/src/generated/typus_perp/symbol.js +0 -55
- package/dist/src/generated/typus_perp/tlp.d.ts +0 -13
- package/dist/src/generated/typus_perp/tlp.js +0 -56
- package/dist/src/generated/typus_perp/trading.d.ts +0 -2486
- package/dist/src/generated/typus_perp/trading.js +0 -2476
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +0 -13
- package/dist/src/generated/typus_perp/user_account.d.ts +0 -40
- package/dist/src/generated/typus_perp/user_account.js +0 -72
- package/dist/src/generated/typus_stake_pool/admin.d.ts +0 -234
- package/dist/src/generated/typus_stake_pool/admin.js +0 -272
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +0 -17
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +0 -25
- package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +0 -8
- package/dist/src/generated/typus_stake_pool/deps/sui/object.js +0 -16
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +0 -30
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +0 -37
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +0 -18
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +0 -25
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +0 -986
- package/dist/src/generated/typus_stake_pool/stake_pool.js +0 -874
- package/dist/src/generated/utils/index.d.ts +0 -11
- package/dist/src/generated/utils/index.js +0 -135
- package/dist/src/grpc/graphql.d.ts +0 -26
- package/dist/src/grpc/graphql.js +0 -126
- package/dist/src/grpc/grpc.d.ts +0 -1
- package/dist/src/grpc/grpc.js +0 -38
- package/dist/src/grpc/ledgerService.js +0 -64
- package/dist/src/grpc/liveDataService.d.ts +0 -0
- package/dist/src/grpc/liveDataService.js +0 -49
- /package/dist/src/{grpc/ledgerService.d.ts → pyth.d.ts} +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const PACKAGE_ID = "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196";
|
|
2
|
+
export declare const PUBLISHED_AT = "0x153ead7b2ccad1483458d41f0daffa35965d89960d1024a4883ba52fb18332b3";
|
|
3
|
+
export declare const PKG_V17 = "0x153ead7b2ccad1483458d41f0daffa35965d89960d1024a4883ba52fb18332b3";
|
|
4
|
+
export declare const PKG_V8 = "0x1abc57354a357ac988e81d60b76ce5bf0322605d666aec701d40291952150082";
|
|
5
|
+
export declare const PKG_V1 = "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196";
|
|
6
|
+
export declare const PKG_V6 = "0xe227fb985a005a4e6e87856f59862ba0e0337b7fe6d587cab588c8436ba05743";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PKG_V6 = exports.PKG_V1 = exports.PKG_V8 = exports.PKG_V17 = exports.PUBLISHED_AT = exports.PACKAGE_ID = void 0;
|
|
4
|
+
exports.PACKAGE_ID = "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196";
|
|
5
|
+
exports.PUBLISHED_AT = "0x153ead7b2ccad1483458d41f0daffa35965d89960d1024a4883ba52fb18332b3";
|
|
6
|
+
exports.PKG_V17 = "0x153ead7b2ccad1483458d41f0daffa35965d89960d1024a4883ba52fb18332b3";
|
|
7
|
+
exports.PKG_V8 = "0x1abc57354a357ac988e81d60b76ce5bf0322605d666aec701d40291952150082";
|
|
8
|
+
exports.PKG_V1 = "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196";
|
|
9
|
+
exports.PKG_V6 = "0xe227fb985a005a4e6e87856f59862ba0e0337b7fe6d587cab588c8436ba05743";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.registerClasses = registerClasses;
|
|
37
|
+
var discountMint = __importStar(require("./discount-mint/structs"));
|
|
38
|
+
var royaltyRule = __importStar(require("./royalty-rule/structs"));
|
|
39
|
+
var staking = __importStar(require("./staking/structs"));
|
|
40
|
+
var tableVec = __importStar(require("./table-vec/structs"));
|
|
41
|
+
var typusNft = __importStar(require("./typus-nft/structs"));
|
|
42
|
+
function registerClasses(loader) {
|
|
43
|
+
loader.register(discountMint.DiscountEventV3);
|
|
44
|
+
loader.register(discountMint.MintRequest);
|
|
45
|
+
loader.register(discountMint.MintRequestEvent);
|
|
46
|
+
loader.register(discountMint.Pool);
|
|
47
|
+
loader.register(royaltyRule.Config);
|
|
48
|
+
loader.register(royaltyRule.Rule);
|
|
49
|
+
loader.register(staking.LevelUpEvent);
|
|
50
|
+
loader.register(staking.ManagerCap);
|
|
51
|
+
loader.register(staking.NftExtension);
|
|
52
|
+
loader.register(staking.Registry);
|
|
53
|
+
loader.register(staking.StakingTails);
|
|
54
|
+
loader.register(tableVec.TableVec);
|
|
55
|
+
loader.register(typusNft.ExpDownEvent);
|
|
56
|
+
loader.register(typusNft.ExpUpEvent);
|
|
57
|
+
loader.register(typusNft.FirstBidEvent);
|
|
58
|
+
loader.register(typusNft.FirstDepositEvent);
|
|
59
|
+
loader.register(typusNft.LevelUpEvent);
|
|
60
|
+
loader.register(typusNft.ManagerCap);
|
|
61
|
+
loader.register(typusNft.MintEvent);
|
|
62
|
+
loader.register(typusNft.NewManagerCapEvent);
|
|
63
|
+
loader.register(typusNft.Pool);
|
|
64
|
+
loader.register(typusNft.Royalty);
|
|
65
|
+
loader.register(typusNft.RoyaltyUpdateEvent);
|
|
66
|
+
loader.register(typusNft.TYPUS_NFT);
|
|
67
|
+
loader.register(typusNft.Tails);
|
|
68
|
+
loader.register(typusNft.Whitelist);
|
|
69
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../../../_framework/reified";
|
|
2
|
+
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
3
|
+
import { PKG_V1 } from "../index";
|
|
4
|
+
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
5
|
+
export declare function isConfig(type: string): boolean;
|
|
6
|
+
export interface ConfigFields {
|
|
7
|
+
amountBp: ToField<"u16">;
|
|
8
|
+
minAmount: ToField<"u64">;
|
|
9
|
+
}
|
|
10
|
+
export type ConfigReified = Reified<Config, ConfigFields>;
|
|
11
|
+
export declare class Config implements StructClass {
|
|
12
|
+
__StructClass: true;
|
|
13
|
+
static readonly $typeName = "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196::royalty_rule::Config";
|
|
14
|
+
static readonly $numTypeParams = 0;
|
|
15
|
+
static readonly $isPhantom: readonly [];
|
|
16
|
+
readonly $typeName = "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196::royalty_rule::Config";
|
|
17
|
+
readonly $fullTypeName: `${typeof PKG_V1}::royalty_rule::Config`;
|
|
18
|
+
readonly $typeArgs: [];
|
|
19
|
+
readonly $isPhantom: readonly [];
|
|
20
|
+
readonly amountBp: ToField<"u16">;
|
|
21
|
+
readonly minAmount: ToField<"u64">;
|
|
22
|
+
private constructor();
|
|
23
|
+
static reified(): ConfigReified;
|
|
24
|
+
static get r(): import("../../../../_framework/reified").StructClassReified<Config, ConfigFields>;
|
|
25
|
+
static phantom(): PhantomReified<ToTypeStr<Config>>;
|
|
26
|
+
static get p(): PhantomReified<"0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196::royalty_rule::Config">;
|
|
27
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
28
|
+
amount_bp: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
29
|
+
min_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
30
|
+
}, string>;
|
|
31
|
+
static fromFields(fields: Record<string, any>): Config;
|
|
32
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): Config;
|
|
33
|
+
static fromBcs(data: Uint8Array): Config;
|
|
34
|
+
toJSONField(): {
|
|
35
|
+
amountBp: number;
|
|
36
|
+
minAmount: string;
|
|
37
|
+
};
|
|
38
|
+
toJSON(): {
|
|
39
|
+
amountBp: number;
|
|
40
|
+
minAmount: string;
|
|
41
|
+
$typeName: string;
|
|
42
|
+
$typeArgs: [];
|
|
43
|
+
};
|
|
44
|
+
static fromJSONField(field: any): Config;
|
|
45
|
+
static fromJSON(json: Record<string, any>): Config;
|
|
46
|
+
static fromSuiParsedData(content: SuiParsedData): Config;
|
|
47
|
+
static fromSuiObjectData(data: SuiObjectData): Config;
|
|
48
|
+
static fetch(client: SuiClient, id: string): Promise<Config>;
|
|
49
|
+
}
|
|
50
|
+
export declare function isRule(type: string): boolean;
|
|
51
|
+
export interface RuleFields {
|
|
52
|
+
dummyField: ToField<"bool">;
|
|
53
|
+
}
|
|
54
|
+
export type RuleReified = Reified<Rule, RuleFields>;
|
|
55
|
+
export declare class Rule implements StructClass {
|
|
56
|
+
__StructClass: true;
|
|
57
|
+
static readonly $typeName = "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196::royalty_rule::Rule";
|
|
58
|
+
static readonly $numTypeParams = 0;
|
|
59
|
+
static readonly $isPhantom: readonly [];
|
|
60
|
+
readonly $typeName = "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196::royalty_rule::Rule";
|
|
61
|
+
readonly $fullTypeName: `${typeof PKG_V1}::royalty_rule::Rule`;
|
|
62
|
+
readonly $typeArgs: [];
|
|
63
|
+
readonly $isPhantom: readonly [];
|
|
64
|
+
readonly dummyField: ToField<"bool">;
|
|
65
|
+
private constructor();
|
|
66
|
+
static reified(): RuleReified;
|
|
67
|
+
static get r(): import("../../../../_framework/reified").StructClassReified<Rule, RuleFields>;
|
|
68
|
+
static phantom(): PhantomReified<ToTypeStr<Rule>>;
|
|
69
|
+
static get p(): PhantomReified<"0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196::royalty_rule::Rule">;
|
|
70
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
71
|
+
dummy_field: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
72
|
+
}, string>;
|
|
73
|
+
static fromFields(fields: Record<string, any>): Rule;
|
|
74
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): Rule;
|
|
75
|
+
static fromBcs(data: Uint8Array): Rule;
|
|
76
|
+
toJSONField(): {
|
|
77
|
+
dummyField: boolean;
|
|
78
|
+
};
|
|
79
|
+
toJSON(): {
|
|
80
|
+
dummyField: boolean;
|
|
81
|
+
$typeName: string;
|
|
82
|
+
$typeArgs: [];
|
|
83
|
+
};
|
|
84
|
+
static fromJSONField(field: any): Rule;
|
|
85
|
+
static fromJSON(json: Record<string, any>): Rule;
|
|
86
|
+
static fromSuiParsedData(content: SuiParsedData): Rule;
|
|
87
|
+
static fromSuiObjectData(data: SuiObjectData): Rule;
|
|
88
|
+
static fetch(client: SuiClient, id: string): Promise<Rule>;
|
|
89
|
+
}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
50
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
+
if (!m) return o;
|
|
52
|
+
var i = m.call(o), r, ar = [], e;
|
|
53
|
+
try {
|
|
54
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
+
}
|
|
56
|
+
catch (error) { e = { error: error }; }
|
|
57
|
+
finally {
|
|
58
|
+
try {
|
|
59
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
+
}
|
|
61
|
+
finally { if (e) throw e.error; }
|
|
62
|
+
}
|
|
63
|
+
return ar;
|
|
64
|
+
};
|
|
65
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
66
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
67
|
+
if (ar || !(i in from)) {
|
|
68
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
69
|
+
ar[i] = from[i];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
73
|
+
};
|
|
74
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75
|
+
exports.Rule = exports.Config = void 0;
|
|
76
|
+
exports.isConfig = isConfig;
|
|
77
|
+
exports.isRule = isRule;
|
|
78
|
+
var reified_1 = require("../../../../_framework/reified");
|
|
79
|
+
var util_1 = require("../../../../_framework/util");
|
|
80
|
+
var index_1 = require("../index");
|
|
81
|
+
var bcs_1 = require("@mysten/sui/bcs");
|
|
82
|
+
var utils_1 = require("@mysten/sui/utils");
|
|
83
|
+
/* ============================== Config =============================== */
|
|
84
|
+
function isConfig(type) {
|
|
85
|
+
type = (0, util_1.compressSuiType)(type);
|
|
86
|
+
return type === "".concat(index_1.PKG_V1, "::royalty_rule::Config");
|
|
87
|
+
}
|
|
88
|
+
var Config = /** @class */ (function () {
|
|
89
|
+
function Config(typeArgs, fields) {
|
|
90
|
+
this.__StructClass = true;
|
|
91
|
+
this.$typeName = Config.$typeName;
|
|
92
|
+
this.$isPhantom = Config.$isPhantom;
|
|
93
|
+
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Config.$typeName], __read(typeArgs), false));
|
|
94
|
+
this.$typeArgs = typeArgs;
|
|
95
|
+
this.amountBp = fields.amountBp;
|
|
96
|
+
this.minAmount = fields.minAmount;
|
|
97
|
+
}
|
|
98
|
+
Config.reified = function () {
|
|
99
|
+
var _this = this;
|
|
100
|
+
return {
|
|
101
|
+
typeName: Config.$typeName,
|
|
102
|
+
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Config.$typeName], [], false)),
|
|
103
|
+
typeArgs: [],
|
|
104
|
+
isPhantom: Config.$isPhantom,
|
|
105
|
+
reifiedTypeArgs: [],
|
|
106
|
+
fromFields: function (fields) { return Config.fromFields(fields); },
|
|
107
|
+
fromFieldsWithTypes: function (item) { return Config.fromFieldsWithTypes(item); },
|
|
108
|
+
fromBcs: function (data) { return Config.fromBcs(data); },
|
|
109
|
+
bcs: Config.bcs,
|
|
110
|
+
fromJSONField: function (field) { return Config.fromJSONField(field); },
|
|
111
|
+
fromJSON: function (json) { return Config.fromJSON(json); },
|
|
112
|
+
fromSuiParsedData: function (content) { return Config.fromSuiParsedData(content); },
|
|
113
|
+
fromSuiObjectData: function (content) { return Config.fromSuiObjectData(content); },
|
|
114
|
+
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
115
|
+
return [2 /*return*/, Config.fetch(client, id)];
|
|
116
|
+
}); }); },
|
|
117
|
+
new: function (fields) {
|
|
118
|
+
return new Config([], fields);
|
|
119
|
+
},
|
|
120
|
+
kind: "StructClassReified",
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
Object.defineProperty(Config, "r", {
|
|
124
|
+
get: function () {
|
|
125
|
+
return Config.reified();
|
|
126
|
+
},
|
|
127
|
+
enumerable: false,
|
|
128
|
+
configurable: true
|
|
129
|
+
});
|
|
130
|
+
Config.phantom = function () {
|
|
131
|
+
return (0, reified_1.phantom)(Config.reified());
|
|
132
|
+
};
|
|
133
|
+
Object.defineProperty(Config, "p", {
|
|
134
|
+
get: function () {
|
|
135
|
+
return Config.phantom();
|
|
136
|
+
},
|
|
137
|
+
enumerable: false,
|
|
138
|
+
configurable: true
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(Config, "bcs", {
|
|
141
|
+
get: function () {
|
|
142
|
+
return bcs_1.bcs.struct("Config", {
|
|
143
|
+
amount_bp: bcs_1.bcs.u16(),
|
|
144
|
+
min_amount: bcs_1.bcs.u64(),
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
enumerable: false,
|
|
148
|
+
configurable: true
|
|
149
|
+
});
|
|
150
|
+
Config.fromFields = function (fields) {
|
|
151
|
+
return Config.reified().new({
|
|
152
|
+
amountBp: (0, reified_1.decodeFromFields)("u16", fields.amount_bp),
|
|
153
|
+
minAmount: (0, reified_1.decodeFromFields)("u64", fields.min_amount),
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
Config.fromFieldsWithTypes = function (item) {
|
|
157
|
+
if (!isConfig(item.type)) {
|
|
158
|
+
throw new Error("not a Config type");
|
|
159
|
+
}
|
|
160
|
+
return Config.reified().new({
|
|
161
|
+
amountBp: (0, reified_1.decodeFromFieldsWithTypes)("u16", item.fields.amount_bp),
|
|
162
|
+
minAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.min_amount),
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
Config.fromBcs = function (data) {
|
|
166
|
+
return Config.fromFields(Config.bcs.parse(data));
|
|
167
|
+
};
|
|
168
|
+
Config.prototype.toJSONField = function () {
|
|
169
|
+
return {
|
|
170
|
+
amountBp: this.amountBp,
|
|
171
|
+
minAmount: this.minAmount.toString(),
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
Config.prototype.toJSON = function () {
|
|
175
|
+
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
176
|
+
};
|
|
177
|
+
Config.fromJSONField = function (field) {
|
|
178
|
+
return Config.reified().new({
|
|
179
|
+
amountBp: (0, reified_1.decodeFromJSONField)("u16", field.amountBp),
|
|
180
|
+
minAmount: (0, reified_1.decodeFromJSONField)("u64", field.minAmount),
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
Config.fromJSON = function (json) {
|
|
184
|
+
if (json.$typeName !== Config.$typeName) {
|
|
185
|
+
throw new Error("not a WithTwoGenerics json object");
|
|
186
|
+
}
|
|
187
|
+
return Config.fromJSONField(json);
|
|
188
|
+
};
|
|
189
|
+
Config.fromSuiParsedData = function (content) {
|
|
190
|
+
if (content.dataType !== "moveObject") {
|
|
191
|
+
throw new Error("not an object");
|
|
192
|
+
}
|
|
193
|
+
if (!isConfig(content.type)) {
|
|
194
|
+
throw new Error("object at ".concat(content.fields.id, " is not a Config object"));
|
|
195
|
+
}
|
|
196
|
+
return Config.fromFieldsWithTypes(content);
|
|
197
|
+
};
|
|
198
|
+
Config.fromSuiObjectData = function (data) {
|
|
199
|
+
if (data.bcs) {
|
|
200
|
+
if (data.bcs.dataType !== "moveObject" || !isConfig(data.bcs.type)) {
|
|
201
|
+
throw new Error("object at is not a Config object");
|
|
202
|
+
}
|
|
203
|
+
return Config.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
204
|
+
}
|
|
205
|
+
if (data.content) {
|
|
206
|
+
return Config.fromSuiParsedData(data.content);
|
|
207
|
+
}
|
|
208
|
+
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
209
|
+
};
|
|
210
|
+
Config.fetch = function (client, id) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
212
|
+
var res;
|
|
213
|
+
var _a, _b;
|
|
214
|
+
return __generator(this, function (_c) {
|
|
215
|
+
switch (_c.label) {
|
|
216
|
+
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
217
|
+
case 1:
|
|
218
|
+
res = _c.sent();
|
|
219
|
+
if (res.error) {
|
|
220
|
+
throw new Error("error fetching Config object at id ".concat(id, ": ").concat(res.error.code));
|
|
221
|
+
}
|
|
222
|
+
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isConfig(res.data.bcs.type)) {
|
|
223
|
+
throw new Error("object at id ".concat(id, " is not a Config object"));
|
|
224
|
+
}
|
|
225
|
+
return [2 /*return*/, Config.fromSuiObjectData(res.data)];
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
Config.$typeName = "".concat(index_1.PKG_V1, "::royalty_rule::Config");
|
|
231
|
+
Config.$numTypeParams = 0;
|
|
232
|
+
Config.$isPhantom = [];
|
|
233
|
+
return Config;
|
|
234
|
+
}());
|
|
235
|
+
exports.Config = Config;
|
|
236
|
+
/* ============================== Rule =============================== */
|
|
237
|
+
function isRule(type) {
|
|
238
|
+
type = (0, util_1.compressSuiType)(type);
|
|
239
|
+
return type === "".concat(index_1.PKG_V1, "::royalty_rule::Rule");
|
|
240
|
+
}
|
|
241
|
+
var Rule = /** @class */ (function () {
|
|
242
|
+
function Rule(typeArgs, fields) {
|
|
243
|
+
this.__StructClass = true;
|
|
244
|
+
this.$typeName = Rule.$typeName;
|
|
245
|
+
this.$isPhantom = Rule.$isPhantom;
|
|
246
|
+
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Rule.$typeName], __read(typeArgs), false));
|
|
247
|
+
this.$typeArgs = typeArgs;
|
|
248
|
+
this.dummyField = fields.dummyField;
|
|
249
|
+
}
|
|
250
|
+
Rule.reified = function () {
|
|
251
|
+
var _this = this;
|
|
252
|
+
return {
|
|
253
|
+
typeName: Rule.$typeName,
|
|
254
|
+
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Rule.$typeName], [], false)),
|
|
255
|
+
typeArgs: [],
|
|
256
|
+
isPhantom: Rule.$isPhantom,
|
|
257
|
+
reifiedTypeArgs: [],
|
|
258
|
+
fromFields: function (fields) { return Rule.fromFields(fields); },
|
|
259
|
+
fromFieldsWithTypes: function (item) { return Rule.fromFieldsWithTypes(item); },
|
|
260
|
+
fromBcs: function (data) { return Rule.fromBcs(data); },
|
|
261
|
+
bcs: Rule.bcs,
|
|
262
|
+
fromJSONField: function (field) { return Rule.fromJSONField(field); },
|
|
263
|
+
fromJSON: function (json) { return Rule.fromJSON(json); },
|
|
264
|
+
fromSuiParsedData: function (content) { return Rule.fromSuiParsedData(content); },
|
|
265
|
+
fromSuiObjectData: function (content) { return Rule.fromSuiObjectData(content); },
|
|
266
|
+
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
267
|
+
return [2 /*return*/, Rule.fetch(client, id)];
|
|
268
|
+
}); }); },
|
|
269
|
+
new: function (fields) {
|
|
270
|
+
return new Rule([], fields);
|
|
271
|
+
},
|
|
272
|
+
kind: "StructClassReified",
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
Object.defineProperty(Rule, "r", {
|
|
276
|
+
get: function () {
|
|
277
|
+
return Rule.reified();
|
|
278
|
+
},
|
|
279
|
+
enumerable: false,
|
|
280
|
+
configurable: true
|
|
281
|
+
});
|
|
282
|
+
Rule.phantom = function () {
|
|
283
|
+
return (0, reified_1.phantom)(Rule.reified());
|
|
284
|
+
};
|
|
285
|
+
Object.defineProperty(Rule, "p", {
|
|
286
|
+
get: function () {
|
|
287
|
+
return Rule.phantom();
|
|
288
|
+
},
|
|
289
|
+
enumerable: false,
|
|
290
|
+
configurable: true
|
|
291
|
+
});
|
|
292
|
+
Object.defineProperty(Rule, "bcs", {
|
|
293
|
+
get: function () {
|
|
294
|
+
return bcs_1.bcs.struct("Rule", {
|
|
295
|
+
dummy_field: bcs_1.bcs.bool(),
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
enumerable: false,
|
|
299
|
+
configurable: true
|
|
300
|
+
});
|
|
301
|
+
Rule.fromFields = function (fields) {
|
|
302
|
+
return Rule.reified().new({ dummyField: (0, reified_1.decodeFromFields)("bool", fields.dummy_field) });
|
|
303
|
+
};
|
|
304
|
+
Rule.fromFieldsWithTypes = function (item) {
|
|
305
|
+
if (!isRule(item.type)) {
|
|
306
|
+
throw new Error("not a Rule type");
|
|
307
|
+
}
|
|
308
|
+
return Rule.reified().new({ dummyField: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.dummy_field) });
|
|
309
|
+
};
|
|
310
|
+
Rule.fromBcs = function (data) {
|
|
311
|
+
return Rule.fromFields(Rule.bcs.parse(data));
|
|
312
|
+
};
|
|
313
|
+
Rule.prototype.toJSONField = function () {
|
|
314
|
+
return {
|
|
315
|
+
dummyField: this.dummyField,
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
Rule.prototype.toJSON = function () {
|
|
319
|
+
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
320
|
+
};
|
|
321
|
+
Rule.fromJSONField = function (field) {
|
|
322
|
+
return Rule.reified().new({ dummyField: (0, reified_1.decodeFromJSONField)("bool", field.dummyField) });
|
|
323
|
+
};
|
|
324
|
+
Rule.fromJSON = function (json) {
|
|
325
|
+
if (json.$typeName !== Rule.$typeName) {
|
|
326
|
+
throw new Error("not a WithTwoGenerics json object");
|
|
327
|
+
}
|
|
328
|
+
return Rule.fromJSONField(json);
|
|
329
|
+
};
|
|
330
|
+
Rule.fromSuiParsedData = function (content) {
|
|
331
|
+
if (content.dataType !== "moveObject") {
|
|
332
|
+
throw new Error("not an object");
|
|
333
|
+
}
|
|
334
|
+
if (!isRule(content.type)) {
|
|
335
|
+
throw new Error("object at ".concat(content.fields.id, " is not a Rule object"));
|
|
336
|
+
}
|
|
337
|
+
return Rule.fromFieldsWithTypes(content);
|
|
338
|
+
};
|
|
339
|
+
Rule.fromSuiObjectData = function (data) {
|
|
340
|
+
if (data.bcs) {
|
|
341
|
+
if (data.bcs.dataType !== "moveObject" || !isRule(data.bcs.type)) {
|
|
342
|
+
throw new Error("object at is not a Rule object");
|
|
343
|
+
}
|
|
344
|
+
return Rule.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
345
|
+
}
|
|
346
|
+
if (data.content) {
|
|
347
|
+
return Rule.fromSuiParsedData(data.content);
|
|
348
|
+
}
|
|
349
|
+
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
350
|
+
};
|
|
351
|
+
Rule.fetch = function (client, id) {
|
|
352
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
353
|
+
var res;
|
|
354
|
+
var _a, _b;
|
|
355
|
+
return __generator(this, function (_c) {
|
|
356
|
+
switch (_c.label) {
|
|
357
|
+
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
358
|
+
case 1:
|
|
359
|
+
res = _c.sent();
|
|
360
|
+
if (res.error) {
|
|
361
|
+
throw new Error("error fetching Rule object at id ".concat(id, ": ").concat(res.error.code));
|
|
362
|
+
}
|
|
363
|
+
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRule(res.data.bcs.type)) {
|
|
364
|
+
throw new Error("object at id ".concat(id, " is not a Rule object"));
|
|
365
|
+
}
|
|
366
|
+
return [2 /*return*/, Rule.fromSuiObjectData(res.data)];
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
Rule.$typeName = "".concat(index_1.PKG_V1, "::royalty_rule::Rule");
|
|
372
|
+
Rule.$numTypeParams = 0;
|
|
373
|
+
Rule.$isPhantom = [];
|
|
374
|
+
return Rule;
|
|
375
|
+
}());
|
|
376
|
+
exports.Rule = Rule;
|