@typus/typus-perp-sdk 1.1.32 → 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 +11 -2
- 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
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* The `admin` module provides administrative functionalities for the Typus Stake
|
|
6
|
+
* Pool. It includes version management, authority control, and fee handling.
|
|
7
|
+
*/
|
|
8
|
+
import { MoveStruct, type RawTransactionArgument } from "../utils/index";
|
|
9
|
+
import { type Transaction } from "@mysten/sui/transactions";
|
|
10
|
+
export declare const FeeInfo: MoveStruct<{
|
|
11
|
+
/** The type name of the token. */
|
|
12
|
+
token: MoveStruct<{
|
|
13
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
14
|
+
}, "std::type_name::TypeName">;
|
|
15
|
+
/** The amount of fees collected. */
|
|
16
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
17
|
+
}, "@typus/stake-pool::admin::FeeInfo">;
|
|
18
|
+
export declare const FeePool: MoveStruct<{
|
|
19
|
+
id: MoveStruct<{
|
|
20
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
+
}, "0x2::object::UID">;
|
|
22
|
+
/** A vector of `FeeInfo` structs. */
|
|
23
|
+
fee_infos: import("@mysten/sui/bcs").BcsType<{
|
|
24
|
+
token: {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
value: string;
|
|
28
|
+
}[], Iterable<{
|
|
29
|
+
token: {
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
value: string | number | bigint;
|
|
33
|
+
}> & {
|
|
34
|
+
length: number;
|
|
35
|
+
}, string>;
|
|
36
|
+
}, "@typus/stake-pool::admin::FeePool">;
|
|
37
|
+
export declare const Version: MoveStruct<{
|
|
38
|
+
id: MoveStruct<{
|
|
39
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
40
|
+
}, "0x2::object::UID">;
|
|
41
|
+
/** The version number. */
|
|
42
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
43
|
+
/** The fee pool for protocol fees. */
|
|
44
|
+
fee_pool: MoveStruct<{
|
|
45
|
+
id: MoveStruct<{
|
|
46
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
47
|
+
}, "0x2::object::UID">;
|
|
48
|
+
/** A vector of `FeeInfo` structs. */
|
|
49
|
+
fee_infos: import("@mysten/sui/bcs").BcsType<{
|
|
50
|
+
token: {
|
|
51
|
+
name: string;
|
|
52
|
+
};
|
|
53
|
+
value: string;
|
|
54
|
+
}[], Iterable<{
|
|
55
|
+
token: {
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
58
|
+
value: string | number | bigint;
|
|
59
|
+
}> & {
|
|
60
|
+
length: number;
|
|
61
|
+
}, string>;
|
|
62
|
+
}, "@typus/stake-pool::admin::FeePool">;
|
|
63
|
+
/** The fee pool for liquidator fees. */
|
|
64
|
+
liquidator_fee_pool: MoveStruct<{
|
|
65
|
+
id: MoveStruct<{
|
|
66
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
67
|
+
}, "0x2::object::UID">;
|
|
68
|
+
/** A vector of `FeeInfo` structs. */
|
|
69
|
+
fee_infos: import("@mysten/sui/bcs").BcsType<{
|
|
70
|
+
token: {
|
|
71
|
+
name: string;
|
|
72
|
+
};
|
|
73
|
+
value: string;
|
|
74
|
+
}[], Iterable<{
|
|
75
|
+
token: {
|
|
76
|
+
name: string;
|
|
77
|
+
};
|
|
78
|
+
value: string | number | bigint;
|
|
79
|
+
}> & {
|
|
80
|
+
length: number;
|
|
81
|
+
}, string>;
|
|
82
|
+
}, "@typus/stake-pool::admin::FeePool">;
|
|
83
|
+
/** The list of authorized addresses. */
|
|
84
|
+
authority: MoveStruct<{
|
|
85
|
+
contents: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | Uint8Array<ArrayBufferLike>> & {
|
|
86
|
+
length: number;
|
|
87
|
+
}, string>;
|
|
88
|
+
}, "0x2::vec_set::VecSet<bytes[32]>">;
|
|
89
|
+
/** Padding for future use. */
|
|
90
|
+
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
91
|
+
length: number;
|
|
92
|
+
}, string>;
|
|
93
|
+
}, "@typus/stake-pool::admin::Version">;
|
|
94
|
+
export declare const SendFeeEvent: MoveStruct<{
|
|
95
|
+
/** The type name of the token. */
|
|
96
|
+
token: MoveStruct<{
|
|
97
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
98
|
+
}, "std::type_name::TypeName">;
|
|
99
|
+
/** The amount of fees sent. */
|
|
100
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
101
|
+
}, "@typus/stake-pool::admin::SendFeeEvent">;
|
|
102
|
+
export declare const ProtocolFeeEvent: MoveStruct<{
|
|
103
|
+
/** The type name of the token. */
|
|
104
|
+
token: MoveStruct<{
|
|
105
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
106
|
+
}, "std::type_name::TypeName">;
|
|
107
|
+
/** The amount of fees charged. */
|
|
108
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
109
|
+
}, "@typus/stake-pool::admin::ProtocolFeeEvent">;
|
|
110
|
+
export interface VersionCheckArguments {
|
|
111
|
+
version: RawTransactionArgument<string>;
|
|
112
|
+
}
|
|
113
|
+
export interface VersionCheckOptions {
|
|
114
|
+
package?: string;
|
|
115
|
+
arguments: VersionCheckArguments | [version: RawTransactionArgument<string>];
|
|
116
|
+
}
|
|
117
|
+
/** Checks if the contract version is valid. */
|
|
118
|
+
export declare function versionCheck(options: VersionCheckOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
119
|
+
export interface UpgradeArguments {
|
|
120
|
+
version: RawTransactionArgument<string>;
|
|
121
|
+
}
|
|
122
|
+
export interface UpgradeOptions {
|
|
123
|
+
package?: string;
|
|
124
|
+
arguments: UpgradeArguments | [version: RawTransactionArgument<string>];
|
|
125
|
+
}
|
|
126
|
+
/** Upgrades the contract version. WARNING: no authority check inside */
|
|
127
|
+
export declare function upgrade(options: UpgradeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
128
|
+
export interface InitOptions {
|
|
129
|
+
package?: string;
|
|
130
|
+
arguments?: [];
|
|
131
|
+
}
|
|
132
|
+
/** Initializes the contract. */
|
|
133
|
+
export declare function init(options?: InitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
134
|
+
export interface VerifyArguments {
|
|
135
|
+
version: RawTransactionArgument<string>;
|
|
136
|
+
}
|
|
137
|
+
export interface VerifyOptions {
|
|
138
|
+
package?: string;
|
|
139
|
+
arguments: VerifyArguments | [version: RawTransactionArgument<string>];
|
|
140
|
+
}
|
|
141
|
+
/** [Authorized Function] Verifies if the sender is an authorized user. */
|
|
142
|
+
export declare function verify(options: VerifyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
143
|
+
export interface AddAuthorizedUserArguments {
|
|
144
|
+
version: RawTransactionArgument<string>;
|
|
145
|
+
userAddress: RawTransactionArgument<string>;
|
|
146
|
+
}
|
|
147
|
+
export interface AddAuthorizedUserOptions {
|
|
148
|
+
package?: string;
|
|
149
|
+
arguments: AddAuthorizedUserArguments | [version: RawTransactionArgument<string>, userAddress: RawTransactionArgument<string>];
|
|
150
|
+
}
|
|
151
|
+
/** [Authorized Function] Adds an authorized user. */
|
|
152
|
+
export declare function addAuthorizedUser(options: AddAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
153
|
+
export interface RemoveAuthorizedUserArguments {
|
|
154
|
+
version: RawTransactionArgument<string>;
|
|
155
|
+
userAddress: RawTransactionArgument<string>;
|
|
156
|
+
}
|
|
157
|
+
export interface RemoveAuthorizedUserOptions {
|
|
158
|
+
package?: string;
|
|
159
|
+
arguments: RemoveAuthorizedUserArguments | [version: RawTransactionArgument<string>, userAddress: RawTransactionArgument<string>];
|
|
160
|
+
}
|
|
161
|
+
/** [Authorized Function] Removes an authorized user. */
|
|
162
|
+
export declare function removeAuthorizedUser(options: RemoveAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
163
|
+
export interface InstallEcosystemManagerCapEntryArguments {
|
|
164
|
+
version: RawTransactionArgument<string>;
|
|
165
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
166
|
+
}
|
|
167
|
+
export interface InstallEcosystemManagerCapEntryOptions {
|
|
168
|
+
package?: string;
|
|
169
|
+
arguments: InstallEcosystemManagerCapEntryArguments | [version: RawTransactionArgument<string>, typusEcosystemVersion: RawTransactionArgument<string>];
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* [Authorized Function] Installs the ecosystem manager cap. TODO: can be remove
|
|
173
|
+
* after install
|
|
174
|
+
*/
|
|
175
|
+
export declare function installEcosystemManagerCapEntry(options: InstallEcosystemManagerCapEntryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
176
|
+
export interface AddTailsExpAmountArguments {
|
|
177
|
+
version: RawTransactionArgument<string>;
|
|
178
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
179
|
+
typusUserRegistry: RawTransactionArgument<string>;
|
|
180
|
+
user: RawTransactionArgument<string>;
|
|
181
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
182
|
+
}
|
|
183
|
+
export interface AddTailsExpAmountOptions {
|
|
184
|
+
package?: string;
|
|
185
|
+
arguments: AddTailsExpAmountArguments | [
|
|
186
|
+
version: RawTransactionArgument<string>,
|
|
187
|
+
typusEcosystemVersion: RawTransactionArgument<string>,
|
|
188
|
+
typusUserRegistry: RawTransactionArgument<string>,
|
|
189
|
+
user: RawTransactionArgument<string>,
|
|
190
|
+
amount: RawTransactionArgument<number | bigint>
|
|
191
|
+
];
|
|
192
|
+
}
|
|
193
|
+
/** Adds tails experience points to a user. */
|
|
194
|
+
export declare function addTailsExpAmount(options: AddTailsExpAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
195
|
+
export interface SendFeeArguments {
|
|
196
|
+
version: RawTransactionArgument<string>;
|
|
197
|
+
}
|
|
198
|
+
export interface SendFeeOptions {
|
|
199
|
+
package?: string;
|
|
200
|
+
arguments: SendFeeArguments | [version: RawTransactionArgument<string>];
|
|
201
|
+
typeArguments: [string];
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Sends the collected fees to the fee address. Safe with constant address as
|
|
205
|
+
* receiver
|
|
206
|
+
*/
|
|
207
|
+
export declare function sendFee(options: SendFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
208
|
+
export interface ChargeFeeArguments {
|
|
209
|
+
version: RawTransactionArgument<string>;
|
|
210
|
+
balance: RawTransactionArgument<string>;
|
|
211
|
+
}
|
|
212
|
+
export interface ChargeFeeOptions {
|
|
213
|
+
package?: string;
|
|
214
|
+
arguments: ChargeFeeArguments | [version: RawTransactionArgument<string>, balance: RawTransactionArgument<string>];
|
|
215
|
+
typeArguments: [string];
|
|
216
|
+
}
|
|
217
|
+
/** Charges a protocol fee. */
|
|
218
|
+
export declare function chargeFee(options: ChargeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,247 @@
|
|
|
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.ProtocolFeeEvent = exports.SendFeeEvent = exports.Version = exports.FeePool = exports.FeeInfo = void 0;
|
|
40
|
+
exports.versionCheck = versionCheck;
|
|
41
|
+
exports.upgrade = upgrade;
|
|
42
|
+
exports.init = init;
|
|
43
|
+
exports.verify = verify;
|
|
44
|
+
exports.addAuthorizedUser = addAuthorizedUser;
|
|
45
|
+
exports.removeAuthorizedUser = removeAuthorizedUser;
|
|
46
|
+
exports.installEcosystemManagerCapEntry = installEcosystemManagerCapEntry;
|
|
47
|
+
exports.addTailsExpAmount = addTailsExpAmount;
|
|
48
|
+
exports.sendFee = sendFee;
|
|
49
|
+
exports.chargeFee = chargeFee;
|
|
50
|
+
/**
|
|
51
|
+
* The `admin` module provides administrative functionalities for the Typus Stake
|
|
52
|
+
* Pool. It includes version management, authority control, and fee handling.
|
|
53
|
+
*/
|
|
54
|
+
const index_1 = require("../utils/index");
|
|
55
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
56
|
+
const type_name = __importStar(require("./deps/std/type_name"));
|
|
57
|
+
const object = __importStar(require("./deps/sui/object"));
|
|
58
|
+
const vec_set = __importStar(require("./deps/sui/vec_set"));
|
|
59
|
+
const $moduleName = "@typus/stake-pool::admin";
|
|
60
|
+
exports.FeeInfo = new index_1.MoveStruct({
|
|
61
|
+
name: `${$moduleName}::FeeInfo`,
|
|
62
|
+
fields: {
|
|
63
|
+
/** The type name of the token. */
|
|
64
|
+
token: type_name.TypeName,
|
|
65
|
+
/** The amount of fees collected. */
|
|
66
|
+
value: bcs_1.bcs.u64(),
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
exports.FeePool = new index_1.MoveStruct({
|
|
70
|
+
name: `${$moduleName}::FeePool`,
|
|
71
|
+
fields: {
|
|
72
|
+
id: object.UID,
|
|
73
|
+
/** A vector of `FeeInfo` structs. */
|
|
74
|
+
fee_infos: bcs_1.bcs.vector(exports.FeeInfo),
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
exports.Version = new index_1.MoveStruct({
|
|
78
|
+
name: `${$moduleName}::Version`,
|
|
79
|
+
fields: {
|
|
80
|
+
id: object.UID,
|
|
81
|
+
/** The version number. */
|
|
82
|
+
value: bcs_1.bcs.u64(),
|
|
83
|
+
/** The fee pool for protocol fees. */
|
|
84
|
+
fee_pool: exports.FeePool,
|
|
85
|
+
/** The fee pool for liquidator fees. */
|
|
86
|
+
liquidator_fee_pool: exports.FeePool,
|
|
87
|
+
/** The list of authorized addresses. */
|
|
88
|
+
authority: vec_set.VecSet(bcs_1.bcs.Address),
|
|
89
|
+
/** Padding for future use. */
|
|
90
|
+
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
exports.SendFeeEvent = new index_1.MoveStruct({
|
|
94
|
+
name: `${$moduleName}::SendFeeEvent`,
|
|
95
|
+
fields: {
|
|
96
|
+
/** The type name of the token. */
|
|
97
|
+
token: type_name.TypeName,
|
|
98
|
+
/** The amount of fees sent. */
|
|
99
|
+
amount: bcs_1.bcs.u64(),
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
exports.ProtocolFeeEvent = new index_1.MoveStruct({
|
|
103
|
+
name: `${$moduleName}::ProtocolFeeEvent`,
|
|
104
|
+
fields: {
|
|
105
|
+
/** The type name of the token. */
|
|
106
|
+
token: type_name.TypeName,
|
|
107
|
+
/** The amount of fees charged. */
|
|
108
|
+
amount: bcs_1.bcs.u64(),
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
/** Checks if the contract version is valid. */
|
|
112
|
+
function versionCheck(options) {
|
|
113
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
114
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
115
|
+
const parameterNames = ["version"];
|
|
116
|
+
return (tx) => tx.moveCall({
|
|
117
|
+
package: packageAddress,
|
|
118
|
+
module: "admin",
|
|
119
|
+
function: "version_check",
|
|
120
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/** Upgrades the contract version. WARNING: no authority check inside */
|
|
124
|
+
function upgrade(options) {
|
|
125
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
126
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
127
|
+
const parameterNames = ["version"];
|
|
128
|
+
return (tx) => tx.moveCall({
|
|
129
|
+
package: packageAddress,
|
|
130
|
+
module: "admin",
|
|
131
|
+
function: "upgrade",
|
|
132
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/** Initializes the contract. */
|
|
136
|
+
function init(options = {}) {
|
|
137
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
138
|
+
return (tx) => tx.moveCall({
|
|
139
|
+
package: packageAddress,
|
|
140
|
+
module: "admin",
|
|
141
|
+
function: "init",
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/** [Authorized Function] Verifies if the sender is an authorized user. */
|
|
145
|
+
function verify(options) {
|
|
146
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
147
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
148
|
+
const parameterNames = ["version"];
|
|
149
|
+
return (tx) => tx.moveCall({
|
|
150
|
+
package: packageAddress,
|
|
151
|
+
module: "admin",
|
|
152
|
+
function: "verify",
|
|
153
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/** [Authorized Function] Adds an authorized user. */
|
|
157
|
+
function addAuthorizedUser(options) {
|
|
158
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
159
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`, "address"];
|
|
160
|
+
const parameterNames = ["version", "userAddress"];
|
|
161
|
+
return (tx) => tx.moveCall({
|
|
162
|
+
package: packageAddress,
|
|
163
|
+
module: "admin",
|
|
164
|
+
function: "add_authorized_user",
|
|
165
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/** [Authorized Function] Removes an authorized user. */
|
|
169
|
+
function removeAuthorizedUser(options) {
|
|
170
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
171
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`, "address"];
|
|
172
|
+
const parameterNames = ["version", "userAddress"];
|
|
173
|
+
return (tx) => tx.moveCall({
|
|
174
|
+
package: packageAddress,
|
|
175
|
+
module: "admin",
|
|
176
|
+
function: "remove_authorized_user",
|
|
177
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* [Authorized Function] Installs the ecosystem manager cap. TODO: can be remove
|
|
182
|
+
* after install
|
|
183
|
+
*/
|
|
184
|
+
function installEcosystemManagerCapEntry(options) {
|
|
185
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
186
|
+
const argumentsTypes = [
|
|
187
|
+
`${packageAddress}::admin::Version`,
|
|
188
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
189
|
+
];
|
|
190
|
+
const parameterNames = ["version", "typusEcosystemVersion"];
|
|
191
|
+
return (tx) => tx.moveCall({
|
|
192
|
+
package: packageAddress,
|
|
193
|
+
module: "admin",
|
|
194
|
+
function: "install_ecosystem_manager_cap_entry",
|
|
195
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/** Adds tails experience points to a user. */
|
|
199
|
+
function addTailsExpAmount(options) {
|
|
200
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
201
|
+
const argumentsTypes = [
|
|
202
|
+
`${packageAddress}::admin::Version`,
|
|
203
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
204
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::TypusUserRegistry",
|
|
205
|
+
"address",
|
|
206
|
+
"u64",
|
|
207
|
+
];
|
|
208
|
+
const parameterNames = ["version", "typusEcosystemVersion", "typusUserRegistry", "user", "amount"];
|
|
209
|
+
return (tx) => tx.moveCall({
|
|
210
|
+
package: packageAddress,
|
|
211
|
+
module: "admin",
|
|
212
|
+
function: "add_tails_exp_amount",
|
|
213
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Sends the collected fees to the fee address. Safe with constant address as
|
|
218
|
+
* receiver
|
|
219
|
+
*/
|
|
220
|
+
function sendFee(options) {
|
|
221
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
222
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
223
|
+
const parameterNames = ["version"];
|
|
224
|
+
return (tx) => tx.moveCall({
|
|
225
|
+
package: packageAddress,
|
|
226
|
+
module: "admin",
|
|
227
|
+
function: "send_fee",
|
|
228
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
229
|
+
typeArguments: options.typeArguments,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/** Charges a protocol fee. */
|
|
233
|
+
function chargeFee(options) {
|
|
234
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
235
|
+
const argumentsTypes = [
|
|
236
|
+
`${packageAddress}::admin::Version`,
|
|
237
|
+
`0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[0]}>`,
|
|
238
|
+
];
|
|
239
|
+
const parameterNames = ["version", "balance"];
|
|
240
|
+
return (tx) => tx.moveCall({
|
|
241
|
+
package: packageAddress,
|
|
242
|
+
module: "admin",
|
|
243
|
+
function: "charge_fee",
|
|
244
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
245
|
+
typeArguments: options.typeArguments,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
@@ -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,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,30 @@
|
|
|
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
|
+
/** An entry in the map */
|
|
7
|
+
export declare function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [K, V]): MoveStruct<{
|
|
8
|
+
key: K;
|
|
9
|
+
value: V;
|
|
10
|
+
}, `0x2::vec_map::Entry<${K["name"]}, ${V["name"]}>`>;
|
|
11
|
+
/**
|
|
12
|
+
* A map data structure backed by a vector. The map is guaranteed not to contain
|
|
13
|
+
* duplicate keys, but entries are _not_ sorted by key--entries are included in
|
|
14
|
+
* insertion order. All operations are O(N) in the size of the map--the intention
|
|
15
|
+
* of this data structure is only to provide the convenience of programming against
|
|
16
|
+
* a map API. Large maps should use handwritten parent/child relationships instead.
|
|
17
|
+
* Maps that need sorted iteration rather than insertion order iteration should
|
|
18
|
+
* also be handwritten.
|
|
19
|
+
*/
|
|
20
|
+
export declare function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [K, V]): MoveStruct<{
|
|
21
|
+
contents: BcsType<{
|
|
22
|
+
key: K extends BcsType<infer U, any, string> ? U : never;
|
|
23
|
+
value: V extends BcsType<infer U, any, string> ? U : never;
|
|
24
|
+
}[], Iterable<{
|
|
25
|
+
key: K extends BcsType<any, infer U_1, string> ? U_1 : never;
|
|
26
|
+
value: V extends BcsType<any, infer U_1, string> ? U_1 : never;
|
|
27
|
+
}> & {
|
|
28
|
+
length: number;
|
|
29
|
+
}, string>;
|
|
30
|
+
}, `0x2::vec_map::VecMap<${K["name"]}, ${V["name"]}>`>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Entry = Entry;
|
|
4
|
+
exports.VecMap = VecMap;
|
|
5
|
+
/**************************************************************
|
|
6
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
7
|
+
**************************************************************/
|
|
8
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
9
|
+
const index_1 = require("../../../utils/index");
|
|
10
|
+
const $moduleName = "0x2::vec_map";
|
|
11
|
+
/** An entry in the map */
|
|
12
|
+
function Entry(...typeParameters) {
|
|
13
|
+
return new index_1.MoveStruct({
|
|
14
|
+
name: `${$moduleName}::Entry<${typeParameters[0].name}, ${typeParameters[1].name}>`,
|
|
15
|
+
fields: {
|
|
16
|
+
key: typeParameters[0],
|
|
17
|
+
value: typeParameters[1],
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A map data structure backed by a vector. The map is guaranteed not to contain
|
|
23
|
+
* duplicate keys, but entries are _not_ sorted by key--entries are included in
|
|
24
|
+
* insertion order. All operations are O(N) in the size of the map--the intention
|
|
25
|
+
* of this data structure is only to provide the convenience of programming against
|
|
26
|
+
* a map API. Large maps should use handwritten parent/child relationships instead.
|
|
27
|
+
* Maps that need sorted iteration rather than insertion order iteration should
|
|
28
|
+
* also be handwritten.
|
|
29
|
+
*/
|
|
30
|
+
function VecMap(...typeParameters) {
|
|
31
|
+
return new index_1.MoveStruct({
|
|
32
|
+
name: `${$moduleName}::VecMap<${typeParameters[0].name}, ${typeParameters[1].name}>`,
|
|
33
|
+
fields: {
|
|
34
|
+
contents: bcs_1.bcs.vector(Entry(typeParameters[0], typeParameters[1])),
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -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
|
+
}
|