@typus/typus-perp-sdk 1.1.32-type-test → 1.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/sentio.d.ts +5 -5
- package/dist/src/api/sentio.js +690 -541
- package/dist/src/client.d.ts +28 -0
- package/dist/src/client.js +171 -0
- package/dist/src/fetch.d.ts +554 -36
- package/dist/src/fetch.js +545 -661
- package/dist/src/generated/typus_perp/admin.d.ts +274 -0
- package/dist/src/generated/typus_perp/admin.js +321 -0
- package/dist/src/generated/typus_perp/competition.d.ts +60 -0
- package/dist/src/generated/typus_perp/competition.js +104 -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/table.d.ts +31 -0
- package/dist/src/generated/typus_perp/deps/sui/table.js +71 -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 +15 -0
- package/dist/src/{_framework/init-loader.js → generated/typus_perp/deps/typus_framework/vault.js} +18 -10
- package/dist/src/generated/typus_perp/error.d.ts +443 -0
- package/dist/src/generated/typus_perp/error.js +788 -0
- package/dist/src/generated/typus_perp/escrow.d.ts +109 -0
- package/dist/src/generated/typus_perp/escrow.js +139 -0
- package/dist/src/generated/typus_perp/lp_pool.d.ts +1853 -0
- package/dist/src/generated/typus_perp/lp_pool.js +1483 -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 +1251 -0
- package/dist/src/generated/typus_perp/position.js +1393 -0
- package/dist/src/generated/typus_perp/profit_vault.d.ts +272 -0
- package/dist/src/generated/typus_perp/profit_vault.js +321 -0
- package/dist/src/generated/typus_perp/symbol.d.ts +47 -0
- package/dist/src/generated/typus_perp/symbol.js +97 -0
- package/dist/src/generated/typus_perp/trading.d.ts +2134 -0
- package/dist/src/generated/typus_perp/trading.js +2050 -0
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +44 -0
- package/dist/src/generated/typus_perp/treasury_caps.js +92 -0
- package/dist/src/generated/typus_perp/user_account.d.ts +146 -0
- package/dist/src/generated/typus_perp/user_account.js +221 -0
- package/dist/src/generated/typus_stake_pool/admin.d.ts +218 -0
- package/dist/src/generated/typus_stake_pool/admin.js +247 -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 +1038 -0
- package/dist/src/generated/typus_stake_pool/stake_pool.js +938 -0
- package/dist/src/generated/utils/index.d.ts +11 -0
- package/dist/src/generated/utils/index.js +138 -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 +2 -8
- package/dist/src/index.js +30 -56
- package/dist/src/user/history.d.ts +1 -1
- package/dist/src/user/history.js +649 -679
- package/dist/src/user/order.d.ts +21 -11
- package/dist/src/user/order.js +204 -301
- package/dist/src/user/orderWithBidReceipt.d.ts +17 -6
- package/dist/src/user/orderWithBidReceipt.js +164 -224
- package/dist/src/user/tlp.d.ts +25 -25
- package/dist/src/user/tlp.js +317 -468
- package/package.json +12 -3
- 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 -121
- package/dist/src/typus_perp/tlp/structs.js +0 -416
- 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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
|
+
**************************************************************/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.CompetitionConfig = void 0;
|
|
40
|
+
exports.newCompetitionConfig = newCompetitionConfig;
|
|
41
|
+
exports.addScore = addScore;
|
|
42
|
+
/** The `competition` module defines the logic for trading competitions. */
|
|
43
|
+
const index_1 = require("../utils/index");
|
|
44
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
45
|
+
const object = __importStar(require("./deps/sui/object"));
|
|
46
|
+
const $moduleName = "@typus/perp::competition";
|
|
47
|
+
exports.CompetitionConfig = new index_1.MoveStruct({
|
|
48
|
+
name: `${$moduleName}::CompetitionConfig`,
|
|
49
|
+
fields: {
|
|
50
|
+
id: object.UID,
|
|
51
|
+
/** The boost in basis points for each staking level. */
|
|
52
|
+
boost_bp: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
53
|
+
/** Whether the competition is active. */
|
|
54
|
+
is_active: bcs_1.bcs.bool(),
|
|
55
|
+
/** The name of the program. */
|
|
56
|
+
program_name: bcs_1.bcs.string(),
|
|
57
|
+
/** Padding for future use. */
|
|
58
|
+
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
function newCompetitionConfig(options) {
|
|
62
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
63
|
+
const argumentsTypes = [
|
|
64
|
+
`${packageAddress}::admin::Version`,
|
|
65
|
+
"vector<u64>",
|
|
66
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
67
|
+
];
|
|
68
|
+
const parameterNames = ["version", "boostBp", "programName"];
|
|
69
|
+
return (tx) => tx.moveCall({
|
|
70
|
+
package: packageAddress,
|
|
71
|
+
module: "competition",
|
|
72
|
+
function: "new_competition_config",
|
|
73
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/** Adds a score to the competition leaderboard. WARNING: no authority check inside */
|
|
77
|
+
function addScore(options) {
|
|
78
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
79
|
+
const argumentsTypes = [
|
|
80
|
+
`${packageAddress}::admin::Version`,
|
|
81
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
82
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::leaderboard::TypusLeaderboardRegistry",
|
|
83
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::tails_staking::TailsStakingRegistry",
|
|
84
|
+
`${packageAddress}::competition::CompetitionConfig`,
|
|
85
|
+
"u64",
|
|
86
|
+
"address",
|
|
87
|
+
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
88
|
+
];
|
|
89
|
+
const parameterNames = [
|
|
90
|
+
"version",
|
|
91
|
+
"ecosystemVersion",
|
|
92
|
+
"typusLeaderboardRegistry",
|
|
93
|
+
"tailsStakingRegistry",
|
|
94
|
+
"competitionConfig",
|
|
95
|
+
"volumeUsd",
|
|
96
|
+
"user",
|
|
97
|
+
];
|
|
98
|
+
return (tx) => tx.moveCall({
|
|
99
|
+
package: packageAddress,
|
|
100
|
+
module: "competition",
|
|
101
|
+
function: "add_score",
|
|
102
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
5
|
+
import { MoveStruct } from "../../../utils/index";
|
|
6
|
+
export declare const TypeName: MoveStruct<{
|
|
7
|
+
/**
|
|
8
|
+
* String representation of the type. All types are represented using their source
|
|
9
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
10
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
11
|
+
* `00000000000000000000000000000001::string::String` or
|
|
12
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
13
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
14
|
+
* 32 depending on the Move platform)
|
|
15
|
+
*/
|
|
16
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
17
|
+
}, "std::type_name::TypeName">;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
|
+
**************************************************************/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TypeName = void 0;
|
|
7
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
8
|
+
const index_1 = require("../../../utils/index");
|
|
9
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
10
|
+
const $moduleName = "std::type_name";
|
|
11
|
+
exports.TypeName = new index_1.MoveStruct({
|
|
12
|
+
name: `${$moduleName}::TypeName`,
|
|
13
|
+
fields: {
|
|
14
|
+
/**
|
|
15
|
+
* String representation of the type. All types are represented using their source
|
|
16
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
17
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
18
|
+
* `00000000000000000000000000000001::string::String` or
|
|
19
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
20
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
21
|
+
* 32 depending on the Move platform)
|
|
22
|
+
*/
|
|
23
|
+
name: bcs_1.bcs.string(),
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
6
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
7
|
+
* and `Balance`s.
|
|
8
|
+
*/
|
|
9
|
+
import { MoveStruct } from "../../../utils/index";
|
|
10
|
+
export declare const Balance: MoveStruct<{
|
|
11
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
|
+
}, "0x2::balance::Balance">;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
|
+
**************************************************************/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Balance = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
9
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
10
|
+
* and `Balance`s.
|
|
11
|
+
*/
|
|
12
|
+
const index_1 = require("../../../utils/index");
|
|
13
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
14
|
+
const $moduleName = "0x2::balance";
|
|
15
|
+
exports.Balance = new index_1.MoveStruct({
|
|
16
|
+
name: `${$moduleName}::Balance`,
|
|
17
|
+
fields: {
|
|
18
|
+
value: bcs_1.bcs.u64(),
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Sui object identifiers */
|
|
5
|
+
import { MoveStruct } from "../../../utils/index";
|
|
6
|
+
export declare const UID: MoveStruct<{
|
|
7
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
+
}, "0x2::object::UID">;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
|
+
**************************************************************/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UID = void 0;
|
|
7
|
+
/** Sui object identifiers */
|
|
8
|
+
const index_1 = require("../../../utils/index");
|
|
9
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
10
|
+
const $moduleName = "0x2::object";
|
|
11
|
+
exports.UID = new index_1.MoveStruct({
|
|
12
|
+
name: `${$moduleName}::UID`,
|
|
13
|
+
fields: {
|
|
14
|
+
id: bcs_1.bcs.Address,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Similar to `sui::table`, an `ObjectTable<K, V>` is a map-like collection. But
|
|
6
|
+
* unlike `sui::table`, the values bound to these dynamic fields _must_ be objects
|
|
7
|
+
* themselves. This allows for the objects to still exist within in storage, which
|
|
8
|
+
* may be important for external tools. The difference is otherwise not observable
|
|
9
|
+
* from within Move.
|
|
10
|
+
*/
|
|
11
|
+
import { MoveStruct } from "../../../utils/index";
|
|
12
|
+
export declare const ObjectTable: MoveStruct<{
|
|
13
|
+
/** the ID of this table */
|
|
14
|
+
id: MoveStruct<{
|
|
15
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
16
|
+
}, "0x2::object::UID">;
|
|
17
|
+
/** the number of key-value pairs in the table */
|
|
18
|
+
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
19
|
+
}, "0x2::object_table::ObjectTable">;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
|
+
**************************************************************/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ObjectTable = void 0;
|
|
40
|
+
/**
|
|
41
|
+
* Similar to `sui::table`, an `ObjectTable<K, V>` is a map-like collection. But
|
|
42
|
+
* unlike `sui::table`, the values bound to these dynamic fields _must_ be objects
|
|
43
|
+
* themselves. This allows for the objects to still exist within in storage, which
|
|
44
|
+
* may be important for external tools. The difference is otherwise not observable
|
|
45
|
+
* from within Move.
|
|
46
|
+
*/
|
|
47
|
+
const index_1 = require("../../../utils/index");
|
|
48
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
49
|
+
const object = __importStar(require("./object"));
|
|
50
|
+
const $moduleName = "0x2::object_table";
|
|
51
|
+
exports.ObjectTable = new index_1.MoveStruct({
|
|
52
|
+
name: `${$moduleName}::ObjectTable`,
|
|
53
|
+
fields: {
|
|
54
|
+
/** the ID of this table */
|
|
55
|
+
id: object.UID,
|
|
56
|
+
/** the number of key-value pairs in the table */
|
|
57
|
+
size: bcs_1.bcs.u64(),
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A table is a map-like collection. But unlike a traditional collection, it's keys
|
|
6
|
+
* and values are not stored within the `Table` value, but instead are stored using
|
|
7
|
+
* Sui's object system. The `Table` struct acts only as a handle into the object
|
|
8
|
+
* system to retrieve those keys and values. Note that this means that `Table`
|
|
9
|
+
* values with exactly the same key-value mapping will not be equal, with `==`, at
|
|
10
|
+
* runtime. For example
|
|
11
|
+
*
|
|
12
|
+
* ```
|
|
13
|
+
* let table1 = table::new<u64, bool>();
|
|
14
|
+
* let table2 = table::new<u64, bool>();
|
|
15
|
+
* table::add(&mut table1, 0, false);
|
|
16
|
+
* table::add(&mut table1, 1, true);
|
|
17
|
+
* table::add(&mut table2, 0, false);
|
|
18
|
+
* table::add(&mut table2, 1, true);
|
|
19
|
+
* // table1 does not equal table2, despite having the same entries
|
|
20
|
+
* assert!(&table1 != &table2);
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
import { MoveStruct } from "../../../utils/index";
|
|
24
|
+
export declare const Table: MoveStruct<{
|
|
25
|
+
/** the ID of this table */
|
|
26
|
+
id: MoveStruct<{
|
|
27
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
28
|
+
}, "0x2::object::UID">;
|
|
29
|
+
/** the number of key-value pairs in the table */
|
|
30
|
+
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
31
|
+
}, "0x2::table::Table">;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
|
+
**************************************************************/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Table = void 0;
|
|
40
|
+
/**
|
|
41
|
+
* A table is a map-like collection. But unlike a traditional collection, it's keys
|
|
42
|
+
* and values are not stored within the `Table` value, but instead are stored using
|
|
43
|
+
* Sui's object system. The `Table` struct acts only as a handle into the object
|
|
44
|
+
* system to retrieve those keys and values. Note that this means that `Table`
|
|
45
|
+
* values with exactly the same key-value mapping will not be equal, with `==`, at
|
|
46
|
+
* runtime. For example
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
* let table1 = table::new<u64, bool>();
|
|
50
|
+
* let table2 = table::new<u64, bool>();
|
|
51
|
+
* table::add(&mut table1, 0, false);
|
|
52
|
+
* table::add(&mut table1, 1, true);
|
|
53
|
+
* table::add(&mut table2, 0, false);
|
|
54
|
+
* table::add(&mut table2, 1, true);
|
|
55
|
+
* // table1 does not equal table2, despite having the same entries
|
|
56
|
+
* assert!(&table1 != &table2);
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
const index_1 = require("../../../utils/index");
|
|
60
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
61
|
+
const object = __importStar(require("./object"));
|
|
62
|
+
const $moduleName = "0x2::table";
|
|
63
|
+
exports.Table = new index_1.MoveStruct({
|
|
64
|
+
name: `${$moduleName}::Table`,
|
|
65
|
+
fields: {
|
|
66
|
+
/** the ID of this table */
|
|
67
|
+
id: object.UID,
|
|
68
|
+
/** the number of key-value pairs in the table */
|
|
69
|
+
size: bcs_1.bcs.u64(),
|
|
70
|
+
},
|
|
71
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { type BcsType } from "@mysten/sui/bcs";
|
|
5
|
+
import { MoveStruct } from "../../../utils/index";
|
|
6
|
+
/**
|
|
7
|
+
* A set data structure backed by a vector. The set is guaranteed not to contain
|
|
8
|
+
* duplicate keys. All operations are O(N) in the size of the set
|
|
9
|
+
*
|
|
10
|
+
* - the intention of this data structure is only to provide the convenience of
|
|
11
|
+
* programming against a set API. Sets that need sorted iteration rather than
|
|
12
|
+
* insertion order iteration should be handwritten.
|
|
13
|
+
*/
|
|
14
|
+
export declare function VecSet<K extends BcsType<any>>(...typeParameters: [K]): MoveStruct<{
|
|
15
|
+
contents: BcsType<import("@mysten/bcs").InferBcsType<K>[], Iterable<import("@mysten/bcs").InferBcsInput<K>> & {
|
|
16
|
+
length: number;
|
|
17
|
+
}, string>;
|
|
18
|
+
}, `0x2::vec_set::VecSet<${K["name"]}>`>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VecSet = VecSet;
|
|
4
|
+
/**************************************************************
|
|
5
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
6
|
+
**************************************************************/
|
|
7
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
8
|
+
const index_1 = require("../../../utils/index");
|
|
9
|
+
const $moduleName = "0x2::vec_set";
|
|
10
|
+
/**
|
|
11
|
+
* A set data structure backed by a vector. The set is guaranteed not to contain
|
|
12
|
+
* duplicate keys. All operations are O(N) in the size of the set
|
|
13
|
+
*
|
|
14
|
+
* - the intention of this data structure is only to provide the convenience of
|
|
15
|
+
* programming against a set API. Sets that need sorted iteration rather than
|
|
16
|
+
* insertion order iteration should be handwritten.
|
|
17
|
+
*/
|
|
18
|
+
function VecSet(...typeParameters) {
|
|
19
|
+
return new index_1.MoveStruct({
|
|
20
|
+
name: `${$moduleName}::VecSet<${typeParameters[0].name}>`,
|
|
21
|
+
fields: {
|
|
22
|
+
contents: bcs_1.bcs.vector(typeParameters[0]),
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* This module implements a `KeyedBigVector`, a data structure that combines the
|
|
6
|
+
* features of a `BigVector` and a `Table`. It allows for both indexed and keyed
|
|
7
|
+
* access to a large number of elements by storing them in slices, while
|
|
8
|
+
* maintaining a mapping from keys to indices in a `Table`.
|
|
9
|
+
*/
|
|
10
|
+
import { MoveStruct } from "../../../utils/index";
|
|
11
|
+
export declare const KeyedBigVector: MoveStruct<{
|
|
12
|
+
/** The unique identifier of the KeyedBigVector object. */
|
|
13
|
+
id: MoveStruct<{
|
|
14
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
15
|
+
}, "0x2::object::UID">;
|
|
16
|
+
/** The type name of the keys. */
|
|
17
|
+
key_type: MoveStruct<{
|
|
18
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
19
|
+
}, "std::type_name::TypeName">;
|
|
20
|
+
/** The type name of the values. */
|
|
21
|
+
value_type: MoveStruct<{
|
|
22
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
23
|
+
}, "std::type_name::TypeName">;
|
|
24
|
+
/** The index of the latest slice. */
|
|
25
|
+
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
26
|
+
/** The maximum size of each slice. */
|
|
27
|
+
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
28
|
+
/** The total number of elements in the KeyedBigVector. */
|
|
29
|
+
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
30
|
+
}, "typus::keyed_big_vector::KeyedBigVector">;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
|
+
**************************************************************/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.KeyedBigVector = void 0;
|
|
40
|
+
/**
|
|
41
|
+
* This module implements a `KeyedBigVector`, a data structure that combines the
|
|
42
|
+
* features of a `BigVector` and a `Table`. It allows for both indexed and keyed
|
|
43
|
+
* access to a large number of elements by storing them in slices, while
|
|
44
|
+
* maintaining a mapping from keys to indices in a `Table`.
|
|
45
|
+
*/
|
|
46
|
+
const index_1 = require("../../../utils/index");
|
|
47
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
48
|
+
const object = __importStar(require("../sui/object"));
|
|
49
|
+
const type_name = __importStar(require("../std/type_name"));
|
|
50
|
+
const $moduleName = "typus::keyed_big_vector";
|
|
51
|
+
exports.KeyedBigVector = new index_1.MoveStruct({
|
|
52
|
+
name: `${$moduleName}::KeyedBigVector`,
|
|
53
|
+
fields: {
|
|
54
|
+
/** The unique identifier of the KeyedBigVector object. */
|
|
55
|
+
id: object.UID,
|
|
56
|
+
/** The type name of the keys. */
|
|
57
|
+
key_type: type_name.TypeName,
|
|
58
|
+
/** The type name of the values. */
|
|
59
|
+
value_type: type_name.TypeName,
|
|
60
|
+
/** The index of the latest slice. */
|
|
61
|
+
slice_idx: bcs_1.bcs.u16(),
|
|
62
|
+
/** The maximum size of each slice. */
|
|
63
|
+
slice_size: bcs_1.bcs.u32(),
|
|
64
|
+
/** The total number of elements in the KeyedBigVector. */
|
|
65
|
+
length: bcs_1.bcs.u64(),
|
|
66
|
+
},
|
|
67
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* This module implements a `LinkedObjectTable`, which is similar to
|
|
6
|
+
* `sui::linked_table` but stores its values as dynamic object fields. This allows
|
|
7
|
+
* the values to be objects themselves, which can be useful for storing complex
|
|
8
|
+
* data structures. The table maintains a doubly-linked list of its entries,
|
|
9
|
+
* allowing for efficient iteration in both forward and reverse order.
|
|
10
|
+
*/
|
|
11
|
+
import { type BcsType } from "@mysten/sui/bcs";
|
|
12
|
+
import { MoveStruct } from "../../../utils/index";
|
|
13
|
+
/**
|
|
14
|
+
* A doubly-linked list of key-value pairs where values are stored as dynamic
|
|
15
|
+
* object fields.
|
|
16
|
+
*/
|
|
17
|
+
export declare function LinkedObjectTable<K extends BcsType<any>>(...typeParameters: [K]): MoveStruct<{
|
|
18
|
+
/** The UID for storing the nodes of the linked list. */
|
|
19
|
+
id: MoveStruct<{
|
|
20
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
+
}, "0x2::object::UID">;
|
|
22
|
+
/** The UID for storing the values as dynamic object fields. */
|
|
23
|
+
vid: MoveStruct<{
|
|
24
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
25
|
+
}, "0x2::object::UID">;
|
|
26
|
+
/** The number of key-value pairs in the table. */
|
|
27
|
+
size: BcsType<string, string | number | bigint, "u64">;
|
|
28
|
+
/** The key of the first entry in the table. */
|
|
29
|
+
head: BcsType<import("@mysten/bcs").InferBcsType<K> | null, import("@mysten/bcs").InferBcsInput<K> | null | undefined, `Option<${K["name"]}>`>;
|
|
30
|
+
/** The key of the last entry in the table. */
|
|
31
|
+
tail: BcsType<import("@mysten/bcs").InferBcsType<K> | null, import("@mysten/bcs").InferBcsInput<K> | null | undefined, `Option<${K["name"]}>`>;
|
|
32
|
+
}, `typus::linked_object_table::LinkedObjectTable<${K["name"]}>`>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
|
+
**************************************************************/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.LinkedObjectTable = LinkedObjectTable;
|
|
40
|
+
/**
|
|
41
|
+
* This module implements a `LinkedObjectTable`, which is similar to
|
|
42
|
+
* `sui::linked_table` but stores its values as dynamic object fields. This allows
|
|
43
|
+
* the values to be objects themselves, which can be useful for storing complex
|
|
44
|
+
* data structures. The table maintains a doubly-linked list of its entries,
|
|
45
|
+
* allowing for efficient iteration in both forward and reverse order.
|
|
46
|
+
*/
|
|
47
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
48
|
+
const index_1 = require("../../../utils/index");
|
|
49
|
+
const object = __importStar(require("../sui/object"));
|
|
50
|
+
const $moduleName = "typus::linked_object_table";
|
|
51
|
+
/**
|
|
52
|
+
* A doubly-linked list of key-value pairs where values are stored as dynamic
|
|
53
|
+
* object fields.
|
|
54
|
+
*/
|
|
55
|
+
function LinkedObjectTable(...typeParameters) {
|
|
56
|
+
return new index_1.MoveStruct({
|
|
57
|
+
name: `${$moduleName}::LinkedObjectTable<${typeParameters[0].name}>`,
|
|
58
|
+
fields: {
|
|
59
|
+
/** The UID for storing the nodes of the linked list. */
|
|
60
|
+
id: object.UID,
|
|
61
|
+
/** The UID for storing the values as dynamic object fields. */
|
|
62
|
+
vid: object.UID,
|
|
63
|
+
/** The number of key-value pairs in the table. */
|
|
64
|
+
size: bcs_1.bcs.u64(),
|
|
65
|
+
/** The key of the first entry in the table. */
|
|
66
|
+
head: bcs_1.bcs.option(typeParameters[0]),
|
|
67
|
+
/** The key of the last entry in the table. */
|
|
68
|
+
tail: bcs_1.bcs.option(typeParameters[0]),
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
}
|