@typus/typus-perp-sdk 1.1.29 → 1.1.30-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 +1 -4
- package/dist/src/index.js +21 -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 +12 -3
- 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,448 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
47
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
48
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
49
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
50
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
51
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
52
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
56
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
57
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
58
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
59
|
-
function step(op) {
|
|
60
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
61
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
62
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
63
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
64
|
-
switch (op[0]) {
|
|
65
|
-
case 0: case 1: t = op; break;
|
|
66
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
67
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
68
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
69
|
-
default:
|
|
70
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
71
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
72
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
73
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
74
|
-
if (t[2]) _.ops.pop();
|
|
75
|
-
_.trys.pop(); continue;
|
|
76
|
-
}
|
|
77
|
-
op = body.call(thisArg, _);
|
|
78
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
79
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
83
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
84
|
-
if (!m) return o;
|
|
85
|
-
var i = m.call(o), r, ar = [], e;
|
|
86
|
-
try {
|
|
87
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
88
|
-
}
|
|
89
|
-
catch (error) { e = { error: error }; }
|
|
90
|
-
finally {
|
|
91
|
-
try {
|
|
92
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
93
|
-
}
|
|
94
|
-
finally { if (e) throw e.error; }
|
|
95
|
-
}
|
|
96
|
-
return ar;
|
|
97
|
-
};
|
|
98
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
99
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
100
|
-
if (ar || !(i in from)) {
|
|
101
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
102
|
-
ar[i] = from[i];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
106
|
-
};
|
|
107
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
108
|
-
exports.UserAccountCap = exports.UserAccount = void 0;
|
|
109
|
-
exports.isUserAccount = isUserAccount;
|
|
110
|
-
exports.isUserAccountCap = isUserAccountCap;
|
|
111
|
-
var reified = __importStar(require("../../_framework/reified"));
|
|
112
|
-
var structs_1 = require("../../_dependencies/source/0x1/type-name/structs");
|
|
113
|
-
var structs_2 = require("../../_dependencies/source/0x2/object/structs");
|
|
114
|
-
var reified_1 = require("../../_framework/reified");
|
|
115
|
-
var util_1 = require("../../_framework/util");
|
|
116
|
-
var index_1 = require("../index");
|
|
117
|
-
var bcs_1 = require("@mysten/sui/bcs");
|
|
118
|
-
var utils_1 = require("@mysten/sui/utils");
|
|
119
|
-
/* ============================== UserAccount =============================== */
|
|
120
|
-
function isUserAccount(type) {
|
|
121
|
-
type = (0, util_1.compressSuiType)(type);
|
|
122
|
-
return type === "".concat(index_1.PKG_V1, "::user_account::UserAccount");
|
|
123
|
-
}
|
|
124
|
-
var UserAccount = /** @class */ (function () {
|
|
125
|
-
function UserAccount(typeArgs, fields) {
|
|
126
|
-
this.__StructClass = true;
|
|
127
|
-
this.$typeName = UserAccount.$typeName;
|
|
128
|
-
this.$isPhantom = UserAccount.$isPhantom;
|
|
129
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UserAccount.$typeName], __read(typeArgs), false));
|
|
130
|
-
this.$typeArgs = typeArgs;
|
|
131
|
-
this.id = fields.id;
|
|
132
|
-
this.owner = fields.owner;
|
|
133
|
-
this.delegateUser = fields.delegateUser;
|
|
134
|
-
this.symbols = fields.symbols;
|
|
135
|
-
this.u64Padding = fields.u64Padding;
|
|
136
|
-
}
|
|
137
|
-
UserAccount.reified = function () {
|
|
138
|
-
var _this = this;
|
|
139
|
-
return {
|
|
140
|
-
typeName: UserAccount.$typeName,
|
|
141
|
-
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UserAccount.$typeName], [], false)),
|
|
142
|
-
typeArgs: [],
|
|
143
|
-
isPhantom: UserAccount.$isPhantom,
|
|
144
|
-
reifiedTypeArgs: [],
|
|
145
|
-
fromFields: function (fields) { return UserAccount.fromFields(fields); },
|
|
146
|
-
fromFieldsWithTypes: function (item) { return UserAccount.fromFieldsWithTypes(item); },
|
|
147
|
-
fromBcs: function (data) { return UserAccount.fromBcs(data); },
|
|
148
|
-
bcs: UserAccount.bcs,
|
|
149
|
-
fromJSONField: function (field) { return UserAccount.fromJSONField(field); },
|
|
150
|
-
fromJSON: function (json) { return UserAccount.fromJSON(json); },
|
|
151
|
-
fromSuiParsedData: function (content) { return UserAccount.fromSuiParsedData(content); },
|
|
152
|
-
fromSuiObjectData: function (content) { return UserAccount.fromSuiObjectData(content); },
|
|
153
|
-
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
154
|
-
return [2 /*return*/, UserAccount.fetch(client, id)];
|
|
155
|
-
}); }); },
|
|
156
|
-
new: function (fields) {
|
|
157
|
-
return new UserAccount([], fields);
|
|
158
|
-
},
|
|
159
|
-
kind: "StructClassReified",
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
Object.defineProperty(UserAccount, "r", {
|
|
163
|
-
get: function () {
|
|
164
|
-
return UserAccount.reified();
|
|
165
|
-
},
|
|
166
|
-
enumerable: false,
|
|
167
|
-
configurable: true
|
|
168
|
-
});
|
|
169
|
-
UserAccount.phantom = function () {
|
|
170
|
-
return (0, reified_1.phantom)(UserAccount.reified());
|
|
171
|
-
};
|
|
172
|
-
Object.defineProperty(UserAccount, "p", {
|
|
173
|
-
get: function () {
|
|
174
|
-
return UserAccount.phantom();
|
|
175
|
-
},
|
|
176
|
-
enumerable: false,
|
|
177
|
-
configurable: true
|
|
178
|
-
});
|
|
179
|
-
Object.defineProperty(UserAccount, "bcs", {
|
|
180
|
-
get: function () {
|
|
181
|
-
return bcs_1.bcs.struct("UserAccount", {
|
|
182
|
-
id: structs_2.UID.bcs,
|
|
183
|
-
owner: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, utils_1.fromHEX)(val); }, output: function (val) { return (0, utils_1.toHEX)(val); } }),
|
|
184
|
-
delegate_user: bcs_1.bcs.vector(bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, utils_1.fromHEX)(val); }, output: function (val) { return (0, utils_1.toHEX)(val); } })),
|
|
185
|
-
symbols: bcs_1.bcs.vector(structs_1.TypeName.bcs),
|
|
186
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
187
|
-
});
|
|
188
|
-
},
|
|
189
|
-
enumerable: false,
|
|
190
|
-
configurable: true
|
|
191
|
-
});
|
|
192
|
-
UserAccount.fromFields = function (fields) {
|
|
193
|
-
return UserAccount.reified().new({
|
|
194
|
-
id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
|
|
195
|
-
owner: (0, reified_1.decodeFromFields)("address", fields.owner),
|
|
196
|
-
delegateUser: (0, reified_1.decodeFromFields)(reified.vector("address"), fields.delegate_user),
|
|
197
|
-
symbols: (0, reified_1.decodeFromFields)(reified.vector(structs_1.TypeName.reified()), fields.symbols),
|
|
198
|
-
u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
UserAccount.fromFieldsWithTypes = function (item) {
|
|
202
|
-
if (!isUserAccount(item.type)) {
|
|
203
|
-
throw new Error("not a UserAccount type");
|
|
204
|
-
}
|
|
205
|
-
return UserAccount.reified().new({
|
|
206
|
-
id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
|
|
207
|
-
owner: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.owner),
|
|
208
|
-
delegateUser: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("address"), item.fields.delegate_user),
|
|
209
|
-
symbols: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(structs_1.TypeName.reified()), item.fields.symbols),
|
|
210
|
-
u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
UserAccount.fromBcs = function (data) {
|
|
214
|
-
return UserAccount.fromFields(UserAccount.bcs.parse(data));
|
|
215
|
-
};
|
|
216
|
-
UserAccount.prototype.toJSONField = function () {
|
|
217
|
-
return {
|
|
218
|
-
id: this.id,
|
|
219
|
-
owner: this.owner,
|
|
220
|
-
delegateUser: (0, reified_1.fieldToJSON)("vector<address>", this.delegateUser),
|
|
221
|
-
symbols: (0, reified_1.fieldToJSON)("vector<".concat(structs_1.TypeName.$typeName, ">"), this.symbols),
|
|
222
|
-
u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
UserAccount.prototype.toJSON = function () {
|
|
226
|
-
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
227
|
-
};
|
|
228
|
-
UserAccount.fromJSONField = function (field) {
|
|
229
|
-
return UserAccount.reified().new({
|
|
230
|
-
id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
|
|
231
|
-
owner: (0, reified_1.decodeFromJSONField)("address", field.owner),
|
|
232
|
-
delegateUser: (0, reified_1.decodeFromJSONField)(reified.vector("address"), field.delegateUser),
|
|
233
|
-
symbols: (0, reified_1.decodeFromJSONField)(reified.vector(structs_1.TypeName.reified()), field.symbols),
|
|
234
|
-
u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
|
|
235
|
-
});
|
|
236
|
-
};
|
|
237
|
-
UserAccount.fromJSON = function (json) {
|
|
238
|
-
if (json.$typeName !== UserAccount.$typeName) {
|
|
239
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
240
|
-
}
|
|
241
|
-
return UserAccount.fromJSONField(json);
|
|
242
|
-
};
|
|
243
|
-
UserAccount.fromSuiParsedData = function (content) {
|
|
244
|
-
if (content.dataType !== "moveObject") {
|
|
245
|
-
throw new Error("not an object");
|
|
246
|
-
}
|
|
247
|
-
if (!isUserAccount(content.type)) {
|
|
248
|
-
throw new Error("object at ".concat(content.fields.id, " is not a UserAccount object"));
|
|
249
|
-
}
|
|
250
|
-
return UserAccount.fromFieldsWithTypes(content);
|
|
251
|
-
};
|
|
252
|
-
UserAccount.fromSuiObjectData = function (data) {
|
|
253
|
-
if (data.bcs) {
|
|
254
|
-
if (data.bcs.dataType !== "moveObject" || !isUserAccount(data.bcs.type)) {
|
|
255
|
-
throw new Error("object at is not a UserAccount object");
|
|
256
|
-
}
|
|
257
|
-
return UserAccount.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
258
|
-
}
|
|
259
|
-
if (data.content) {
|
|
260
|
-
return UserAccount.fromSuiParsedData(data.content);
|
|
261
|
-
}
|
|
262
|
-
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
263
|
-
};
|
|
264
|
-
UserAccount.fetch = function (client, id) {
|
|
265
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
266
|
-
var res;
|
|
267
|
-
var _a, _b;
|
|
268
|
-
return __generator(this, function (_c) {
|
|
269
|
-
switch (_c.label) {
|
|
270
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
271
|
-
case 1:
|
|
272
|
-
res = _c.sent();
|
|
273
|
-
if (res.error) {
|
|
274
|
-
throw new Error("error fetching UserAccount object at id ".concat(id, ": ").concat(res.error.code));
|
|
275
|
-
}
|
|
276
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUserAccount(res.data.bcs.type)) {
|
|
277
|
-
throw new Error("object at id ".concat(id, " is not a UserAccount object"));
|
|
278
|
-
}
|
|
279
|
-
return [2 /*return*/, UserAccount.fromSuiObjectData(res.data)];
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
};
|
|
284
|
-
UserAccount.$typeName = "".concat(index_1.PKG_V1, "::user_account::UserAccount");
|
|
285
|
-
UserAccount.$numTypeParams = 0;
|
|
286
|
-
UserAccount.$isPhantom = [];
|
|
287
|
-
return UserAccount;
|
|
288
|
-
}());
|
|
289
|
-
exports.UserAccount = UserAccount;
|
|
290
|
-
/* ============================== UserAccountCap =============================== */
|
|
291
|
-
function isUserAccountCap(type) {
|
|
292
|
-
type = (0, util_1.compressSuiType)(type);
|
|
293
|
-
return type === "".concat(index_1.PKG_V1, "::user_account::UserAccountCap");
|
|
294
|
-
}
|
|
295
|
-
var UserAccountCap = /** @class */ (function () {
|
|
296
|
-
function UserAccountCap(typeArgs, fields) {
|
|
297
|
-
this.__StructClass = true;
|
|
298
|
-
this.$typeName = UserAccountCap.$typeName;
|
|
299
|
-
this.$isPhantom = UserAccountCap.$isPhantom;
|
|
300
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UserAccountCap.$typeName], __read(typeArgs), false));
|
|
301
|
-
this.$typeArgs = typeArgs;
|
|
302
|
-
this.id = fields.id;
|
|
303
|
-
this.owner = fields.owner;
|
|
304
|
-
this.userAccountId = fields.userAccountId;
|
|
305
|
-
}
|
|
306
|
-
UserAccountCap.reified = function () {
|
|
307
|
-
var _this = this;
|
|
308
|
-
return {
|
|
309
|
-
typeName: UserAccountCap.$typeName,
|
|
310
|
-
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UserAccountCap.$typeName], [], false)),
|
|
311
|
-
typeArgs: [],
|
|
312
|
-
isPhantom: UserAccountCap.$isPhantom,
|
|
313
|
-
reifiedTypeArgs: [],
|
|
314
|
-
fromFields: function (fields) { return UserAccountCap.fromFields(fields); },
|
|
315
|
-
fromFieldsWithTypes: function (item) { return UserAccountCap.fromFieldsWithTypes(item); },
|
|
316
|
-
fromBcs: function (data) { return UserAccountCap.fromBcs(data); },
|
|
317
|
-
bcs: UserAccountCap.bcs,
|
|
318
|
-
fromJSONField: function (field) { return UserAccountCap.fromJSONField(field); },
|
|
319
|
-
fromJSON: function (json) { return UserAccountCap.fromJSON(json); },
|
|
320
|
-
fromSuiParsedData: function (content) { return UserAccountCap.fromSuiParsedData(content); },
|
|
321
|
-
fromSuiObjectData: function (content) { return UserAccountCap.fromSuiObjectData(content); },
|
|
322
|
-
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
323
|
-
return [2 /*return*/, UserAccountCap.fetch(client, id)];
|
|
324
|
-
}); }); },
|
|
325
|
-
new: function (fields) {
|
|
326
|
-
return new UserAccountCap([], fields);
|
|
327
|
-
},
|
|
328
|
-
kind: "StructClassReified",
|
|
329
|
-
};
|
|
330
|
-
};
|
|
331
|
-
Object.defineProperty(UserAccountCap, "r", {
|
|
332
|
-
get: function () {
|
|
333
|
-
return UserAccountCap.reified();
|
|
334
|
-
},
|
|
335
|
-
enumerable: false,
|
|
336
|
-
configurable: true
|
|
337
|
-
});
|
|
338
|
-
UserAccountCap.phantom = function () {
|
|
339
|
-
return (0, reified_1.phantom)(UserAccountCap.reified());
|
|
340
|
-
};
|
|
341
|
-
Object.defineProperty(UserAccountCap, "p", {
|
|
342
|
-
get: function () {
|
|
343
|
-
return UserAccountCap.phantom();
|
|
344
|
-
},
|
|
345
|
-
enumerable: false,
|
|
346
|
-
configurable: true
|
|
347
|
-
});
|
|
348
|
-
Object.defineProperty(UserAccountCap, "bcs", {
|
|
349
|
-
get: function () {
|
|
350
|
-
return bcs_1.bcs.struct("UserAccountCap", {
|
|
351
|
-
id: structs_2.UID.bcs,
|
|
352
|
-
owner: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, utils_1.fromHEX)(val); }, output: function (val) { return (0, utils_1.toHEX)(val); } }),
|
|
353
|
-
user_account_id: structs_2.ID.bcs,
|
|
354
|
-
});
|
|
355
|
-
},
|
|
356
|
-
enumerable: false,
|
|
357
|
-
configurable: true
|
|
358
|
-
});
|
|
359
|
-
UserAccountCap.fromFields = function (fields) {
|
|
360
|
-
return UserAccountCap.reified().new({
|
|
361
|
-
id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
|
|
362
|
-
owner: (0, reified_1.decodeFromFields)("address", fields.owner),
|
|
363
|
-
userAccountId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.user_account_id),
|
|
364
|
-
});
|
|
365
|
-
};
|
|
366
|
-
UserAccountCap.fromFieldsWithTypes = function (item) {
|
|
367
|
-
if (!isUserAccountCap(item.type)) {
|
|
368
|
-
throw new Error("not a UserAccountCap type");
|
|
369
|
-
}
|
|
370
|
-
return UserAccountCap.reified().new({
|
|
371
|
-
id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
|
|
372
|
-
owner: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.owner),
|
|
373
|
-
userAccountId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.user_account_id),
|
|
374
|
-
});
|
|
375
|
-
};
|
|
376
|
-
UserAccountCap.fromBcs = function (data) {
|
|
377
|
-
return UserAccountCap.fromFields(UserAccountCap.bcs.parse(data));
|
|
378
|
-
};
|
|
379
|
-
UserAccountCap.prototype.toJSONField = function () {
|
|
380
|
-
return {
|
|
381
|
-
id: this.id,
|
|
382
|
-
owner: this.owner,
|
|
383
|
-
userAccountId: this.userAccountId,
|
|
384
|
-
};
|
|
385
|
-
};
|
|
386
|
-
UserAccountCap.prototype.toJSON = function () {
|
|
387
|
-
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
388
|
-
};
|
|
389
|
-
UserAccountCap.fromJSONField = function (field) {
|
|
390
|
-
return UserAccountCap.reified().new({
|
|
391
|
-
id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
|
|
392
|
-
owner: (0, reified_1.decodeFromJSONField)("address", field.owner),
|
|
393
|
-
userAccountId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.userAccountId),
|
|
394
|
-
});
|
|
395
|
-
};
|
|
396
|
-
UserAccountCap.fromJSON = function (json) {
|
|
397
|
-
if (json.$typeName !== UserAccountCap.$typeName) {
|
|
398
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
399
|
-
}
|
|
400
|
-
return UserAccountCap.fromJSONField(json);
|
|
401
|
-
};
|
|
402
|
-
UserAccountCap.fromSuiParsedData = function (content) {
|
|
403
|
-
if (content.dataType !== "moveObject") {
|
|
404
|
-
throw new Error("not an object");
|
|
405
|
-
}
|
|
406
|
-
if (!isUserAccountCap(content.type)) {
|
|
407
|
-
throw new Error("object at ".concat(content.fields.id, " is not a UserAccountCap object"));
|
|
408
|
-
}
|
|
409
|
-
return UserAccountCap.fromFieldsWithTypes(content);
|
|
410
|
-
};
|
|
411
|
-
UserAccountCap.fromSuiObjectData = function (data) {
|
|
412
|
-
if (data.bcs) {
|
|
413
|
-
if (data.bcs.dataType !== "moveObject" || !isUserAccountCap(data.bcs.type)) {
|
|
414
|
-
throw new Error("object at is not a UserAccountCap object");
|
|
415
|
-
}
|
|
416
|
-
return UserAccountCap.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
417
|
-
}
|
|
418
|
-
if (data.content) {
|
|
419
|
-
return UserAccountCap.fromSuiParsedData(data.content);
|
|
420
|
-
}
|
|
421
|
-
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
422
|
-
};
|
|
423
|
-
UserAccountCap.fetch = function (client, id) {
|
|
424
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
425
|
-
var res;
|
|
426
|
-
var _a, _b;
|
|
427
|
-
return __generator(this, function (_c) {
|
|
428
|
-
switch (_c.label) {
|
|
429
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
430
|
-
case 1:
|
|
431
|
-
res = _c.sent();
|
|
432
|
-
if (res.error) {
|
|
433
|
-
throw new Error("error fetching UserAccountCap object at id ".concat(id, ": ").concat(res.error.code));
|
|
434
|
-
}
|
|
435
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUserAccountCap(res.data.bcs.type)) {
|
|
436
|
-
throw new Error("object at id ".concat(id, " is not a UserAccountCap object"));
|
|
437
|
-
}
|
|
438
|
-
return [2 /*return*/, UserAccountCap.fromSuiObjectData(res.data)];
|
|
439
|
-
}
|
|
440
|
-
});
|
|
441
|
-
});
|
|
442
|
-
};
|
|
443
|
-
UserAccountCap.$typeName = "".concat(index_1.PKG_V1, "::user_account::UserAccountCap");
|
|
444
|
-
UserAccountCap.$numTypeParams = 0;
|
|
445
|
-
UserAccountCap.$isPhantom = [];
|
|
446
|
-
return UserAccountCap;
|
|
447
|
-
}());
|
|
448
|
-
exports.UserAccountCap = UserAccountCap;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui/transactions";
|
|
2
|
-
export declare function versionCheck(tx: Transaction, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
3
|
-
export declare function upgrade(tx: Transaction, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
4
|
-
export declare function init(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
5
|
-
export declare function verify(tx: Transaction, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
6
|
-
export interface AddAuthorizedUserArgs {
|
|
7
|
-
version: TransactionObjectInput;
|
|
8
|
-
userAddress: string | TransactionArgument;
|
|
9
|
-
}
|
|
10
|
-
export declare function addAuthorizedUser(tx: Transaction, args: AddAuthorizedUserArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
11
|
-
export interface RemoveAuthorizedUserArgs {
|
|
12
|
-
version: TransactionObjectInput;
|
|
13
|
-
userAddress: string | TransactionArgument;
|
|
14
|
-
}
|
|
15
|
-
export declare function removeAuthorizedUser(tx: Transaction, args: RemoveAuthorizedUserArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
16
|
-
export interface InstallEcosystemManagerCapEntryArgs {
|
|
17
|
-
version: TransactionObjectInput;
|
|
18
|
-
typusEcosystemVersion: TransactionObjectInput;
|
|
19
|
-
}
|
|
20
|
-
export declare function installEcosystemManagerCapEntry(tx: Transaction, args: InstallEcosystemManagerCapEntryArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
21
|
-
export interface AddTailsExpAmountArgs {
|
|
22
|
-
version: TransactionObjectInput;
|
|
23
|
-
typusEcosystemVersion: TransactionObjectInput;
|
|
24
|
-
typusUserRegistry: TransactionObjectInput;
|
|
25
|
-
user: string | TransactionArgument;
|
|
26
|
-
amount: bigint | TransactionArgument;
|
|
27
|
-
}
|
|
28
|
-
export declare function addTailsExpAmount(tx: Transaction, args: AddTailsExpAmountArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
29
|
-
export interface AddExpLeaderboardArgs {
|
|
30
|
-
version: TransactionObjectInput;
|
|
31
|
-
typusEcosystemVersion: TransactionObjectInput;
|
|
32
|
-
typusLeaderboardRegistry: TransactionObjectInput;
|
|
33
|
-
user: string | TransactionArgument;
|
|
34
|
-
score: bigint | TransactionArgument;
|
|
35
|
-
clock: TransactionObjectInput;
|
|
36
|
-
}
|
|
37
|
-
export declare function addExpLeaderboard(tx: Transaction, args: AddExpLeaderboardArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
38
|
-
export declare function sendFee(tx: Transaction, typeArg: string, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
39
|
-
export interface ChargeFeeArgs {
|
|
40
|
-
version: TransactionObjectInput;
|
|
41
|
-
balance: TransactionObjectInput;
|
|
42
|
-
}
|
|
43
|
-
export declare function chargeFee(tx: Transaction, typeArg: string, args: ChargeFeeArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
44
|
-
export declare function sendLiquidatorFee(tx: Transaction, typeArg: string, version: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
45
|
-
export interface ChargeLiquidatorFeeArgs {
|
|
46
|
-
version: TransactionObjectInput;
|
|
47
|
-
balance: TransactionObjectInput;
|
|
48
|
-
}
|
|
49
|
-
export declare function chargeLiquidatorFee(tx: Transaction, typeArg: string, args: ChargeLiquidatorFeeArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.versionCheck = versionCheck;
|
|
4
|
-
exports.upgrade = upgrade;
|
|
5
|
-
exports.init = init;
|
|
6
|
-
exports.verify = verify;
|
|
7
|
-
exports.addAuthorizedUser = addAuthorizedUser;
|
|
8
|
-
exports.removeAuthorizedUser = removeAuthorizedUser;
|
|
9
|
-
exports.installEcosystemManagerCapEntry = installEcosystemManagerCapEntry;
|
|
10
|
-
exports.addTailsExpAmount = addTailsExpAmount;
|
|
11
|
-
exports.addExpLeaderboard = addExpLeaderboard;
|
|
12
|
-
exports.sendFee = sendFee;
|
|
13
|
-
exports.chargeFee = chargeFee;
|
|
14
|
-
exports.sendLiquidatorFee = sendLiquidatorFee;
|
|
15
|
-
exports.chargeLiquidatorFee = chargeLiquidatorFee;
|
|
16
|
-
var __1 = require("..");
|
|
17
|
-
var util_1 = require("../../_framework/util");
|
|
18
|
-
function versionCheck(tx, version, published_at) {
|
|
19
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
20
|
-
return tx.moveCall({ target: "".concat(published_at, "::admin::version_check"), arguments: [(0, util_1.obj)(tx, version)] });
|
|
21
|
-
}
|
|
22
|
-
function upgrade(tx, version, published_at) {
|
|
23
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
24
|
-
return tx.moveCall({ target: "".concat(published_at, "::admin::upgrade"), arguments: [(0, util_1.obj)(tx, version)] });
|
|
25
|
-
}
|
|
26
|
-
function init(tx, published_at) {
|
|
27
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
28
|
-
return tx.moveCall({ target: "".concat(published_at, "::admin::init"), arguments: [] });
|
|
29
|
-
}
|
|
30
|
-
function verify(tx, version, published_at) {
|
|
31
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
32
|
-
return tx.moveCall({ target: "".concat(published_at, "::admin::verify"), arguments: [(0, util_1.obj)(tx, version)] });
|
|
33
|
-
}
|
|
34
|
-
function addAuthorizedUser(tx, args, published_at) {
|
|
35
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
36
|
-
return tx.moveCall({
|
|
37
|
-
target: "".concat(published_at, "::admin::add_authorized_user"),
|
|
38
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.pure)(tx, args.userAddress, "address")],
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function removeAuthorizedUser(tx, args, published_at) {
|
|
42
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
43
|
-
return tx.moveCall({
|
|
44
|
-
target: "".concat(published_at, "::admin::remove_authorized_user"),
|
|
45
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.pure)(tx, args.userAddress, "address")],
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function installEcosystemManagerCapEntry(tx, args, published_at) {
|
|
49
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
50
|
-
return tx.moveCall({
|
|
51
|
-
target: "".concat(published_at, "::admin::install_ecosystem_manager_cap_entry"),
|
|
52
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.typusEcosystemVersion)],
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function addTailsExpAmount(tx, args, published_at) {
|
|
56
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
57
|
-
return tx.moveCall({
|
|
58
|
-
target: "".concat(published_at, "::admin::add_tails_exp_amount"),
|
|
59
|
-
arguments: [
|
|
60
|
-
(0, util_1.obj)(tx, args.version),
|
|
61
|
-
(0, util_1.obj)(tx, args.typusEcosystemVersion),
|
|
62
|
-
(0, util_1.obj)(tx, args.typusUserRegistry),
|
|
63
|
-
(0, util_1.pure)(tx, args.user, "address"),
|
|
64
|
-
(0, util_1.pure)(tx, args.amount, "u64"),
|
|
65
|
-
],
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
function addExpLeaderboard(tx, args, published_at) {
|
|
69
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
70
|
-
return tx.moveCall({
|
|
71
|
-
target: "".concat(published_at, "::admin::add_exp_leaderboard"),
|
|
72
|
-
arguments: [
|
|
73
|
-
(0, util_1.obj)(tx, args.version),
|
|
74
|
-
(0, util_1.obj)(tx, args.typusEcosystemVersion),
|
|
75
|
-
(0, util_1.obj)(tx, args.typusLeaderboardRegistry),
|
|
76
|
-
(0, util_1.pure)(tx, args.user, "address"),
|
|
77
|
-
(0, util_1.pure)(tx, args.score, "u64"),
|
|
78
|
-
(0, util_1.obj)(tx, args.clock),
|
|
79
|
-
],
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function sendFee(tx, typeArg, version, published_at) {
|
|
83
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
84
|
-
return tx.moveCall({ target: "".concat(published_at, "::admin::send_fee"), typeArguments: [typeArg], arguments: [(0, util_1.obj)(tx, version)] });
|
|
85
|
-
}
|
|
86
|
-
function chargeFee(tx, typeArg, args, published_at) {
|
|
87
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
88
|
-
return tx.moveCall({
|
|
89
|
-
target: "".concat(published_at, "::admin::charge_fee"),
|
|
90
|
-
typeArguments: [typeArg],
|
|
91
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.balance)],
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
function sendLiquidatorFee(tx, typeArg, version, published_at) {
|
|
95
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
96
|
-
return tx.moveCall({ target: "".concat(published_at, "::admin::send_liquidator_fee"), typeArguments: [typeArg], arguments: [(0, util_1.obj)(tx, version)] });
|
|
97
|
-
}
|
|
98
|
-
function chargeLiquidatorFee(tx, typeArg, args, published_at) {
|
|
99
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
100
|
-
return tx.moveCall({
|
|
101
|
-
target: "".concat(published_at, "::admin::charge_liquidator_fee"),
|
|
102
|
-
typeArguments: [typeArg],
|
|
103
|
-
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.balance)],
|
|
104
|
-
});
|
|
105
|
-
}
|