@typus/typus-perp-sdk 1.1.32 → 1.1.34
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 +540 -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 +988 -0
- package/dist/src/generated/typus_stake_pool/stake_pool.js +937 -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,274 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* The `admin` module provides administrative functionalities for the Typus
|
|
6
|
+
* Perpetual Protocol. It includes version management, authority control, and fee
|
|
7
|
+
* handling.
|
|
8
|
+
*/
|
|
9
|
+
import { MoveStruct, type RawTransactionArgument } from "../utils/index";
|
|
10
|
+
import { type Transaction } from "@mysten/sui/transactions";
|
|
11
|
+
export declare const FeeInfo: MoveStruct<{
|
|
12
|
+
/** The type name of the token. */
|
|
13
|
+
token: MoveStruct<{
|
|
14
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
15
|
+
}, "std::type_name::TypeName">;
|
|
16
|
+
/** The amount of fees collected. */
|
|
17
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
18
|
+
}, "@typus/perp::admin::FeeInfo">;
|
|
19
|
+
export declare const FeePool: MoveStruct<{
|
|
20
|
+
id: MoveStruct<{
|
|
21
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
22
|
+
}, "0x2::object::UID">;
|
|
23
|
+
/** A vector of `FeeInfo` structs. */
|
|
24
|
+
fee_infos: import("@mysten/sui/bcs").BcsType<{
|
|
25
|
+
token: {
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
value: string;
|
|
29
|
+
}[], Iterable<{
|
|
30
|
+
token: {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
value: string | number | bigint;
|
|
34
|
+
}> & {
|
|
35
|
+
length: number;
|
|
36
|
+
}, string>;
|
|
37
|
+
}, "@typus/perp::admin::FeePool">;
|
|
38
|
+
export declare const Version: MoveStruct<{
|
|
39
|
+
id: MoveStruct<{
|
|
40
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
41
|
+
}, "0x2::object::UID">;
|
|
42
|
+
/** The version number. */
|
|
43
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
44
|
+
/** The fee pool for protocol fees. */
|
|
45
|
+
fee_pool: MoveStruct<{
|
|
46
|
+
id: MoveStruct<{
|
|
47
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
48
|
+
}, "0x2::object::UID">;
|
|
49
|
+
/** A vector of `FeeInfo` structs. */
|
|
50
|
+
fee_infos: import("@mysten/sui/bcs").BcsType<{
|
|
51
|
+
token: {
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
value: string;
|
|
55
|
+
}[], Iterable<{
|
|
56
|
+
token: {
|
|
57
|
+
name: string;
|
|
58
|
+
};
|
|
59
|
+
value: string | number | bigint;
|
|
60
|
+
}> & {
|
|
61
|
+
length: number;
|
|
62
|
+
}, string>;
|
|
63
|
+
}, "@typus/perp::admin::FeePool">;
|
|
64
|
+
/** The fee pool for liquidator fees. */
|
|
65
|
+
liquidator_fee_pool: MoveStruct<{
|
|
66
|
+
id: MoveStruct<{
|
|
67
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
68
|
+
}, "0x2::object::UID">;
|
|
69
|
+
/** A vector of `FeeInfo` structs. */
|
|
70
|
+
fee_infos: import("@mysten/sui/bcs").BcsType<{
|
|
71
|
+
token: {
|
|
72
|
+
name: string;
|
|
73
|
+
};
|
|
74
|
+
value: string;
|
|
75
|
+
}[], Iterable<{
|
|
76
|
+
token: {
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
value: string | number | bigint;
|
|
80
|
+
}> & {
|
|
81
|
+
length: number;
|
|
82
|
+
}, string>;
|
|
83
|
+
}, "@typus/perp::admin::FeePool">;
|
|
84
|
+
/** The list of authorized addresses. */
|
|
85
|
+
authority: MoveStruct<{
|
|
86
|
+
contents: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | Uint8Array<ArrayBufferLike>> & {
|
|
87
|
+
length: number;
|
|
88
|
+
}, string>;
|
|
89
|
+
}, "0x2::vec_set::VecSet<bytes[32]>">;
|
|
90
|
+
/** Padding for future use. */
|
|
91
|
+
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
92
|
+
length: number;
|
|
93
|
+
}, string>;
|
|
94
|
+
}, "@typus/perp::admin::Version">;
|
|
95
|
+
export declare const SendFeeEvent: MoveStruct<{
|
|
96
|
+
/** The type name of the token. */
|
|
97
|
+
token: MoveStruct<{
|
|
98
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
99
|
+
}, "std::type_name::TypeName">;
|
|
100
|
+
/** The amount of fees sent. */
|
|
101
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
102
|
+
}, "@typus/perp::admin::SendFeeEvent">;
|
|
103
|
+
export declare const ProtocolFeeEvent: MoveStruct<{
|
|
104
|
+
/** The type name of the token. */
|
|
105
|
+
token: MoveStruct<{
|
|
106
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
107
|
+
}, "std::type_name::TypeName">;
|
|
108
|
+
/** The amount of fees charged. */
|
|
109
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
110
|
+
}, "@typus/perp::admin::ProtocolFeeEvent">;
|
|
111
|
+
export declare const PutInsuranceFundEvent: MoveStruct<{
|
|
112
|
+
/** The type name of the token. */
|
|
113
|
+
token: MoveStruct<{
|
|
114
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
115
|
+
}, "std::type_name::TypeName">;
|
|
116
|
+
/** The amount of funds put into the insurance fund. */
|
|
117
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
118
|
+
}, "@typus/perp::admin::PutInsuranceFundEvent">;
|
|
119
|
+
export interface VersionCheckArguments {
|
|
120
|
+
version: RawTransactionArgument<string>;
|
|
121
|
+
}
|
|
122
|
+
export interface VersionCheckOptions {
|
|
123
|
+
package?: string;
|
|
124
|
+
arguments: VersionCheckArguments | [version: RawTransactionArgument<string>];
|
|
125
|
+
}
|
|
126
|
+
/** Checks if the contract version is valid. */
|
|
127
|
+
export declare function versionCheck(options: VersionCheckOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
128
|
+
export interface UpgradeArguments {
|
|
129
|
+
version: RawTransactionArgument<string>;
|
|
130
|
+
}
|
|
131
|
+
export interface UpgradeOptions {
|
|
132
|
+
package?: string;
|
|
133
|
+
arguments: UpgradeArguments | [version: RawTransactionArgument<string>];
|
|
134
|
+
}
|
|
135
|
+
/** Upgrades the contract version. WARNING: no authority check inside */
|
|
136
|
+
export declare function upgrade(options: UpgradeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
137
|
+
export interface InitOptions {
|
|
138
|
+
package?: string;
|
|
139
|
+
arguments?: [];
|
|
140
|
+
}
|
|
141
|
+
export declare function init(options?: InitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
142
|
+
export interface VerifyArguments {
|
|
143
|
+
version: RawTransactionArgument<string>;
|
|
144
|
+
}
|
|
145
|
+
export interface VerifyOptions {
|
|
146
|
+
package?: string;
|
|
147
|
+
arguments: VerifyArguments | [version: RawTransactionArgument<string>];
|
|
148
|
+
}
|
|
149
|
+
/** [Authorized Function] Verifies if the sender is an authorized user. */
|
|
150
|
+
export declare function verify(options: VerifyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
151
|
+
export interface AddAuthorizedUserArguments {
|
|
152
|
+
version: RawTransactionArgument<string>;
|
|
153
|
+
userAddress: RawTransactionArgument<string>;
|
|
154
|
+
}
|
|
155
|
+
export interface AddAuthorizedUserOptions {
|
|
156
|
+
package?: string;
|
|
157
|
+
arguments: AddAuthorizedUserArguments | [version: RawTransactionArgument<string>, userAddress: RawTransactionArgument<string>];
|
|
158
|
+
}
|
|
159
|
+
/** [Authorized Function] Adds an authorized user. */
|
|
160
|
+
export declare function addAuthorizedUser(options: AddAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
161
|
+
export interface RemoveAuthorizedUserArguments {
|
|
162
|
+
version: RawTransactionArgument<string>;
|
|
163
|
+
userAddress: RawTransactionArgument<string>;
|
|
164
|
+
}
|
|
165
|
+
export interface RemoveAuthorizedUserOptions {
|
|
166
|
+
package?: string;
|
|
167
|
+
arguments: RemoveAuthorizedUserArguments | [version: RawTransactionArgument<string>, userAddress: RawTransactionArgument<string>];
|
|
168
|
+
}
|
|
169
|
+
/** [Authorized Function] Removes an authorized user. */
|
|
170
|
+
export declare function removeAuthorizedUser(options: RemoveAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
171
|
+
export interface InstallEcosystemManagerCapEntryArguments {
|
|
172
|
+
version: RawTransactionArgument<string>;
|
|
173
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
174
|
+
}
|
|
175
|
+
export interface InstallEcosystemManagerCapEntryOptions {
|
|
176
|
+
package?: string;
|
|
177
|
+
arguments: InstallEcosystemManagerCapEntryArguments | [version: RawTransactionArgument<string>, typusEcosystemVersion: RawTransactionArgument<string>];
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* [Authorized Function] Installs the ecosystem manager cap. TODO: can be remove
|
|
181
|
+
* after install
|
|
182
|
+
*/
|
|
183
|
+
export declare function installEcosystemManagerCapEntry(options: InstallEcosystemManagerCapEntryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
184
|
+
export interface AddTailsExpAndLeaderboardArguments {
|
|
185
|
+
version: RawTransactionArgument<string>;
|
|
186
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
187
|
+
typusUserRegistry: RawTransactionArgument<string>;
|
|
188
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>;
|
|
189
|
+
user: RawTransactionArgument<string>;
|
|
190
|
+
tradingFeeUsd: RawTransactionArgument<number | bigint>;
|
|
191
|
+
expMultiplier: RawTransactionArgument<number | bigint>;
|
|
192
|
+
}
|
|
193
|
+
export interface AddTailsExpAndLeaderboardOptions {
|
|
194
|
+
package?: string;
|
|
195
|
+
arguments: AddTailsExpAndLeaderboardArguments | [
|
|
196
|
+
version: RawTransactionArgument<string>,
|
|
197
|
+
typusEcosystemVersion: RawTransactionArgument<string>,
|
|
198
|
+
typusUserRegistry: RawTransactionArgument<string>,
|
|
199
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>,
|
|
200
|
+
user: RawTransactionArgument<string>,
|
|
201
|
+
tradingFeeUsd: RawTransactionArgument<number | bigint>,
|
|
202
|
+
expMultiplier: RawTransactionArgument<number | bigint>
|
|
203
|
+
];
|
|
204
|
+
}
|
|
205
|
+
export declare function addTailsExpAndLeaderboard(options: AddTailsExpAndLeaderboardOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
206
|
+
export interface AddCompetitionLeaderboardArguments {
|
|
207
|
+
version: RawTransactionArgument<string>;
|
|
208
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
209
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>;
|
|
210
|
+
leaderboardKey: RawTransactionArgument<string>;
|
|
211
|
+
user: RawTransactionArgument<string>;
|
|
212
|
+
score: RawTransactionArgument<number | bigint>;
|
|
213
|
+
}
|
|
214
|
+
export interface AddCompetitionLeaderboardOptions {
|
|
215
|
+
package?: string;
|
|
216
|
+
arguments: AddCompetitionLeaderboardArguments | [
|
|
217
|
+
version: RawTransactionArgument<string>,
|
|
218
|
+
typusEcosystemVersion: RawTransactionArgument<string>,
|
|
219
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>,
|
|
220
|
+
leaderboardKey: RawTransactionArgument<string>,
|
|
221
|
+
user: RawTransactionArgument<string>,
|
|
222
|
+
score: RawTransactionArgument<number | bigint>
|
|
223
|
+
];
|
|
224
|
+
}
|
|
225
|
+
/** Adds a score to the competition leaderboard. */
|
|
226
|
+
export declare function addCompetitionLeaderboard(options: AddCompetitionLeaderboardOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
227
|
+
export interface SendFeeArguments {
|
|
228
|
+
version: RawTransactionArgument<string>;
|
|
229
|
+
}
|
|
230
|
+
export interface SendFeeOptions {
|
|
231
|
+
package?: string;
|
|
232
|
+
arguments: SendFeeArguments | [version: RawTransactionArgument<string>];
|
|
233
|
+
typeArguments: [string];
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Sends the collected fees to the fee address. Safe with constant address as
|
|
237
|
+
* receiver
|
|
238
|
+
*/
|
|
239
|
+
export declare function sendFee(options: SendFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
240
|
+
export interface ChargeFeeArguments {
|
|
241
|
+
version: RawTransactionArgument<string>;
|
|
242
|
+
balance: RawTransactionArgument<string>;
|
|
243
|
+
}
|
|
244
|
+
export interface ChargeFeeOptions {
|
|
245
|
+
package?: string;
|
|
246
|
+
arguments: ChargeFeeArguments | [version: RawTransactionArgument<string>, balance: RawTransactionArgument<string>];
|
|
247
|
+
typeArguments: [string];
|
|
248
|
+
}
|
|
249
|
+
/** Charges a protocol fee. */
|
|
250
|
+
export declare function chargeFee(options: ChargeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
251
|
+
export interface SendLiquidatorFeeArguments {
|
|
252
|
+
version: RawTransactionArgument<string>;
|
|
253
|
+
}
|
|
254
|
+
export interface SendLiquidatorFeeOptions {
|
|
255
|
+
package?: string;
|
|
256
|
+
arguments: SendLiquidatorFeeArguments | [version: RawTransactionArgument<string>];
|
|
257
|
+
typeArguments: [string];
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Sends the liquidator fees to the fee address. Safe with constant address as
|
|
261
|
+
* receiver
|
|
262
|
+
*/
|
|
263
|
+
export declare function sendLiquidatorFee(options: SendLiquidatorFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
264
|
+
export interface ChargeLiquidatorFeeArguments {
|
|
265
|
+
version: RawTransactionArgument<string>;
|
|
266
|
+
balance: RawTransactionArgument<string>;
|
|
267
|
+
}
|
|
268
|
+
export interface ChargeLiquidatorFeeOptions {
|
|
269
|
+
package?: string;
|
|
270
|
+
arguments: ChargeLiquidatorFeeArguments | [version: RawTransactionArgument<string>, balance: RawTransactionArgument<string>];
|
|
271
|
+
typeArguments: [string];
|
|
272
|
+
}
|
|
273
|
+
/** Charges a liquidator fee. */
|
|
274
|
+
export declare function chargeLiquidatorFee(options: ChargeLiquidatorFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,321 @@
|
|
|
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.PutInsuranceFundEvent = 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.addTailsExpAndLeaderboard = addTailsExpAndLeaderboard;
|
|
48
|
+
exports.addCompetitionLeaderboard = addCompetitionLeaderboard;
|
|
49
|
+
exports.sendFee = sendFee;
|
|
50
|
+
exports.chargeFee = chargeFee;
|
|
51
|
+
exports.sendLiquidatorFee = sendLiquidatorFee;
|
|
52
|
+
exports.chargeLiquidatorFee = chargeLiquidatorFee;
|
|
53
|
+
/**
|
|
54
|
+
* The `admin` module provides administrative functionalities for the Typus
|
|
55
|
+
* Perpetual Protocol. It includes version management, authority control, and fee
|
|
56
|
+
* handling.
|
|
57
|
+
*/
|
|
58
|
+
const index_1 = require("../utils/index");
|
|
59
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
60
|
+
const type_name = __importStar(require("./deps/std/type_name"));
|
|
61
|
+
const object = __importStar(require("./deps/sui/object"));
|
|
62
|
+
const vec_set = __importStar(require("./deps/sui/vec_set"));
|
|
63
|
+
const $moduleName = "@typus/perp::admin";
|
|
64
|
+
exports.FeeInfo = new index_1.MoveStruct({
|
|
65
|
+
name: `${$moduleName}::FeeInfo`,
|
|
66
|
+
fields: {
|
|
67
|
+
/** The type name of the token. */
|
|
68
|
+
token: type_name.TypeName,
|
|
69
|
+
/** The amount of fees collected. */
|
|
70
|
+
value: bcs_1.bcs.u64(),
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
exports.FeePool = new index_1.MoveStruct({
|
|
74
|
+
name: `${$moduleName}::FeePool`,
|
|
75
|
+
fields: {
|
|
76
|
+
id: object.UID,
|
|
77
|
+
/** A vector of `FeeInfo` structs. */
|
|
78
|
+
fee_infos: bcs_1.bcs.vector(exports.FeeInfo),
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
exports.Version = new index_1.MoveStruct({
|
|
82
|
+
name: `${$moduleName}::Version`,
|
|
83
|
+
fields: {
|
|
84
|
+
id: object.UID,
|
|
85
|
+
/** The version number. */
|
|
86
|
+
value: bcs_1.bcs.u64(),
|
|
87
|
+
/** The fee pool for protocol fees. */
|
|
88
|
+
fee_pool: exports.FeePool,
|
|
89
|
+
/** The fee pool for liquidator fees. */
|
|
90
|
+
liquidator_fee_pool: exports.FeePool,
|
|
91
|
+
/** The list of authorized addresses. */
|
|
92
|
+
authority: vec_set.VecSet(bcs_1.bcs.Address),
|
|
93
|
+
/** Padding for future use. */
|
|
94
|
+
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
exports.SendFeeEvent = new index_1.MoveStruct({
|
|
98
|
+
name: `${$moduleName}::SendFeeEvent`,
|
|
99
|
+
fields: {
|
|
100
|
+
/** The type name of the token. */
|
|
101
|
+
token: type_name.TypeName,
|
|
102
|
+
/** The amount of fees sent. */
|
|
103
|
+
amount: bcs_1.bcs.u64(),
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
exports.ProtocolFeeEvent = new index_1.MoveStruct({
|
|
107
|
+
name: `${$moduleName}::ProtocolFeeEvent`,
|
|
108
|
+
fields: {
|
|
109
|
+
/** The type name of the token. */
|
|
110
|
+
token: type_name.TypeName,
|
|
111
|
+
/** The amount of fees charged. */
|
|
112
|
+
amount: bcs_1.bcs.u64(),
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
exports.PutInsuranceFundEvent = new index_1.MoveStruct({
|
|
116
|
+
name: `${$moduleName}::PutInsuranceFundEvent`,
|
|
117
|
+
fields: {
|
|
118
|
+
/** The type name of the token. */
|
|
119
|
+
token: type_name.TypeName,
|
|
120
|
+
/** The amount of funds put into the insurance fund. */
|
|
121
|
+
amount: bcs_1.bcs.u64(),
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
/** Checks if the contract version is valid. */
|
|
125
|
+
function versionCheck(options) {
|
|
126
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
127
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
128
|
+
const parameterNames = ["version"];
|
|
129
|
+
return (tx) => tx.moveCall({
|
|
130
|
+
package: packageAddress,
|
|
131
|
+
module: "admin",
|
|
132
|
+
function: "version_check",
|
|
133
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/** Upgrades the contract version. WARNING: no authority check inside */
|
|
137
|
+
function upgrade(options) {
|
|
138
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
139
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
140
|
+
const parameterNames = ["version"];
|
|
141
|
+
return (tx) => tx.moveCall({
|
|
142
|
+
package: packageAddress,
|
|
143
|
+
module: "admin",
|
|
144
|
+
function: "upgrade",
|
|
145
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function init(options = {}) {
|
|
149
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
150
|
+
return (tx) => tx.moveCall({
|
|
151
|
+
package: packageAddress,
|
|
152
|
+
module: "admin",
|
|
153
|
+
function: "init",
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/** [Authorized Function] Verifies if the sender is an authorized user. */
|
|
157
|
+
function verify(options) {
|
|
158
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
159
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
160
|
+
const parameterNames = ["version"];
|
|
161
|
+
return (tx) => tx.moveCall({
|
|
162
|
+
package: packageAddress,
|
|
163
|
+
module: "admin",
|
|
164
|
+
function: "verify",
|
|
165
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/** [Authorized Function] Adds an authorized user. */
|
|
169
|
+
function addAuthorizedUser(options) {
|
|
170
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
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: "add_authorized_user",
|
|
177
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/** [Authorized Function] Removes an authorized user. */
|
|
181
|
+
function removeAuthorizedUser(options) {
|
|
182
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
183
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`, "address"];
|
|
184
|
+
const parameterNames = ["version", "userAddress"];
|
|
185
|
+
return (tx) => tx.moveCall({
|
|
186
|
+
package: packageAddress,
|
|
187
|
+
module: "admin",
|
|
188
|
+
function: "remove_authorized_user",
|
|
189
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* [Authorized Function] Installs the ecosystem manager cap. TODO: can be remove
|
|
194
|
+
* after install
|
|
195
|
+
*/
|
|
196
|
+
function installEcosystemManagerCapEntry(options) {
|
|
197
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
198
|
+
const argumentsTypes = [
|
|
199
|
+
`${packageAddress}::admin::Version`,
|
|
200
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
201
|
+
];
|
|
202
|
+
const parameterNames = ["version", "typusEcosystemVersion"];
|
|
203
|
+
return (tx) => tx.moveCall({
|
|
204
|
+
package: packageAddress,
|
|
205
|
+
module: "admin",
|
|
206
|
+
function: "install_ecosystem_manager_cap_entry",
|
|
207
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
function addTailsExpAndLeaderboard(options) {
|
|
211
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
212
|
+
const argumentsTypes = [
|
|
213
|
+
`${packageAddress}::admin::Version`,
|
|
214
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
215
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::TypusUserRegistry",
|
|
216
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::leaderboard::TypusLeaderboardRegistry",
|
|
217
|
+
"address",
|
|
218
|
+
"u64",
|
|
219
|
+
"u64",
|
|
220
|
+
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
221
|
+
];
|
|
222
|
+
const parameterNames = [
|
|
223
|
+
"version",
|
|
224
|
+
"typusEcosystemVersion",
|
|
225
|
+
"typusUserRegistry",
|
|
226
|
+
"typusLeaderboardRegistry",
|
|
227
|
+
"user",
|
|
228
|
+
"tradingFeeUsd",
|
|
229
|
+
"expMultiplier",
|
|
230
|
+
];
|
|
231
|
+
return (tx) => tx.moveCall({
|
|
232
|
+
package: packageAddress,
|
|
233
|
+
module: "admin",
|
|
234
|
+
function: "add_tails_exp_and_leaderboard",
|
|
235
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
/** Adds a score to the competition leaderboard. */
|
|
239
|
+
function addCompetitionLeaderboard(options) {
|
|
240
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
241
|
+
const argumentsTypes = [
|
|
242
|
+
`${packageAddress}::admin::Version`,
|
|
243
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
244
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::leaderboard::TypusLeaderboardRegistry",
|
|
245
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
246
|
+
"address",
|
|
247
|
+
"u64",
|
|
248
|
+
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
249
|
+
];
|
|
250
|
+
const parameterNames = ["version", "typusEcosystemVersion", "typusLeaderboardRegistry", "leaderboardKey", "user", "score"];
|
|
251
|
+
return (tx) => tx.moveCall({
|
|
252
|
+
package: packageAddress,
|
|
253
|
+
module: "admin",
|
|
254
|
+
function: "add_competition_leaderboard",
|
|
255
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Sends the collected fees to the fee address. Safe with constant address as
|
|
260
|
+
* receiver
|
|
261
|
+
*/
|
|
262
|
+
function sendFee(options) {
|
|
263
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
264
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
265
|
+
const parameterNames = ["version"];
|
|
266
|
+
return (tx) => tx.moveCall({
|
|
267
|
+
package: packageAddress,
|
|
268
|
+
module: "admin",
|
|
269
|
+
function: "send_fee",
|
|
270
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
271
|
+
typeArguments: options.typeArguments,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
/** Charges a protocol fee. */
|
|
275
|
+
function chargeFee(options) {
|
|
276
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
277
|
+
const argumentsTypes = [
|
|
278
|
+
`${packageAddress}::admin::Version`,
|
|
279
|
+
`0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[0]}>`,
|
|
280
|
+
];
|
|
281
|
+
const parameterNames = ["version", "balance"];
|
|
282
|
+
return (tx) => tx.moveCall({
|
|
283
|
+
package: packageAddress,
|
|
284
|
+
module: "admin",
|
|
285
|
+
function: "charge_fee",
|
|
286
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
287
|
+
typeArguments: options.typeArguments,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Sends the liquidator fees to the fee address. Safe with constant address as
|
|
292
|
+
* receiver
|
|
293
|
+
*/
|
|
294
|
+
function sendLiquidatorFee(options) {
|
|
295
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
296
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
297
|
+
const parameterNames = ["version"];
|
|
298
|
+
return (tx) => tx.moveCall({
|
|
299
|
+
package: packageAddress,
|
|
300
|
+
module: "admin",
|
|
301
|
+
function: "send_liquidator_fee",
|
|
302
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
303
|
+
typeArguments: options.typeArguments,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/** Charges a liquidator fee. */
|
|
307
|
+
function chargeLiquidatorFee(options) {
|
|
308
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
309
|
+
const argumentsTypes = [
|
|
310
|
+
`${packageAddress}::admin::Version`,
|
|
311
|
+
`0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[0]}>`,
|
|
312
|
+
];
|
|
313
|
+
const parameterNames = ["version", "balance"];
|
|
314
|
+
return (tx) => tx.moveCall({
|
|
315
|
+
package: packageAddress,
|
|
316
|
+
module: "admin",
|
|
317
|
+
function: "charge_liquidator_fee",
|
|
318
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
319
|
+
typeArguments: options.typeArguments,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** The `competition` module defines the logic for trading competitions. */
|
|
5
|
+
import { MoveStruct, type RawTransactionArgument } from "../utils/index";
|
|
6
|
+
import { type Transaction } from "@mysten/sui/transactions";
|
|
7
|
+
export declare const CompetitionConfig: MoveStruct<{
|
|
8
|
+
id: MoveStruct<{
|
|
9
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
|
+
}, "0x2::object::UID">;
|
|
11
|
+
/** The boost in basis points for each staking level. */
|
|
12
|
+
boost_bp: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
13
|
+
length: number;
|
|
14
|
+
}, string>;
|
|
15
|
+
/** Whether the competition is active. */
|
|
16
|
+
is_active: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
17
|
+
/** The name of the program. */
|
|
18
|
+
program_name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
19
|
+
/** Padding for future use. */
|
|
20
|
+
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
21
|
+
length: number;
|
|
22
|
+
}, string>;
|
|
23
|
+
}, "@typus/perp::competition::CompetitionConfig">;
|
|
24
|
+
export interface NewCompetitionConfigArguments {
|
|
25
|
+
version: RawTransactionArgument<string>;
|
|
26
|
+
boostBp: RawTransactionArgument<number | bigint[]>;
|
|
27
|
+
programName: RawTransactionArgument<string>;
|
|
28
|
+
}
|
|
29
|
+
export interface NewCompetitionConfigOptions {
|
|
30
|
+
package?: string;
|
|
31
|
+
arguments: NewCompetitionConfigArguments | [
|
|
32
|
+
version: RawTransactionArgument<string>,
|
|
33
|
+
boostBp: RawTransactionArgument<number | bigint[]>,
|
|
34
|
+
programName: RawTransactionArgument<string>
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
export declare function newCompetitionConfig(options: NewCompetitionConfigOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
38
|
+
export interface AddScoreArguments {
|
|
39
|
+
version: RawTransactionArgument<string>;
|
|
40
|
+
ecosystemVersion: RawTransactionArgument<string>;
|
|
41
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>;
|
|
42
|
+
tailsStakingRegistry: RawTransactionArgument<string>;
|
|
43
|
+
competitionConfig: RawTransactionArgument<string>;
|
|
44
|
+
volumeUsd: RawTransactionArgument<number | bigint>;
|
|
45
|
+
user: RawTransactionArgument<string>;
|
|
46
|
+
}
|
|
47
|
+
export interface AddScoreOptions {
|
|
48
|
+
package?: string;
|
|
49
|
+
arguments: AddScoreArguments | [
|
|
50
|
+
version: RawTransactionArgument<string>,
|
|
51
|
+
ecosystemVersion: RawTransactionArgument<string>,
|
|
52
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>,
|
|
53
|
+
tailsStakingRegistry: RawTransactionArgument<string>,
|
|
54
|
+
competitionConfig: RawTransactionArgument<string>,
|
|
55
|
+
volumeUsd: RawTransactionArgument<number | bigint>,
|
|
56
|
+
user: RawTransactionArgument<string>
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
/** Adds a score to the competition leaderboard. WARNING: no authority check inside */
|
|
60
|
+
export declare function addScore(options: AddScoreOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|