@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,713 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addPositionLinkedOrderInfo = addPositionLinkedOrderInfo;
|
|
4
|
-
exports.calculateFilled_ = calculateFilled_;
|
|
5
|
-
exports.calculateIntrinsicValue = calculateIntrinsicValue;
|
|
6
|
-
exports.calculatePositionFundingRate = calculatePositionFundingRate;
|
|
7
|
-
exports.calculateRealizedPnlUsd = calculateRealizedPnlUsd;
|
|
8
|
-
exports.calculateTradingFee = calculateTradingFee;
|
|
9
|
-
exports.calculateUnrealizedCost = calculateUnrealizedCost;
|
|
10
|
-
exports.calculateUnrealizedPnl = calculateUnrealizedPnl;
|
|
11
|
-
exports.checkOptionCollateralPositionLiquidated = checkOptionCollateralPositionLiquidated;
|
|
12
|
-
exports.checkOrderFilled = checkOrderFilled;
|
|
13
|
-
exports.checkPositionLiquidated = checkPositionLiquidated;
|
|
14
|
-
exports.collateralWithPnl = collateralWithPnl;
|
|
15
|
-
exports.createOrder = createOrder;
|
|
16
|
-
exports.createOrderWithBidReceipts = createOrderWithBidReceipts;
|
|
17
|
-
exports.emitRealizedFundingEvent = emitRealizedFundingEvent;
|
|
18
|
-
exports.getEstimatedLiquidationPrice = getEstimatedLiquidationPrice;
|
|
19
|
-
exports.getMaxOrderTypeTag = getMaxOrderTypeTag;
|
|
20
|
-
exports.getOptionCollateralOrderCollateralAmount = getOptionCollateralOrderCollateralAmount;
|
|
21
|
-
exports.getOptionPositionCollateralAmount = getOptionPositionCollateralAmount;
|
|
22
|
-
exports.getOptionPositionExerciseValue = getOptionPositionExerciseValue;
|
|
23
|
-
exports.getOptionPositionPortfolioIndex = getOptionPositionPortfolioIndex;
|
|
24
|
-
exports.getOrderCollateralAmount = getOrderCollateralAmount;
|
|
25
|
-
exports.getOrderCollateralToken = getOrderCollateralToken;
|
|
26
|
-
exports.getOrderCollateralTokenDecimal = getOrderCollateralTokenDecimal;
|
|
27
|
-
exports.getOrderFilledFee = getOrderFilledFee;
|
|
28
|
-
exports.getOrderId = getOrderId;
|
|
29
|
-
exports.getOrderLinkedPositionId = getOrderLinkedPositionId;
|
|
30
|
-
exports.getOrderPortfolioIndex = getOrderPortfolioIndex;
|
|
31
|
-
exports.getOrderPrice = getOrderPrice;
|
|
32
|
-
exports.getOrderReduceOnly = getOrderReduceOnly;
|
|
33
|
-
exports.getOrderSide = getOrderSide;
|
|
34
|
-
exports.getOrderSize = getOrderSize;
|
|
35
|
-
exports.getOrderTradingSymbol = getOrderTradingSymbol;
|
|
36
|
-
exports.getOrderTypeTag = getOrderTypeTag;
|
|
37
|
-
exports.getOrderUser = getOrderUser;
|
|
38
|
-
exports.getPositionCollateralAmount = getPositionCollateralAmount;
|
|
39
|
-
exports.getPositionCollateralTokenDecimal = getPositionCollateralTokenDecimal;
|
|
40
|
-
exports.getPositionCollateralTokenType = getPositionCollateralTokenType;
|
|
41
|
-
exports.getPositionId = getPositionId;
|
|
42
|
-
exports.getPositionLinkedOrderIds = getPositionLinkedOrderIds;
|
|
43
|
-
exports.getPositionOptionCollateralInfo = getPositionOptionCollateralInfo;
|
|
44
|
-
exports.getPositionSide = getPositionSide;
|
|
45
|
-
exports.getPositionSize = getPositionSize;
|
|
46
|
-
exports.getPositionSizeDecimal = getPositionSizeDecimal;
|
|
47
|
-
exports.getPositionSymbol = getPositionSymbol;
|
|
48
|
-
exports.getPositionUnrealizedFundingSign = getPositionUnrealizedFundingSign;
|
|
49
|
-
exports.getPositionUser = getPositionUser;
|
|
50
|
-
exports.getReserveAmount = getReserveAmount;
|
|
51
|
-
exports.increaseCollateral = increaseCollateral;
|
|
52
|
-
exports.isOptionCollateralOrder = isOptionCollateralOrder;
|
|
53
|
-
exports.isOptionCollateralPosition = isOptionCollateralPosition;
|
|
54
|
-
exports.managerCreateReduceOnlyOrder = managerCreateReduceOnlyOrder;
|
|
55
|
-
exports.maxReleasingCollateralAmount = maxReleasingCollateralAmount;
|
|
56
|
-
exports.optionPositionBidReceiptsExpired = optionPositionBidReceiptsExpired;
|
|
57
|
-
exports.orderFilled = orderFilled;
|
|
58
|
-
exports.orderFilledWithBidReceiptsCollateral = orderFilledWithBidReceiptsCollateral;
|
|
59
|
-
exports.realizeFunding = realizeFunding;
|
|
60
|
-
exports.releaseCollateral = releaseCollateral;
|
|
61
|
-
exports.removeOrder = removeOrder;
|
|
62
|
-
exports.removeOrderWithBidReceipts = removeOrderWithBidReceipts;
|
|
63
|
-
exports.removePosition = removePosition;
|
|
64
|
-
exports.removePositionLinkedOrderInfo = removePositionLinkedOrderInfo;
|
|
65
|
-
exports.removePositionWithBidReceipts = removePositionWithBidReceipts;
|
|
66
|
-
exports.splitBidReceipt = splitBidReceipt;
|
|
67
|
-
exports.updateOptionPositionCollateralAmount = updateOptionPositionCollateralAmount;
|
|
68
|
-
exports.updatePositionBorrowRateAndFundingRate = updatePositionBorrowRateAndFundingRate;
|
|
69
|
-
var __1 = require("..");
|
|
70
|
-
var structs_1 = require("../../_dependencies/source/0x1/option/structs");
|
|
71
|
-
var structs_2 = require("../../_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs");
|
|
72
|
-
var util_1 = require("../../_framework/util");
|
|
73
|
-
var structs_3 = require("./structs");
|
|
74
|
-
function addPositionLinkedOrderInfo(tx, args, published_at) {
|
|
75
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
76
|
-
return tx.moveCall({
|
|
77
|
-
target: "".concat(published_at, "::position::add_position_linked_order_info"),
|
|
78
|
-
arguments: [(0, util_1.obj)(tx, args.position), (0, util_1.pure)(tx, args.linkedOrderId, "u64"), (0, util_1.pure)(tx, args.linkedOrderPrice, "u64")],
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function calculateFilled_(tx, args, published_at) {
|
|
82
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
83
|
-
return tx.moveCall({
|
|
84
|
-
target: "".concat(published_at, "::position::calculate_filled_"),
|
|
85
|
-
arguments: [
|
|
86
|
-
(0, util_1.obj)(tx, args.position),
|
|
87
|
-
(0, util_1.pure)(tx, args.reduceOnly, "bool"),
|
|
88
|
-
(0, util_1.pure)(tx, args.orderSide, "bool"),
|
|
89
|
-
(0, util_1.pure)(tx, args.orderSize, "u64"),
|
|
90
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
91
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
92
|
-
],
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function calculateIntrinsicValue(tx, typeArg, args, published_at) {
|
|
96
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
97
|
-
return tx.moveCall({
|
|
98
|
-
target: "".concat(published_at, "::position::calculate_intrinsic_value"),
|
|
99
|
-
typeArguments: [typeArg],
|
|
100
|
-
arguments: [
|
|
101
|
-
(0, util_1.obj)(tx, args.dovRegistry),
|
|
102
|
-
(0, util_1.obj)(tx, args.typusOracleTradingSymbol),
|
|
103
|
-
(0, util_1.obj)(tx, args.typusOracleCToken),
|
|
104
|
-
(0, util_1.vector)(tx, "".concat(structs_2.TypusBidReceipt.$typeName), args.receipts),
|
|
105
|
-
(0, util_1.obj)(tx, args.clock),
|
|
106
|
-
],
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function calculatePositionFundingRate(tx, args, published_at) {
|
|
110
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
111
|
-
return tx.moveCall({
|
|
112
|
-
target: "".concat(published_at, "::position::calculate_position_funding_rate"),
|
|
113
|
-
arguments: [
|
|
114
|
-
(0, util_1.obj)(tx, args.position),
|
|
115
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
116
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
117
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
118
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
119
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndexSign, "bool"),
|
|
120
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndex, "u64"),
|
|
121
|
-
],
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
function calculateRealizedPnlUsd(tx, args, published_at) {
|
|
125
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
126
|
-
return tx.moveCall({
|
|
127
|
-
target: "".concat(published_at, "::position::calculate_realized_pnl_usd"),
|
|
128
|
-
arguments: [
|
|
129
|
-
(0, util_1.pure)(tx, args.side, "bool"),
|
|
130
|
-
(0, util_1.pure)(tx, args.size, "u64"),
|
|
131
|
-
(0, util_1.pure)(tx, args.entryPrice, "u64"),
|
|
132
|
-
(0, util_1.pure)(tx, args.exitPrice, "u64"),
|
|
133
|
-
(0, util_1.pure)(tx, args.sizeDecimal, "u64"),
|
|
134
|
-
(0, util_1.pure)(tx, args.priceDecimal, "u64"),
|
|
135
|
-
],
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
function calculateTradingFee(tx, args, published_at) {
|
|
139
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
140
|
-
return tx.moveCall({
|
|
141
|
-
target: "".concat(published_at, "::position::calculate_trading_fee"),
|
|
142
|
-
arguments: [
|
|
143
|
-
(0, util_1.pure)(tx, args.size, "u64"),
|
|
144
|
-
(0, util_1.pure)(tx, args.sizeDecimal, "u64"),
|
|
145
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
146
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
147
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
148
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
149
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
150
|
-
(0, util_1.pure)(tx, args.collateralTokenDecimal, "u64"),
|
|
151
|
-
],
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
function calculateUnrealizedCost(tx, position, published_at) {
|
|
155
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
156
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::calculate_unrealized_cost"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
157
|
-
}
|
|
158
|
-
function calculateUnrealizedPnl(tx, args, published_at) {
|
|
159
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
160
|
-
return tx.moveCall({
|
|
161
|
-
target: "".concat(published_at, "::position::calculate_unrealized_pnl"),
|
|
162
|
-
arguments: [
|
|
163
|
-
(0, util_1.obj)(tx, args.position),
|
|
164
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
165
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
166
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
167
|
-
],
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
function checkOptionCollateralPositionLiquidated(tx, typeArg, args, published_at) {
|
|
171
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
172
|
-
return tx.moveCall({
|
|
173
|
-
target: "".concat(published_at, "::position::check_option_collateral_position_liquidated"),
|
|
174
|
-
typeArguments: [typeArg],
|
|
175
|
-
arguments: [
|
|
176
|
-
(0, util_1.obj)(tx, args.dovRegistry),
|
|
177
|
-
(0, util_1.obj)(tx, args.typusOracleTradingSymbol),
|
|
178
|
-
(0, util_1.obj)(tx, args.typusOracleCToken),
|
|
179
|
-
(0, util_1.obj)(tx, args.position),
|
|
180
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
181
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
182
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
183
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
184
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
185
|
-
(0, util_1.pure)(tx, args.maintenanceMarginRateBp, "u64"),
|
|
186
|
-
(0, util_1.pure)(tx, args.cumulativeBorrowRate, "u64"),
|
|
187
|
-
(0, util_1.obj)(tx, args.clock),
|
|
188
|
-
],
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
function checkOrderFilled(tx, args, published_at) {
|
|
192
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
193
|
-
return tx.moveCall({
|
|
194
|
-
target: "".concat(published_at, "::position::check_order_filled"),
|
|
195
|
-
arguments: [(0, util_1.obj)(tx, args.order), (0, util_1.pure)(tx, args.oraclePrice, "u64")],
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
function checkPositionLiquidated(tx, args, published_at) {
|
|
199
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
200
|
-
return tx.moveCall({
|
|
201
|
-
target: "".concat(published_at, "::position::check_position_liquidated"),
|
|
202
|
-
arguments: [
|
|
203
|
-
(0, util_1.obj)(tx, args.position),
|
|
204
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
205
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
206
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
207
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
208
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
209
|
-
(0, util_1.pure)(tx, args.maintenanceMarginRateBp, "u64"),
|
|
210
|
-
(0, util_1.pure)(tx, args.cumulativeBorrowRate, "u64"),
|
|
211
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndexSign, "bool"),
|
|
212
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndex, "u64"),
|
|
213
|
-
],
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
function collateralWithPnl(tx, args, published_at) {
|
|
217
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
218
|
-
return tx.moveCall({
|
|
219
|
-
target: "".concat(published_at, "::position::collateral_with_pnl"),
|
|
220
|
-
arguments: [
|
|
221
|
-
(0, util_1.obj)(tx, args.position),
|
|
222
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
223
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
224
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
225
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
226
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
227
|
-
],
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
function createOrder(tx, typeArg, args, published_at) {
|
|
231
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
232
|
-
return tx.moveCall({
|
|
233
|
-
target: "".concat(published_at, "::position::create_order"),
|
|
234
|
-
typeArguments: [typeArg],
|
|
235
|
-
arguments: [
|
|
236
|
-
(0, util_1.obj)(tx, args.version),
|
|
237
|
-
(0, util_1.obj)(tx, args.symbol),
|
|
238
|
-
(0, util_1.pure)(tx, args.leverageMbp, "u64"),
|
|
239
|
-
(0, util_1.pure)(tx, args.reduceOnly, "bool"),
|
|
240
|
-
(0, util_1.pure)(tx, args.isLong, "bool"),
|
|
241
|
-
(0, util_1.pure)(tx, args.isStopOrder, "bool"),
|
|
242
|
-
(0, util_1.pure)(tx, args.size, "u64"),
|
|
243
|
-
(0, util_1.pure)(tx, args.sizeDecimal, "u64"),
|
|
244
|
-
(0, util_1.pure)(tx, args.triggerPrice, "u64"),
|
|
245
|
-
(0, util_1.obj)(tx, args.collateral),
|
|
246
|
-
(0, util_1.pure)(tx, args.collateralTokenDecimal, "u64"),
|
|
247
|
-
(0, util_1.pure)(tx, args.linkedPositionId, "".concat(structs_1.Option.$typeName, "<u64>")),
|
|
248
|
-
(0, util_1.pure)(tx, args.orderId, "u64"),
|
|
249
|
-
(0, util_1.pure)(tx, args.oraclePrice, "u64"),
|
|
250
|
-
(0, util_1.obj)(tx, args.clock),
|
|
251
|
-
],
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
function createOrderWithBidReceipts(tx, args, published_at) {
|
|
255
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
256
|
-
return tx.moveCall({
|
|
257
|
-
target: "".concat(published_at, "::position::create_order_with_bid_receipts"),
|
|
258
|
-
arguments: [
|
|
259
|
-
(0, util_1.obj)(tx, args.version),
|
|
260
|
-
(0, util_1.obj)(tx, args.symbol),
|
|
261
|
-
(0, util_1.pure)(tx, args.portfolioIndex, "u64"),
|
|
262
|
-
(0, util_1.obj)(tx, args.depositToken),
|
|
263
|
-
(0, util_1.pure)(tx, args.leverageMbp, "u64"),
|
|
264
|
-
(0, util_1.pure)(tx, args.reduceOnly, "bool"),
|
|
265
|
-
(0, util_1.pure)(tx, args.isLong, "bool"),
|
|
266
|
-
(0, util_1.pure)(tx, args.isStopOrder, "bool"),
|
|
267
|
-
(0, util_1.pure)(tx, args.size, "u64"),
|
|
268
|
-
(0, util_1.pure)(tx, args.sizeDecimal, "u64"),
|
|
269
|
-
(0, util_1.pure)(tx, args.triggerPrice, "u64"),
|
|
270
|
-
(0, util_1.vector)(tx, "".concat(structs_2.TypusBidReceipt.$typeName), args.collateralBidReceipts),
|
|
271
|
-
(0, util_1.pure)(tx, args.depositTokenDecimal, "u64"),
|
|
272
|
-
(0, util_1.pure)(tx, args.linkedPositionId, "".concat(structs_1.Option.$typeName, "<u64>")),
|
|
273
|
-
(0, util_1.pure)(tx, args.orderId, "u64"),
|
|
274
|
-
(0, util_1.pure)(tx, args.oraclePrice, "u64"),
|
|
275
|
-
(0, util_1.pure)(tx, args.user, "address"),
|
|
276
|
-
(0, util_1.obj)(tx, args.clock),
|
|
277
|
-
],
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
function emitRealizedFundingEvent(tx, args, published_at) {
|
|
281
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
282
|
-
return tx.moveCall({
|
|
283
|
-
target: "".concat(published_at, "::position::emit_realized_funding_event"),
|
|
284
|
-
arguments: [
|
|
285
|
-
(0, util_1.pure)(tx, args.user, "address"),
|
|
286
|
-
(0, util_1.obj)(tx, args.collateralToken),
|
|
287
|
-
(0, util_1.obj)(tx, args.symbol),
|
|
288
|
-
(0, util_1.pure)(tx, args.positionId, "u64"),
|
|
289
|
-
(0, util_1.pure)(tx, args.realizedFundingSign, "bool"),
|
|
290
|
-
(0, util_1.pure)(tx, args.realizedFundingFee, "u64"),
|
|
291
|
-
(0, util_1.pure)(tx, args.realizedFundingFeeUsd, "u64"),
|
|
292
|
-
(0, util_1.pure)(tx, args.u64Padding, "vector<u64>"),
|
|
293
|
-
],
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
function getEstimatedLiquidationPrice(tx, args, published_at) {
|
|
297
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
298
|
-
return tx.moveCall({
|
|
299
|
-
target: "".concat(published_at, "::position::get_estimated_liquidation_price"),
|
|
300
|
-
arguments: [
|
|
301
|
-
(0, util_1.obj)(tx, args.position),
|
|
302
|
-
(0, util_1.pure)(tx, args.isSameToken, "bool"),
|
|
303
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
304
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
305
|
-
(0, util_1.pure)(tx, args.tradingOraclePriceDecimal, "u64"),
|
|
306
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
307
|
-
(0, util_1.pure)(tx, args.maintenanceMarginRateBp, "u64"),
|
|
308
|
-
],
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
function getMaxOrderTypeTag(tx, published_at) {
|
|
312
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
313
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_max_order_type_tag"), arguments: [] });
|
|
314
|
-
}
|
|
315
|
-
function getOptionCollateralOrderCollateralAmount(tx, typeArg, args, published_at) {
|
|
316
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
317
|
-
return tx.moveCall({
|
|
318
|
-
target: "".concat(published_at, "::position::get_option_collateral_order_collateral_amount"),
|
|
319
|
-
typeArguments: [typeArg],
|
|
320
|
-
arguments: [
|
|
321
|
-
(0, util_1.obj)(tx, args.dovRegistry),
|
|
322
|
-
(0, util_1.obj)(tx, args.typusOracleTradingSymbol),
|
|
323
|
-
(0, util_1.obj)(tx, args.typusOracleCToken),
|
|
324
|
-
(0, util_1.obj)(tx, args.order),
|
|
325
|
-
(0, util_1.obj)(tx, args.clock),
|
|
326
|
-
],
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
function getOptionPositionCollateralAmount(tx, typeArg, args, published_at) {
|
|
330
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
331
|
-
return tx.moveCall({
|
|
332
|
-
target: "".concat(published_at, "::position::get_option_position_collateral_amount"),
|
|
333
|
-
typeArguments: [typeArg],
|
|
334
|
-
arguments: [
|
|
335
|
-
(0, util_1.obj)(tx, args.dovRegistry),
|
|
336
|
-
(0, util_1.obj)(tx, args.typusOracleTradingSymbol),
|
|
337
|
-
(0, util_1.obj)(tx, args.typusOracleCToken),
|
|
338
|
-
(0, util_1.obj)(tx, args.position),
|
|
339
|
-
(0, util_1.obj)(tx, args.clock),
|
|
340
|
-
],
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
function getOptionPositionExerciseValue(tx, typeArg, args, published_at) {
|
|
344
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
345
|
-
return tx.moveCall({
|
|
346
|
-
target: "".concat(published_at, "::position::get_option_position_exercise_value"),
|
|
347
|
-
typeArguments: [typeArg],
|
|
348
|
-
arguments: [
|
|
349
|
-
(0, util_1.obj)(tx, args.dovRegistry),
|
|
350
|
-
(0, util_1.obj)(tx, args.typusOracleTradingSymbol),
|
|
351
|
-
(0, util_1.obj)(tx, args.typusOracleCToken),
|
|
352
|
-
(0, util_1.obj)(tx, args.position),
|
|
353
|
-
(0, util_1.obj)(tx, args.clock),
|
|
354
|
-
],
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
function getOptionPositionPortfolioIndex(tx, position, published_at) {
|
|
358
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
359
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_option_position_portfolio_index"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
360
|
-
}
|
|
361
|
-
function getOrderCollateralAmount(tx, typeArg, order, published_at) {
|
|
362
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
363
|
-
return tx.moveCall({
|
|
364
|
-
target: "".concat(published_at, "::position::get_order_collateral_amount"),
|
|
365
|
-
typeArguments: [typeArg],
|
|
366
|
-
arguments: [(0, util_1.obj)(tx, order)],
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
function getOrderCollateralToken(tx, order, published_at) {
|
|
370
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
371
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_collateral_token"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
372
|
-
}
|
|
373
|
-
function getOrderCollateralTokenDecimal(tx, order, published_at) {
|
|
374
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
375
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_collateral_token_decimal"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
376
|
-
}
|
|
377
|
-
function getOrderFilledFee(tx, args, published_at) {
|
|
378
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
379
|
-
return tx.moveCall({
|
|
380
|
-
target: "".concat(published_at, "::position::get_order_filled_fee"),
|
|
381
|
-
arguments: [
|
|
382
|
-
(0, util_1.obj)(tx, args.order),
|
|
383
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
384
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
385
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
386
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
387
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
388
|
-
],
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
function getOrderId(tx, order, published_at) {
|
|
392
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
393
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_id"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
394
|
-
}
|
|
395
|
-
function getOrderLinkedPositionId(tx, order, published_at) {
|
|
396
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
397
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_linked_position_id"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
398
|
-
}
|
|
399
|
-
function getOrderPortfolioIndex(tx, order, published_at) {
|
|
400
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
401
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_portfolio_index"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
402
|
-
}
|
|
403
|
-
function getOrderPrice(tx, order, published_at) {
|
|
404
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
405
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_price"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
406
|
-
}
|
|
407
|
-
function getOrderReduceOnly(tx, order, published_at) {
|
|
408
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
409
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_reduce_only"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
410
|
-
}
|
|
411
|
-
function getOrderSide(tx, order, published_at) {
|
|
412
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
413
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_side"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
414
|
-
}
|
|
415
|
-
function getOrderSize(tx, order, published_at) {
|
|
416
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
417
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_size"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
418
|
-
}
|
|
419
|
-
function getOrderTradingSymbol(tx, order, published_at) {
|
|
420
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
421
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_trading_symbol"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
422
|
-
}
|
|
423
|
-
function getOrderTypeTag(tx, order, published_at) {
|
|
424
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
425
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_type_tag"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
426
|
-
}
|
|
427
|
-
function getOrderUser(tx, order, published_at) {
|
|
428
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
429
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_user"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
430
|
-
}
|
|
431
|
-
function getPositionCollateralAmount(tx, typeArg, position, published_at) {
|
|
432
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
433
|
-
return tx.moveCall({
|
|
434
|
-
target: "".concat(published_at, "::position::get_position_collateral_amount"),
|
|
435
|
-
typeArguments: [typeArg],
|
|
436
|
-
arguments: [(0, util_1.obj)(tx, position)],
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
function getPositionCollateralTokenDecimal(tx, position, published_at) {
|
|
440
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
441
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_collateral_token_decimal"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
442
|
-
}
|
|
443
|
-
function getPositionCollateralTokenType(tx, position, published_at) {
|
|
444
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
445
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_collateral_token_type"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
446
|
-
}
|
|
447
|
-
function getPositionId(tx, position, published_at) {
|
|
448
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
449
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_id"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
450
|
-
}
|
|
451
|
-
function getPositionLinkedOrderIds(tx, position, published_at) {
|
|
452
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
453
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_linked_order_ids"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
454
|
-
}
|
|
455
|
-
function getPositionOptionCollateralInfo(tx, position, published_at) {
|
|
456
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
457
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_option_collateral_info"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
458
|
-
}
|
|
459
|
-
function getPositionSide(tx, position, published_at) {
|
|
460
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
461
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_side"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
462
|
-
}
|
|
463
|
-
function getPositionSize(tx, position, published_at) {
|
|
464
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
465
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_size"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
466
|
-
}
|
|
467
|
-
function getPositionSizeDecimal(tx, position, published_at) {
|
|
468
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
469
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_size_decimal"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
470
|
-
}
|
|
471
|
-
function getPositionSymbol(tx, position, published_at) {
|
|
472
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
473
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_symbol"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
474
|
-
}
|
|
475
|
-
function getPositionUnrealizedFundingSign(tx, position, published_at) {
|
|
476
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
477
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_unrealized_funding_sign"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
478
|
-
}
|
|
479
|
-
function getPositionUser(tx, position, published_at) {
|
|
480
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
481
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_user"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
482
|
-
}
|
|
483
|
-
function getReserveAmount(tx, position, published_at) {
|
|
484
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
485
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::get_reserve_amount"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
486
|
-
}
|
|
487
|
-
function increaseCollateral(tx, typeArg, args, published_at) {
|
|
488
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
489
|
-
return tx.moveCall({
|
|
490
|
-
target: "".concat(published_at, "::position::increase_collateral"),
|
|
491
|
-
typeArguments: [typeArg],
|
|
492
|
-
arguments: [
|
|
493
|
-
(0, util_1.obj)(tx, args.position),
|
|
494
|
-
(0, util_1.obj)(tx, args.collateral),
|
|
495
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
496
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
497
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
498
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
499
|
-
],
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
function isOptionCollateralOrder(tx, order, published_at) {
|
|
503
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
504
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::is_option_collateral_order"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
505
|
-
}
|
|
506
|
-
function isOptionCollateralPosition(tx, position, published_at) {
|
|
507
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
508
|
-
return tx.moveCall({ target: "".concat(published_at, "::position::is_option_collateral_position"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
509
|
-
}
|
|
510
|
-
function managerCreateReduceOnlyOrder(tx, typeArg, args, published_at) {
|
|
511
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
512
|
-
return tx.moveCall({
|
|
513
|
-
target: "".concat(published_at, "::position::manager_create_reduce_only_order"),
|
|
514
|
-
typeArguments: [typeArg],
|
|
515
|
-
arguments: [
|
|
516
|
-
(0, util_1.obj)(tx, args.version),
|
|
517
|
-
(0, util_1.obj)(tx, args.symbol),
|
|
518
|
-
(0, util_1.pure)(tx, args.isLong, "bool"),
|
|
519
|
-
(0, util_1.pure)(tx, args.size, "u64"),
|
|
520
|
-
(0, util_1.pure)(tx, args.sizeDecimal, "u64"),
|
|
521
|
-
(0, util_1.pure)(tx, args.triggerPrice, "u64"),
|
|
522
|
-
(0, util_1.obj)(tx, args.collateral),
|
|
523
|
-
(0, util_1.pure)(tx, args.collateralTokenDecimal, "u64"),
|
|
524
|
-
(0, util_1.pure)(tx, args.linkedPositionId, "u64"),
|
|
525
|
-
(0, util_1.pure)(tx, args.user, "address"),
|
|
526
|
-
(0, util_1.pure)(tx, args.orderId, "u64"),
|
|
527
|
-
(0, util_1.pure)(tx, args.oraclePrice, "u64"),
|
|
528
|
-
(0, util_1.obj)(tx, args.clock),
|
|
529
|
-
],
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
function maxReleasingCollateralAmount(tx, args, published_at) {
|
|
533
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
534
|
-
return tx.moveCall({
|
|
535
|
-
target: "".concat(published_at, "::position::max_releasing_collateral_amount"),
|
|
536
|
-
arguments: [
|
|
537
|
-
(0, util_1.obj)(tx, args.position),
|
|
538
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
539
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
540
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
541
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
542
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
543
|
-
(0, util_1.pure)(tx, args.cumulativeBorrowRate, "u64"),
|
|
544
|
-
(0, util_1.pure)(tx, args.maxEntryLeverageMbp, "u64"),
|
|
545
|
-
],
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
function optionPositionBidReceiptsExpired(tx, args, published_at) {
|
|
549
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
550
|
-
return tx.moveCall({
|
|
551
|
-
target: "".concat(published_at, "::position::option_position_bid_receipts_expired"),
|
|
552
|
-
arguments: [(0, util_1.obj)(tx, args.dovRegistry), (0, util_1.obj)(tx, args.position)],
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
function orderFilled(tx, typeArg, args, published_at) {
|
|
556
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
557
|
-
return tx.moveCall({
|
|
558
|
-
target: "".concat(published_at, "::position::order_filled"),
|
|
559
|
-
typeArguments: [typeArg],
|
|
560
|
-
arguments: [
|
|
561
|
-
(0, util_1.obj)(tx, args.version),
|
|
562
|
-
(0, util_1.obj)(tx, args.ecosystemVersion),
|
|
563
|
-
(0, util_1.obj)(tx, args.typusLeaderboardRegistry),
|
|
564
|
-
(0, util_1.obj)(tx, args.tailsStakingRegistry),
|
|
565
|
-
(0, util_1.obj)(tx, args.competitionConfig),
|
|
566
|
-
(0, util_1.obj)(tx, args.order),
|
|
567
|
-
(0, util_1.option)(tx, "".concat(structs_3.Position.$typeName), args.originalPosition),
|
|
568
|
-
(0, util_1.pure)(tx, args.nextPositionId, "u64"),
|
|
569
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
570
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
571
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
572
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
573
|
-
(0, util_1.pure)(tx, args.cumulativeBorrowRate, "u64"),
|
|
574
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndexSign, "bool"),
|
|
575
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndex, "u64"),
|
|
576
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
577
|
-
(0, util_1.obj)(tx, args.clock),
|
|
578
|
-
],
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
function orderFilledWithBidReceiptsCollateral(tx, typeArgs, args, published_at) {
|
|
582
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
583
|
-
return tx.moveCall({
|
|
584
|
-
target: "".concat(published_at, "::position::order_filled_with_bid_receipts_collateral"),
|
|
585
|
-
typeArguments: typeArgs,
|
|
586
|
-
arguments: [
|
|
587
|
-
(0, util_1.obj)(tx, args.version),
|
|
588
|
-
(0, util_1.obj)(tx, args.ecosystemVersion),
|
|
589
|
-
(0, util_1.obj)(tx, args.typusLeaderboardRegistry),
|
|
590
|
-
(0, util_1.obj)(tx, args.tailsStakingRegistry),
|
|
591
|
-
(0, util_1.obj)(tx, args.competitionConfig),
|
|
592
|
-
(0, util_1.obj)(tx, args.liquidityPool),
|
|
593
|
-
(0, util_1.obj)(tx, args.dovRegistry),
|
|
594
|
-
(0, util_1.obj)(tx, args.typusOracleTradingSymbol),
|
|
595
|
-
(0, util_1.obj)(tx, args.typusOracleCToken),
|
|
596
|
-
(0, util_1.obj)(tx, args.order),
|
|
597
|
-
(0, util_1.option)(tx, "".concat(structs_3.Position.$typeName), args.originalPosition),
|
|
598
|
-
(0, util_1.pure)(tx, args.nextPositionId, "u64"),
|
|
599
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
600
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
601
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
602
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
603
|
-
(0, util_1.pure)(tx, args.cumulativeBorrowRate, "u64"),
|
|
604
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndexSign, "bool"),
|
|
605
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndex, "u64"),
|
|
606
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
607
|
-
(0, util_1.pure)(tx, args.referralFeeRebateBp, "u64"),
|
|
608
|
-
(0, util_1.obj)(tx, args.clock),
|
|
609
|
-
],
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
function realizeFunding(tx, typeArg, args, published_at) {
|
|
613
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
614
|
-
return tx.moveCall({
|
|
615
|
-
target: "".concat(published_at, "::position::realize_funding"),
|
|
616
|
-
typeArguments: [typeArg],
|
|
617
|
-
arguments: [
|
|
618
|
-
(0, util_1.obj)(tx, args.position),
|
|
619
|
-
(0, util_1.obj)(tx, args.fundingIncome),
|
|
620
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
621
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
622
|
-
],
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
function releaseCollateral(tx, typeArg, args, published_at) {
|
|
626
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
627
|
-
return tx.moveCall({
|
|
628
|
-
target: "".concat(published_at, "::position::release_collateral"),
|
|
629
|
-
typeArguments: [typeArg],
|
|
630
|
-
arguments: [
|
|
631
|
-
(0, util_1.obj)(tx, args.position),
|
|
632
|
-
(0, util_1.pure)(tx, args.releaseAmount, "u64"),
|
|
633
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
634
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
635
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
636
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
637
|
-
],
|
|
638
|
-
});
|
|
639
|
-
}
|
|
640
|
-
function removeOrder(tx, typeArg, args, published_at) {
|
|
641
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
642
|
-
return tx.moveCall({
|
|
643
|
-
target: "".concat(published_at, "::position::remove_order"),
|
|
644
|
-
typeArguments: [typeArg],
|
|
645
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.order)],
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
function removeOrderWithBidReceipts(tx, args, published_at) {
|
|
649
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
650
|
-
return tx.moveCall({
|
|
651
|
-
target: "".concat(published_at, "::position::remove_order_with_bid_receipts"),
|
|
652
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.order)],
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
function removePosition(tx, typeArg, args, published_at) {
|
|
656
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
657
|
-
return tx.moveCall({
|
|
658
|
-
target: "".concat(published_at, "::position::remove_position"),
|
|
659
|
-
typeArguments: [typeArg],
|
|
660
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.position)],
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
function removePositionLinkedOrderInfo(tx, args, published_at) {
|
|
664
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
665
|
-
return tx.moveCall({
|
|
666
|
-
target: "".concat(published_at, "::position::remove_position_linked_order_info"),
|
|
667
|
-
arguments: [(0, util_1.obj)(tx, args.position), (0, util_1.pure)(tx, args.linkedOrderId, "u64")],
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
function removePositionWithBidReceipts(tx, args, published_at) {
|
|
671
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
672
|
-
return tx.moveCall({
|
|
673
|
-
target: "".concat(published_at, "::position::remove_position_with_bid_receipts"),
|
|
674
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.position)],
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
function splitBidReceipt(tx, args, published_at) {
|
|
678
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
679
|
-
return tx.moveCall({
|
|
680
|
-
target: "".concat(published_at, "::position::split_bid_receipt"),
|
|
681
|
-
arguments: [(0, util_1.obj)(tx, args.dovRegistry), (0, util_1.obj)(tx, args.position), (0, util_1.pure)(tx, args.size, "u64")],
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
function updateOptionPositionCollateralAmount(tx, typeArg, args, published_at) {
|
|
685
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
686
|
-
return tx.moveCall({
|
|
687
|
-
target: "".concat(published_at, "::position::update_option_position_collateral_amount"),
|
|
688
|
-
typeArguments: [typeArg],
|
|
689
|
-
arguments: [
|
|
690
|
-
(0, util_1.obj)(tx, args.dovRegistry),
|
|
691
|
-
(0, util_1.obj)(tx, args.typusOracleTradingSymbol),
|
|
692
|
-
(0, util_1.obj)(tx, args.typusOracleCToken),
|
|
693
|
-
(0, util_1.obj)(tx, args.position),
|
|
694
|
-
(0, util_1.obj)(tx, args.clock),
|
|
695
|
-
],
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
function updatePositionBorrowRateAndFundingRate(tx, args, published_at) {
|
|
699
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
700
|
-
return tx.moveCall({
|
|
701
|
-
target: "".concat(published_at, "::position::update_position_borrow_rate_and_funding_rate"),
|
|
702
|
-
arguments: [
|
|
703
|
-
(0, util_1.obj)(tx, args.position),
|
|
704
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
705
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
706
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
707
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
708
|
-
(0, util_1.pure)(tx, args.cumulativeBorrowRate, "u64"),
|
|
709
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndexSign, "bool"),
|
|
710
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndex, "u64"),
|
|
711
|
-
],
|
|
712
|
-
});
|
|
713
|
-
}
|