@typus/typus-perp-sdk 1.1.30 → 1.1.31-codegen
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/sentio.js +604 -538
- package/dist/src/client.d.ts +27 -0
- package/dist/src/client.js +108 -0
- package/dist/src/fetch.d.ts +160 -34
- package/dist/src/fetch.js +365 -665
- package/dist/src/generated/typus_perp/admin.d.ts +117 -0
- package/dist/src/generated/typus_perp/admin.js +110 -0
- package/dist/src/generated/typus_perp/competition.d.ts +22 -0
- package/dist/src/generated/typus_perp/competition.js +58 -0
- package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/typus_perp/deps/std/type_name.js +25 -0
- package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/typus_perp/deps/sui/balance.js +20 -0
- package/dist/src/generated/typus_perp/deps/sui/object.d.ts +8 -0
- package/dist/src/generated/typus_perp/deps/sui/object.js +16 -0
- package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +19 -0
- package/dist/src/generated/typus_perp/deps/sui/object_table.js +59 -0
- package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +18 -0
- package/dist/src/generated/typus_perp/deps/sui/vec_set.js +25 -0
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +30 -0
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +67 -0
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +32 -0
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +71 -0
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +23 -0
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +61 -0
- package/dist/src/generated/typus_perp/escrow.d.ts +59 -0
- package/dist/src/generated/typus_perp/escrow.js +76 -0
- package/dist/src/generated/typus_perp/lending.d.ts +47 -0
- package/dist/src/generated/typus_perp/lending.js +50 -0
- package/dist/src/generated/typus_perp/lp_pool.d.ts +2327 -0
- package/dist/src/generated/typus_perp/lp_pool.js +1956 -0
- package/dist/src/generated/typus_perp/math.d.ts +95 -0
- package/dist/src/generated/typus_perp/math.js +97 -0
- package/dist/src/generated/typus_perp/position.d.ts +234 -0
- package/dist/src/generated/typus_perp/position.js +204 -0
- package/dist/src/generated/typus_perp/symbol.d.ts +18 -0
- package/dist/src/generated/typus_perp/symbol.js +55 -0
- package/dist/src/generated/typus_perp/tlp.d.ts +13 -0
- package/dist/src/generated/typus_perp/tlp.js +56 -0
- package/dist/src/generated/typus_perp/trading.d.ts +2486 -0
- package/dist/src/generated/typus_perp/trading.js +2476 -0
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +13 -0
- package/dist/src/{_framework/init-loader.js → generated/typus_perp/treasury_caps.js} +17 -10
- package/dist/src/generated/typus_perp/user_account.d.ts +40 -0
- package/dist/src/generated/typus_perp/user_account.js +72 -0
- package/dist/src/generated/typus_stake_pool/admin.d.ts +100 -0
- package/dist/src/generated/typus_stake_pool/admin.js +91 -0
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +25 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +8 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/object.js +16 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +30 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +37 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +18 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +25 -0
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +1023 -0
- package/dist/src/generated/typus_stake_pool/stake_pool.js +918 -0
- package/dist/src/generated/utils/index.d.ts +11 -0
- package/dist/src/generated/utils/index.js +135 -0
- package/dist/src/grpc/graphql.d.ts +26 -0
- package/dist/src/grpc/graphql.js +126 -0
- package/dist/src/grpc/grpc.d.ts +1 -0
- package/dist/src/grpc/grpc.js +38 -0
- package/dist/src/grpc/ledgerService.js +64 -0
- package/dist/src/grpc/liveDataService.d.ts +0 -0
- package/dist/src/grpc/liveDataService.js +49 -0
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +20 -39
- package/dist/src/user/history.js +611 -680
- package/dist/src/user/order.d.ts +11 -11
- package/dist/src/user/order.js +171 -302
- package/dist/src/user/orderWithBidReceipt.d.ts +8 -6
- package/dist/src/user/orderWithBidReceipt.js +127 -226
- package/dist/src/user/tlp.d.ts +32 -23
- package/dist/src/user/tlp.js +316 -468
- package/package.json +44 -36
- package/dist/src/_dependencies/source/0x1/ascii/structs.d.ts +0 -88
- package/dist/src/_dependencies/source/0x1/ascii/structs.js +0 -398
- package/dist/src/_dependencies/source/0x1/index.d.ts +0 -3
- package/dist/src/_dependencies/source/0x1/index.js +0 -6
- package/dist/src/_dependencies/source/0x1/option/structs.d.ts +0 -50
- package/dist/src/_dependencies/source/0x1/option/structs.js +0 -271
- package/dist/src/_dependencies/source/0x1/string/structs.d.ts +0 -48
- package/dist/src/_dependencies/source/0x1/string/structs.js +0 -256
- package/dist/src/_dependencies/source/0x1/type-name/structs.d.ts +0 -49
- package/dist/src/_dependencies/source/0x1/type-name/structs.js +0 -223
- package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +0 -54
- package/dist/src/_dependencies/source/0x2/bag/structs.js +0 -229
- package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +0 -84
- package/dist/src/_dependencies/source/0x2/balance/structs.js +0 -386
- package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +0 -406
- package/dist/src/_dependencies/source/0x2/coin/structs.js +0 -1247
- package/dist/src/_dependencies/source/0x2/index.d.ts +0 -3
- package/dist/src/_dependencies/source/0x2/index.js +0 -6
- package/dist/src/_dependencies/source/0x2/linked-table/structs.d.ts +0 -132
- package/dist/src/_dependencies/source/0x2/linked-table/structs.js +0 -438
- package/dist/src/_dependencies/source/0x2/object/structs.d.ts +0 -86
- package/dist/src/_dependencies/source/0x2/object/structs.js +0 -364
- package/dist/src/_dependencies/source/0x2/object-table/structs.d.ts +0 -54
- package/dist/src/_dependencies/source/0x2/object-table/structs.js +0 -248
- package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +0 -44
- package/dist/src/_dependencies/source/0x2/sui/structs.js +0 -222
- package/dist/src/_dependencies/source/0x2/table/structs.d.ts +0 -54
- package/dist/src/_dependencies/source/0x2/table/structs.js +0 -248
- package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +0 -59
- package/dist/src/_dependencies/source/0x2/table-vec/structs.js +0 -274
- package/dist/src/_dependencies/source/0x2/token/structs.d.ts +0 -421
- package/dist/src/_dependencies/source/0x2/token/structs.js +0 -1095
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +0 -348
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +0 -1091
- package/dist/src/_dependencies/source/0x2/url/structs.d.ts +0 -49
- package/dist/src/_dependencies/source/0x2/url/structs.js +0 -223
- package/dist/src/_dependencies/source/0x2/vec-map/structs.d.ts +0 -106
- package/dist/src/_dependencies/source/0x2/vec-map/structs.js +0 -446
- package/dist/src/_dependencies/source/0x2/vec-set/structs.d.ts +0 -49
- package/dist/src/_dependencies/source/0x2/vec-set/structs.js +0 -270
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +0 -422
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.js +0 -1084
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +0 -130
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.js +0 -456
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +0 -208
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.js +0 -653
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +0 -362
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.js +0 -899
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.d.ts +0 -8
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.js +0 -11
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.d.ts +0 -2
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.js +0 -102
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.d.ts +0 -202
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.js +0 -632
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +0 -600
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.js +0 -1459
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.d.ts +0 -136
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.js +0 -438
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.d.ts +0 -127
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.js +0 -430
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +0 -957
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.js +0 -2261
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +0 -244
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.js +0 -733
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +0 -294
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.js +0 -892
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +0 -73
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.js +0 -263
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +0 -294
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.js +0 -591
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +0 -64
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.js +0 -258
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +0 -756
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.js +0 -1721
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +0 -44
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.js +0 -222
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.d.ts +0 -3
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.js +0 -6
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.d.ts +0 -2
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.js +0 -89
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.d.ts +0 -135
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.js +0 -444
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.d.ts +0 -2106
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.js +0 -4952
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +0 -390
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.js +0 -844
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.d.ts +0 -6
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.js +0 -9
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.d.ts +0 -2
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.js +0 -69
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.d.ts +0 -89
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.js +0 -376
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +0 -386
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.js +0 -881
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +0 -59
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.js +0 -274
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +0 -974
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.js +0 -2387
- package/dist/src/_framework/init-loader.d.ts +0 -2
- package/dist/src/_framework/loader.d.ts +0 -17
- package/dist/src/_framework/loader.js +0 -108
- package/dist/src/_framework/reified.d.ts +0 -108
- package/dist/src/_framework/reified.js +0 -237
- package/dist/src/_framework/util.d.ts +0 -35
- package/dist/src/_framework/util.js +0 -396
- package/dist/src/_framework/vector.d.ts +0 -42
- package/dist/src/_framework/vector.js +0 -112
- package/dist/src/pyth.js +0 -1
- package/dist/src/typus_perp/admin/functions.d.ts +0 -59
- package/dist/src/typus_perp/admin/functions.js +0 -122
- package/dist/src/typus_perp/admin/structs.d.ts +0 -467
- package/dist/src/typus_perp/admin/structs.js +0 -1065
- package/dist/src/typus_perp/competition/functions.d.ts +0 -24
- package/dist/src/typus_perp/competition/functions.js +0 -38
- package/dist/src/typus_perp/competition/structs.d.ts +0 -80
- package/dist/src/typus_perp/competition/structs.js +0 -288
- package/dist/src/typus_perp/error/functions.d.ts +0 -73
- package/dist/src/typus_perp/error/functions.js +0 -363
- package/dist/src/typus_perp/escrow/functions.d.ts +0 -17
- package/dist/src/typus_perp/escrow/functions.js +0 -36
- package/dist/src/typus_perp/escrow/structs.d.ts +0 -160
- package/dist/src/typus_perp/escrow/structs.js +0 -324
- package/dist/src/typus_perp/index.d.ts +0 -1
- package/dist/src/typus_perp/index.js +0 -7
- package/dist/src/typus_perp/init.d.ts +0 -2
- package/dist/src/typus_perp/init.js +0 -118
- package/dist/src/typus_perp/lending/functions.d.ts +0 -15
- package/dist/src/typus_perp/lending/functions.js +0 -22
- package/dist/src/typus_perp/lp-pool/functions.d.ts +0 -460
- package/dist/src/typus_perp/lp-pool/functions.js +0 -732
- package/dist/src/typus_perp/lp-pool/structs.d.ts +0 -3705
- package/dist/src/typus_perp/lp-pool/structs.js +0 -6789
- package/dist/src/typus_perp/math/functions.d.ts +0 -29
- package/dist/src/typus_perp/math/functions.js +0 -61
- package/dist/src/typus_perp/position/functions.d.ts +0 -379
- package/dist/src/typus_perp/position/functions.js +0 -713
- package/dist/src/typus_perp/position/structs.d.ts +0 -905
- package/dist/src/typus_perp/position/structs.js +0 -1450
- package/dist/src/typus_perp/symbol/functions.d.ts +0 -9
- package/dist/src/typus_perp/symbol/functions.js +0 -24
- package/dist/src/typus_perp/symbol/structs.d.ts +0 -70
- package/dist/src/typus_perp/symbol/structs.js +0 -235
- package/dist/src/typus_perp/tlp/functions.d.ts +0 -19
- package/dist/src/typus_perp/tlp/functions.js +0 -40
- package/dist/src/typus_perp/tlp/structs.d.ts +0 -89
- package/dist/src/typus_perp/tlp/structs.js +0 -365
- package/dist/src/typus_perp/token-interface/functions.d.ts +0 -11
- package/dist/src/typus_perp/token-interface/functions.js +0 -22
- package/dist/src/typus_perp/trading/functions.d.ts +0 -812
- package/dist/src/typus_perp/trading/functions.js +0 -1218
- package/dist/src/typus_perp/trading/structs.d.ts +0 -3060
- package/dist/src/typus_perp/trading/structs.js +0 -5813
- package/dist/src/typus_perp/treasury-caps/functions.d.ts +0 -9
- package/dist/src/typus_perp/treasury-caps/functions.js +0 -36
- package/dist/src/typus_perp/treasury-caps/structs.d.ts +0 -49
- package/dist/src/typus_perp/treasury-caps/structs.js +0 -223
- package/dist/src/typus_perp/user-account/functions.d.ts +0 -36
- package/dist/src/typus_perp/user-account/functions.js +0 -70
- package/dist/src/typus_perp/user-account/structs.d.ts +0 -148
- package/dist/src/typus_perp/user-account/structs.js +0 -448
- package/dist/src/typus_stake_pool/admin/functions.d.ts +0 -49
- package/dist/src/typus_stake_pool/admin/functions.js +0 -105
- package/dist/src/typus_stake_pool/admin/structs.d.ts +0 -365
- package/dist/src/typus_stake_pool/admin/structs.js +0 -789
- package/dist/src/typus_stake_pool/index.d.ts +0 -1
- package/dist/src/typus_stake_pool/index.js +0 -7
- package/dist/src/typus_stake_pool/init.d.ts +0 -2
- package/dist/src/typus_stake_pool/init.js +0 -69
- package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +0 -229
- package/dist/src/typus_stake_pool/stake-pool/functions.js +0 -380
- package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +0 -2199
- package/dist/src/typus_stake_pool/stake-pool/structs.js +0 -4653
- /package/dist/src/{pyth.d.ts → grpc/ledgerService.d.ts} +0 -0
|
@@ -1,236 +1,137 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __values = (this && this.__values) || function(o) {
|
|
39
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
40
|
-
if (m) return m.call(o);
|
|
41
|
-
if (o && typeof o.length === "number") return {
|
|
42
|
-
next: function () {
|
|
43
|
-
if (o && i >= o.length) o = void 0;
|
|
44
|
-
return { value: o && o[i++], done: !o };
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
48
|
-
};
|
|
49
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
3
|
exports.createTradingOrderWithBidReceiptByAutoBid = createTradingOrderWithBidReceiptByAutoBid;
|
|
51
4
|
exports.createTradingOrderWithBidReceipt = createTradingOrderWithBidReceipt;
|
|
52
5
|
exports.reduceOptionCollateralPositionSize = reduceOptionCollateralPositionSize;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
function createTradingOrderWithBidReceiptByAutoBid(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
token = tokens_1_1.value;
|
|
78
|
-
(0, utils_1.updateOracleWithPythUsd)(pythClient, tx, config.package.oracle, token);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
82
|
-
finally {
|
|
83
|
-
try {
|
|
84
|
-
if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1);
|
|
85
|
-
}
|
|
86
|
-
finally { if (e_1) throw e_1.error; }
|
|
87
|
-
}
|
|
88
|
-
collateralBidReceipt = (0, user_entry_1.getWithdrawBidReceiptTx)(config, tx, {
|
|
89
|
-
vaultIndex: input.index,
|
|
90
|
-
signalIndex: input.signalIndex,
|
|
91
|
-
strategyIndex: input.strategyIndex,
|
|
92
|
-
user: input.user,
|
|
93
|
-
share: input.share,
|
|
94
|
-
});
|
|
95
|
-
cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
|
|
96
|
-
bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
|
|
97
|
-
baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
|
|
98
|
-
(0, functions_1.createTradingOrderWithBidReceiptV3)(tx, [cToken, bToken, baseToken], {
|
|
99
|
-
version: __1.PERP_VERSION,
|
|
100
|
-
registry: __1.MARKET,
|
|
101
|
-
poolRegistry: __1.LP_POOL,
|
|
102
|
-
marketIndex: BigInt(0),
|
|
103
|
-
poolIndex: BigInt(0),
|
|
104
|
-
typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
|
|
105
|
-
typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
|
|
106
|
-
clock: constants_1.CLOCK,
|
|
107
|
-
typusEcosystemVersion: config.version.typus,
|
|
108
|
-
typusUserRegistry: config.registry.typus.user,
|
|
109
|
-
typusLeaderboardRegistry: config.registry.typus.leaderboard,
|
|
110
|
-
isLong: input.isLong,
|
|
111
|
-
dovRegistry: config.registry.dov.dovSingle,
|
|
112
|
-
collateralBidReceipt: collateralBidReceipt,
|
|
113
|
-
tailsStakingRegistry: config.registry.typus.tailsStaking,
|
|
114
|
-
competitionConfig: __1.COMPETITION_CONFIG,
|
|
115
|
-
});
|
|
116
|
-
return [2 /*return*/, tx];
|
|
117
|
-
}
|
|
118
|
-
});
|
|
6
|
+
const trading_1 = require("../../src/generated/typus_perp/trading");
|
|
7
|
+
const utils_1 = require("@typus/typus-sdk/dist/src/utils");
|
|
8
|
+
const constants_1 = require("@typus/typus-sdk/dist/src/constants");
|
|
9
|
+
const typus_dov_single_v2_1 = require("@typus/typus-sdk/dist/src/typus-dov-single-v2");
|
|
10
|
+
const user_entry_1 = require("@typus/typus-sdk/dist/src/auto-bid/user-entry");
|
|
11
|
+
const __1 = require("..");
|
|
12
|
+
async function createTradingOrderWithBidReceiptByAutoBid(client, tx, input) {
|
|
13
|
+
// INPUTS
|
|
14
|
+
let TOKEN = input.cToken;
|
|
15
|
+
let BASE_TOKEN = input.tradingToken;
|
|
16
|
+
let tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
|
|
17
|
+
let suiCoin;
|
|
18
|
+
if (client.config.sponsored) {
|
|
19
|
+
suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), client.config.sponsored);
|
|
20
|
+
}
|
|
21
|
+
await (0, utils_1.updatePyth)(client.pythClient, tx, tokens, suiCoin);
|
|
22
|
+
for (let token of tokens) {
|
|
23
|
+
(0, utils_1.updateOracleWithPythUsd)(client.pythClient, tx, client.config.package.oracle, token);
|
|
24
|
+
}
|
|
25
|
+
let collateralBidReceipt = (0, user_entry_1.getWithdrawBidReceiptTx)(client.config, tx, {
|
|
26
|
+
vaultIndex: input.dovIndex,
|
|
27
|
+
signalIndex: input.signalIndex,
|
|
28
|
+
strategyIndex: input.strategyIndex,
|
|
29
|
+
user: input.user,
|
|
119
30
|
});
|
|
31
|
+
let cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
|
|
32
|
+
let bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
|
|
33
|
+
let baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
|
|
34
|
+
tx.add((0, trading_1.createTradingOrderWithBidReceiptV3)({
|
|
35
|
+
arguments: {
|
|
36
|
+
version: __1.PERP_VERSION,
|
|
37
|
+
registry: __1.MARKET,
|
|
38
|
+
poolRegistry: __1.LP_POOL,
|
|
39
|
+
marketIndex: BigInt(input.perpIndex ?? 0),
|
|
40
|
+
poolIndex: BigInt(input.perpIndex ?? 0),
|
|
41
|
+
typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
|
|
42
|
+
typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
|
|
43
|
+
typusEcosystemVersion: client.config.version.typus,
|
|
44
|
+
typusUserRegistry: client.config.registry.typus.user,
|
|
45
|
+
typusLeaderboardRegistry: client.config.registry.typus.leaderboard,
|
|
46
|
+
isLong: input.isLong,
|
|
47
|
+
dovRegistry: client.config.registry.dov.dovSingle,
|
|
48
|
+
collateralBidReceipt,
|
|
49
|
+
tailsStakingRegistry: client.config.registry.typus.tailsStaking,
|
|
50
|
+
competitionConfig: __1.COMPETITION_CONFIG,
|
|
51
|
+
},
|
|
52
|
+
typeArguments: [cToken, bToken, baseToken],
|
|
53
|
+
}));
|
|
54
|
+
return tx;
|
|
120
55
|
}
|
|
121
|
-
function createTradingOrderWithBidReceipt(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
(0, utils_1.updateOracleWithPythUsd)(pythClient, tx, config.package.oracle, token);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
144
|
-
finally {
|
|
145
|
-
try {
|
|
146
|
-
if (tokens_2_1 && !tokens_2_1.done && (_a = tokens_2.return)) _a.call(tokens_2);
|
|
147
|
-
}
|
|
148
|
-
finally { if (e_2) throw e_2.error; }
|
|
149
|
-
}
|
|
150
|
-
collateralBidReceipt = (0, typus_dov_single_v2_1.getSplitBidReceiptTx)(config, tx, {
|
|
151
|
-
index: input.index,
|
|
152
|
-
receipts: input.bidReceipts,
|
|
153
|
-
share: input.share, // if undefined, merge all receipts
|
|
154
|
-
recipient: input.user,
|
|
155
|
-
});
|
|
156
|
-
cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
|
|
157
|
-
bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
|
|
158
|
-
baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
|
|
159
|
-
(0, functions_1.createTradingOrderWithBidReceiptV3)(tx, [cToken, bToken, baseToken], {
|
|
160
|
-
version: __1.PERP_VERSION,
|
|
161
|
-
registry: __1.MARKET,
|
|
162
|
-
poolRegistry: __1.LP_POOL,
|
|
163
|
-
marketIndex: BigInt(0),
|
|
164
|
-
poolIndex: BigInt(0),
|
|
165
|
-
typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
|
|
166
|
-
typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
|
|
167
|
-
clock: constants_1.CLOCK,
|
|
168
|
-
typusEcosystemVersion: config.version.typus,
|
|
169
|
-
typusUserRegistry: config.registry.typus.user,
|
|
170
|
-
typusLeaderboardRegistry: config.registry.typus.leaderboard,
|
|
171
|
-
isLong: input.isLong,
|
|
172
|
-
dovRegistry: config.registry.dov.dovSingle,
|
|
173
|
-
collateralBidReceipt: collateralBidReceipt,
|
|
174
|
-
tailsStakingRegistry: config.registry.typus.tailsStaking,
|
|
175
|
-
competitionConfig: __1.COMPETITION_CONFIG,
|
|
176
|
-
});
|
|
177
|
-
return [2 /*return*/, tx];
|
|
178
|
-
}
|
|
179
|
-
});
|
|
56
|
+
async function createTradingOrderWithBidReceipt(client, tx, input) {
|
|
57
|
+
// INPUTS
|
|
58
|
+
let TOKEN = input.cToken;
|
|
59
|
+
let BASE_TOKEN = input.tradingToken;
|
|
60
|
+
let tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
|
|
61
|
+
let suiCoin;
|
|
62
|
+
if (client.config.sponsored) {
|
|
63
|
+
suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), client.config.sponsored);
|
|
64
|
+
}
|
|
65
|
+
await (0, utils_1.updatePyth)(client.pythClient, tx, tokens, suiCoin);
|
|
66
|
+
for (let token of tokens) {
|
|
67
|
+
(0, utils_1.updateOracleWithPythUsd)(client.pythClient, tx, client.config.package.oracle, token);
|
|
68
|
+
}
|
|
69
|
+
// split bid receipt
|
|
70
|
+
let collateralBidReceipt = (0, typus_dov_single_v2_1.getSplitBidReceiptTx)(client.config, tx, {
|
|
71
|
+
index: input.index,
|
|
72
|
+
receipts: input.bidReceipts,
|
|
73
|
+
share: input.share, // if undefined, merge all receipts
|
|
74
|
+
recipient: input.user,
|
|
180
75
|
});
|
|
76
|
+
let cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
|
|
77
|
+
let bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
|
|
78
|
+
let baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
|
|
79
|
+
tx.add((0, trading_1.createTradingOrderWithBidReceiptV3)({
|
|
80
|
+
arguments: {
|
|
81
|
+
version: __1.PERP_VERSION,
|
|
82
|
+
registry: __1.MARKET,
|
|
83
|
+
poolRegistry: __1.LP_POOL,
|
|
84
|
+
marketIndex: BigInt(input.perpIndex ?? 0),
|
|
85
|
+
poolIndex: BigInt(input.perpIndex ?? 0),
|
|
86
|
+
typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
|
|
87
|
+
typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
|
|
88
|
+
typusEcosystemVersion: client.config.version.typus,
|
|
89
|
+
typusUserRegistry: client.config.registry.typus.user,
|
|
90
|
+
typusLeaderboardRegistry: client.config.registry.typus.leaderboard,
|
|
91
|
+
isLong: input.isLong,
|
|
92
|
+
dovRegistry: client.config.registry.dov.dovSingle,
|
|
93
|
+
collateralBidReceipt,
|
|
94
|
+
tailsStakingRegistry: client.config.registry.typus.tailsStaking,
|
|
95
|
+
competitionConfig: __1.COMPETITION_CONFIG,
|
|
96
|
+
},
|
|
97
|
+
typeArguments: [cToken, bToken, baseToken],
|
|
98
|
+
}));
|
|
99
|
+
return tx;
|
|
181
100
|
}
|
|
182
|
-
function reduceOptionCollateralPositionSize(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
marketIndex: BigInt(0),
|
|
219
|
-
poolIndex: BigInt(0),
|
|
220
|
-
typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
|
|
221
|
-
typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
|
|
222
|
-
clock: constants_1.CLOCK,
|
|
223
|
-
typusEcosystemVersion: config.version.typus,
|
|
224
|
-
typusUserRegistry: config.registry.typus.user,
|
|
225
|
-
typusLeaderboardRegistry: config.registry.typus.leaderboard,
|
|
226
|
-
dovRegistry: config.registry.dov.dovSingle,
|
|
227
|
-
positionId: BigInt(input.positionId),
|
|
228
|
-
orderSize: input.orderSize ? BigInt(input.orderSize) : null,
|
|
229
|
-
tailsStakingRegistry: config.registry.typus.tailsStaking,
|
|
230
|
-
competitionConfig: __1.COMPETITION_CONFIG,
|
|
231
|
-
});
|
|
232
|
-
return [2 /*return*/, tx];
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
});
|
|
101
|
+
async function reduceOptionCollateralPositionSize(client, tx, input) {
|
|
102
|
+
let TOKEN = input.cToken;
|
|
103
|
+
let BASE_TOKEN = input.tradingToken;
|
|
104
|
+
let tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
|
|
105
|
+
let suiCoin;
|
|
106
|
+
if (client.config.sponsored) {
|
|
107
|
+
suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), client.config.sponsored);
|
|
108
|
+
}
|
|
109
|
+
await (0, utils_1.updatePyth)(client.pythClient, tx, tokens, suiCoin);
|
|
110
|
+
for (let token of tokens) {
|
|
111
|
+
(0, utils_1.updateOracleWithPythUsd)(client.pythClient, tx, client.config.package.oracle, token);
|
|
112
|
+
}
|
|
113
|
+
let cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
|
|
114
|
+
let bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
|
|
115
|
+
let baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
|
|
116
|
+
tx.add((0, trading_1.reduceOptionCollateralPositionSizeV2)({
|
|
117
|
+
arguments: {
|
|
118
|
+
version: __1.PERP_VERSION,
|
|
119
|
+
registry: __1.MARKET,
|
|
120
|
+
poolRegistry: __1.LP_POOL,
|
|
121
|
+
marketIndex: BigInt(input.perpIndex ?? 0),
|
|
122
|
+
poolIndex: BigInt(input.perpIndex ?? 0),
|
|
123
|
+
typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
|
|
124
|
+
typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
|
|
125
|
+
typusEcosystemVersion: client.config.version.typus,
|
|
126
|
+
typusUserRegistry: client.config.registry.typus.user,
|
|
127
|
+
typusLeaderboardRegistry: client.config.registry.typus.leaderboard,
|
|
128
|
+
dovRegistry: client.config.registry.dov.dovSingle,
|
|
129
|
+
positionId: BigInt(input.positionId),
|
|
130
|
+
orderSize: input.orderSize ? BigInt(input.orderSize) : null,
|
|
131
|
+
tailsStakingRegistry: client.config.registry.typus.tailsStaking,
|
|
132
|
+
competitionConfig: __1.COMPETITION_CONFIG,
|
|
133
|
+
},
|
|
134
|
+
typeArguments: [cToken, bToken, baseToken],
|
|
135
|
+
}));
|
|
136
|
+
return tx;
|
|
236
137
|
}
|
package/dist/src/user/tlp.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Transaction } from "@mysten/sui/transactions";
|
|
2
|
-
import { LiquidityPool } from "../typus_perp/lp-pool/structs";
|
|
3
|
-
import { PythClient, TypusConfig } from "@typus/typus-sdk/dist/src/utils";
|
|
4
2
|
import { TOKEN } from "@typus/typus-sdk/dist/src/constants";
|
|
5
|
-
import { StakePool } from "../../src/typus_stake_pool/
|
|
6
|
-
|
|
3
|
+
import { StakePool } from "../../src/generated/typus_stake_pool/stake_pool";
|
|
4
|
+
import { LiquidityPool } from "../../src/generated/typus_perp/lp_pool";
|
|
5
|
+
import { TypusClient } from "../../src/client";
|
|
6
|
+
export declare function snapshot(client: TypusClient, tx: Transaction, input: {
|
|
7
7
|
userShareId: string;
|
|
8
|
+
perpIndex?: number;
|
|
8
9
|
}): Promise<Transaction>;
|
|
9
|
-
export declare function mintStakeLp(
|
|
10
|
-
lpPool: LiquidityPool;
|
|
11
|
-
stakePool: StakePool;
|
|
10
|
+
export declare function mintStakeLp(client: TypusClient, tx: Transaction, input: {
|
|
11
|
+
lpPool: typeof LiquidityPool.$inferType;
|
|
12
|
+
stakePool: typeof StakePool.$inferType;
|
|
12
13
|
coins: string[];
|
|
13
14
|
cTOKEN: TOKEN;
|
|
14
15
|
amount: string;
|
|
@@ -17,53 +18,61 @@ export declare function mintStakeLp(config: TypusConfig, tx: Transaction, pythCl
|
|
|
17
18
|
user: string;
|
|
18
19
|
stake: boolean;
|
|
19
20
|
suiCoins?: string[];
|
|
21
|
+
perpIndex?: number;
|
|
20
22
|
}): Promise<Transaction>;
|
|
21
|
-
export declare function stakeLp(
|
|
22
|
-
stakePool: StakePool;
|
|
23
|
+
export declare function stakeLp(client: TypusClient, tx: Transaction, input: {
|
|
24
|
+
stakePool: typeof StakePool.$inferType;
|
|
23
25
|
lpCoins: string[];
|
|
24
26
|
amount: string;
|
|
25
27
|
userShareId: string | null;
|
|
26
28
|
user: string;
|
|
29
|
+
perpIndex?: number;
|
|
27
30
|
}): Promise<Transaction>;
|
|
28
|
-
export declare function unstake(
|
|
29
|
-
lpPool: LiquidityPool;
|
|
30
|
-
stakePool: StakePool;
|
|
31
|
+
export declare function unstake(client: TypusClient, tx: Transaction, input: {
|
|
32
|
+
lpPool: typeof LiquidityPool.$inferType;
|
|
33
|
+
stakePool: typeof StakePool.$inferType;
|
|
31
34
|
userShareId: string;
|
|
32
35
|
share: string | null;
|
|
33
36
|
user: string;
|
|
37
|
+
perpIndex?: number;
|
|
34
38
|
}): Promise<Transaction>;
|
|
35
|
-
export declare function unstakeRedeem(
|
|
36
|
-
lpPool: LiquidityPool;
|
|
37
|
-
stakePool: StakePool;
|
|
39
|
+
export declare function unstakeRedeem(client: TypusClient, tx: Transaction, input: {
|
|
40
|
+
lpPool: typeof LiquidityPool.$inferType;
|
|
41
|
+
stakePool: typeof StakePool.$inferType;
|
|
38
42
|
userShareId: string;
|
|
39
43
|
share: string | null;
|
|
40
44
|
user: string;
|
|
41
45
|
suiCoins?: string[];
|
|
46
|
+
perpIndex?: number;
|
|
42
47
|
}): Promise<Transaction>;
|
|
43
|
-
export declare function redeemTlp(
|
|
44
|
-
lpPool: LiquidityPool;
|
|
48
|
+
export declare function redeemTlp(client: TypusClient, tx: Transaction, input: {
|
|
49
|
+
lpPool: typeof LiquidityPool.$inferType;
|
|
45
50
|
lpCoins: string[];
|
|
46
51
|
share: string | null;
|
|
47
52
|
user: string;
|
|
48
53
|
suiCoins?: string[];
|
|
54
|
+
perpIndex?: number;
|
|
49
55
|
}): Promise<Transaction>;
|
|
50
|
-
export declare function claim(
|
|
51
|
-
lpPool: LiquidityPool;
|
|
52
|
-
stakePool: StakePool;
|
|
56
|
+
export declare function claim(client: TypusClient, tx: Transaction, input: {
|
|
57
|
+
lpPool: typeof LiquidityPool.$inferType;
|
|
58
|
+
stakePool: typeof StakePool.$inferType;
|
|
53
59
|
cTOKEN: TOKEN;
|
|
54
60
|
user: string;
|
|
55
61
|
suiCoins?: string[];
|
|
62
|
+
perpIndex?: number;
|
|
56
63
|
}): Promise<Transaction>;
|
|
57
|
-
export declare function swap(
|
|
64
|
+
export declare function swap(client: TypusClient, tx: Transaction, input: {
|
|
58
65
|
coins: string[];
|
|
59
66
|
FROM_TOKEN: TOKEN;
|
|
60
67
|
TO_TOKEN: TOKEN;
|
|
61
68
|
amount: string;
|
|
62
69
|
user: string;
|
|
63
70
|
suiCoins?: string[];
|
|
71
|
+
perpIndex?: number;
|
|
64
72
|
}): Promise<Transaction>;
|
|
65
|
-
export declare function harvestStakeReward(
|
|
66
|
-
stakePool: StakePool;
|
|
73
|
+
export declare function harvestStakeReward(client: TypusClient, tx: Transaction, input: {
|
|
74
|
+
stakePool: typeof StakePool.$inferType;
|
|
67
75
|
userShareId: string;
|
|
68
76
|
user: string;
|
|
77
|
+
perpIndex?: number;
|
|
69
78
|
}): Promise<Transaction>;
|