@typus/typus-perp-sdk 1.1.30 → 1.1.31-codegen
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/api/sentio.js +604 -538
- package/dist/src/client.d.ts +27 -0
- package/dist/src/client.js +108 -0
- package/dist/src/fetch.d.ts +160 -34
- package/dist/src/fetch.js +365 -665
- package/dist/src/generated/typus_perp/admin.d.ts +117 -0
- package/dist/src/generated/typus_perp/admin.js +110 -0
- package/dist/src/generated/typus_perp/competition.d.ts +22 -0
- package/dist/src/generated/typus_perp/competition.js +58 -0
- package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/typus_perp/deps/std/type_name.js +25 -0
- package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/typus_perp/deps/sui/balance.js +20 -0
- package/dist/src/generated/typus_perp/deps/sui/object.d.ts +8 -0
- package/dist/src/generated/typus_perp/deps/sui/object.js +16 -0
- package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +19 -0
- package/dist/src/generated/typus_perp/deps/sui/object_table.js +59 -0
- package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +18 -0
- package/dist/src/generated/typus_perp/deps/sui/vec_set.js +25 -0
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +30 -0
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +67 -0
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +32 -0
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +71 -0
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +23 -0
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +61 -0
- package/dist/src/generated/typus_perp/escrow.d.ts +59 -0
- package/dist/src/generated/typus_perp/escrow.js +76 -0
- package/dist/src/generated/typus_perp/lending.d.ts +47 -0
- package/dist/src/generated/typus_perp/lending.js +50 -0
- package/dist/src/generated/typus_perp/lp_pool.d.ts +2327 -0
- package/dist/src/generated/typus_perp/lp_pool.js +1956 -0
- package/dist/src/generated/typus_perp/math.d.ts +95 -0
- package/dist/src/generated/typus_perp/math.js +97 -0
- package/dist/src/generated/typus_perp/position.d.ts +234 -0
- package/dist/src/generated/typus_perp/position.js +204 -0
- package/dist/src/generated/typus_perp/symbol.d.ts +18 -0
- package/dist/src/generated/typus_perp/symbol.js +55 -0
- package/dist/src/generated/typus_perp/tlp.d.ts +13 -0
- package/dist/src/generated/typus_perp/tlp.js +56 -0
- package/dist/src/generated/typus_perp/trading.d.ts +2486 -0
- package/dist/src/generated/typus_perp/trading.js +2476 -0
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +13 -0
- package/dist/src/{_framework/init-loader.js → generated/typus_perp/treasury_caps.js} +17 -10
- package/dist/src/generated/typus_perp/user_account.d.ts +40 -0
- package/dist/src/generated/typus_perp/user_account.js +72 -0
- package/dist/src/generated/typus_stake_pool/admin.d.ts +100 -0
- package/dist/src/generated/typus_stake_pool/admin.js +91 -0
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +25 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +8 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/object.js +16 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +30 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +37 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +18 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +25 -0
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +1023 -0
- package/dist/src/generated/typus_stake_pool/stake_pool.js +918 -0
- package/dist/src/generated/utils/index.d.ts +11 -0
- package/dist/src/generated/utils/index.js +135 -0
- package/dist/src/grpc/graphql.d.ts +26 -0
- package/dist/src/grpc/graphql.js +126 -0
- package/dist/src/grpc/grpc.d.ts +1 -0
- package/dist/src/grpc/grpc.js +38 -0
- package/dist/src/grpc/ledgerService.js +64 -0
- package/dist/src/grpc/liveDataService.d.ts +0 -0
- package/dist/src/grpc/liveDataService.js +49 -0
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +20 -39
- package/dist/src/user/history.js +611 -680
- package/dist/src/user/order.d.ts +11 -11
- package/dist/src/user/order.js +171 -302
- package/dist/src/user/orderWithBidReceipt.d.ts +8 -6
- package/dist/src/user/orderWithBidReceipt.js +127 -226
- package/dist/src/user/tlp.d.ts +32 -23
- package/dist/src/user/tlp.js +316 -468
- package/package.json +44 -36
- package/dist/src/_dependencies/source/0x1/ascii/structs.d.ts +0 -88
- package/dist/src/_dependencies/source/0x1/ascii/structs.js +0 -398
- package/dist/src/_dependencies/source/0x1/index.d.ts +0 -3
- package/dist/src/_dependencies/source/0x1/index.js +0 -6
- package/dist/src/_dependencies/source/0x1/option/structs.d.ts +0 -50
- package/dist/src/_dependencies/source/0x1/option/structs.js +0 -271
- package/dist/src/_dependencies/source/0x1/string/structs.d.ts +0 -48
- package/dist/src/_dependencies/source/0x1/string/structs.js +0 -256
- package/dist/src/_dependencies/source/0x1/type-name/structs.d.ts +0 -49
- package/dist/src/_dependencies/source/0x1/type-name/structs.js +0 -223
- package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +0 -54
- package/dist/src/_dependencies/source/0x2/bag/structs.js +0 -229
- package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +0 -84
- package/dist/src/_dependencies/source/0x2/balance/structs.js +0 -386
- package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +0 -406
- package/dist/src/_dependencies/source/0x2/coin/structs.js +0 -1247
- package/dist/src/_dependencies/source/0x2/index.d.ts +0 -3
- package/dist/src/_dependencies/source/0x2/index.js +0 -6
- package/dist/src/_dependencies/source/0x2/linked-table/structs.d.ts +0 -132
- package/dist/src/_dependencies/source/0x2/linked-table/structs.js +0 -438
- package/dist/src/_dependencies/source/0x2/object/structs.d.ts +0 -86
- package/dist/src/_dependencies/source/0x2/object/structs.js +0 -364
- package/dist/src/_dependencies/source/0x2/object-table/structs.d.ts +0 -54
- package/dist/src/_dependencies/source/0x2/object-table/structs.js +0 -248
- package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +0 -44
- package/dist/src/_dependencies/source/0x2/sui/structs.js +0 -222
- package/dist/src/_dependencies/source/0x2/table/structs.d.ts +0 -54
- package/dist/src/_dependencies/source/0x2/table/structs.js +0 -248
- package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +0 -59
- package/dist/src/_dependencies/source/0x2/table-vec/structs.js +0 -274
- package/dist/src/_dependencies/source/0x2/token/structs.d.ts +0 -421
- package/dist/src/_dependencies/source/0x2/token/structs.js +0 -1095
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +0 -348
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +0 -1091
- package/dist/src/_dependencies/source/0x2/url/structs.d.ts +0 -49
- package/dist/src/_dependencies/source/0x2/url/structs.js +0 -223
- package/dist/src/_dependencies/source/0x2/vec-map/structs.d.ts +0 -106
- package/dist/src/_dependencies/source/0x2/vec-map/structs.js +0 -446
- package/dist/src/_dependencies/source/0x2/vec-set/structs.d.ts +0 -49
- package/dist/src/_dependencies/source/0x2/vec-set/structs.js +0 -270
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +0 -422
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.js +0 -1084
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +0 -130
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.js +0 -456
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +0 -208
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.js +0 -653
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +0 -362
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.js +0 -899
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.d.ts +0 -8
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.js +0 -11
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.d.ts +0 -2
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.js +0 -102
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.d.ts +0 -202
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.js +0 -632
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +0 -600
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.js +0 -1459
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.d.ts +0 -136
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.js +0 -438
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.d.ts +0 -127
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.js +0 -430
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +0 -957
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.js +0 -2261
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +0 -244
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.js +0 -733
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +0 -294
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.js +0 -892
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +0 -73
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.js +0 -263
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +0 -294
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.js +0 -591
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +0 -64
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.js +0 -258
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +0 -756
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.js +0 -1721
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +0 -44
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.js +0 -222
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.d.ts +0 -3
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.js +0 -6
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.d.ts +0 -2
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.js +0 -89
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.d.ts +0 -135
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.js +0 -444
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.d.ts +0 -2106
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.js +0 -4952
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +0 -390
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.js +0 -844
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.d.ts +0 -6
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.js +0 -9
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.d.ts +0 -2
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.js +0 -69
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.d.ts +0 -89
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.js +0 -376
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +0 -386
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.js +0 -881
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +0 -59
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.js +0 -274
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +0 -974
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.js +0 -2387
- package/dist/src/_framework/init-loader.d.ts +0 -2
- package/dist/src/_framework/loader.d.ts +0 -17
- package/dist/src/_framework/loader.js +0 -108
- package/dist/src/_framework/reified.d.ts +0 -108
- package/dist/src/_framework/reified.js +0 -237
- package/dist/src/_framework/util.d.ts +0 -35
- package/dist/src/_framework/util.js +0 -396
- package/dist/src/_framework/vector.d.ts +0 -42
- package/dist/src/_framework/vector.js +0 -112
- package/dist/src/pyth.js +0 -1
- package/dist/src/typus_perp/admin/functions.d.ts +0 -59
- package/dist/src/typus_perp/admin/functions.js +0 -122
- package/dist/src/typus_perp/admin/structs.d.ts +0 -467
- package/dist/src/typus_perp/admin/structs.js +0 -1065
- package/dist/src/typus_perp/competition/functions.d.ts +0 -24
- package/dist/src/typus_perp/competition/functions.js +0 -38
- package/dist/src/typus_perp/competition/structs.d.ts +0 -80
- package/dist/src/typus_perp/competition/structs.js +0 -288
- package/dist/src/typus_perp/error/functions.d.ts +0 -73
- package/dist/src/typus_perp/error/functions.js +0 -363
- package/dist/src/typus_perp/escrow/functions.d.ts +0 -17
- package/dist/src/typus_perp/escrow/functions.js +0 -36
- package/dist/src/typus_perp/escrow/structs.d.ts +0 -160
- package/dist/src/typus_perp/escrow/structs.js +0 -324
- package/dist/src/typus_perp/index.d.ts +0 -1
- package/dist/src/typus_perp/index.js +0 -7
- package/dist/src/typus_perp/init.d.ts +0 -2
- package/dist/src/typus_perp/init.js +0 -118
- package/dist/src/typus_perp/lending/functions.d.ts +0 -15
- package/dist/src/typus_perp/lending/functions.js +0 -22
- package/dist/src/typus_perp/lp-pool/functions.d.ts +0 -460
- package/dist/src/typus_perp/lp-pool/functions.js +0 -732
- package/dist/src/typus_perp/lp-pool/structs.d.ts +0 -3705
- package/dist/src/typus_perp/lp-pool/structs.js +0 -6789
- package/dist/src/typus_perp/math/functions.d.ts +0 -29
- package/dist/src/typus_perp/math/functions.js +0 -61
- package/dist/src/typus_perp/position/functions.d.ts +0 -379
- package/dist/src/typus_perp/position/functions.js +0 -713
- package/dist/src/typus_perp/position/structs.d.ts +0 -905
- package/dist/src/typus_perp/position/structs.js +0 -1450
- package/dist/src/typus_perp/symbol/functions.d.ts +0 -9
- package/dist/src/typus_perp/symbol/functions.js +0 -24
- package/dist/src/typus_perp/symbol/structs.d.ts +0 -70
- package/dist/src/typus_perp/symbol/structs.js +0 -235
- package/dist/src/typus_perp/tlp/functions.d.ts +0 -19
- package/dist/src/typus_perp/tlp/functions.js +0 -40
- package/dist/src/typus_perp/tlp/structs.d.ts +0 -89
- package/dist/src/typus_perp/tlp/structs.js +0 -365
- package/dist/src/typus_perp/token-interface/functions.d.ts +0 -11
- package/dist/src/typus_perp/token-interface/functions.js +0 -22
- package/dist/src/typus_perp/trading/functions.d.ts +0 -812
- package/dist/src/typus_perp/trading/functions.js +0 -1218
- package/dist/src/typus_perp/trading/structs.d.ts +0 -3060
- package/dist/src/typus_perp/trading/structs.js +0 -5813
- package/dist/src/typus_perp/treasury-caps/functions.d.ts +0 -9
- package/dist/src/typus_perp/treasury-caps/functions.js +0 -36
- package/dist/src/typus_perp/treasury-caps/structs.d.ts +0 -49
- package/dist/src/typus_perp/treasury-caps/structs.js +0 -223
- package/dist/src/typus_perp/user-account/functions.d.ts +0 -36
- package/dist/src/typus_perp/user-account/functions.js +0 -70
- package/dist/src/typus_perp/user-account/structs.d.ts +0 -148
- package/dist/src/typus_perp/user-account/structs.js +0 -448
- package/dist/src/typus_stake_pool/admin/functions.d.ts +0 -49
- package/dist/src/typus_stake_pool/admin/functions.js +0 -105
- package/dist/src/typus_stake_pool/admin/structs.d.ts +0 -365
- package/dist/src/typus_stake_pool/admin/structs.js +0 -789
- package/dist/src/typus_stake_pool/index.d.ts +0 -1
- package/dist/src/typus_stake_pool/index.js +0 -7
- package/dist/src/typus_stake_pool/init.d.ts +0 -2
- package/dist/src/typus_stake_pool/init.js +0 -69
- package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +0 -229
- package/dist/src/typus_stake_pool/stake-pool/functions.js +0 -380
- package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +0 -2199
- package/dist/src/typus_stake_pool/stake-pool/structs.js +0 -4653
- /package/dist/src/{pyth.d.ts → grpc/ledgerService.d.ts} +0 -0
|
@@ -1,591 +0,0 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
47
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
48
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
49
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
50
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
51
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
52
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
56
|
-
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);
|
|
57
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
58
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
59
|
-
function step(op) {
|
|
60
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
61
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
62
|
-
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;
|
|
63
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
64
|
-
switch (op[0]) {
|
|
65
|
-
case 0: case 1: t = op; break;
|
|
66
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
67
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
68
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
69
|
-
default:
|
|
70
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
71
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
72
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
73
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
74
|
-
if (t[2]) _.ops.pop();
|
|
75
|
-
_.trys.pop(); continue;
|
|
76
|
-
}
|
|
77
|
-
op = body.call(thisArg, _);
|
|
78
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
79
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
83
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
84
|
-
if (!m) return o;
|
|
85
|
-
var i = m.call(o), r, ar = [], e;
|
|
86
|
-
try {
|
|
87
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
88
|
-
}
|
|
89
|
-
catch (error) { e = { error: error }; }
|
|
90
|
-
finally {
|
|
91
|
-
try {
|
|
92
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
93
|
-
}
|
|
94
|
-
finally { if (e) throw e.error; }
|
|
95
|
-
}
|
|
96
|
-
return ar;
|
|
97
|
-
};
|
|
98
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
99
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
100
|
-
if (ar || !(i in from)) {
|
|
101
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
102
|
-
ar[i] = from[i];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
106
|
-
};
|
|
107
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
108
|
-
exports.SharedBalancePool = exports.BalancePool = exports.BalanceInfo = void 0;
|
|
109
|
-
exports.isBalanceInfo = isBalanceInfo;
|
|
110
|
-
exports.isBalancePool = isBalancePool;
|
|
111
|
-
exports.isSharedBalancePool = isSharedBalancePool;
|
|
112
|
-
var reified = __importStar(require("../../../../_framework/reified"));
|
|
113
|
-
var reified_1 = require("../../../../_framework/reified");
|
|
114
|
-
var util_1 = require("../../../../_framework/util");
|
|
115
|
-
var structs_1 = require("../../0x1/type-name/structs");
|
|
116
|
-
var structs_2 = require("../../0x2/object/structs");
|
|
117
|
-
var structs_3 = require("../authority/structs");
|
|
118
|
-
var index_1 = require("../index");
|
|
119
|
-
var bcs_1 = require("@mysten/sui/bcs");
|
|
120
|
-
var utils_1 = require("@mysten/sui/utils");
|
|
121
|
-
/* ============================== BalanceInfo =============================== */
|
|
122
|
-
function isBalanceInfo(type) {
|
|
123
|
-
type = (0, util_1.compressSuiType)(type);
|
|
124
|
-
return type === "".concat(index_1.PKG_V1, "::balance_pool::BalanceInfo");
|
|
125
|
-
}
|
|
126
|
-
var BalanceInfo = /** @class */ (function () {
|
|
127
|
-
function BalanceInfo(typeArgs, fields) {
|
|
128
|
-
this.__StructClass = true;
|
|
129
|
-
this.$typeName = BalanceInfo.$typeName;
|
|
130
|
-
this.$isPhantom = BalanceInfo.$isPhantom;
|
|
131
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([BalanceInfo.$typeName], __read(typeArgs), false));
|
|
132
|
-
this.$typeArgs = typeArgs;
|
|
133
|
-
this.token = fields.token;
|
|
134
|
-
this.value = fields.value;
|
|
135
|
-
}
|
|
136
|
-
BalanceInfo.reified = function () {
|
|
137
|
-
var _this = this;
|
|
138
|
-
return {
|
|
139
|
-
typeName: BalanceInfo.$typeName,
|
|
140
|
-
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([BalanceInfo.$typeName], [], false)),
|
|
141
|
-
typeArgs: [],
|
|
142
|
-
isPhantom: BalanceInfo.$isPhantom,
|
|
143
|
-
reifiedTypeArgs: [],
|
|
144
|
-
fromFields: function (fields) { return BalanceInfo.fromFields(fields); },
|
|
145
|
-
fromFieldsWithTypes: function (item) { return BalanceInfo.fromFieldsWithTypes(item); },
|
|
146
|
-
fromBcs: function (data) { return BalanceInfo.fromBcs(data); },
|
|
147
|
-
bcs: BalanceInfo.bcs,
|
|
148
|
-
fromJSONField: function (field) { return BalanceInfo.fromJSONField(field); },
|
|
149
|
-
fromJSON: function (json) { return BalanceInfo.fromJSON(json); },
|
|
150
|
-
fromSuiParsedData: function (content) { return BalanceInfo.fromSuiParsedData(content); },
|
|
151
|
-
fromSuiObjectData: function (content) { return BalanceInfo.fromSuiObjectData(content); },
|
|
152
|
-
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
153
|
-
return [2 /*return*/, BalanceInfo.fetch(client, id)];
|
|
154
|
-
}); }); },
|
|
155
|
-
new: function (fields) {
|
|
156
|
-
return new BalanceInfo([], fields);
|
|
157
|
-
},
|
|
158
|
-
kind: "StructClassReified",
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
Object.defineProperty(BalanceInfo, "r", {
|
|
162
|
-
get: function () {
|
|
163
|
-
return BalanceInfo.reified();
|
|
164
|
-
},
|
|
165
|
-
enumerable: false,
|
|
166
|
-
configurable: true
|
|
167
|
-
});
|
|
168
|
-
BalanceInfo.phantom = function () {
|
|
169
|
-
return (0, reified_1.phantom)(BalanceInfo.reified());
|
|
170
|
-
};
|
|
171
|
-
Object.defineProperty(BalanceInfo, "p", {
|
|
172
|
-
get: function () {
|
|
173
|
-
return BalanceInfo.phantom();
|
|
174
|
-
},
|
|
175
|
-
enumerable: false,
|
|
176
|
-
configurable: true
|
|
177
|
-
});
|
|
178
|
-
Object.defineProperty(BalanceInfo, "bcs", {
|
|
179
|
-
get: function () {
|
|
180
|
-
return bcs_1.bcs.struct("BalanceInfo", {
|
|
181
|
-
token: structs_1.TypeName.bcs,
|
|
182
|
-
value: bcs_1.bcs.u64(),
|
|
183
|
-
});
|
|
184
|
-
},
|
|
185
|
-
enumerable: false,
|
|
186
|
-
configurable: true
|
|
187
|
-
});
|
|
188
|
-
BalanceInfo.fromFields = function (fields) {
|
|
189
|
-
return BalanceInfo.reified().new({
|
|
190
|
-
token: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.token),
|
|
191
|
-
value: (0, reified_1.decodeFromFields)("u64", fields.value),
|
|
192
|
-
});
|
|
193
|
-
};
|
|
194
|
-
BalanceInfo.fromFieldsWithTypes = function (item) {
|
|
195
|
-
if (!isBalanceInfo(item.type)) {
|
|
196
|
-
throw new Error("not a BalanceInfo type");
|
|
197
|
-
}
|
|
198
|
-
return BalanceInfo.reified().new({
|
|
199
|
-
token: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.token),
|
|
200
|
-
value: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.value),
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
|
-
BalanceInfo.fromBcs = function (data) {
|
|
204
|
-
return BalanceInfo.fromFields(BalanceInfo.bcs.parse(data));
|
|
205
|
-
};
|
|
206
|
-
BalanceInfo.prototype.toJSONField = function () {
|
|
207
|
-
return {
|
|
208
|
-
token: this.token.toJSONField(),
|
|
209
|
-
value: this.value.toString(),
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
BalanceInfo.prototype.toJSON = function () {
|
|
213
|
-
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
214
|
-
};
|
|
215
|
-
BalanceInfo.fromJSONField = function (field) {
|
|
216
|
-
return BalanceInfo.reified().new({
|
|
217
|
-
token: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.token),
|
|
218
|
-
value: (0, reified_1.decodeFromJSONField)("u64", field.value),
|
|
219
|
-
});
|
|
220
|
-
};
|
|
221
|
-
BalanceInfo.fromJSON = function (json) {
|
|
222
|
-
if (json.$typeName !== BalanceInfo.$typeName) {
|
|
223
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
224
|
-
}
|
|
225
|
-
return BalanceInfo.fromJSONField(json);
|
|
226
|
-
};
|
|
227
|
-
BalanceInfo.fromSuiParsedData = function (content) {
|
|
228
|
-
if (content.dataType !== "moveObject") {
|
|
229
|
-
throw new Error("not an object");
|
|
230
|
-
}
|
|
231
|
-
if (!isBalanceInfo(content.type)) {
|
|
232
|
-
throw new Error("object at ".concat(content.fields.id, " is not a BalanceInfo object"));
|
|
233
|
-
}
|
|
234
|
-
return BalanceInfo.fromFieldsWithTypes(content);
|
|
235
|
-
};
|
|
236
|
-
BalanceInfo.fromSuiObjectData = function (data) {
|
|
237
|
-
if (data.bcs) {
|
|
238
|
-
if (data.bcs.dataType !== "moveObject" || !isBalanceInfo(data.bcs.type)) {
|
|
239
|
-
throw new Error("object at is not a BalanceInfo object");
|
|
240
|
-
}
|
|
241
|
-
return BalanceInfo.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
242
|
-
}
|
|
243
|
-
if (data.content) {
|
|
244
|
-
return BalanceInfo.fromSuiParsedData(data.content);
|
|
245
|
-
}
|
|
246
|
-
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
247
|
-
};
|
|
248
|
-
BalanceInfo.fetch = function (client, id) {
|
|
249
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
250
|
-
var res;
|
|
251
|
-
var _a, _b;
|
|
252
|
-
return __generator(this, function (_c) {
|
|
253
|
-
switch (_c.label) {
|
|
254
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
255
|
-
case 1:
|
|
256
|
-
res = _c.sent();
|
|
257
|
-
if (res.error) {
|
|
258
|
-
throw new Error("error fetching BalanceInfo object at id ".concat(id, ": ").concat(res.error.code));
|
|
259
|
-
}
|
|
260
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBalanceInfo(res.data.bcs.type)) {
|
|
261
|
-
throw new Error("object at id ".concat(id, " is not a BalanceInfo object"));
|
|
262
|
-
}
|
|
263
|
-
return [2 /*return*/, BalanceInfo.fromSuiObjectData(res.data)];
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
});
|
|
267
|
-
};
|
|
268
|
-
BalanceInfo.$typeName = "".concat(index_1.PKG_V1, "::balance_pool::BalanceInfo");
|
|
269
|
-
BalanceInfo.$numTypeParams = 0;
|
|
270
|
-
BalanceInfo.$isPhantom = [];
|
|
271
|
-
return BalanceInfo;
|
|
272
|
-
}());
|
|
273
|
-
exports.BalanceInfo = BalanceInfo;
|
|
274
|
-
/* ============================== BalancePool =============================== */
|
|
275
|
-
function isBalancePool(type) {
|
|
276
|
-
type = (0, util_1.compressSuiType)(type);
|
|
277
|
-
return type === "".concat(index_1.PKG_V1, "::balance_pool::BalancePool");
|
|
278
|
-
}
|
|
279
|
-
var BalancePool = /** @class */ (function () {
|
|
280
|
-
function BalancePool(typeArgs, fields) {
|
|
281
|
-
this.__StructClass = true;
|
|
282
|
-
this.$typeName = BalancePool.$typeName;
|
|
283
|
-
this.$isPhantom = BalancePool.$isPhantom;
|
|
284
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([BalancePool.$typeName], __read(typeArgs), false));
|
|
285
|
-
this.$typeArgs = typeArgs;
|
|
286
|
-
this.id = fields.id;
|
|
287
|
-
this.balanceInfos = fields.balanceInfos;
|
|
288
|
-
this.authority = fields.authority;
|
|
289
|
-
}
|
|
290
|
-
BalancePool.reified = function () {
|
|
291
|
-
var _this = this;
|
|
292
|
-
return {
|
|
293
|
-
typeName: BalancePool.$typeName,
|
|
294
|
-
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([BalancePool.$typeName], [], false)),
|
|
295
|
-
typeArgs: [],
|
|
296
|
-
isPhantom: BalancePool.$isPhantom,
|
|
297
|
-
reifiedTypeArgs: [],
|
|
298
|
-
fromFields: function (fields) { return BalancePool.fromFields(fields); },
|
|
299
|
-
fromFieldsWithTypes: function (item) { return BalancePool.fromFieldsWithTypes(item); },
|
|
300
|
-
fromBcs: function (data) { return BalancePool.fromBcs(data); },
|
|
301
|
-
bcs: BalancePool.bcs,
|
|
302
|
-
fromJSONField: function (field) { return BalancePool.fromJSONField(field); },
|
|
303
|
-
fromJSON: function (json) { return BalancePool.fromJSON(json); },
|
|
304
|
-
fromSuiParsedData: function (content) { return BalancePool.fromSuiParsedData(content); },
|
|
305
|
-
fromSuiObjectData: function (content) { return BalancePool.fromSuiObjectData(content); },
|
|
306
|
-
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
307
|
-
return [2 /*return*/, BalancePool.fetch(client, id)];
|
|
308
|
-
}); }); },
|
|
309
|
-
new: function (fields) {
|
|
310
|
-
return new BalancePool([], fields);
|
|
311
|
-
},
|
|
312
|
-
kind: "StructClassReified",
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
Object.defineProperty(BalancePool, "r", {
|
|
316
|
-
get: function () {
|
|
317
|
-
return BalancePool.reified();
|
|
318
|
-
},
|
|
319
|
-
enumerable: false,
|
|
320
|
-
configurable: true
|
|
321
|
-
});
|
|
322
|
-
BalancePool.phantom = function () {
|
|
323
|
-
return (0, reified_1.phantom)(BalancePool.reified());
|
|
324
|
-
};
|
|
325
|
-
Object.defineProperty(BalancePool, "p", {
|
|
326
|
-
get: function () {
|
|
327
|
-
return BalancePool.phantom();
|
|
328
|
-
},
|
|
329
|
-
enumerable: false,
|
|
330
|
-
configurable: true
|
|
331
|
-
});
|
|
332
|
-
Object.defineProperty(BalancePool, "bcs", {
|
|
333
|
-
get: function () {
|
|
334
|
-
return bcs_1.bcs.struct("BalancePool", {
|
|
335
|
-
id: structs_2.UID.bcs,
|
|
336
|
-
balance_infos: bcs_1.bcs.vector(BalanceInfo.bcs),
|
|
337
|
-
authority: structs_3.Authority.bcs,
|
|
338
|
-
});
|
|
339
|
-
},
|
|
340
|
-
enumerable: false,
|
|
341
|
-
configurable: true
|
|
342
|
-
});
|
|
343
|
-
BalancePool.fromFields = function (fields) {
|
|
344
|
-
return BalancePool.reified().new({
|
|
345
|
-
id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
|
|
346
|
-
balanceInfos: (0, reified_1.decodeFromFields)(reified.vector(BalanceInfo.reified()), fields.balance_infos),
|
|
347
|
-
authority: (0, reified_1.decodeFromFields)(structs_3.Authority.reified(), fields.authority),
|
|
348
|
-
});
|
|
349
|
-
};
|
|
350
|
-
BalancePool.fromFieldsWithTypes = function (item) {
|
|
351
|
-
if (!isBalancePool(item.type)) {
|
|
352
|
-
throw new Error("not a BalancePool type");
|
|
353
|
-
}
|
|
354
|
-
return BalancePool.reified().new({
|
|
355
|
-
id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
|
|
356
|
-
balanceInfos: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(BalanceInfo.reified()), item.fields.balance_infos),
|
|
357
|
-
authority: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.Authority.reified(), item.fields.authority),
|
|
358
|
-
});
|
|
359
|
-
};
|
|
360
|
-
BalancePool.fromBcs = function (data) {
|
|
361
|
-
return BalancePool.fromFields(BalancePool.bcs.parse(data));
|
|
362
|
-
};
|
|
363
|
-
BalancePool.prototype.toJSONField = function () {
|
|
364
|
-
return {
|
|
365
|
-
id: this.id,
|
|
366
|
-
balanceInfos: (0, reified_1.fieldToJSON)("vector<".concat(BalanceInfo.$typeName, ">"), this.balanceInfos),
|
|
367
|
-
authority: this.authority.toJSONField(),
|
|
368
|
-
};
|
|
369
|
-
};
|
|
370
|
-
BalancePool.prototype.toJSON = function () {
|
|
371
|
-
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
372
|
-
};
|
|
373
|
-
BalancePool.fromJSONField = function (field) {
|
|
374
|
-
return BalancePool.reified().new({
|
|
375
|
-
id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
|
|
376
|
-
balanceInfos: (0, reified_1.decodeFromJSONField)(reified.vector(BalanceInfo.reified()), field.balanceInfos),
|
|
377
|
-
authority: (0, reified_1.decodeFromJSONField)(structs_3.Authority.reified(), field.authority),
|
|
378
|
-
});
|
|
379
|
-
};
|
|
380
|
-
BalancePool.fromJSON = function (json) {
|
|
381
|
-
if (json.$typeName !== BalancePool.$typeName) {
|
|
382
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
383
|
-
}
|
|
384
|
-
return BalancePool.fromJSONField(json);
|
|
385
|
-
};
|
|
386
|
-
BalancePool.fromSuiParsedData = function (content) {
|
|
387
|
-
if (content.dataType !== "moveObject") {
|
|
388
|
-
throw new Error("not an object");
|
|
389
|
-
}
|
|
390
|
-
if (!isBalancePool(content.type)) {
|
|
391
|
-
throw new Error("object at ".concat(content.fields.id, " is not a BalancePool object"));
|
|
392
|
-
}
|
|
393
|
-
return BalancePool.fromFieldsWithTypes(content);
|
|
394
|
-
};
|
|
395
|
-
BalancePool.fromSuiObjectData = function (data) {
|
|
396
|
-
if (data.bcs) {
|
|
397
|
-
if (data.bcs.dataType !== "moveObject" || !isBalancePool(data.bcs.type)) {
|
|
398
|
-
throw new Error("object at is not a BalancePool object");
|
|
399
|
-
}
|
|
400
|
-
return BalancePool.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
401
|
-
}
|
|
402
|
-
if (data.content) {
|
|
403
|
-
return BalancePool.fromSuiParsedData(data.content);
|
|
404
|
-
}
|
|
405
|
-
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
406
|
-
};
|
|
407
|
-
BalancePool.fetch = function (client, id) {
|
|
408
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
409
|
-
var res;
|
|
410
|
-
var _a, _b;
|
|
411
|
-
return __generator(this, function (_c) {
|
|
412
|
-
switch (_c.label) {
|
|
413
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
414
|
-
case 1:
|
|
415
|
-
res = _c.sent();
|
|
416
|
-
if (res.error) {
|
|
417
|
-
throw new Error("error fetching BalancePool object at id ".concat(id, ": ").concat(res.error.code));
|
|
418
|
-
}
|
|
419
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBalancePool(res.data.bcs.type)) {
|
|
420
|
-
throw new Error("object at id ".concat(id, " is not a BalancePool object"));
|
|
421
|
-
}
|
|
422
|
-
return [2 /*return*/, BalancePool.fromSuiObjectData(res.data)];
|
|
423
|
-
}
|
|
424
|
-
});
|
|
425
|
-
});
|
|
426
|
-
};
|
|
427
|
-
BalancePool.$typeName = "".concat(index_1.PKG_V1, "::balance_pool::BalancePool");
|
|
428
|
-
BalancePool.$numTypeParams = 0;
|
|
429
|
-
BalancePool.$isPhantom = [];
|
|
430
|
-
return BalancePool;
|
|
431
|
-
}());
|
|
432
|
-
exports.BalancePool = BalancePool;
|
|
433
|
-
/* ============================== SharedBalancePool =============================== */
|
|
434
|
-
function isSharedBalancePool(type) {
|
|
435
|
-
type = (0, util_1.compressSuiType)(type);
|
|
436
|
-
return type === "".concat(index_1.PKG_V1, "::balance_pool::SharedBalancePool");
|
|
437
|
-
}
|
|
438
|
-
var SharedBalancePool = /** @class */ (function () {
|
|
439
|
-
function SharedBalancePool(typeArgs, fields) {
|
|
440
|
-
this.__StructClass = true;
|
|
441
|
-
this.$typeName = SharedBalancePool.$typeName;
|
|
442
|
-
this.$isPhantom = SharedBalancePool.$isPhantom;
|
|
443
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SharedBalancePool.$typeName], __read(typeArgs), false));
|
|
444
|
-
this.$typeArgs = typeArgs;
|
|
445
|
-
this.id = fields.id;
|
|
446
|
-
this.balanceInfos = fields.balanceInfos;
|
|
447
|
-
this.authority = fields.authority;
|
|
448
|
-
}
|
|
449
|
-
SharedBalancePool.reified = function () {
|
|
450
|
-
var _this = this;
|
|
451
|
-
return {
|
|
452
|
-
typeName: SharedBalancePool.$typeName,
|
|
453
|
-
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SharedBalancePool.$typeName], [], false)),
|
|
454
|
-
typeArgs: [],
|
|
455
|
-
isPhantom: SharedBalancePool.$isPhantom,
|
|
456
|
-
reifiedTypeArgs: [],
|
|
457
|
-
fromFields: function (fields) { return SharedBalancePool.fromFields(fields); },
|
|
458
|
-
fromFieldsWithTypes: function (item) { return SharedBalancePool.fromFieldsWithTypes(item); },
|
|
459
|
-
fromBcs: function (data) { return SharedBalancePool.fromBcs(data); },
|
|
460
|
-
bcs: SharedBalancePool.bcs,
|
|
461
|
-
fromJSONField: function (field) { return SharedBalancePool.fromJSONField(field); },
|
|
462
|
-
fromJSON: function (json) { return SharedBalancePool.fromJSON(json); },
|
|
463
|
-
fromSuiParsedData: function (content) { return SharedBalancePool.fromSuiParsedData(content); },
|
|
464
|
-
fromSuiObjectData: function (content) { return SharedBalancePool.fromSuiObjectData(content); },
|
|
465
|
-
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
466
|
-
return [2 /*return*/, SharedBalancePool.fetch(client, id)];
|
|
467
|
-
}); }); },
|
|
468
|
-
new: function (fields) {
|
|
469
|
-
return new SharedBalancePool([], fields);
|
|
470
|
-
},
|
|
471
|
-
kind: "StructClassReified",
|
|
472
|
-
};
|
|
473
|
-
};
|
|
474
|
-
Object.defineProperty(SharedBalancePool, "r", {
|
|
475
|
-
get: function () {
|
|
476
|
-
return SharedBalancePool.reified();
|
|
477
|
-
},
|
|
478
|
-
enumerable: false,
|
|
479
|
-
configurable: true
|
|
480
|
-
});
|
|
481
|
-
SharedBalancePool.phantom = function () {
|
|
482
|
-
return (0, reified_1.phantom)(SharedBalancePool.reified());
|
|
483
|
-
};
|
|
484
|
-
Object.defineProperty(SharedBalancePool, "p", {
|
|
485
|
-
get: function () {
|
|
486
|
-
return SharedBalancePool.phantom();
|
|
487
|
-
},
|
|
488
|
-
enumerable: false,
|
|
489
|
-
configurable: true
|
|
490
|
-
});
|
|
491
|
-
Object.defineProperty(SharedBalancePool, "bcs", {
|
|
492
|
-
get: function () {
|
|
493
|
-
return bcs_1.bcs.struct("SharedBalancePool", {
|
|
494
|
-
id: structs_2.UID.bcs,
|
|
495
|
-
balance_infos: bcs_1.bcs.vector(BalanceInfo.bcs),
|
|
496
|
-
authority: structs_3.Authority.bcs,
|
|
497
|
-
});
|
|
498
|
-
},
|
|
499
|
-
enumerable: false,
|
|
500
|
-
configurable: true
|
|
501
|
-
});
|
|
502
|
-
SharedBalancePool.fromFields = function (fields) {
|
|
503
|
-
return SharedBalancePool.reified().new({
|
|
504
|
-
id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
|
|
505
|
-
balanceInfos: (0, reified_1.decodeFromFields)(reified.vector(BalanceInfo.reified()), fields.balance_infos),
|
|
506
|
-
authority: (0, reified_1.decodeFromFields)(structs_3.Authority.reified(), fields.authority),
|
|
507
|
-
});
|
|
508
|
-
};
|
|
509
|
-
SharedBalancePool.fromFieldsWithTypes = function (item) {
|
|
510
|
-
if (!isSharedBalancePool(item.type)) {
|
|
511
|
-
throw new Error("not a SharedBalancePool type");
|
|
512
|
-
}
|
|
513
|
-
return SharedBalancePool.reified().new({
|
|
514
|
-
id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
|
|
515
|
-
balanceInfos: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(BalanceInfo.reified()), item.fields.balance_infos),
|
|
516
|
-
authority: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.Authority.reified(), item.fields.authority),
|
|
517
|
-
});
|
|
518
|
-
};
|
|
519
|
-
SharedBalancePool.fromBcs = function (data) {
|
|
520
|
-
return SharedBalancePool.fromFields(SharedBalancePool.bcs.parse(data));
|
|
521
|
-
};
|
|
522
|
-
SharedBalancePool.prototype.toJSONField = function () {
|
|
523
|
-
return {
|
|
524
|
-
id: this.id,
|
|
525
|
-
balanceInfos: (0, reified_1.fieldToJSON)("vector<".concat(BalanceInfo.$typeName, ">"), this.balanceInfos),
|
|
526
|
-
authority: this.authority.toJSONField(),
|
|
527
|
-
};
|
|
528
|
-
};
|
|
529
|
-
SharedBalancePool.prototype.toJSON = function () {
|
|
530
|
-
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
531
|
-
};
|
|
532
|
-
SharedBalancePool.fromJSONField = function (field) {
|
|
533
|
-
return SharedBalancePool.reified().new({
|
|
534
|
-
id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
|
|
535
|
-
balanceInfos: (0, reified_1.decodeFromJSONField)(reified.vector(BalanceInfo.reified()), field.balanceInfos),
|
|
536
|
-
authority: (0, reified_1.decodeFromJSONField)(structs_3.Authority.reified(), field.authority),
|
|
537
|
-
});
|
|
538
|
-
};
|
|
539
|
-
SharedBalancePool.fromJSON = function (json) {
|
|
540
|
-
if (json.$typeName !== SharedBalancePool.$typeName) {
|
|
541
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
542
|
-
}
|
|
543
|
-
return SharedBalancePool.fromJSONField(json);
|
|
544
|
-
};
|
|
545
|
-
SharedBalancePool.fromSuiParsedData = function (content) {
|
|
546
|
-
if (content.dataType !== "moveObject") {
|
|
547
|
-
throw new Error("not an object");
|
|
548
|
-
}
|
|
549
|
-
if (!isSharedBalancePool(content.type)) {
|
|
550
|
-
throw new Error("object at ".concat(content.fields.id, " is not a SharedBalancePool object"));
|
|
551
|
-
}
|
|
552
|
-
return SharedBalancePool.fromFieldsWithTypes(content);
|
|
553
|
-
};
|
|
554
|
-
SharedBalancePool.fromSuiObjectData = function (data) {
|
|
555
|
-
if (data.bcs) {
|
|
556
|
-
if (data.bcs.dataType !== "moveObject" || !isSharedBalancePool(data.bcs.type)) {
|
|
557
|
-
throw new Error("object at is not a SharedBalancePool object");
|
|
558
|
-
}
|
|
559
|
-
return SharedBalancePool.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
560
|
-
}
|
|
561
|
-
if (data.content) {
|
|
562
|
-
return SharedBalancePool.fromSuiParsedData(data.content);
|
|
563
|
-
}
|
|
564
|
-
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
565
|
-
};
|
|
566
|
-
SharedBalancePool.fetch = function (client, id) {
|
|
567
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
568
|
-
var res;
|
|
569
|
-
var _a, _b;
|
|
570
|
-
return __generator(this, function (_c) {
|
|
571
|
-
switch (_c.label) {
|
|
572
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
573
|
-
case 1:
|
|
574
|
-
res = _c.sent();
|
|
575
|
-
if (res.error) {
|
|
576
|
-
throw new Error("error fetching SharedBalancePool object at id ".concat(id, ": ").concat(res.error.code));
|
|
577
|
-
}
|
|
578
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSharedBalancePool(res.data.bcs.type)) {
|
|
579
|
-
throw new Error("object at id ".concat(id, " is not a SharedBalancePool object"));
|
|
580
|
-
}
|
|
581
|
-
return [2 /*return*/, SharedBalancePool.fromSuiObjectData(res.data)];
|
|
582
|
-
}
|
|
583
|
-
});
|
|
584
|
-
});
|
|
585
|
-
};
|
|
586
|
-
SharedBalancePool.$typeName = "".concat(index_1.PKG_V1, "::balance_pool::SharedBalancePool");
|
|
587
|
-
SharedBalancePool.$numTypeParams = 0;
|
|
588
|
-
SharedBalancePool.$isPhantom = [];
|
|
589
|
-
return SharedBalancePool;
|
|
590
|
-
}());
|
|
591
|
-
exports.SharedBalancePool = SharedBalancePool;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { PhantomReified, PhantomToTypeStr, PhantomTypeArgument, Reified, StructClass, ToField, ToPhantomTypeArgument, ToTypeStr } from "../../../../_framework/reified";
|
|
2
|
-
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
3
|
-
import { UID } from "../../0x2/object/structs";
|
|
4
|
-
import { PKG_V1 } from "../index";
|
|
5
|
-
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
6
|
-
export declare function isBigVector(type: string): boolean;
|
|
7
|
-
export interface BigVectorFields<Element extends PhantomTypeArgument> {
|
|
8
|
-
id: ToField<UID>;
|
|
9
|
-
sliceCount: ToField<"u64">;
|
|
10
|
-
sliceSize: ToField<"u64">;
|
|
11
|
-
length: ToField<"u64">;
|
|
12
|
-
}
|
|
13
|
-
export type BigVectorReified<Element extends PhantomTypeArgument> = Reified<BigVector<Element>, BigVectorFields<Element>>;
|
|
14
|
-
export declare class BigVector<Element extends PhantomTypeArgument> implements StructClass {
|
|
15
|
-
__StructClass: true;
|
|
16
|
-
static readonly $typeName = "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274::big_vector::BigVector";
|
|
17
|
-
static readonly $numTypeParams = 1;
|
|
18
|
-
static readonly $isPhantom: readonly [true];
|
|
19
|
-
readonly $typeName = "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274::big_vector::BigVector";
|
|
20
|
-
readonly $fullTypeName: `${typeof PKG_V1}::big_vector::BigVector<${PhantomToTypeStr<Element>}>`;
|
|
21
|
-
readonly $typeArgs: [PhantomToTypeStr<Element>];
|
|
22
|
-
readonly $isPhantom: readonly [true];
|
|
23
|
-
readonly id: ToField<UID>;
|
|
24
|
-
readonly sliceCount: ToField<"u64">;
|
|
25
|
-
readonly sliceSize: ToField<"u64">;
|
|
26
|
-
readonly length: ToField<"u64">;
|
|
27
|
-
private constructor();
|
|
28
|
-
static reified<Element extends PhantomReified<PhantomTypeArgument>>(Element: Element): BigVectorReified<ToPhantomTypeArgument<Element>>;
|
|
29
|
-
static get r(): typeof BigVector.reified;
|
|
30
|
-
static phantom<Element extends PhantomReified<PhantomTypeArgument>>(Element: Element): PhantomReified<ToTypeStr<BigVector<ToPhantomTypeArgument<Element>>>>;
|
|
31
|
-
static get p(): typeof BigVector.phantom;
|
|
32
|
-
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
33
|
-
id: import("@mysten/sui/bcs").BcsStruct<{
|
|
34
|
-
id: import("@mysten/sui/bcs").BcsStruct<{
|
|
35
|
-
bytes: import("@mysten/sui/bcs").BcsType<string, string, string>;
|
|
36
|
-
}, string>;
|
|
37
|
-
}, string>;
|
|
38
|
-
slice_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
39
|
-
slice_size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
40
|
-
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
41
|
-
}, string>;
|
|
42
|
-
static fromFields<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, fields: Record<string, any>): BigVector<ToPhantomTypeArgument<Element>>;
|
|
43
|
-
static fromFieldsWithTypes<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, item: FieldsWithTypes): BigVector<ToPhantomTypeArgument<Element>>;
|
|
44
|
-
static fromBcs<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, data: Uint8Array): BigVector<ToPhantomTypeArgument<Element>>;
|
|
45
|
-
toJSONField(): {
|
|
46
|
-
id: string;
|
|
47
|
-
sliceCount: string;
|
|
48
|
-
sliceSize: string;
|
|
49
|
-
length: string;
|
|
50
|
-
};
|
|
51
|
-
toJSON(): {
|
|
52
|
-
id: string;
|
|
53
|
-
sliceCount: string;
|
|
54
|
-
sliceSize: string;
|
|
55
|
-
length: string;
|
|
56
|
-
$typeName: string;
|
|
57
|
-
$typeArgs: [PhantomToTypeStr<Element>];
|
|
58
|
-
};
|
|
59
|
-
static fromJSONField<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, field: any): BigVector<ToPhantomTypeArgument<Element>>;
|
|
60
|
-
static fromJSON<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, json: Record<string, any>): BigVector<ToPhantomTypeArgument<Element>>;
|
|
61
|
-
static fromSuiParsedData<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, content: SuiParsedData): BigVector<ToPhantomTypeArgument<Element>>;
|
|
62
|
-
static fromSuiObjectData<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, data: SuiObjectData): BigVector<ToPhantomTypeArgument<Element>>;
|
|
63
|
-
static fetch<Element extends PhantomReified<PhantomTypeArgument>>(client: SuiClient, typeArg: Element, id: string): Promise<BigVector<ToPhantomTypeArgument<Element>>>;
|
|
64
|
-
}
|