@typus/typus-perp-sdk 1.1.27 → 1.1.28-codegen-test
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 +2328 -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 -5
- package/dist/src/user/orderWithBidReceipt.js +127 -225
- package/dist/src/user/tlp.d.ts +32 -23
- package/dist/src/user/tlp.js +316 -468
- package/package.json +13 -4
- package/dist/src/_dependencies/source/0x1/ascii/structs.d.ts +0 -92
- 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 -52
- package/dist/src/_dependencies/source/0x1/option/structs.js +0 -271
- package/dist/src/_dependencies/source/0x1/string/structs.d.ts +0 -50
- package/dist/src/_dependencies/source/0x1/string/structs.js +0 -256
- package/dist/src/_dependencies/source/0x1/type-name/structs.d.ts +0 -53
- package/dist/src/_dependencies/source/0x1/type-name/structs.js +0 -223
- package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +0 -61
- package/dist/src/_dependencies/source/0x2/bag/structs.js +0 -229
- package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +0 -88
- package/dist/src/_dependencies/source/0x2/balance/structs.js +0 -386
- package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +0 -460
- 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 -153
- package/dist/src/_dependencies/source/0x2/linked-table/structs.js +0 -438
- package/dist/src/_dependencies/source/0x2/object/structs.d.ts +0 -92
- package/dist/src/_dependencies/source/0x2/object/structs.js +0 -364
- package/dist/src/_dependencies/source/0x2/object-table/structs.d.ts +0 -61
- package/dist/src/_dependencies/source/0x2/object-table/structs.js +0 -248
- package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +0 -46
- package/dist/src/_dependencies/source/0x2/sui/structs.js +0 -222
- package/dist/src/_dependencies/source/0x2/table/structs.d.ts +0 -61
- package/dist/src/_dependencies/source/0x2/table/structs.js +0 -248
- package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +0 -68
- package/dist/src/_dependencies/source/0x2/table-vec/structs.js +0 -274
- package/dist/src/_dependencies/source/0x2/token/structs.d.ts +0 -449
- package/dist/src/_dependencies/source/0x2/token/structs.js +0 -1095
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +0 -370
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +0 -1091
- package/dist/src/_dependencies/source/0x2/url/structs.d.ts +0 -53
- package/dist/src/_dependencies/source/0x2/url/structs.js +0 -223
- package/dist/src/_dependencies/source/0x2/vec-map/structs.d.ts +0 -111
- package/dist/src/_dependencies/source/0x2/vec-map/structs.js +0 -446
- package/dist/src/_dependencies/source/0x2/vec-set/structs.d.ts +0 -51
- package/dist/src/_dependencies/source/0x2/vec-set/structs.js +0 -270
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +0 -489
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.js +0 -1084
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +0 -147
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.js +0 -456
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +0 -239
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.js +0 -653
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +0 -405
- 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 -227
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.js +0 -632
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +0 -699
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.js +0 -1459
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.d.ts +0 -161
- 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 -147
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.js +0 -430
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +0 -1071
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.js +0 -2261
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +0 -279
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.js +0 -733
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +0 -328
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.js +0 -892
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +0 -88
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.js +0 -263
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +0 -347
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.js +0 -591
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +0 -73
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.js +0 -258
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +0 -876
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.js +0 -1721
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +0 -46
- 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 -155
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.js +0 -444
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.d.ts +0 -2386
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.js +0 -4952
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +0 -446
- 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 -94
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.js +0 -376
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +0 -454
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.js +0 -881
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +0 -68
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.js +0 -274
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +0 -1117
- 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 -35
- 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 -529
- 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 -92
- 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 -172
- 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 -4268
- 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 -1064
- 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 -81
- 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 -97
- 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 -3613
- 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 -55
- 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 -168
- 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 -413
- 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 -2477
- 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,396 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
-
if (!m) return o;
|
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
|
6
|
-
try {
|
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
var __values = (this && this.__values) || function(o) {
|
|
19
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
20
|
-
if (m) return m.call(o);
|
|
21
|
-
if (o && typeof o.length === "number") return {
|
|
22
|
-
next: function () {
|
|
23
|
-
if (o && i >= o.length) o = void 0;
|
|
24
|
-
return { value: o && o[i++], done: !o };
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.splitGenericParameters = splitGenericParameters;
|
|
31
|
-
exports.parseTypeName = parseTypeName;
|
|
32
|
-
exports.isTransactionArgument = isTransactionArgument;
|
|
33
|
-
exports.obj = obj;
|
|
34
|
-
exports.pure = pure;
|
|
35
|
-
exports.option = option;
|
|
36
|
-
exports.generic = generic;
|
|
37
|
-
exports.vector = vector;
|
|
38
|
-
exports.typeArgIsPure = typeArgIsPure;
|
|
39
|
-
exports.compressSuiAddress = compressSuiAddress;
|
|
40
|
-
exports.compressSuiType = compressSuiType;
|
|
41
|
-
exports.composeSuiType = composeSuiType;
|
|
42
|
-
var bcs_1 = require("@mysten/sui/bcs");
|
|
43
|
-
function splitGenericParameters(str, genericSeparators) {
|
|
44
|
-
if (genericSeparators === void 0) { genericSeparators = ["<", ">"]; }
|
|
45
|
-
var _a = __read(genericSeparators, 2), left = _a[0], right = _a[1];
|
|
46
|
-
var tok = [];
|
|
47
|
-
var word = "";
|
|
48
|
-
var nestedAngleBrackets = 0;
|
|
49
|
-
for (var i = 0; i < str.length; i++) {
|
|
50
|
-
var char = str[i];
|
|
51
|
-
if (char === left) {
|
|
52
|
-
nestedAngleBrackets++;
|
|
53
|
-
}
|
|
54
|
-
if (char === right) {
|
|
55
|
-
nestedAngleBrackets--;
|
|
56
|
-
}
|
|
57
|
-
if (nestedAngleBrackets === 0 && char === ",") {
|
|
58
|
-
tok.push(word.trim());
|
|
59
|
-
word = "";
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
word += char;
|
|
63
|
-
}
|
|
64
|
-
tok.push(word.trim());
|
|
65
|
-
return tok;
|
|
66
|
-
}
|
|
67
|
-
function parseTypeName(name) {
|
|
68
|
-
if (typeof name !== "string") {
|
|
69
|
-
throw new Error("Illegal type passed as a name of the type: ".concat(name));
|
|
70
|
-
}
|
|
71
|
-
var _a = __read(["<", ">"], 2), left = _a[0], right = _a[1];
|
|
72
|
-
var l_bound = name.indexOf(left);
|
|
73
|
-
var r_bound = Array.from(name).reverse().indexOf(right);
|
|
74
|
-
// if there are no generics - exit gracefully.
|
|
75
|
-
if (l_bound === -1 && r_bound === -1) {
|
|
76
|
-
return { typeName: name, typeArgs: [] };
|
|
77
|
-
}
|
|
78
|
-
// if one of the bounds is not defined - throw an Error.
|
|
79
|
-
if (l_bound === -1 || r_bound === -1) {
|
|
80
|
-
throw new Error("Unclosed generic in name '".concat(name, "'"));
|
|
81
|
-
}
|
|
82
|
-
var typeName = name.slice(0, l_bound);
|
|
83
|
-
var typeArgs = splitGenericParameters(name.slice(l_bound + 1, name.length - r_bound - 1), [left, right]);
|
|
84
|
-
return { typeName: typeName, typeArgs: typeArgs };
|
|
85
|
-
}
|
|
86
|
-
function isTransactionArgument(arg) {
|
|
87
|
-
if (!arg || typeof arg !== "object" || Array.isArray(arg)) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
return "GasCoin" in arg || "Input" in arg || "Result" in arg || "NestedResult" in arg;
|
|
91
|
-
}
|
|
92
|
-
function obj(tx, arg) {
|
|
93
|
-
return isTransactionArgument(arg) ? arg : tx.object(arg);
|
|
94
|
-
}
|
|
95
|
-
function pure(tx, arg, type) {
|
|
96
|
-
if (isTransactionArgument(arg)) {
|
|
97
|
-
return obj(tx, arg);
|
|
98
|
-
}
|
|
99
|
-
function getBcsForType(type) {
|
|
100
|
-
var _a = parseTypeName(type), typeName = _a.typeName, typeArgs = _a.typeArgs;
|
|
101
|
-
switch (typeName) {
|
|
102
|
-
case "bool":
|
|
103
|
-
return bcs_1.bcs.Bool;
|
|
104
|
-
case "u8":
|
|
105
|
-
return bcs_1.bcs.U8;
|
|
106
|
-
case "u16":
|
|
107
|
-
return bcs_1.bcs.U16;
|
|
108
|
-
case "u32":
|
|
109
|
-
return bcs_1.bcs.U32;
|
|
110
|
-
case "u64":
|
|
111
|
-
return bcs_1.bcs.U64;
|
|
112
|
-
case "u128":
|
|
113
|
-
return bcs_1.bcs.U128;
|
|
114
|
-
case "u256":
|
|
115
|
-
return bcs_1.bcs.U256;
|
|
116
|
-
case "address":
|
|
117
|
-
return bcs_1.bcs.Address;
|
|
118
|
-
case "0x1::string::String":
|
|
119
|
-
case "0x1::ascii::String":
|
|
120
|
-
return bcs_1.bcs.String;
|
|
121
|
-
case "0x2::object::ID":
|
|
122
|
-
return bcs_1.bcs.Address;
|
|
123
|
-
case "0x1::option::Option":
|
|
124
|
-
return bcs_1.bcs.option(getBcsForType(typeArgs[0]));
|
|
125
|
-
case "vector":
|
|
126
|
-
return bcs_1.bcs.vector(getBcsForType(typeArgs[0]));
|
|
127
|
-
default:
|
|
128
|
-
throw new Error("invalid primitive type ".concat(type));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function hasUndefinedOrNull(items) {
|
|
132
|
-
var e_1, _a;
|
|
133
|
-
try {
|
|
134
|
-
for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
|
|
135
|
-
var item = items_1_1.value;
|
|
136
|
-
if (typeof item === "undefined" || item === null) {
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
if (Array.isArray(item)) {
|
|
140
|
-
return hasUndefinedOrNull(item);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
145
|
-
finally {
|
|
146
|
-
try {
|
|
147
|
-
if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
|
|
148
|
-
}
|
|
149
|
-
finally { if (e_1) throw e_1.error; }
|
|
150
|
-
}
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
function consistsOnlyOfPrimitiveValues(items) {
|
|
154
|
-
var e_2, _a;
|
|
155
|
-
try {
|
|
156
|
-
for (var items_2 = __values(items), items_2_1 = items_2.next(); !items_2_1.done; items_2_1 = items_2.next()) {
|
|
157
|
-
var item = items_2_1.value;
|
|
158
|
-
if (!Array.isArray(item)) {
|
|
159
|
-
if (item === null) {
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
switch (typeof item) {
|
|
163
|
-
case "string":
|
|
164
|
-
case "number":
|
|
165
|
-
case "bigint":
|
|
166
|
-
case "boolean":
|
|
167
|
-
continue;
|
|
168
|
-
default:
|
|
169
|
-
return false;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
return consistsOnlyOfPrimitiveValues(item);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
176
|
-
finally {
|
|
177
|
-
try {
|
|
178
|
-
if (items_2_1 && !items_2_1.done && (_a = items_2.return)) _a.call(items_2);
|
|
179
|
-
}
|
|
180
|
-
finally { if (e_2) throw e_2.error; }
|
|
181
|
-
}
|
|
182
|
-
return true;
|
|
183
|
-
}
|
|
184
|
-
function hasPrimitiveValues(items) {
|
|
185
|
-
var e_3, _a;
|
|
186
|
-
try {
|
|
187
|
-
for (var items_3 = __values(items), items_3_1 = items_3.next(); !items_3_1.done; items_3_1 = items_3.next()) {
|
|
188
|
-
var item = items_3_1.value;
|
|
189
|
-
if (!Array.isArray(item)) {
|
|
190
|
-
switch (typeof item) {
|
|
191
|
-
case "string":
|
|
192
|
-
case "number":
|
|
193
|
-
case "bigint":
|
|
194
|
-
case "boolean":
|
|
195
|
-
return true;
|
|
196
|
-
default:
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return hasPrimitiveValues(item);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
204
|
-
finally {
|
|
205
|
-
try {
|
|
206
|
-
if (items_3_1 && !items_3_1.done && (_a = items_3.return)) _a.call(items_3);
|
|
207
|
-
}
|
|
208
|
-
finally { if (e_3) throw e_3.error; }
|
|
209
|
-
}
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
// handle some cases when TransactionArgument is nested within a vector or option
|
|
213
|
-
var _a = parseTypeName(type), typeName = _a.typeName, typeArgs = _a.typeArgs;
|
|
214
|
-
switch (typeName) {
|
|
215
|
-
case "0x1::option::Option":
|
|
216
|
-
if (arg === null) {
|
|
217
|
-
return tx.pure.option("bool", null); // 'bool' is arbitrary
|
|
218
|
-
}
|
|
219
|
-
if (consistsOnlyOfPrimitiveValues([arg])) {
|
|
220
|
-
return tx.pure(getBcsForType(type).serialize(arg));
|
|
221
|
-
}
|
|
222
|
-
if (hasPrimitiveValues([arg])) {
|
|
223
|
-
throw new Error("mixing primitive and TransactionArgument values is not supported");
|
|
224
|
-
}
|
|
225
|
-
// wrap it with some
|
|
226
|
-
return tx.moveCall({
|
|
227
|
-
target: "0x1::option::some",
|
|
228
|
-
typeArguments: [typeArgs[0]],
|
|
229
|
-
arguments: [pure(tx, arg, typeArgs[0])],
|
|
230
|
-
});
|
|
231
|
-
case "vector":
|
|
232
|
-
if (!Array.isArray(arg)) {
|
|
233
|
-
throw new Error("expected an array for vector type");
|
|
234
|
-
}
|
|
235
|
-
if (arg.length === 0) {
|
|
236
|
-
return tx.pure(bcs_1.bcs.vector(bcs_1.bcs.Bool).serialize([])); // bcs.Bool is arbitrary
|
|
237
|
-
}
|
|
238
|
-
if (hasUndefinedOrNull(arg)) {
|
|
239
|
-
throw new Error("the provided array contains undefined or null values");
|
|
240
|
-
}
|
|
241
|
-
if (consistsOnlyOfPrimitiveValues(arg)) {
|
|
242
|
-
return tx.pure(getBcsForType(type).serialize(arg));
|
|
243
|
-
}
|
|
244
|
-
if (hasPrimitiveValues(arg)) {
|
|
245
|
-
throw new Error("mixing primitive and TransactionArgument values is not supported");
|
|
246
|
-
}
|
|
247
|
-
return tx.makeMoveVec({
|
|
248
|
-
type: typeArgs[0],
|
|
249
|
-
elements: arg,
|
|
250
|
-
});
|
|
251
|
-
default:
|
|
252
|
-
return tx.pure(getBcsForType(type).serialize(arg));
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
function option(tx, type, arg) {
|
|
256
|
-
if (isTransactionArgument(arg)) {
|
|
257
|
-
return arg;
|
|
258
|
-
}
|
|
259
|
-
if (typeArgIsPure(type)) {
|
|
260
|
-
return pure(tx, arg, "0x1::option::Option<".concat(type, ">"));
|
|
261
|
-
}
|
|
262
|
-
if (arg === null) {
|
|
263
|
-
return tx.moveCall({
|
|
264
|
-
target: "0x1::option::none",
|
|
265
|
-
typeArguments: [type],
|
|
266
|
-
arguments: [],
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
// wrap it with some
|
|
270
|
-
var val = generic(tx, type, arg);
|
|
271
|
-
return tx.moveCall({
|
|
272
|
-
target: "0x1::option::some",
|
|
273
|
-
typeArguments: [type],
|
|
274
|
-
arguments: [val],
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
function generic(tx, type, arg) {
|
|
278
|
-
if (typeArgIsPure(type)) {
|
|
279
|
-
return pure(tx, arg, type);
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
var _a = parseTypeName(type), typeName = _a.typeName, typeArgs = _a.typeArgs;
|
|
283
|
-
if (typeName === "vector" && Array.isArray(arg)) {
|
|
284
|
-
var itemType = typeArgs[0];
|
|
285
|
-
return tx.makeMoveVec({
|
|
286
|
-
type: itemType,
|
|
287
|
-
elements: arg.map(function (item) { return obj(tx, item); }),
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
return obj(tx, arg);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
function vector(tx, itemType, items) {
|
|
296
|
-
if (typeof items === "function") {
|
|
297
|
-
throw new Error("Transaction plugins are not supported");
|
|
298
|
-
}
|
|
299
|
-
if (typeArgIsPure(itemType)) {
|
|
300
|
-
return pure(tx, items, "vector<".concat(itemType, ">"));
|
|
301
|
-
}
|
|
302
|
-
else if (isTransactionArgument(items)) {
|
|
303
|
-
return items;
|
|
304
|
-
}
|
|
305
|
-
else {
|
|
306
|
-
var _a = parseTypeName(itemType), itemTypeName = _a.typeName, itemTypeArgs_1 = _a.typeArgs;
|
|
307
|
-
if (itemTypeName === "0x1::option::Option") {
|
|
308
|
-
var elements = items.map(function (item) { return option(tx, itemTypeArgs_1[0], item); });
|
|
309
|
-
return tx.makeMoveVec({
|
|
310
|
-
type: itemType,
|
|
311
|
-
elements: elements,
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
return tx.makeMoveVec({
|
|
315
|
-
type: itemType,
|
|
316
|
-
elements: items,
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
function typeArgIsPure(type) {
|
|
321
|
-
var _a = parseTypeName(type), typeName = _a.typeName, typeArgs = _a.typeArgs;
|
|
322
|
-
switch (typeName) {
|
|
323
|
-
case "bool":
|
|
324
|
-
case "u8":
|
|
325
|
-
case "u16":
|
|
326
|
-
case "u32":
|
|
327
|
-
case "u64":
|
|
328
|
-
case "u128":
|
|
329
|
-
case "u256":
|
|
330
|
-
case "address":
|
|
331
|
-
case "signer":
|
|
332
|
-
return true;
|
|
333
|
-
case "vector":
|
|
334
|
-
return typeArgIsPure(typeArgs[0]);
|
|
335
|
-
case "0x1::string::String":
|
|
336
|
-
case "0x1::ascii::String":
|
|
337
|
-
case "0x2::object::ID":
|
|
338
|
-
return true;
|
|
339
|
-
case "0x1::option::Option":
|
|
340
|
-
return typeArgIsPure(typeArgs[0]);
|
|
341
|
-
default:
|
|
342
|
-
return false;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
function compressSuiAddress(addr) {
|
|
346
|
-
// remove leading zeros
|
|
347
|
-
var stripped = addr.split("0x").join("");
|
|
348
|
-
for (var i = 0; i < stripped.length; i++) {
|
|
349
|
-
if (stripped[i] !== "0") {
|
|
350
|
-
return "0x".concat(stripped.substring(i));
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
return "0x0";
|
|
354
|
-
}
|
|
355
|
-
// Recursively removes leading zeros from a type.
|
|
356
|
-
// e.g. `0x00000002::module::Name<0x00001::a::C>` -> `0x2::module::Name<0x1::a::C>`
|
|
357
|
-
function compressSuiType(type) {
|
|
358
|
-
var _a = parseTypeName(type), typeName = _a.typeName, typeArgs = _a.typeArgs;
|
|
359
|
-
switch (typeName) {
|
|
360
|
-
case "bool":
|
|
361
|
-
case "u8":
|
|
362
|
-
case "u16":
|
|
363
|
-
case "u32":
|
|
364
|
-
case "u64":
|
|
365
|
-
case "u128":
|
|
366
|
-
case "u256":
|
|
367
|
-
case "address":
|
|
368
|
-
case "signer":
|
|
369
|
-
return typeName;
|
|
370
|
-
case "vector":
|
|
371
|
-
return "vector<".concat(compressSuiType(typeArgs[0]), ">");
|
|
372
|
-
default: {
|
|
373
|
-
var tok = typeName.split("::");
|
|
374
|
-
tok[0] = compressSuiAddress(tok[0]);
|
|
375
|
-
var compressedName = tok.join("::");
|
|
376
|
-
if (typeArgs.length > 0) {
|
|
377
|
-
return "".concat(compressedName, "<").concat(typeArgs.map(function (typeArg) { return compressSuiType(typeArg); }).join(","), ">");
|
|
378
|
-
}
|
|
379
|
-
else {
|
|
380
|
-
return compressedName;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
function composeSuiType(typeName) {
|
|
386
|
-
var typeArgs = [];
|
|
387
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
388
|
-
typeArgs[_i - 1] = arguments[_i];
|
|
389
|
-
}
|
|
390
|
-
if (typeArgs.length > 0) {
|
|
391
|
-
return "".concat(typeName, "<").concat(typeArgs.join(", "), ">");
|
|
392
|
-
}
|
|
393
|
-
else {
|
|
394
|
-
return typeName;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Reified, ToField, ToTypeArgument, ToTypeStr, TypeArgument, VectorClass, VectorClassReified } from "./reified";
|
|
2
|
-
import { FieldsWithTypes } from "./util";
|
|
3
|
-
export type VectorElements<T extends TypeArgument> = Array<ToField<T>>;
|
|
4
|
-
export type VectorReified<T extends TypeArgument> = VectorClassReified<Vector<T>, VectorElements<T>>;
|
|
5
|
-
export declare class Vector<T extends TypeArgument> implements VectorClass {
|
|
6
|
-
__VectorClass: true;
|
|
7
|
-
static readonly $typeName = "vector";
|
|
8
|
-
static readonly $numTypeParams = 1;
|
|
9
|
-
static readonly $isPhantom: readonly [false];
|
|
10
|
-
readonly $typeName = "vector";
|
|
11
|
-
readonly $fullTypeName: `vector<${ToTypeStr<T>}>`;
|
|
12
|
-
readonly $typeArgs: [ToTypeStr<T>];
|
|
13
|
-
readonly $isPhantom: readonly [false];
|
|
14
|
-
readonly elements: Array<ToField<T>>;
|
|
15
|
-
constructor(typeArgs: [ToTypeStr<T>], elements: VectorElements<T>);
|
|
16
|
-
static reified<T extends Reified<TypeArgument, any>>(T: T): VectorReified<ToTypeArgument<T>>;
|
|
17
|
-
static get r(): typeof Vector.reified;
|
|
18
|
-
static get bcs(): <T, Input>(type: import("@mysten/sui/bcs").BcsType<T, Input>, options?: import("@mysten/sui/bcs").BcsTypeOptions<T[], Iterable<Input> & {
|
|
19
|
-
length: number;
|
|
20
|
-
}>) => import("@mysten/sui/bcs").BcsType<T[], Iterable<Input> & {
|
|
21
|
-
length: number;
|
|
22
|
-
}>;
|
|
23
|
-
static fromFields<T extends Reified<TypeArgument, any>>(typeArg: T, elements: any[]): Vector<ToTypeArgument<T>>;
|
|
24
|
-
static fromFieldsWithTypes<T extends Reified<TypeArgument, any>>(typeArg: T, item: FieldsWithTypes): Vector<ToTypeArgument<T>>;
|
|
25
|
-
static fromBcs<T extends Reified<TypeArgument, any>>(typeArg: T, data: Uint8Array): Vector<ToTypeArgument<T>>;
|
|
26
|
-
toJSONField(): import("./reified").ToJSON<T>[];
|
|
27
|
-
toJSON(): {
|
|
28
|
-
$typeName: string;
|
|
29
|
-
$typeArgs: [ToTypeStr<T>];
|
|
30
|
-
elements: import("./reified").ToJSON<T>[];
|
|
31
|
-
};
|
|
32
|
-
static fromJSONField<T extends Reified<TypeArgument, any>>(typeArg: T, field: any[]): Vector<ToTypeArgument<T>>;
|
|
33
|
-
static fromJSON<T extends Reified<TypeArgument, any>>(typeArg: T, json: any): Vector<ToTypeArgument<T>>;
|
|
34
|
-
}
|
|
35
|
-
export declare function vector<T extends Reified<TypeArgument, any>>(T: T): VectorClassReified<Vector<ToTypeArgument<T>>, VectorElements<ToTypeArgument<T>>>;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
-
if (!m) return o;
|
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
|
6
|
-
try {
|
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
-
if (ar || !(i in from)) {
|
|
21
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
-
ar[i] = from[i];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.Vector = void 0;
|
|
29
|
-
exports.vector = vector;
|
|
30
|
-
var bcs_1 = require("@mysten/sui/bcs");
|
|
31
|
-
var reified_1 = require("./reified");
|
|
32
|
-
var util_1 = require("./util");
|
|
33
|
-
var Vector = /** @class */ (function () {
|
|
34
|
-
function Vector(typeArgs, elements) {
|
|
35
|
-
this.__VectorClass = true;
|
|
36
|
-
this.$typeName = "vector";
|
|
37
|
-
this.$isPhantom = [false];
|
|
38
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([this.$typeName], __read(typeArgs), false));
|
|
39
|
-
this.$typeArgs = typeArgs;
|
|
40
|
-
this.elements = elements;
|
|
41
|
-
}
|
|
42
|
-
Vector.reified = function (T) {
|
|
43
|
-
return {
|
|
44
|
-
typeName: Vector.$typeName,
|
|
45
|
-
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Vector.$typeName], [(0, reified_1.extractType)(T)], false)),
|
|
46
|
-
typeArgs: [(0, reified_1.extractType)(T)],
|
|
47
|
-
isPhantom: Vector.$isPhantom,
|
|
48
|
-
reifiedTypeArgs: [T],
|
|
49
|
-
fromFields: function (elements) { return Vector.fromFields(T, elements); },
|
|
50
|
-
fromFieldsWithTypes: function (item) { return Vector.fromFieldsWithTypes(T, item); },
|
|
51
|
-
fromBcs: function (data) { return Vector.fromBcs(T, data); },
|
|
52
|
-
bcs: Vector.bcs((0, reified_1.toBcs)(T)),
|
|
53
|
-
fromJSONField: function (field) { return Vector.fromJSONField(T, field); },
|
|
54
|
-
fromJSON: function (json) { return Vector.fromJSON(T, json); },
|
|
55
|
-
new: function (elements) {
|
|
56
|
-
return new Vector([(0, reified_1.extractType)(T)], elements);
|
|
57
|
-
},
|
|
58
|
-
kind: "VectorClassReified",
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
Object.defineProperty(Vector, "r", {
|
|
62
|
-
get: function () {
|
|
63
|
-
return Vector.reified;
|
|
64
|
-
},
|
|
65
|
-
enumerable: false,
|
|
66
|
-
configurable: true
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(Vector, "bcs", {
|
|
69
|
-
get: function () {
|
|
70
|
-
return bcs_1.bcs.vector;
|
|
71
|
-
},
|
|
72
|
-
enumerable: false,
|
|
73
|
-
configurable: true
|
|
74
|
-
});
|
|
75
|
-
Vector.fromFields = function (typeArg, elements) {
|
|
76
|
-
return Vector.reified(typeArg).new(elements.map(function (element) { return (0, reified_1.decodeFromFields)(typeArg, element); }));
|
|
77
|
-
};
|
|
78
|
-
Vector.fromFieldsWithTypes = function (typeArg, item) {
|
|
79
|
-
return Vector.reified(typeArg).new(item.map(function (field) { return (0, reified_1.decodeFromFieldsWithTypes)(typeArg, field); }));
|
|
80
|
-
};
|
|
81
|
-
Vector.fromBcs = function (typeArg, data) {
|
|
82
|
-
return Vector.fromFields(typeArg, Vector.bcs((0, reified_1.toBcs)(typeArg)).parse(data));
|
|
83
|
-
};
|
|
84
|
-
Vector.prototype.toJSONField = function () {
|
|
85
|
-
var _this = this;
|
|
86
|
-
return this.elements.map(function (element) { return (0, reified_1.fieldToJSON)(_this.$typeArgs[0], element); });
|
|
87
|
-
};
|
|
88
|
-
Vector.prototype.toJSON = function () {
|
|
89
|
-
return {
|
|
90
|
-
$typeName: this.$typeName,
|
|
91
|
-
$typeArgs: this.$typeArgs,
|
|
92
|
-
elements: this.toJSONField(),
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
Vector.fromJSONField = function (typeArg, field) {
|
|
96
|
-
return Vector.reified(typeArg).new(field.map(function (field) { return (0, reified_1.decodeFromJSONField)(typeArg, field); }));
|
|
97
|
-
};
|
|
98
|
-
Vector.fromJSON = function (typeArg, json) {
|
|
99
|
-
if (json.$typeName !== Vector.$typeName) {
|
|
100
|
-
throw new Error("not a vector json object");
|
|
101
|
-
}
|
|
102
|
-
return Vector.fromJSONField(typeArg, json.elements);
|
|
103
|
-
};
|
|
104
|
-
Vector.$typeName = "vector";
|
|
105
|
-
Vector.$numTypeParams = 1;
|
|
106
|
-
Vector.$isPhantom = [false];
|
|
107
|
-
return Vector;
|
|
108
|
-
}());
|
|
109
|
-
exports.Vector = Vector;
|
|
110
|
-
function vector(T) {
|
|
111
|
-
return Vector.r(T);
|
|
112
|
-
}
|
package/dist/src/pyth.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui/transactions";
|
|
2
|
-
export interface AddAuthorizedUserArgs {
|
|
3
|
-
version: TransactionObjectInput;
|
|
4
|
-
userAddress: string | TransactionArgument;
|
|
5
|
-
}
|
|
6
|
-
export declare function addAuthorizedUser(tx: Transaction, args: AddAuthorizedUserArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
7
|
-
export interface AddCompetitionLeaderboardArgs {
|
|
8
|
-
version: TransactionObjectInput;
|
|
9
|
-
typusEcosystemVersion: TransactionObjectInput;
|
|
10
|
-
typusLeaderboardRegistry: TransactionObjectInput;
|
|
11
|
-
leaderboardKey: string | TransactionArgument;
|
|
12
|
-
user: string | TransactionArgument;
|
|
13
|
-
score: bigint | TransactionArgument;
|
|
14
|
-
clock: TransactionObjectInput;
|
|
15
|
-
}
|
|
16
|
-
export declare function addCompetitionLeaderboard(tx: Transaction, args: AddCompetitionLeaderboardArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
17
|
-
export interface AddExpLeaderboardArgs {
|
|
18
|
-
version: TransactionObjectInput;
|
|
19
|
-
typusEcosystemVersion: TransactionObjectInput;
|
|
20
|
-
typusLeaderboardRegistry: TransactionObjectInput;
|
|
21
|
-
user: string | TransactionArgument;
|
|
22
|
-
score: bigint | TransactionArgument;
|
|
23
|
-
clock: TransactionObjectInput;
|
|
24
|
-
}
|
|
25
|
-
export declare function addExpLeaderboard(tx: Transaction, args: AddExpLeaderboardArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
26
|
-
export interface AddTailsExpAmountArgs {
|
|
27
|
-
version: TransactionObjectInput;
|
|
28
|
-
typusEcosystemVersion: TransactionObjectInput;
|
|
29
|
-
typusUserRegistry: TransactionObjectInput;
|
|
30
|
-
user: string | TransactionArgument;
|
|
31
|
-
amount: bigint | TransactionArgument;
|
|
32
|
-
}
|
|
33
|
-
export declare function addTailsExpAmount(tx: Transaction, args: AddTailsExpAmountArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
34
|
-
export interface ChargeFeeArgs {
|
|
35
|
-
version: TransactionObjectInput;
|
|
36
|
-
balance: TransactionObjectInput;
|
|
37
|
-
}
|
|
38
|
-
export declare function chargeFee(tx: Transaction, typeArg: string, args: ChargeFeeArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
39
|
-
export interface ChargeLiquidatorFeeArgs {
|
|
40
|
-
version: TransactionObjectInput;
|
|
41
|
-
balance: TransactionObjectInput;
|
|
42
|
-
}
|
|
43
|
-
export declare function chargeLiquidatorFee(tx: Transaction, typeArg: string, args: ChargeLiquidatorFeeArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
44
|
-
export declare function init(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
45
|
-
export interface InstallEcosystemManagerCapEntryArgs {
|
|
46
|
-
version: TransactionObjectInput;
|
|
47
|
-
typusEcosystemVersion: TransactionObjectInput;
|
|
48
|
-
}
|
|
49
|
-
export declare function installEcosystemManagerCapEntry(tx: Transaction, args: InstallEcosystemManagerCapEntryArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
50
|
-
export interface RemoveAuthorizedUserArgs {
|
|
51
|
-
version: TransactionObjectInput;
|
|
52
|
-
userAddress: string | TransactionArgument;
|
|
53
|
-
}
|
|
54
|
-
export declare function removeAuthorizedUser(tx: Transaction, args: RemoveAuthorizedUserArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
55
|
-
export declare function sendFee(tx: Transaction, typeArg: string, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
56
|
-
export declare function sendLiquidatorFee(tx: Transaction, typeArg: string, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
57
|
-
export declare function upgrade(tx: Transaction, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
58
|
-
export declare function verify(tx: Transaction, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
59
|
-
export declare function versionCheck(tx: Transaction, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|