@typus/typus-sdk 1.4.84 → 1.5.1
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/auto-bid/token-user-entry.d.ts +9 -9
- package/dist/src/auto-bid/token-user-entry.js +24 -24
- package/dist/src/auto-bid/user-entry.d.ts +9 -9
- package/dist/src/auto-bid/user-entry.js +46 -46
- package/dist/src/auto-bid/view-function.js +14 -14
- package/dist/src/constants/constant.d.ts +1 -1
- package/dist/src/constants/constant.js +1 -1
- package/dist/src/constants/token.d.ts +4 -1
- package/dist/src/constants/token.js +4 -1
- package/dist/src/dice/fetch.js +1 -1
- package/dist/src/dice/user-entry.d.ts +11 -11
- package/dist/src/dice/user-entry.js +34 -34
- package/dist/src/typus/airdrop/authority-entry.d.ts +5 -5
- package/dist/src/typus/airdrop/authority-entry.js +10 -10
- package/dist/src/typus/airdrop/user-entry.d.ts +3 -3
- package/dist/src/typus/airdrop/user-entry.js +2 -2
- package/dist/src/typus/airdrop/view-function.js +10 -10
- package/dist/src/typus/leaderboard/authority-entry.d.ts +5 -5
- package/dist/src/typus/leaderboard/authority-entry.js +9 -4
- package/dist/src/typus/leaderboard/view-function.js +13 -13
- package/dist/src/typus/tails-staking/authority-entry.d.ts +29 -27
- package/dist/src/typus/tails-staking/authority-entry.js +22 -20
- package/dist/src/typus/tails-staking/user-entry.d.ts +23 -23
- package/dist/src/typus/tails-staking/user-entry.js +30 -30
- package/dist/src/typus/tails-staking/view-function.js +14 -14
- package/dist/src/typus/user/view-function.js +9 -9
- package/dist/src/typus-dov-single-v2/authority-entry.d.ts +4 -4
- package/dist/src/typus-dov-single-v2/authority-entry.js +21 -21
- package/dist/src/typus-dov-single-v2/function/bidding.d.ts +1 -83
- package/dist/src/typus-dov-single-v2/function/bidding.js +9 -182
- package/dist/src/typus-dov-single-v2/function/token.js +3 -1
- package/dist/src/typus-dov-single-v2/history/user-history.d.ts +1 -1
- package/dist/src/typus-dov-single-v2/history/vault-history.d.ts +1 -2
- package/dist/src/typus-dov-single-v2/history/vault-history.js +1 -99
- package/dist/src/typus-dov-single-v2/token-user-entry.d.ts +13 -13
- package/dist/src/typus-dov-single-v2/token-user-entry.js +29 -29
- package/dist/src/typus-dov-single-v2/user-entry.d.ts +20 -20
- package/dist/src/typus-dov-single-v2/user-entry.js +61 -59
- package/dist/src/typus-dov-single-v2/view-function.js +55 -55
- package/dist/src/typus-launch/airdrop/authority-entry.d.ts +3 -3
- package/dist/src/typus-launch/airdrop/authority-entry.js +7 -7
- package/dist/src/typus-launch/airdrop/user-entry.d.ts +2 -2
- package/dist/src/typus-launch/airdrop/user-entry.js +2 -2
- package/dist/src/typus-launch/airdrop/view-function.d.ts +1 -0
- package/dist/src/typus-launch/airdrop/view-function.js +12 -10
- package/dist/src/typus-launch/auction/entry.d.ts +5 -5
- package/dist/src/typus-launch/auction/entry.js +4 -4
- package/dist/src/typus-launch/auction/view-function.js +17 -17
- package/dist/src/typus-launch/funding-vault/authority-entry.d.ts +11 -11
- package/dist/src/typus-launch/funding-vault/authority-entry.js +32 -24
- package/dist/src/typus-launch/funding-vault/user-entry.d.ts +3 -3
- package/dist/src/typus-launch/funding-vault/user-entry.js +6 -6
- package/dist/src/typus-launch/funding-vault/view-function.js +29 -29
- package/dist/src/typus-launch/improvement-proposal/authority-entry.d.ts +11 -9
- package/dist/src/typus-launch/improvement-proposal/authority-entry.js +23 -21
- package/dist/src/typus-launch/improvement-proposal/user-entry.d.ts +3 -3
- package/dist/src/typus-launch/improvement-proposal/user-entry.js +2 -2
- package/dist/src/typus-launch/improvement-proposal/view-function.d.ts +6 -1
- package/dist/src/typus-launch/improvement-proposal/view-function.js +51 -39
- package/dist/src/typus-launch/option-airdrop/authority-entry.d.ts +5 -5
- package/dist/src/typus-launch/option-airdrop/authority-entry.js +6 -6
- package/dist/src/typus-launch/ve-typus/authority-entry.d.ts +5 -5
- package/dist/src/typus-launch/ve-typus/authority-entry.js +10 -10
- package/dist/src/typus-launch/ve-typus/user-entry.d.ts +4 -4
- package/dist/src/typus-launch/ve-typus/user-entry.js +9 -6
- package/dist/src/typus-launch/ve-typus/view-function.js +20 -19
- package/dist/src/typus-nft/fetch.d.ts +2 -2
- package/dist/src/typus-nft/user-entry.d.ts +11 -11
- package/dist/src/typus-nft/user-entry.js +3 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/ascii/structs.d.ts +16 -6
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/ascii/structs.js +161 -45
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/bit-vector/structs.d.ts +10 -4
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/bit-vector/structs.js +90 -25
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/fixed-point32/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/fixed-point32/structs.js +84 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/index.d.ts +1 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/index.js +2 -1
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/init.js +4 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/option/structs.d.ts +10 -4
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/option/structs.js +94 -25
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/string/structs.d.ts +10 -4
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/string/structs.js +84 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/type-name/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/type-name/structs.js +84 -23
- package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.d.ts +46 -0
- package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.js +228 -0
- package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.d.ts +46 -0
- package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.js +228 -0
- package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.d.ts +5 -0
- package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.js +8 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.js +1 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.d.ts +86 -13
- package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.js +793 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.d.ts +14 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.js +52 -10
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.js +105 -28
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.js +108 -28
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/authenticator-state/structs.d.ts +34 -12
- package/dist/src/typus-perp/_dependencies/source/0x2/authenticator-state/structs.js +894 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bag/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bag/structs.js +90 -25
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/balance/structs.d.ts +14 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/balance/structs.js +183 -45
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bcs/structs.d.ts +10 -4
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bcs/structs.js +84 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bls12381/structs.d.ts +68 -9
- package/dist/src/typus-perp/_dependencies/source/0x2/bls12381/structs.js +820 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/borrow/structs.d.ts +13 -4
- package/dist/src/typus-perp/_dependencies/source/0x2/borrow/structs.js +410 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/clock/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/clock/structs.js +90 -25
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/coin/structs.d.ts +94 -13
- package/dist/src/typus-perp/_dependencies/source/0x2/coin/structs.js +1259 -0
- package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.d.ts +179 -0
- package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.js +577 -0
- package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.d.ts +430 -0
- package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.js +1177 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/display/structs.d.ts +20 -7
- package/dist/src/typus-perp/_dependencies/source/0x2/display/structs.js +584 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/dynamic-field/structs.d.ts +12 -7
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/dynamic-field/structs.js +110 -28
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/dynamic-object-field/structs.d.ts +10 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/dynamic-object-field/structs.js +94 -24
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/groth16/structs.d.ts +28 -10
- package/dist/src/typus-perp/_dependencies/source/0x2/groth16/structs.js +710 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/group-ops/structs.d.ts +10 -4
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/group-ops/structs.js +93 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/index.d.ts +1 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/index.js +2 -1
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/init.js +16 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/kiosk/structs.d.ts +62 -21
- package/dist/src/typus-perp/_dependencies/source/0x2/kiosk/structs.js +1724 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/kiosk-extension/structs.d.ts +14 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/kiosk-extension/structs.js +185 -48
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/linked-table/structs.d.ts +15 -6
- package/dist/src/typus-perp/_dependencies/source/0x2/linked-table/structs.js +438 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object/structs.d.ts +14 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object/structs.js +166 -45
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object-bag/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object-bag/structs.js +90 -25
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object-table/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object-table/structs.js +101 -25
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/package/structs.d.ts +28 -10
- package/dist/src/typus-perp/_dependencies/source/0x2/package/structs.js +752 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/priority-queue/structs.d.ts +19 -9
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/priority-queue/structs.js +192 -50
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/random/structs.d.ts +22 -8
- package/dist/src/typus-perp/_dependencies/source/0x2/random/structs.js +586 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/sui/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/sui/structs.js +84 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/table/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/table/structs.js +101 -25
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/table-vec/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/table-vec/structs.js +93 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/token/structs.d.ts +38 -13
- package/dist/src/typus-perp/_dependencies/source/0x2/token/structs.js +1107 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/transfer/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/transfer/structs.js +99 -25
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/transfer-policy/structs.d.ts +38 -13
- package/dist/src/typus-perp/_dependencies/source/0x2/transfer-policy/structs.js +1099 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/tx-context/structs.d.ts +10 -4
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/tx-context/structs.js +108 -28
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/url/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/url/structs.js +84 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/vec-map/structs.d.ts +23 -13
- package/dist/src/typus-perp/_dependencies/source/0x2/vec-map/structs.js +436 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/vec-set/structs.d.ts +10 -4
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/vec-set/structs.js +94 -24
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/versioned/structs.d.ts +14 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/versioned/structs.js +177 -49
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/zklogin-verified-id/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/zklogin-verified-id/structs.js +113 -29
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/zklogin-verified-issuer/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/zklogin-verified-issuer/structs.js +98 -26
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.d.ts +1 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.js +2 -1
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.js +84 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.d.ts +2 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.js +3 -1
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.js +84 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.d.ts +14 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.js +186 -50
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.d.ts +40 -14
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.js +1092 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.d.ts +15 -5
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.js +52 -7
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.d.ts +20 -7
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.js +643 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.d.ts +34 -12
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.js +898 -0
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +8 -0
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +11 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.js +20 -1
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.d.ts +227 -0
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.js +622 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.d.ts +124 -16
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.js +1476 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.d.ts +13 -4
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.js +438 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.d.ts +13 -4
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.js +430 -0
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.d.ts +1071 -0
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.js +2275 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.d.ts +68 -50
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.js +732 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.d.ts +34 -12
- package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.js +900 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.d.ts +46 -16
- package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.js +1335 -0
- package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.d.ts +9 -0
- package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.js +12 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.js +4 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.d.ts +50 -41
- package/dist/src/{_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585 → typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828}/royalty-rule/structs.js +227 -103
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.d.ts +76 -55
- package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.js +886 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.js +93 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.d.ts +247 -136
- package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.js +2407 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.d.ts +100 -34
- package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.js +3052 -0
- package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.d.ts +10 -0
- package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.js +13 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.js +23 -17
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.d.ts +213 -147
- package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.js +2846 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.d.ts +58 -20
- package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.js +1669 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.d.ts +46 -16
- package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.js +1249 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.d.ts +244 -82
- package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.js +1869 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.js +115 -30
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.d.ts +534 -74
- package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.js +7680 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.d.ts +1 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.js +2 -1
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.js +87 -23
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.d.ts +22 -8
- package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +581 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.js +109 -27
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.d.ts +50 -17
- package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +1735 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.js +80 -23
- package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +3 -0
- package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +6 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.d.ts +15 -6
- package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +444 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.d.ts +172 -58
- package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +5014 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.d.ts +40 -14
- package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +1229 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.d.ts +1 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.js +2 -1
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.d.ts +10 -4
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.js +105 -28
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.js +95 -26
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.d.ts +10 -4
- package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +322 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/batch-price-attestation/structs.d.ts +22 -12
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/batch-price-attestation/structs.js +202 -54
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/contract-upgrade/structs.d.ts +21 -12
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/contract-upgrade/structs.js +172 -48
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/data-source/structs.d.ts +12 -7
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/data-source/structs.js +91 -26
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/event/structs.d.ts +20 -11
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/event/structs.js +171 -47
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance/structs.d.ts +14 -8
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance/structs.js +96 -27
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance-action/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance-action/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance-instruction/structs.d.ts +13 -7
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance-instruction/structs.js +100 -27
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/hot-potato-vector/structs.d.ts +12 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/hot-potato-vector/structs.js +94 -24
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/i64/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/i64/structs.js +90 -25
- package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.d.ts +3 -0
- package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.js +6 -0
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/init.js +1 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/migrate/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/migrate/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price/structs.js +100 -27
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-feed/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-feed/structs.js +95 -26
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-identifier/structs.d.ts +13 -7
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-identifier/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-info/structs.d.ts +20 -11
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-info/structs.js +182 -50
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-status/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-status/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set/structs.d.ts +20 -10
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set/structs.js +181 -48
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-data-sources/structs.d.ts +13 -7
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-data-sources/structs.js +85 -24
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-fee-recipient/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-fee-recipient/structs.js +87 -23
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-governance-data-source/structs.d.ts +12 -7
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-governance-data-source/structs.js +96 -27
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-stale-price-threshold/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-stale-price-threshold/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-update-fee/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-update-fee/structs.js +90 -25
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/setup/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/setup/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/state/structs.d.ts +30 -17
- package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/state/structs.js +573 -0
- package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.d.ts +130 -0
- package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.js +524 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.d.ts +1 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.js +2 -1
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.d.ts +48 -39
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.js +217 -97
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.d.ts +50 -41
- package/dist/src/{_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828 → typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585}/royalty-rule/structs.js +227 -103
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.d.ts +8 -3
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.js +93 -23
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/bytes20/structs.d.ts +13 -7
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/bytes20/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/bytes32/structs.d.ts +13 -7
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/bytes32/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/consumed-vaas/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/consumed-vaas/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/cursor/structs.d.ts +12 -6
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/cursor/structs.js +94 -24
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/emitter/structs.d.ts +29 -16
- package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/emitter/structs.js +531 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/external-address/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/external-address/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/fee-collector/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/fee-collector/structs.js +90 -25
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/governance-message/structs.d.ts +20 -10
- package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/governance-message/structs.js +460 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian-set/structs.d.ts +13 -7
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian-set/structs.js +95 -26
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian-signature/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian-signature/structs.js +100 -27
- package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.d.ts +3 -0
- package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.js +6 -0
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/migrate/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/migrate/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/package-utils/structs.d.ts +38 -21
- package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/package-utils/structs.js +680 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/publish-message/structs.d.ts +22 -12
- package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/publish-message/structs.js +449 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/set/structs.d.ts +52 -43
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/set/structs.js +232 -103
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/set-fee/structs.d.ts +20 -11
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/set-fee/structs.js +165 -45
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/setup/structs.d.ts +11 -6
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/setup/structs.js +84 -23
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/state/structs.d.ts +20 -11
- package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/state/structs.js +455 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/transfer-fee/structs.d.ts +20 -11
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/transfer-fee/structs.js +174 -47
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/update-guardian-set/structs.d.ts +31 -17
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/update-guardian-set/structs.js +252 -69
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/upgrade-contract/structs.d.ts +62 -49
- package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/upgrade-contract/structs.js +532 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/vaa/structs.d.ts +13 -7
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/vaa/structs.js +125 -32
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/version-control/structs.d.ts +20 -11
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/version-control/structs.js +165 -45
- package/dist/src/typus-perp/_framework/init-loader.d.ts +2 -0
- package/dist/src/typus-perp/_framework/init-loader.js +63 -0
- package/dist/src/{_framework → typus-perp/_framework}/loader.d.ts +3 -3
- package/dist/src/{_framework → typus-perp/_framework}/loader.js +14 -5
- package/dist/src/{_framework → typus-perp/_framework}/reified.d.ts +28 -20
- package/dist/src/{_framework → typus-perp/_framework}/reified.js +11 -37
- package/dist/src/typus-perp/_framework/util.d.ts +35 -0
- package/dist/src/typus-perp/_framework/util.js +396 -0
- package/dist/src/typus-perp/_framework/vector.d.ts +35 -0
- package/dist/src/typus-perp/_framework/vector.js +112 -0
- package/dist/src/typus-perp/fetch.d.ts +5 -5
- package/dist/src/typus-perp/fetch.js +16 -16
- package/dist/src/typus-perp/index.d.ts +2 -4
- package/dist/src/typus-perp/index.js +5 -64
- package/dist/src/typus-perp/readVec.js +9 -9
- package/dist/src/typus-perp/typus_perp/admin/functions.d.ts +50 -0
- package/dist/src/typus-perp/typus_perp/admin/functions.js +116 -0
- package/dist/src/typus-perp/{admin → typus_perp/admin}/structs.d.ts +49 -27
- package/dist/src/typus-perp/{admin → typus_perp/admin}/structs.js +117 -21
- package/dist/src/typus-perp/typus_perp/index.d.ts +3 -0
- package/dist/src/typus-perp/typus_perp/index.js +6 -0
- package/dist/src/typus-perp/{init.js → typus_perp/init.js} +13 -26
- package/dist/src/typus-perp/typus_perp/lp-pool/functions.d.ts +342 -0
- package/dist/src/typus-perp/typus_perp/lp-pool/functions.js +517 -0
- package/dist/src/typus-perp/{lp-pool → typus_perp/lp-pool}/structs.d.ts +698 -148
- package/dist/src/typus-perp/{lp-pool → typus_perp/lp-pool}/structs.js +1457 -172
- package/dist/src/typus-perp/typus_perp/math/functions.d.ts +18 -0
- package/dist/src/typus-perp/typus_perp/math/functions.js +49 -0
- package/dist/src/typus-perp/typus_perp/oracle/functions.d.ts +13 -0
- package/dist/src/typus-perp/typus_perp/oracle/functions.js +25 -0
- package/dist/src/typus-perp/{oracle → typus_perp/oracle}/structs.d.ts +20 -11
- package/dist/src/typus-perp/{oracle → typus_perp/oracle}/structs.js +52 -10
- package/dist/src/typus-perp/typus_perp/position/functions.d.ts +343 -0
- package/dist/src/typus-perp/typus_perp/position/functions.js +659 -0
- package/dist/src/typus-perp/{position → typus_perp/position}/structs.d.ts +73 -43
- package/dist/src/typus-perp/{position → typus_perp/position}/structs.js +177 -38
- package/dist/src/typus-perp/typus_perp/symbol/functions.d.ts +9 -0
- package/dist/src/typus-perp/typus_perp/symbol/functions.js +33 -0
- package/dist/src/typus-perp/{symbol → typus_perp/symbol}/structs.d.ts +11 -6
- package/dist/src/typus-perp/{symbol → typus_perp/symbol}/structs.js +23 -4
- package/dist/src/typus-perp/typus_perp/tlp/functions.d.ts +19 -0
- package/dist/src/typus-perp/typus_perp/tlp/functions.js +41 -0
- package/dist/src/typus-perp/{tlp → typus_perp/tlp}/structs.d.ts +20 -11
- package/dist/src/typus-perp/{tlp → typus_perp/tlp}/structs.js +61 -13
- package/dist/src/typus-perp/typus_perp/token-interface/functions.d.ts +11 -0
- package/dist/src/typus-perp/{token-interface → typus_perp/token-interface}/functions.js +6 -6
- package/dist/src/typus-perp/typus_perp/trading/functions.d.ts +493 -0
- package/dist/src/typus-perp/typus_perp/trading/functions.js +711 -0
- package/dist/src/typus-perp/{trading → typus_perp/trading}/structs.d.ts +523 -161
- package/dist/src/typus-perp/{trading → typus_perp/trading}/structs.js +1042 -107
- package/dist/src/typus-perp/typus_perp/treasury-caps/functions.d.ts +9 -0
- package/dist/src/typus-perp/{treasury-caps → typus_perp/treasury-caps}/functions.js +14 -11
- package/dist/src/typus-perp/{treasury-caps → typus_perp/treasury-caps}/structs.d.ts +11 -6
- package/dist/src/typus-perp/{treasury-caps → typus_perp/treasury-caps}/structs.js +32 -7
- package/dist/src/typus-perp/typus_stake_pool/admin/functions.d.ts +50 -0
- package/dist/src/typus-perp/typus_stake_pool/admin/functions.js +116 -0
- package/dist/src/typus-perp/typus_stake_pool/admin/structs.d.ts +447 -0
- package/dist/src/typus-perp/typus_stake_pool/admin/structs.js +898 -0
- package/dist/src/typus-perp/typus_stake_pool/index.d.ts +3 -0
- package/dist/src/typus-perp/typus_stake_pool/index.js +6 -0
- package/dist/src/typus-perp/typus_stake_pool/init.d.ts +2 -0
- package/dist/src/typus-perp/typus_stake_pool/init.js +57 -0
- package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.d.ts +175 -0
- package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.js +275 -0
- package/dist/src/typus-perp/{stake-pool → typus_stake_pool/stake-pool}/structs.d.ts +293 -185
- package/dist/src/typus-perp/{stake-pool → typus_stake_pool/stake-pool}/structs.js +659 -235
- package/dist/src/typus-perp/user/order.d.ts +10 -10
- package/dist/src/typus-perp/user/order.js +6 -5
- package/dist/src/typus-perp/user/orderWithBidReceipt.d.ts +5 -5
- package/dist/src/typus-perp/user/orderWithBidReceipt.js +3 -3
- package/dist/src/typus-perp/user/tlp.d.ts +12 -12
- package/dist/src/typus-perp/user/tlp.js +13 -11
- package/dist/src/typus-safu/user-entry.d.ts +9 -9
- package/dist/src/typus-safu/user-entry.js +18 -18
- package/dist/src/typus-safu/user-history.d.ts +1 -1
- package/dist/src/typus-safu/user-history.js +1 -1
- package/dist/src/typus-safu/view-function.js +17 -17
- package/dist/src/utils/api/price.js +18 -2
- package/dist/src/utils/api/sentio/reward-generated.d.ts +1 -1
- package/dist/src/utils/mint.d.ts +2 -2
- package/dist/src/utils/mint.js +3 -3
- package/dist/src/utils/pyth/constant.d.ts +2 -0
- package/dist/src/utils/pyth/constant.js +2 -0
- package/dist/src/utils/pyth/pythClient.d.ts +3 -3
- package/dist/src/utils/typusConfig.d.ts +8 -2
- package/package.json +4 -5
- package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.d.ts +0 -2
- package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.js +0 -5
- package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.js +0 -377
- package/dist/src/_dependencies/source/0x2/authenticator-state/structs.js +0 -565
- package/dist/src/_dependencies/source/0x2/bls12381/structs.js +0 -434
- package/dist/src/_dependencies/source/0x2/borrow/structs.js +0 -267
- package/dist/src/_dependencies/source/0x2/coin/structs.js +0 -648
- package/dist/src/_dependencies/source/0x2/deny-list/structs.d.ts +0 -178
- package/dist/src/_dependencies/source/0x2/deny-list/structs.js +0 -290
- package/dist/src/_dependencies/source/0x2/display/structs.js +0 -362
- package/dist/src/_dependencies/source/0x2/groth16/structs.js +0 -464
- package/dist/src/_dependencies/source/0x2/kiosk/structs.js +0 -1033
- package/dist/src/_dependencies/source/0x2/linked-table/structs.js +0 -272
- package/dist/src/_dependencies/source/0x2/package/structs.js +0 -478
- package/dist/src/_dependencies/source/0x2/random/structs.js +0 -383
- package/dist/src/_dependencies/source/0x2/token/structs.js +0 -651
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +0 -665
- package/dist/src/_dependencies/source/0x2/vec-map/structs.js +0 -286
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.js +0 -669
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.js +0 -402
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.js +0 -566
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +0 -2
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +0 -5
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.js +0 -774
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.js +0 -272
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.js +0 -276
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.js +0 -471
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.js +0 -563
- package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.js +0 -789
- package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.d.ts +0 -2
- package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.js +0 -5
- package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.js +0 -562
- package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.js +0 -1331
- package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.js +0 -1706
- package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.d.ts +0 -2
- package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.js +0 -5
- package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.js +0 -1643
- package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.js +0 -971
- package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.js +0 -750
- package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.js +0 -933
- package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.js +0 -3796
- package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +0 -382
- package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +0 -959
- package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +0 -2
- package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +0 -5
- package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +0 -274
- package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +0 -2830
- package/dist/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +0 -711
- package/dist/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +0 -212
- package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/emitter/structs.js +0 -348
- package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/governance-message/structs.js +0 -298
- package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.d.ts +0 -2
- package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.js +0 -5
- package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/package-utils/structs.js +0 -438
- package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/publish-message/structs.js +0 -297
- package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/state/structs.js +0 -303
- package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/upgrade-contract/structs.js +0 -349
- package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.d.ts +0 -2
- package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.js +0 -5
- package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/state/structs.js +0 -363
- package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.d.ts +0 -79
- package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.js +0 -256
- package/dist/src/_framework/init-source.d.ts +0 -1
- package/dist/src/_framework/init-source.js +0 -64
- package/dist/src/_framework/util.d.ts +0 -53
- package/dist/src/_framework/util.js +0 -251
- package/dist/src/typus-perp/admin/functions.d.ts +0 -51
- package/dist/src/typus-perp/admin/functions.js +0 -100
- package/dist/src/typus-perp/lp-pool/functions.d.ts +0 -283
- package/dist/src/typus-perp/lp-pool/functions.js +0 -418
- package/dist/src/typus-perp/math/functions.d.ts +0 -18
- package/dist/src/typus-perp/math/functions.js +0 -40
- package/dist/src/typus-perp/oracle/functions.d.ts +0 -14
- package/dist/src/typus-perp/oracle/functions.js +0 -22
- package/dist/src/typus-perp/position/functions.d.ts +0 -339
- package/dist/src/typus-perp/position/functions.js +0 -564
- package/dist/src/typus-perp/stake-pool/functions.d.ts +0 -169
- package/dist/src/typus-perp/stake-pool/functions.js +0 -258
- package/dist/src/typus-perp/symbol/functions.d.ts +0 -10
- package/dist/src/typus-perp/symbol/functions.js +0 -20
- package/dist/src/typus-perp/tlp/functions.d.ts +0 -20
- package/dist/src/typus-perp/tlp/functions.js +0 -35
- package/dist/src/typus-perp/token-interface/functions.d.ts +0 -12
- package/dist/src/typus-perp/trading/functions.d.ts +0 -427
- package/dist/src/typus-perp/trading/functions.js +0 -612
- package/dist/src/typus-perp/treasury-caps/functions.d.ts +0 -10
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.js +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.js +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.js +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.js +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.js +0 -0
- package/dist/src/{_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/init.d.ts +0 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585}/init.d.ts +0 -0
- package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.js +2 -2
- package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/init.d.ts +0 -0
- package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/init.js +4 -4
- /package/dist/src/typus-perp/{init.d.ts → typus_perp/init.d.ts} +0 -0
|
@@ -1,2830 +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 (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
-
function step(op) {
|
|
50
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
52
|
-
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;
|
|
53
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
-
switch (op[0]) {
|
|
55
|
-
case 0: case 1: t = op; break;
|
|
56
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
-
default:
|
|
60
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
-
if (t[2]) _.ops.pop();
|
|
65
|
-
_.trys.pop(); continue;
|
|
66
|
-
}
|
|
67
|
-
op = body.call(thisArg, _);
|
|
68
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
73
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
74
|
-
if (!m) return o;
|
|
75
|
-
var i = m.call(o), r, ar = [], e;
|
|
76
|
-
try {
|
|
77
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
78
|
-
}
|
|
79
|
-
catch (error) { e = { error: error }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
83
|
-
}
|
|
84
|
-
finally { if (e) throw e.error; }
|
|
85
|
-
}
|
|
86
|
-
return ar;
|
|
87
|
-
};
|
|
88
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
89
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
90
|
-
if (ar || !(i in from)) {
|
|
91
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
92
|
-
ar[i] = from[i];
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
96
|
-
};
|
|
97
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
98
|
-
exports.Withdraw = exports.VAULT = exports.UpdateFeeShareConfig = exports.UpdateFeeConfig = exports.Unsubscribe = exports.TypusDepositReceipt = exports.TypusBidReceipt = exports.Terminate = exports.Settle = exports.RefundVault = exports.RefundShare = exports.Redeem = exports.Recoup = exports.NewRefundVault = exports.NewDepositVault = exports.NewBidVault = exports.IncentiviseBidder = exports.Harvest = exports.Exercise = exports.DepositVault = exports.DepositShare = exports.Deposit = exports.Delivery = exports.Compound = exports.Claim = exports.BidVault = exports.BidShare = exports.Activate = void 0;
|
|
99
|
-
exports.isActivate = isActivate;
|
|
100
|
-
exports.isBidShare = isBidShare;
|
|
101
|
-
exports.isBidVault = isBidVault;
|
|
102
|
-
exports.isClaim = isClaim;
|
|
103
|
-
exports.isCompound = isCompound;
|
|
104
|
-
exports.isDelivery = isDelivery;
|
|
105
|
-
exports.isDeposit = isDeposit;
|
|
106
|
-
exports.isDepositShare = isDepositShare;
|
|
107
|
-
exports.isDepositVault = isDepositVault;
|
|
108
|
-
exports.isExercise = isExercise;
|
|
109
|
-
exports.isHarvest = isHarvest;
|
|
110
|
-
exports.isIncentiviseBidder = isIncentiviseBidder;
|
|
111
|
-
exports.isNewBidVault = isNewBidVault;
|
|
112
|
-
exports.isNewDepositVault = isNewDepositVault;
|
|
113
|
-
exports.isNewRefundVault = isNewRefundVault;
|
|
114
|
-
exports.isRecoup = isRecoup;
|
|
115
|
-
exports.isRedeem = isRedeem;
|
|
116
|
-
exports.isRefundShare = isRefundShare;
|
|
117
|
-
exports.isRefundVault = isRefundVault;
|
|
118
|
-
exports.isSettle = isSettle;
|
|
119
|
-
exports.isTerminate = isTerminate;
|
|
120
|
-
exports.isTypusBidReceipt = isTypusBidReceipt;
|
|
121
|
-
exports.isTypusDepositReceipt = isTypusDepositReceipt;
|
|
122
|
-
exports.isUnsubscribe = isUnsubscribe;
|
|
123
|
-
exports.isUpdateFeeConfig = isUpdateFeeConfig;
|
|
124
|
-
exports.isUpdateFeeShareConfig = isUpdateFeeShareConfig;
|
|
125
|
-
exports.isVAULT = isVAULT;
|
|
126
|
-
exports.isWithdraw = isWithdraw;
|
|
127
|
-
var reified = __importStar(require("../../../../_framework/reified"));
|
|
128
|
-
var reified_1 = require("../../../../_framework/reified");
|
|
129
|
-
var util_1 = require("../../../../_framework/util");
|
|
130
|
-
var structs_1 = require("../../0x1/option/structs");
|
|
131
|
-
var structs_2 = require("../../0x1/string/structs");
|
|
132
|
-
var structs_3 = require("../../0x1/type-name/structs");
|
|
133
|
-
var structs_4 = require("../../0x2/object/structs");
|
|
134
|
-
var bcs_1 = require("@mysten/bcs");
|
|
135
|
-
/* ============================== Activate =============================== */
|
|
136
|
-
function isActivate(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Activate"; }
|
|
137
|
-
var Activate = /** @class */ (function () {
|
|
138
|
-
function Activate(typeArgs, fields) {
|
|
139
|
-
this.$typeName = Activate.$typeName;
|
|
140
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Activate.$typeName], __read(typeArgs), false));
|
|
141
|
-
this.$typeArgs = typeArgs;
|
|
142
|
-
this.signer = fields.signer;
|
|
143
|
-
;
|
|
144
|
-
this.index = fields.index;
|
|
145
|
-
;
|
|
146
|
-
this.token = fields.token;
|
|
147
|
-
;
|
|
148
|
-
this.amount = fields.amount;
|
|
149
|
-
;
|
|
150
|
-
this.hasNext = fields.hasNext;
|
|
151
|
-
}
|
|
152
|
-
Activate.reified = function () {
|
|
153
|
-
var _this = this;
|
|
154
|
-
return { typeName: Activate.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Activate.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Activate.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Activate.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Activate.fromBcs(data); }, bcs: Activate.bcs, fromJSONField: function (field) { return Activate.fromJSONField(field); }, fromJSON: function (json) { return Activate.fromJSON(json); }, fromSuiParsedData: function (content) { return Activate.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
155
|
-
return [2 /*return*/, Activate.fetch(client, id)];
|
|
156
|
-
}); }); }, new: function (fields) { return new Activate([], fields); }, kind: "StructClassReified", };
|
|
157
|
-
};
|
|
158
|
-
Object.defineProperty(Activate, "r", {
|
|
159
|
-
get: function () { return Activate.reified(); },
|
|
160
|
-
enumerable: false,
|
|
161
|
-
configurable: true
|
|
162
|
-
});
|
|
163
|
-
Activate.phantom = function () { return (0, reified_1.phantom)(Activate.reified()); };
|
|
164
|
-
Object.defineProperty(Activate, "p", {
|
|
165
|
-
get: function () { return Activate.phantom(); },
|
|
166
|
-
enumerable: false,
|
|
167
|
-
configurable: true
|
|
168
|
-
});
|
|
169
|
-
Object.defineProperty(Activate, "bcs", {
|
|
170
|
-
get: function () {
|
|
171
|
-
return bcs_1.bcs.struct("Activate", {
|
|
172
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64(), has_next: bcs_1.bcs.bool()
|
|
173
|
-
});
|
|
174
|
-
},
|
|
175
|
-
enumerable: false,
|
|
176
|
-
configurable: true
|
|
177
|
-
});
|
|
178
|
-
;
|
|
179
|
-
Activate.fromFields = function (fields) { return Activate.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount), hasNext: (0, reified_1.decodeFromFields)("bool", fields.has_next) }); };
|
|
180
|
-
Activate.fromFieldsWithTypes = function (item) {
|
|
181
|
-
if (!isActivate(item.type)) {
|
|
182
|
-
throw new Error("not a Activate type");
|
|
183
|
-
}
|
|
184
|
-
return Activate.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount), hasNext: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.has_next) });
|
|
185
|
-
};
|
|
186
|
-
Activate.fromBcs = function (data) { return Activate.fromFields(Activate.bcs.parse(data)); };
|
|
187
|
-
Activate.prototype.toJSONField = function () {
|
|
188
|
-
return {
|
|
189
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), hasNext: this.hasNext,
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
Activate.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
193
|
-
Activate.fromJSONField = function (field) { return Activate.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount), hasNext: (0, reified_1.decodeFromJSONField)("bool", field.hasNext) }); };
|
|
194
|
-
Activate.fromJSON = function (json) {
|
|
195
|
-
if (json.$typeName !== Activate.$typeName) {
|
|
196
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
197
|
-
}
|
|
198
|
-
;
|
|
199
|
-
return Activate.fromJSONField(json);
|
|
200
|
-
};
|
|
201
|
-
Activate.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
202
|
-
throw new Error("not an object");
|
|
203
|
-
} if (!isActivate(content.type)) {
|
|
204
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Activate object"));
|
|
205
|
-
} return Activate.fromFieldsWithTypes(content); };
|
|
206
|
-
Activate.fetch = function (client, id) {
|
|
207
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
208
|
-
var res;
|
|
209
|
-
var _a, _b;
|
|
210
|
-
return __generator(this, function (_c) {
|
|
211
|
-
switch (_c.label) {
|
|
212
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
213
|
-
case 1:
|
|
214
|
-
res = _c.sent();
|
|
215
|
-
if (res.error) {
|
|
216
|
-
throw new Error("error fetching Activate object at id ".concat(id, ": ").concat(res.error.code));
|
|
217
|
-
}
|
|
218
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isActivate(res.data.bcs.type)) {
|
|
219
|
-
throw new Error("object at id ".concat(id, " is not a Activate object"));
|
|
220
|
-
}
|
|
221
|
-
return [2 /*return*/, Activate.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
Activate.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Activate";
|
|
227
|
-
Activate.$numTypeParams = 0;
|
|
228
|
-
return Activate;
|
|
229
|
-
}());
|
|
230
|
-
exports.Activate = Activate;
|
|
231
|
-
/* ============================== BidShare =============================== */
|
|
232
|
-
function isBidShare(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::BidShare"; }
|
|
233
|
-
var BidShare = /** @class */ (function () {
|
|
234
|
-
function BidShare(typeArgs, fields) {
|
|
235
|
-
this.$typeName = BidShare.$typeName;
|
|
236
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([BidShare.$typeName], __read(typeArgs), false));
|
|
237
|
-
this.$typeArgs = typeArgs;
|
|
238
|
-
this.receipt = fields.receipt;
|
|
239
|
-
;
|
|
240
|
-
this.share = fields.share;
|
|
241
|
-
;
|
|
242
|
-
this.u64Padding = fields.u64Padding;
|
|
243
|
-
}
|
|
244
|
-
BidShare.reified = function () {
|
|
245
|
-
var _this = this;
|
|
246
|
-
return { typeName: BidShare.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([BidShare.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return BidShare.fromFields(fields); }, fromFieldsWithTypes: function (item) { return BidShare.fromFieldsWithTypes(item); }, fromBcs: function (data) { return BidShare.fromBcs(data); }, bcs: BidShare.bcs, fromJSONField: function (field) { return BidShare.fromJSONField(field); }, fromJSON: function (json) { return BidShare.fromJSON(json); }, fromSuiParsedData: function (content) { return BidShare.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
247
|
-
return [2 /*return*/, BidShare.fetch(client, id)];
|
|
248
|
-
}); }); }, new: function (fields) { return new BidShare([], fields); }, kind: "StructClassReified", };
|
|
249
|
-
};
|
|
250
|
-
Object.defineProperty(BidShare, "r", {
|
|
251
|
-
get: function () { return BidShare.reified(); },
|
|
252
|
-
enumerable: false,
|
|
253
|
-
configurable: true
|
|
254
|
-
});
|
|
255
|
-
BidShare.phantom = function () { return (0, reified_1.phantom)(BidShare.reified()); };
|
|
256
|
-
Object.defineProperty(BidShare, "p", {
|
|
257
|
-
get: function () { return BidShare.phantom(); },
|
|
258
|
-
enumerable: false,
|
|
259
|
-
configurable: true
|
|
260
|
-
});
|
|
261
|
-
Object.defineProperty(BidShare, "bcs", {
|
|
262
|
-
get: function () {
|
|
263
|
-
return bcs_1.bcs.struct("BidShare", {
|
|
264
|
-
receipt: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), share: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
265
|
-
});
|
|
266
|
-
},
|
|
267
|
-
enumerable: false,
|
|
268
|
-
configurable: true
|
|
269
|
-
});
|
|
270
|
-
;
|
|
271
|
-
BidShare.fromFields = function (fields) { return BidShare.reified().new({ receipt: (0, reified_1.decodeFromFields)("address", fields.receipt), share: (0, reified_1.decodeFromFields)("u64", fields.share), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
272
|
-
BidShare.fromFieldsWithTypes = function (item) {
|
|
273
|
-
if (!isBidShare(item.type)) {
|
|
274
|
-
throw new Error("not a BidShare type");
|
|
275
|
-
}
|
|
276
|
-
return BidShare.reified().new({ receipt: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.receipt), share: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
277
|
-
};
|
|
278
|
-
BidShare.fromBcs = function (data) { return BidShare.fromFields(BidShare.bcs.parse(data)); };
|
|
279
|
-
BidShare.prototype.toJSONField = function () {
|
|
280
|
-
return {
|
|
281
|
-
receipt: this.receipt, share: this.share.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
282
|
-
};
|
|
283
|
-
};
|
|
284
|
-
BidShare.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
285
|
-
BidShare.fromJSONField = function (field) { return BidShare.reified().new({ receipt: (0, reified_1.decodeFromJSONField)("address", field.receipt), share: (0, reified_1.decodeFromJSONField)("u64", field.share), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
286
|
-
BidShare.fromJSON = function (json) {
|
|
287
|
-
if (json.$typeName !== BidShare.$typeName) {
|
|
288
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
289
|
-
}
|
|
290
|
-
;
|
|
291
|
-
return BidShare.fromJSONField(json);
|
|
292
|
-
};
|
|
293
|
-
BidShare.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
294
|
-
throw new Error("not an object");
|
|
295
|
-
} if (!isBidShare(content.type)) {
|
|
296
|
-
throw new Error("object at ".concat(content.fields.id, " is not a BidShare object"));
|
|
297
|
-
} return BidShare.fromFieldsWithTypes(content); };
|
|
298
|
-
BidShare.fetch = function (client, id) {
|
|
299
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
300
|
-
var res;
|
|
301
|
-
var _a, _b;
|
|
302
|
-
return __generator(this, function (_c) {
|
|
303
|
-
switch (_c.label) {
|
|
304
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
305
|
-
case 1:
|
|
306
|
-
res = _c.sent();
|
|
307
|
-
if (res.error) {
|
|
308
|
-
throw new Error("error fetching BidShare object at id ".concat(id, ": ").concat(res.error.code));
|
|
309
|
-
}
|
|
310
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBidShare(res.data.bcs.type)) {
|
|
311
|
-
throw new Error("object at id ".concat(id, " is not a BidShare object"));
|
|
312
|
-
}
|
|
313
|
-
return [2 /*return*/, BidShare.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
BidShare.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::BidShare";
|
|
319
|
-
BidShare.$numTypeParams = 0;
|
|
320
|
-
return BidShare;
|
|
321
|
-
}());
|
|
322
|
-
exports.BidShare = BidShare;
|
|
323
|
-
/* ============================== BidVault =============================== */
|
|
324
|
-
function isBidVault(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::BidVault"; }
|
|
325
|
-
var BidVault = /** @class */ (function () {
|
|
326
|
-
function BidVault(typeArgs, fields) {
|
|
327
|
-
this.$typeName = BidVault.$typeName;
|
|
328
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([BidVault.$typeName], __read(typeArgs), false));
|
|
329
|
-
this.$typeArgs = typeArgs;
|
|
330
|
-
this.id = fields.id;
|
|
331
|
-
;
|
|
332
|
-
this.depositToken = fields.depositToken;
|
|
333
|
-
;
|
|
334
|
-
this.bidToken = fields.bidToken;
|
|
335
|
-
;
|
|
336
|
-
this.incentiveToken = fields.incentiveToken;
|
|
337
|
-
;
|
|
338
|
-
this.index = fields.index;
|
|
339
|
-
;
|
|
340
|
-
this.shareSupply = fields.shareSupply;
|
|
341
|
-
;
|
|
342
|
-
this.metadata = fields.metadata;
|
|
343
|
-
;
|
|
344
|
-
this.u64Padding = fields.u64Padding;
|
|
345
|
-
;
|
|
346
|
-
this.bcsPadding = fields.bcsPadding;
|
|
347
|
-
}
|
|
348
|
-
BidVault.reified = function () {
|
|
349
|
-
var _this = this;
|
|
350
|
-
return { typeName: BidVault.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([BidVault.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return BidVault.fromFields(fields); }, fromFieldsWithTypes: function (item) { return BidVault.fromFieldsWithTypes(item); }, fromBcs: function (data) { return BidVault.fromBcs(data); }, bcs: BidVault.bcs, fromJSONField: function (field) { return BidVault.fromJSONField(field); }, fromJSON: function (json) { return BidVault.fromJSON(json); }, fromSuiParsedData: function (content) { return BidVault.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
351
|
-
return [2 /*return*/, BidVault.fetch(client, id)];
|
|
352
|
-
}); }); }, new: function (fields) { return new BidVault([], fields); }, kind: "StructClassReified", };
|
|
353
|
-
};
|
|
354
|
-
Object.defineProperty(BidVault, "r", {
|
|
355
|
-
get: function () { return BidVault.reified(); },
|
|
356
|
-
enumerable: false,
|
|
357
|
-
configurable: true
|
|
358
|
-
});
|
|
359
|
-
BidVault.phantom = function () { return (0, reified_1.phantom)(BidVault.reified()); };
|
|
360
|
-
Object.defineProperty(BidVault, "p", {
|
|
361
|
-
get: function () { return BidVault.phantom(); },
|
|
362
|
-
enumerable: false,
|
|
363
|
-
configurable: true
|
|
364
|
-
});
|
|
365
|
-
Object.defineProperty(BidVault, "bcs", {
|
|
366
|
-
get: function () {
|
|
367
|
-
return bcs_1.bcs.struct("BidVault", {
|
|
368
|
-
id: structs_4.UID.bcs, deposit_token: structs_3.TypeName.bcs, bid_token: structs_3.TypeName.bcs, incentive_token: structs_1.Option.bcs(structs_3.TypeName.bcs), index: bcs_1.bcs.u64(), share_supply: bcs_1.bcs.u64(), metadata: structs_2.String.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()), bcs_padding: bcs_1.bcs.vector(bcs_1.bcs.u8())
|
|
369
|
-
});
|
|
370
|
-
},
|
|
371
|
-
enumerable: false,
|
|
372
|
-
configurable: true
|
|
373
|
-
});
|
|
374
|
-
;
|
|
375
|
-
BidVault.fromFields = function (fields) { return BidVault.reified().new({ id: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.id), depositToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.deposit_token), bidToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.bid_token), incentiveToken: (0, reified_1.decodeFromFields)(structs_1.Option.reified(structs_3.TypeName.reified()), fields.incentive_token), index: (0, reified_1.decodeFromFields)("u64", fields.index), shareSupply: (0, reified_1.decodeFromFields)("u64", fields.share_supply), metadata: (0, reified_1.decodeFromFields)(structs_2.String.reified(), fields.metadata), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFields)(reified.vector("u8"), fields.bcs_padding) }); };
|
|
376
|
-
BidVault.fromFieldsWithTypes = function (item) {
|
|
377
|
-
if (!isBidVault(item.type)) {
|
|
378
|
-
throw new Error("not a BidVault type");
|
|
379
|
-
}
|
|
380
|
-
return BidVault.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.id), depositToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.deposit_token), bidToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.bid_token), incentiveToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(structs_3.TypeName.reified()), item.fields.incentive_token), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), shareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share_supply), metadata: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.String.reified(), item.fields.metadata), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u8"), item.fields.bcs_padding) });
|
|
381
|
-
};
|
|
382
|
-
BidVault.fromBcs = function (data) { return BidVault.fromFields(BidVault.bcs.parse(data)); };
|
|
383
|
-
BidVault.prototype.toJSONField = function () {
|
|
384
|
-
return {
|
|
385
|
-
id: this.id, depositToken: this.depositToken.toJSONField(), bidToken: this.bidToken.toJSONField(), incentiveToken: (0, reified_1.fieldToJSON)("0x1::option::Option<0x1::type_name::TypeName>", this.incentiveToken), index: this.index.toString(), shareSupply: this.shareSupply.toString(), metadata: this.metadata, u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding), bcsPadding: (0, reified_1.fieldToJSON)("vector<u8>", this.bcsPadding),
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
|
-
BidVault.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
389
|
-
BidVault.fromJSONField = function (field) { return BidVault.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.id), depositToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.depositToken), bidToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bidToken), incentiveToken: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(structs_3.TypeName.reified()), field.incentiveToken), index: (0, reified_1.decodeFromJSONField)("u64", field.index), shareSupply: (0, reified_1.decodeFromJSONField)("u64", field.shareSupply), metadata: (0, reified_1.decodeFromJSONField)(structs_2.String.reified(), field.metadata), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding), bcsPadding: (0, reified_1.decodeFromJSONField)(reified.vector("u8"), field.bcsPadding) }); };
|
|
390
|
-
BidVault.fromJSON = function (json) {
|
|
391
|
-
if (json.$typeName !== BidVault.$typeName) {
|
|
392
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
393
|
-
}
|
|
394
|
-
;
|
|
395
|
-
return BidVault.fromJSONField(json);
|
|
396
|
-
};
|
|
397
|
-
BidVault.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
398
|
-
throw new Error("not an object");
|
|
399
|
-
} if (!isBidVault(content.type)) {
|
|
400
|
-
throw new Error("object at ".concat(content.fields.id, " is not a BidVault object"));
|
|
401
|
-
} return BidVault.fromFieldsWithTypes(content); };
|
|
402
|
-
BidVault.fetch = function (client, id) {
|
|
403
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
404
|
-
var res;
|
|
405
|
-
var _a, _b;
|
|
406
|
-
return __generator(this, function (_c) {
|
|
407
|
-
switch (_c.label) {
|
|
408
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
409
|
-
case 1:
|
|
410
|
-
res = _c.sent();
|
|
411
|
-
if (res.error) {
|
|
412
|
-
throw new Error("error fetching BidVault object at id ".concat(id, ": ").concat(res.error.code));
|
|
413
|
-
}
|
|
414
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBidVault(res.data.bcs.type)) {
|
|
415
|
-
throw new Error("object at id ".concat(id, " is not a BidVault object"));
|
|
416
|
-
}
|
|
417
|
-
return [2 /*return*/, BidVault.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
});
|
|
421
|
-
};
|
|
422
|
-
BidVault.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::BidVault";
|
|
423
|
-
BidVault.$numTypeParams = 0;
|
|
424
|
-
return BidVault;
|
|
425
|
-
}());
|
|
426
|
-
exports.BidVault = BidVault;
|
|
427
|
-
/* ============================== Claim =============================== */
|
|
428
|
-
function isClaim(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Claim"; }
|
|
429
|
-
var Claim = /** @class */ (function () {
|
|
430
|
-
function Claim(typeArgs, fields) {
|
|
431
|
-
this.$typeName = Claim.$typeName;
|
|
432
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Claim.$typeName], __read(typeArgs), false));
|
|
433
|
-
this.$typeArgs = typeArgs;
|
|
434
|
-
this.signer = fields.signer;
|
|
435
|
-
;
|
|
436
|
-
this.index = fields.index;
|
|
437
|
-
;
|
|
438
|
-
this.token = fields.token;
|
|
439
|
-
;
|
|
440
|
-
this.amount = fields.amount;
|
|
441
|
-
}
|
|
442
|
-
Claim.reified = function () {
|
|
443
|
-
var _this = this;
|
|
444
|
-
return { typeName: Claim.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Claim.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Claim.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Claim.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Claim.fromBcs(data); }, bcs: Claim.bcs, fromJSONField: function (field) { return Claim.fromJSONField(field); }, fromJSON: function (json) { return Claim.fromJSON(json); }, fromSuiParsedData: function (content) { return Claim.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
445
|
-
return [2 /*return*/, Claim.fetch(client, id)];
|
|
446
|
-
}); }); }, new: function (fields) { return new Claim([], fields); }, kind: "StructClassReified", };
|
|
447
|
-
};
|
|
448
|
-
Object.defineProperty(Claim, "r", {
|
|
449
|
-
get: function () { return Claim.reified(); },
|
|
450
|
-
enumerable: false,
|
|
451
|
-
configurable: true
|
|
452
|
-
});
|
|
453
|
-
Claim.phantom = function () { return (0, reified_1.phantom)(Claim.reified()); };
|
|
454
|
-
Object.defineProperty(Claim, "p", {
|
|
455
|
-
get: function () { return Claim.phantom(); },
|
|
456
|
-
enumerable: false,
|
|
457
|
-
configurable: true
|
|
458
|
-
});
|
|
459
|
-
Object.defineProperty(Claim, "bcs", {
|
|
460
|
-
get: function () {
|
|
461
|
-
return bcs_1.bcs.struct("Claim", {
|
|
462
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64()
|
|
463
|
-
});
|
|
464
|
-
},
|
|
465
|
-
enumerable: false,
|
|
466
|
-
configurable: true
|
|
467
|
-
});
|
|
468
|
-
;
|
|
469
|
-
Claim.fromFields = function (fields) { return Claim.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount) }); };
|
|
470
|
-
Claim.fromFieldsWithTypes = function (item) {
|
|
471
|
-
if (!isClaim(item.type)) {
|
|
472
|
-
throw new Error("not a Claim type");
|
|
473
|
-
}
|
|
474
|
-
return Claim.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount) });
|
|
475
|
-
};
|
|
476
|
-
Claim.fromBcs = function (data) { return Claim.fromFields(Claim.bcs.parse(data)); };
|
|
477
|
-
Claim.prototype.toJSONField = function () {
|
|
478
|
-
return {
|
|
479
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(),
|
|
480
|
-
};
|
|
481
|
-
};
|
|
482
|
-
Claim.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
483
|
-
Claim.fromJSONField = function (field) { return Claim.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount) }); };
|
|
484
|
-
Claim.fromJSON = function (json) {
|
|
485
|
-
if (json.$typeName !== Claim.$typeName) {
|
|
486
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
487
|
-
}
|
|
488
|
-
;
|
|
489
|
-
return Claim.fromJSONField(json);
|
|
490
|
-
};
|
|
491
|
-
Claim.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
492
|
-
throw new Error("not an object");
|
|
493
|
-
} if (!isClaim(content.type)) {
|
|
494
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Claim object"));
|
|
495
|
-
} return Claim.fromFieldsWithTypes(content); };
|
|
496
|
-
Claim.fetch = function (client, id) {
|
|
497
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
498
|
-
var res;
|
|
499
|
-
var _a, _b;
|
|
500
|
-
return __generator(this, function (_c) {
|
|
501
|
-
switch (_c.label) {
|
|
502
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
503
|
-
case 1:
|
|
504
|
-
res = _c.sent();
|
|
505
|
-
if (res.error) {
|
|
506
|
-
throw new Error("error fetching Claim object at id ".concat(id, ": ").concat(res.error.code));
|
|
507
|
-
}
|
|
508
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isClaim(res.data.bcs.type)) {
|
|
509
|
-
throw new Error("object at id ".concat(id, " is not a Claim object"));
|
|
510
|
-
}
|
|
511
|
-
return [2 /*return*/, Claim.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
});
|
|
515
|
-
};
|
|
516
|
-
Claim.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Claim";
|
|
517
|
-
Claim.$numTypeParams = 0;
|
|
518
|
-
return Claim;
|
|
519
|
-
}());
|
|
520
|
-
exports.Claim = Claim;
|
|
521
|
-
/* ============================== Compound =============================== */
|
|
522
|
-
function isCompound(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Compound"; }
|
|
523
|
-
var Compound = /** @class */ (function () {
|
|
524
|
-
function Compound(typeArgs, fields) {
|
|
525
|
-
this.$typeName = Compound.$typeName;
|
|
526
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Compound.$typeName], __read(typeArgs), false));
|
|
527
|
-
this.$typeArgs = typeArgs;
|
|
528
|
-
this.signer = fields.signer;
|
|
529
|
-
;
|
|
530
|
-
this.index = fields.index;
|
|
531
|
-
;
|
|
532
|
-
this.token = fields.token;
|
|
533
|
-
;
|
|
534
|
-
this.amount = fields.amount;
|
|
535
|
-
;
|
|
536
|
-
this.feeAmount = fields.feeAmount;
|
|
537
|
-
;
|
|
538
|
-
this.feeShareAmount = fields.feeShareAmount;
|
|
539
|
-
;
|
|
540
|
-
this.sharedFeePool = fields.sharedFeePool;
|
|
541
|
-
}
|
|
542
|
-
Compound.reified = function () {
|
|
543
|
-
var _this = this;
|
|
544
|
-
return { typeName: Compound.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Compound.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Compound.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Compound.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Compound.fromBcs(data); }, bcs: Compound.bcs, fromJSONField: function (field) { return Compound.fromJSONField(field); }, fromJSON: function (json) { return Compound.fromJSON(json); }, fromSuiParsedData: function (content) { return Compound.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
545
|
-
return [2 /*return*/, Compound.fetch(client, id)];
|
|
546
|
-
}); }); }, new: function (fields) { return new Compound([], fields); }, kind: "StructClassReified", };
|
|
547
|
-
};
|
|
548
|
-
Object.defineProperty(Compound, "r", {
|
|
549
|
-
get: function () { return Compound.reified(); },
|
|
550
|
-
enumerable: false,
|
|
551
|
-
configurable: true
|
|
552
|
-
});
|
|
553
|
-
Compound.phantom = function () { return (0, reified_1.phantom)(Compound.reified()); };
|
|
554
|
-
Object.defineProperty(Compound, "p", {
|
|
555
|
-
get: function () { return Compound.phantom(); },
|
|
556
|
-
enumerable: false,
|
|
557
|
-
configurable: true
|
|
558
|
-
});
|
|
559
|
-
Object.defineProperty(Compound, "bcs", {
|
|
560
|
-
get: function () {
|
|
561
|
-
return bcs_1.bcs.struct("Compound", {
|
|
562
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64(), fee_amount: bcs_1.bcs.u64(), fee_share_amount: bcs_1.bcs.u64(), shared_fee_pool: structs_1.Option.bcs(bcs_1.bcs.vector(bcs_1.bcs.u8()))
|
|
563
|
-
});
|
|
564
|
-
},
|
|
565
|
-
enumerable: false,
|
|
566
|
-
configurable: true
|
|
567
|
-
});
|
|
568
|
-
;
|
|
569
|
-
Compound.fromFields = function (fields) { return Compound.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount), feeAmount: (0, reified_1.decodeFromFields)("u64", fields.fee_amount), feeShareAmount: (0, reified_1.decodeFromFields)("u64", fields.fee_share_amount), sharedFeePool: (0, reified_1.decodeFromFields)(structs_1.Option.reified(reified.vector("u8")), fields.shared_fee_pool) }); };
|
|
570
|
-
Compound.fromFieldsWithTypes = function (item) {
|
|
571
|
-
if (!isCompound(item.type)) {
|
|
572
|
-
throw new Error("not a Compound type");
|
|
573
|
-
}
|
|
574
|
-
return Compound.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount), feeAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_amount), feeShareAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_share_amount), sharedFeePool: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(reified.vector("u8")), item.fields.shared_fee_pool) });
|
|
575
|
-
};
|
|
576
|
-
Compound.fromBcs = function (data) { return Compound.fromFields(Compound.bcs.parse(data)); };
|
|
577
|
-
Compound.prototype.toJSONField = function () {
|
|
578
|
-
return {
|
|
579
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), feeAmount: this.feeAmount.toString(), feeShareAmount: this.feeShareAmount.toString(), sharedFeePool: (0, reified_1.fieldToJSON)("0x1::option::Option<vector<u8>>", this.sharedFeePool),
|
|
580
|
-
};
|
|
581
|
-
};
|
|
582
|
-
Compound.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
583
|
-
Compound.fromJSONField = function (field) { return Compound.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount), feeAmount: (0, reified_1.decodeFromJSONField)("u64", field.feeAmount), feeShareAmount: (0, reified_1.decodeFromJSONField)("u64", field.feeShareAmount), sharedFeePool: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(reified.vector("u8")), field.sharedFeePool) }); };
|
|
584
|
-
Compound.fromJSON = function (json) {
|
|
585
|
-
if (json.$typeName !== Compound.$typeName) {
|
|
586
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
587
|
-
}
|
|
588
|
-
;
|
|
589
|
-
return Compound.fromJSONField(json);
|
|
590
|
-
};
|
|
591
|
-
Compound.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
592
|
-
throw new Error("not an object");
|
|
593
|
-
} if (!isCompound(content.type)) {
|
|
594
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Compound object"));
|
|
595
|
-
} return Compound.fromFieldsWithTypes(content); };
|
|
596
|
-
Compound.fetch = function (client, id) {
|
|
597
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
598
|
-
var res;
|
|
599
|
-
var _a, _b;
|
|
600
|
-
return __generator(this, function (_c) {
|
|
601
|
-
switch (_c.label) {
|
|
602
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
603
|
-
case 1:
|
|
604
|
-
res = _c.sent();
|
|
605
|
-
if (res.error) {
|
|
606
|
-
throw new Error("error fetching Compound object at id ".concat(id, ": ").concat(res.error.code));
|
|
607
|
-
}
|
|
608
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isCompound(res.data.bcs.type)) {
|
|
609
|
-
throw new Error("object at id ".concat(id, " is not a Compound object"));
|
|
610
|
-
}
|
|
611
|
-
return [2 /*return*/, Compound.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
});
|
|
615
|
-
};
|
|
616
|
-
Compound.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Compound";
|
|
617
|
-
Compound.$numTypeParams = 0;
|
|
618
|
-
return Compound;
|
|
619
|
-
}());
|
|
620
|
-
exports.Compound = Compound;
|
|
621
|
-
/* ============================== Delivery =============================== */
|
|
622
|
-
function isDelivery(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Delivery"; }
|
|
623
|
-
var Delivery = /** @class */ (function () {
|
|
624
|
-
function Delivery(typeArgs, fields) {
|
|
625
|
-
this.$typeName = Delivery.$typeName;
|
|
626
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Delivery.$typeName], __read(typeArgs), false));
|
|
627
|
-
this.$typeArgs = typeArgs;
|
|
628
|
-
this.signer = fields.signer;
|
|
629
|
-
;
|
|
630
|
-
this.index = fields.index;
|
|
631
|
-
;
|
|
632
|
-
this.premiumToken = fields.premiumToken;
|
|
633
|
-
;
|
|
634
|
-
this.incentiveToken = fields.incentiveToken;
|
|
635
|
-
;
|
|
636
|
-
this.premium = fields.premium;
|
|
637
|
-
;
|
|
638
|
-
this.incentive = fields.incentive;
|
|
639
|
-
}
|
|
640
|
-
Delivery.reified = function () {
|
|
641
|
-
var _this = this;
|
|
642
|
-
return { typeName: Delivery.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Delivery.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Delivery.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Delivery.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Delivery.fromBcs(data); }, bcs: Delivery.bcs, fromJSONField: function (field) { return Delivery.fromJSONField(field); }, fromJSON: function (json) { return Delivery.fromJSON(json); }, fromSuiParsedData: function (content) { return Delivery.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
643
|
-
return [2 /*return*/, Delivery.fetch(client, id)];
|
|
644
|
-
}); }); }, new: function (fields) { return new Delivery([], fields); }, kind: "StructClassReified", };
|
|
645
|
-
};
|
|
646
|
-
Object.defineProperty(Delivery, "r", {
|
|
647
|
-
get: function () { return Delivery.reified(); },
|
|
648
|
-
enumerable: false,
|
|
649
|
-
configurable: true
|
|
650
|
-
});
|
|
651
|
-
Delivery.phantom = function () { return (0, reified_1.phantom)(Delivery.reified()); };
|
|
652
|
-
Object.defineProperty(Delivery, "p", {
|
|
653
|
-
get: function () { return Delivery.phantom(); },
|
|
654
|
-
enumerable: false,
|
|
655
|
-
configurable: true
|
|
656
|
-
});
|
|
657
|
-
Object.defineProperty(Delivery, "bcs", {
|
|
658
|
-
get: function () {
|
|
659
|
-
return bcs_1.bcs.struct("Delivery", {
|
|
660
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), premium_token: structs_3.TypeName.bcs, incentive_token: structs_3.TypeName.bcs, premium: bcs_1.bcs.u64(), incentive: bcs_1.bcs.u64()
|
|
661
|
-
});
|
|
662
|
-
},
|
|
663
|
-
enumerable: false,
|
|
664
|
-
configurable: true
|
|
665
|
-
});
|
|
666
|
-
;
|
|
667
|
-
Delivery.fromFields = function (fields) { return Delivery.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), premiumToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.premium_token), incentiveToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.incentive_token), premium: (0, reified_1.decodeFromFields)("u64", fields.premium), incentive: (0, reified_1.decodeFromFields)("u64", fields.incentive) }); };
|
|
668
|
-
Delivery.fromFieldsWithTypes = function (item) {
|
|
669
|
-
if (!isDelivery(item.type)) {
|
|
670
|
-
throw new Error("not a Delivery type");
|
|
671
|
-
}
|
|
672
|
-
return Delivery.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), premiumToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.premium_token), incentiveToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.incentive_token), premium: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.premium), incentive: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive) });
|
|
673
|
-
};
|
|
674
|
-
Delivery.fromBcs = function (data) { return Delivery.fromFields(Delivery.bcs.parse(data)); };
|
|
675
|
-
Delivery.prototype.toJSONField = function () {
|
|
676
|
-
return {
|
|
677
|
-
signer: this.signer, index: this.index.toString(), premiumToken: this.premiumToken.toJSONField(), incentiveToken: this.incentiveToken.toJSONField(), premium: this.premium.toString(), incentive: this.incentive.toString(),
|
|
678
|
-
};
|
|
679
|
-
};
|
|
680
|
-
Delivery.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
681
|
-
Delivery.fromJSONField = function (field) { return Delivery.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), premiumToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.premiumToken), incentiveToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.incentiveToken), premium: (0, reified_1.decodeFromJSONField)("u64", field.premium), incentive: (0, reified_1.decodeFromJSONField)("u64", field.incentive) }); };
|
|
682
|
-
Delivery.fromJSON = function (json) {
|
|
683
|
-
if (json.$typeName !== Delivery.$typeName) {
|
|
684
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
685
|
-
}
|
|
686
|
-
;
|
|
687
|
-
return Delivery.fromJSONField(json);
|
|
688
|
-
};
|
|
689
|
-
Delivery.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
690
|
-
throw new Error("not an object");
|
|
691
|
-
} if (!isDelivery(content.type)) {
|
|
692
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Delivery object"));
|
|
693
|
-
} return Delivery.fromFieldsWithTypes(content); };
|
|
694
|
-
Delivery.fetch = function (client, id) {
|
|
695
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
696
|
-
var res;
|
|
697
|
-
var _a, _b;
|
|
698
|
-
return __generator(this, function (_c) {
|
|
699
|
-
switch (_c.label) {
|
|
700
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
701
|
-
case 1:
|
|
702
|
-
res = _c.sent();
|
|
703
|
-
if (res.error) {
|
|
704
|
-
throw new Error("error fetching Delivery object at id ".concat(id, ": ").concat(res.error.code));
|
|
705
|
-
}
|
|
706
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDelivery(res.data.bcs.type)) {
|
|
707
|
-
throw new Error("object at id ".concat(id, " is not a Delivery object"));
|
|
708
|
-
}
|
|
709
|
-
return [2 /*return*/, Delivery.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
});
|
|
713
|
-
};
|
|
714
|
-
Delivery.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Delivery";
|
|
715
|
-
Delivery.$numTypeParams = 0;
|
|
716
|
-
return Delivery;
|
|
717
|
-
}());
|
|
718
|
-
exports.Delivery = Delivery;
|
|
719
|
-
/* ============================== Deposit =============================== */
|
|
720
|
-
function isDeposit(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Deposit"; }
|
|
721
|
-
var Deposit = /** @class */ (function () {
|
|
722
|
-
function Deposit(typeArgs, fields) {
|
|
723
|
-
this.$typeName = Deposit.$typeName;
|
|
724
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Deposit.$typeName], __read(typeArgs), false));
|
|
725
|
-
this.$typeArgs = typeArgs;
|
|
726
|
-
this.signer = fields.signer;
|
|
727
|
-
;
|
|
728
|
-
this.index = fields.index;
|
|
729
|
-
;
|
|
730
|
-
this.token = fields.token;
|
|
731
|
-
;
|
|
732
|
-
this.amount = fields.amount;
|
|
733
|
-
}
|
|
734
|
-
Deposit.reified = function () {
|
|
735
|
-
var _this = this;
|
|
736
|
-
return { typeName: Deposit.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Deposit.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Deposit.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Deposit.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Deposit.fromBcs(data); }, bcs: Deposit.bcs, fromJSONField: function (field) { return Deposit.fromJSONField(field); }, fromJSON: function (json) { return Deposit.fromJSON(json); }, fromSuiParsedData: function (content) { return Deposit.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
737
|
-
return [2 /*return*/, Deposit.fetch(client, id)];
|
|
738
|
-
}); }); }, new: function (fields) { return new Deposit([], fields); }, kind: "StructClassReified", };
|
|
739
|
-
};
|
|
740
|
-
Object.defineProperty(Deposit, "r", {
|
|
741
|
-
get: function () { return Deposit.reified(); },
|
|
742
|
-
enumerable: false,
|
|
743
|
-
configurable: true
|
|
744
|
-
});
|
|
745
|
-
Deposit.phantom = function () { return (0, reified_1.phantom)(Deposit.reified()); };
|
|
746
|
-
Object.defineProperty(Deposit, "p", {
|
|
747
|
-
get: function () { return Deposit.phantom(); },
|
|
748
|
-
enumerable: false,
|
|
749
|
-
configurable: true
|
|
750
|
-
});
|
|
751
|
-
Object.defineProperty(Deposit, "bcs", {
|
|
752
|
-
get: function () {
|
|
753
|
-
return bcs_1.bcs.struct("Deposit", {
|
|
754
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64()
|
|
755
|
-
});
|
|
756
|
-
},
|
|
757
|
-
enumerable: false,
|
|
758
|
-
configurable: true
|
|
759
|
-
});
|
|
760
|
-
;
|
|
761
|
-
Deposit.fromFields = function (fields) { return Deposit.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount) }); };
|
|
762
|
-
Deposit.fromFieldsWithTypes = function (item) {
|
|
763
|
-
if (!isDeposit(item.type)) {
|
|
764
|
-
throw new Error("not a Deposit type");
|
|
765
|
-
}
|
|
766
|
-
return Deposit.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount) });
|
|
767
|
-
};
|
|
768
|
-
Deposit.fromBcs = function (data) { return Deposit.fromFields(Deposit.bcs.parse(data)); };
|
|
769
|
-
Deposit.prototype.toJSONField = function () {
|
|
770
|
-
return {
|
|
771
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(),
|
|
772
|
-
};
|
|
773
|
-
};
|
|
774
|
-
Deposit.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
775
|
-
Deposit.fromJSONField = function (field) { return Deposit.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount) }); };
|
|
776
|
-
Deposit.fromJSON = function (json) {
|
|
777
|
-
if (json.$typeName !== Deposit.$typeName) {
|
|
778
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
779
|
-
}
|
|
780
|
-
;
|
|
781
|
-
return Deposit.fromJSONField(json);
|
|
782
|
-
};
|
|
783
|
-
Deposit.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
784
|
-
throw new Error("not an object");
|
|
785
|
-
} if (!isDeposit(content.type)) {
|
|
786
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Deposit object"));
|
|
787
|
-
} return Deposit.fromFieldsWithTypes(content); };
|
|
788
|
-
Deposit.fetch = function (client, id) {
|
|
789
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
790
|
-
var res;
|
|
791
|
-
var _a, _b;
|
|
792
|
-
return __generator(this, function (_c) {
|
|
793
|
-
switch (_c.label) {
|
|
794
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
795
|
-
case 1:
|
|
796
|
-
res = _c.sent();
|
|
797
|
-
if (res.error) {
|
|
798
|
-
throw new Error("error fetching Deposit object at id ".concat(id, ": ").concat(res.error.code));
|
|
799
|
-
}
|
|
800
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDeposit(res.data.bcs.type)) {
|
|
801
|
-
throw new Error("object at id ".concat(id, " is not a Deposit object"));
|
|
802
|
-
}
|
|
803
|
-
return [2 /*return*/, Deposit.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
804
|
-
}
|
|
805
|
-
});
|
|
806
|
-
});
|
|
807
|
-
};
|
|
808
|
-
Deposit.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Deposit";
|
|
809
|
-
Deposit.$numTypeParams = 0;
|
|
810
|
-
return Deposit;
|
|
811
|
-
}());
|
|
812
|
-
exports.Deposit = Deposit;
|
|
813
|
-
/* ============================== DepositShare =============================== */
|
|
814
|
-
function isDepositShare(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::DepositShare"; }
|
|
815
|
-
var DepositShare = /** @class */ (function () {
|
|
816
|
-
function DepositShare(typeArgs, fields) {
|
|
817
|
-
this.$typeName = DepositShare.$typeName;
|
|
818
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DepositShare.$typeName], __read(typeArgs), false));
|
|
819
|
-
this.$typeArgs = typeArgs;
|
|
820
|
-
this.receipt = fields.receipt;
|
|
821
|
-
;
|
|
822
|
-
this.activeShare = fields.activeShare;
|
|
823
|
-
;
|
|
824
|
-
this.deactivatingShare = fields.deactivatingShare;
|
|
825
|
-
;
|
|
826
|
-
this.inactiveShare = fields.inactiveShare;
|
|
827
|
-
;
|
|
828
|
-
this.warmupShare = fields.warmupShare;
|
|
829
|
-
;
|
|
830
|
-
this.premiumShare = fields.premiumShare;
|
|
831
|
-
;
|
|
832
|
-
this.incentiveShare = fields.incentiveShare;
|
|
833
|
-
;
|
|
834
|
-
this.u64Padding = fields.u64Padding;
|
|
835
|
-
}
|
|
836
|
-
DepositShare.reified = function () {
|
|
837
|
-
var _this = this;
|
|
838
|
-
return { typeName: DepositShare.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DepositShare.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return DepositShare.fromFields(fields); }, fromFieldsWithTypes: function (item) { return DepositShare.fromFieldsWithTypes(item); }, fromBcs: function (data) { return DepositShare.fromBcs(data); }, bcs: DepositShare.bcs, fromJSONField: function (field) { return DepositShare.fromJSONField(field); }, fromJSON: function (json) { return DepositShare.fromJSON(json); }, fromSuiParsedData: function (content) { return DepositShare.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
839
|
-
return [2 /*return*/, DepositShare.fetch(client, id)];
|
|
840
|
-
}); }); }, new: function (fields) { return new DepositShare([], fields); }, kind: "StructClassReified", };
|
|
841
|
-
};
|
|
842
|
-
Object.defineProperty(DepositShare, "r", {
|
|
843
|
-
get: function () { return DepositShare.reified(); },
|
|
844
|
-
enumerable: false,
|
|
845
|
-
configurable: true
|
|
846
|
-
});
|
|
847
|
-
DepositShare.phantom = function () { return (0, reified_1.phantom)(DepositShare.reified()); };
|
|
848
|
-
Object.defineProperty(DepositShare, "p", {
|
|
849
|
-
get: function () { return DepositShare.phantom(); },
|
|
850
|
-
enumerable: false,
|
|
851
|
-
configurable: true
|
|
852
|
-
});
|
|
853
|
-
Object.defineProperty(DepositShare, "bcs", {
|
|
854
|
-
get: function () {
|
|
855
|
-
return bcs_1.bcs.struct("DepositShare", {
|
|
856
|
-
receipt: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), active_share: bcs_1.bcs.u64(), deactivating_share: bcs_1.bcs.u64(), inactive_share: bcs_1.bcs.u64(), warmup_share: bcs_1.bcs.u64(), premium_share: bcs_1.bcs.u64(), incentive_share: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
857
|
-
});
|
|
858
|
-
},
|
|
859
|
-
enumerable: false,
|
|
860
|
-
configurable: true
|
|
861
|
-
});
|
|
862
|
-
;
|
|
863
|
-
DepositShare.fromFields = function (fields) { return DepositShare.reified().new({ receipt: (0, reified_1.decodeFromFields)("address", fields.receipt), activeShare: (0, reified_1.decodeFromFields)("u64", fields.active_share), deactivatingShare: (0, reified_1.decodeFromFields)("u64", fields.deactivating_share), inactiveShare: (0, reified_1.decodeFromFields)("u64", fields.inactive_share), warmupShare: (0, reified_1.decodeFromFields)("u64", fields.warmup_share), premiumShare: (0, reified_1.decodeFromFields)("u64", fields.premium_share), incentiveShare: (0, reified_1.decodeFromFields)("u64", fields.incentive_share), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
864
|
-
DepositShare.fromFieldsWithTypes = function (item) {
|
|
865
|
-
if (!isDepositShare(item.type)) {
|
|
866
|
-
throw new Error("not a DepositShare type");
|
|
867
|
-
}
|
|
868
|
-
return DepositShare.reified().new({ receipt: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.receipt), activeShare: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.active_share), deactivatingShare: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deactivating_share), inactiveShare: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.inactive_share), warmupShare: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.warmup_share), premiumShare: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.premium_share), incentiveShare: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_share), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
869
|
-
};
|
|
870
|
-
DepositShare.fromBcs = function (data) { return DepositShare.fromFields(DepositShare.bcs.parse(data)); };
|
|
871
|
-
DepositShare.prototype.toJSONField = function () {
|
|
872
|
-
return {
|
|
873
|
-
receipt: this.receipt, activeShare: this.activeShare.toString(), deactivatingShare: this.deactivatingShare.toString(), inactiveShare: this.inactiveShare.toString(), warmupShare: this.warmupShare.toString(), premiumShare: this.premiumShare.toString(), incentiveShare: this.incentiveShare.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
874
|
-
};
|
|
875
|
-
};
|
|
876
|
-
DepositShare.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
877
|
-
DepositShare.fromJSONField = function (field) { return DepositShare.reified().new({ receipt: (0, reified_1.decodeFromJSONField)("address", field.receipt), activeShare: (0, reified_1.decodeFromJSONField)("u64", field.activeShare), deactivatingShare: (0, reified_1.decodeFromJSONField)("u64", field.deactivatingShare), inactiveShare: (0, reified_1.decodeFromJSONField)("u64", field.inactiveShare), warmupShare: (0, reified_1.decodeFromJSONField)("u64", field.warmupShare), premiumShare: (0, reified_1.decodeFromJSONField)("u64", field.premiumShare), incentiveShare: (0, reified_1.decodeFromJSONField)("u64", field.incentiveShare), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
878
|
-
DepositShare.fromJSON = function (json) {
|
|
879
|
-
if (json.$typeName !== DepositShare.$typeName) {
|
|
880
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
881
|
-
}
|
|
882
|
-
;
|
|
883
|
-
return DepositShare.fromJSONField(json);
|
|
884
|
-
};
|
|
885
|
-
DepositShare.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
886
|
-
throw new Error("not an object");
|
|
887
|
-
} if (!isDepositShare(content.type)) {
|
|
888
|
-
throw new Error("object at ".concat(content.fields.id, " is not a DepositShare object"));
|
|
889
|
-
} return DepositShare.fromFieldsWithTypes(content); };
|
|
890
|
-
DepositShare.fetch = function (client, id) {
|
|
891
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
892
|
-
var res;
|
|
893
|
-
var _a, _b;
|
|
894
|
-
return __generator(this, function (_c) {
|
|
895
|
-
switch (_c.label) {
|
|
896
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
897
|
-
case 1:
|
|
898
|
-
res = _c.sent();
|
|
899
|
-
if (res.error) {
|
|
900
|
-
throw new Error("error fetching DepositShare object at id ".concat(id, ": ").concat(res.error.code));
|
|
901
|
-
}
|
|
902
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDepositShare(res.data.bcs.type)) {
|
|
903
|
-
throw new Error("object at id ".concat(id, " is not a DepositShare object"));
|
|
904
|
-
}
|
|
905
|
-
return [2 /*return*/, DepositShare.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
906
|
-
}
|
|
907
|
-
});
|
|
908
|
-
});
|
|
909
|
-
};
|
|
910
|
-
DepositShare.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::DepositShare";
|
|
911
|
-
DepositShare.$numTypeParams = 0;
|
|
912
|
-
return DepositShare;
|
|
913
|
-
}());
|
|
914
|
-
exports.DepositShare = DepositShare;
|
|
915
|
-
/* ============================== DepositVault =============================== */
|
|
916
|
-
function isDepositVault(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::DepositVault"; }
|
|
917
|
-
var DepositVault = /** @class */ (function () {
|
|
918
|
-
function DepositVault(typeArgs, fields) {
|
|
919
|
-
this.$typeName = DepositVault.$typeName;
|
|
920
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DepositVault.$typeName], __read(typeArgs), false));
|
|
921
|
-
this.$typeArgs = typeArgs;
|
|
922
|
-
this.id = fields.id;
|
|
923
|
-
;
|
|
924
|
-
this.depositToken = fields.depositToken;
|
|
925
|
-
;
|
|
926
|
-
this.bidToken = fields.bidToken;
|
|
927
|
-
;
|
|
928
|
-
this.incentiveToken = fields.incentiveToken;
|
|
929
|
-
;
|
|
930
|
-
this.index = fields.index;
|
|
931
|
-
;
|
|
932
|
-
this.feeBp = fields.feeBp;
|
|
933
|
-
;
|
|
934
|
-
this.feeShareBp = fields.feeShareBp;
|
|
935
|
-
;
|
|
936
|
-
this.sharedFeePool = fields.sharedFeePool;
|
|
937
|
-
;
|
|
938
|
-
this.activeShareSupply = fields.activeShareSupply;
|
|
939
|
-
;
|
|
940
|
-
this.deactivatingShareSupply = fields.deactivatingShareSupply;
|
|
941
|
-
;
|
|
942
|
-
this.inactiveShareSupply = fields.inactiveShareSupply;
|
|
943
|
-
;
|
|
944
|
-
this.warmupShareSupply = fields.warmupShareSupply;
|
|
945
|
-
;
|
|
946
|
-
this.premiumShareSupply = fields.premiumShareSupply;
|
|
947
|
-
;
|
|
948
|
-
this.incentiveShareSupply = fields.incentiveShareSupply;
|
|
949
|
-
;
|
|
950
|
-
this.hasNext = fields.hasNext;
|
|
951
|
-
;
|
|
952
|
-
this.metadata = fields.metadata;
|
|
953
|
-
;
|
|
954
|
-
this.u64Padding = fields.u64Padding;
|
|
955
|
-
;
|
|
956
|
-
this.bcsPadding = fields.bcsPadding;
|
|
957
|
-
}
|
|
958
|
-
DepositVault.reified = function () {
|
|
959
|
-
var _this = this;
|
|
960
|
-
return { typeName: DepositVault.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DepositVault.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return DepositVault.fromFields(fields); }, fromFieldsWithTypes: function (item) { return DepositVault.fromFieldsWithTypes(item); }, fromBcs: function (data) { return DepositVault.fromBcs(data); }, bcs: DepositVault.bcs, fromJSONField: function (field) { return DepositVault.fromJSONField(field); }, fromJSON: function (json) { return DepositVault.fromJSON(json); }, fromSuiParsedData: function (content) { return DepositVault.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
961
|
-
return [2 /*return*/, DepositVault.fetch(client, id)];
|
|
962
|
-
}); }); }, new: function (fields) { return new DepositVault([], fields); }, kind: "StructClassReified", };
|
|
963
|
-
};
|
|
964
|
-
Object.defineProperty(DepositVault, "r", {
|
|
965
|
-
get: function () { return DepositVault.reified(); },
|
|
966
|
-
enumerable: false,
|
|
967
|
-
configurable: true
|
|
968
|
-
});
|
|
969
|
-
DepositVault.phantom = function () { return (0, reified_1.phantom)(DepositVault.reified()); };
|
|
970
|
-
Object.defineProperty(DepositVault, "p", {
|
|
971
|
-
get: function () { return DepositVault.phantom(); },
|
|
972
|
-
enumerable: false,
|
|
973
|
-
configurable: true
|
|
974
|
-
});
|
|
975
|
-
Object.defineProperty(DepositVault, "bcs", {
|
|
976
|
-
get: function () {
|
|
977
|
-
return bcs_1.bcs.struct("DepositVault", {
|
|
978
|
-
id: structs_4.UID.bcs, deposit_token: structs_3.TypeName.bcs, bid_token: structs_3.TypeName.bcs, incentive_token: structs_1.Option.bcs(structs_3.TypeName.bcs), index: bcs_1.bcs.u64(), fee_bp: bcs_1.bcs.u64(), fee_share_bp: bcs_1.bcs.u64(), shared_fee_pool: structs_1.Option.bcs(bcs_1.bcs.vector(bcs_1.bcs.u8())), active_share_supply: bcs_1.bcs.u64(), deactivating_share_supply: bcs_1.bcs.u64(), inactive_share_supply: bcs_1.bcs.u64(), warmup_share_supply: bcs_1.bcs.u64(), premium_share_supply: bcs_1.bcs.u64(), incentive_share_supply: bcs_1.bcs.u64(), has_next: bcs_1.bcs.bool(), metadata: structs_2.String.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()), bcs_padding: bcs_1.bcs.vector(bcs_1.bcs.u8())
|
|
979
|
-
});
|
|
980
|
-
},
|
|
981
|
-
enumerable: false,
|
|
982
|
-
configurable: true
|
|
983
|
-
});
|
|
984
|
-
;
|
|
985
|
-
DepositVault.fromFields = function (fields) { return DepositVault.reified().new({ id: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.id), depositToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.deposit_token), bidToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.bid_token), incentiveToken: (0, reified_1.decodeFromFields)(structs_1.Option.reified(structs_3.TypeName.reified()), fields.incentive_token), index: (0, reified_1.decodeFromFields)("u64", fields.index), feeBp: (0, reified_1.decodeFromFields)("u64", fields.fee_bp), feeShareBp: (0, reified_1.decodeFromFields)("u64", fields.fee_share_bp), sharedFeePool: (0, reified_1.decodeFromFields)(structs_1.Option.reified(reified.vector("u8")), fields.shared_fee_pool), activeShareSupply: (0, reified_1.decodeFromFields)("u64", fields.active_share_supply), deactivatingShareSupply: (0, reified_1.decodeFromFields)("u64", fields.deactivating_share_supply), inactiveShareSupply: (0, reified_1.decodeFromFields)("u64", fields.inactive_share_supply), warmupShareSupply: (0, reified_1.decodeFromFields)("u64", fields.warmup_share_supply), premiumShareSupply: (0, reified_1.decodeFromFields)("u64", fields.premium_share_supply), incentiveShareSupply: (0, reified_1.decodeFromFields)("u64", fields.incentive_share_supply), hasNext: (0, reified_1.decodeFromFields)("bool", fields.has_next), metadata: (0, reified_1.decodeFromFields)(structs_2.String.reified(), fields.metadata), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFields)(reified.vector("u8"), fields.bcs_padding) }); };
|
|
986
|
-
DepositVault.fromFieldsWithTypes = function (item) {
|
|
987
|
-
if (!isDepositVault(item.type)) {
|
|
988
|
-
throw new Error("not a DepositVault type");
|
|
989
|
-
}
|
|
990
|
-
return DepositVault.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.id), depositToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.deposit_token), bidToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.bid_token), incentiveToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(structs_3.TypeName.reified()), item.fields.incentive_token), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), feeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_bp), feeShareBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_share_bp), sharedFeePool: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(reified.vector("u8")), item.fields.shared_fee_pool), activeShareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.active_share_supply), deactivatingShareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deactivating_share_supply), inactiveShareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.inactive_share_supply), warmupShareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.warmup_share_supply), premiumShareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.premium_share_supply), incentiveShareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_share_supply), hasNext: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.has_next), metadata: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.String.reified(), item.fields.metadata), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u8"), item.fields.bcs_padding) });
|
|
991
|
-
};
|
|
992
|
-
DepositVault.fromBcs = function (data) { return DepositVault.fromFields(DepositVault.bcs.parse(data)); };
|
|
993
|
-
DepositVault.prototype.toJSONField = function () {
|
|
994
|
-
return {
|
|
995
|
-
id: this.id, depositToken: this.depositToken.toJSONField(), bidToken: this.bidToken.toJSONField(), incentiveToken: (0, reified_1.fieldToJSON)("0x1::option::Option<0x1::type_name::TypeName>", this.incentiveToken), index: this.index.toString(), feeBp: this.feeBp.toString(), feeShareBp: this.feeShareBp.toString(), sharedFeePool: (0, reified_1.fieldToJSON)("0x1::option::Option<vector<u8>>", this.sharedFeePool), activeShareSupply: this.activeShareSupply.toString(), deactivatingShareSupply: this.deactivatingShareSupply.toString(), inactiveShareSupply: this.inactiveShareSupply.toString(), warmupShareSupply: this.warmupShareSupply.toString(), premiumShareSupply: this.premiumShareSupply.toString(), incentiveShareSupply: this.incentiveShareSupply.toString(), hasNext: this.hasNext, metadata: this.metadata, u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding), bcsPadding: (0, reified_1.fieldToJSON)("vector<u8>", this.bcsPadding),
|
|
996
|
-
};
|
|
997
|
-
};
|
|
998
|
-
DepositVault.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
999
|
-
DepositVault.fromJSONField = function (field) { return DepositVault.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.id), depositToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.depositToken), bidToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bidToken), incentiveToken: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(structs_3.TypeName.reified()), field.incentiveToken), index: (0, reified_1.decodeFromJSONField)("u64", field.index), feeBp: (0, reified_1.decodeFromJSONField)("u64", field.feeBp), feeShareBp: (0, reified_1.decodeFromJSONField)("u64", field.feeShareBp), sharedFeePool: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(reified.vector("u8")), field.sharedFeePool), activeShareSupply: (0, reified_1.decodeFromJSONField)("u64", field.activeShareSupply), deactivatingShareSupply: (0, reified_1.decodeFromJSONField)("u64", field.deactivatingShareSupply), inactiveShareSupply: (0, reified_1.decodeFromJSONField)("u64", field.inactiveShareSupply), warmupShareSupply: (0, reified_1.decodeFromJSONField)("u64", field.warmupShareSupply), premiumShareSupply: (0, reified_1.decodeFromJSONField)("u64", field.premiumShareSupply), incentiveShareSupply: (0, reified_1.decodeFromJSONField)("u64", field.incentiveShareSupply), hasNext: (0, reified_1.decodeFromJSONField)("bool", field.hasNext), metadata: (0, reified_1.decodeFromJSONField)(structs_2.String.reified(), field.metadata), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding), bcsPadding: (0, reified_1.decodeFromJSONField)(reified.vector("u8"), field.bcsPadding) }); };
|
|
1000
|
-
DepositVault.fromJSON = function (json) {
|
|
1001
|
-
if (json.$typeName !== DepositVault.$typeName) {
|
|
1002
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1003
|
-
}
|
|
1004
|
-
;
|
|
1005
|
-
return DepositVault.fromJSONField(json);
|
|
1006
|
-
};
|
|
1007
|
-
DepositVault.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1008
|
-
throw new Error("not an object");
|
|
1009
|
-
} if (!isDepositVault(content.type)) {
|
|
1010
|
-
throw new Error("object at ".concat(content.fields.id, " is not a DepositVault object"));
|
|
1011
|
-
} return DepositVault.fromFieldsWithTypes(content); };
|
|
1012
|
-
DepositVault.fetch = function (client, id) {
|
|
1013
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1014
|
-
var res;
|
|
1015
|
-
var _a, _b;
|
|
1016
|
-
return __generator(this, function (_c) {
|
|
1017
|
-
switch (_c.label) {
|
|
1018
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1019
|
-
case 1:
|
|
1020
|
-
res = _c.sent();
|
|
1021
|
-
if (res.error) {
|
|
1022
|
-
throw new Error("error fetching DepositVault object at id ".concat(id, ": ").concat(res.error.code));
|
|
1023
|
-
}
|
|
1024
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDepositVault(res.data.bcs.type)) {
|
|
1025
|
-
throw new Error("object at id ".concat(id, " is not a DepositVault object"));
|
|
1026
|
-
}
|
|
1027
|
-
return [2 /*return*/, DepositVault.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1028
|
-
}
|
|
1029
|
-
});
|
|
1030
|
-
});
|
|
1031
|
-
};
|
|
1032
|
-
DepositVault.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::DepositVault";
|
|
1033
|
-
DepositVault.$numTypeParams = 0;
|
|
1034
|
-
return DepositVault;
|
|
1035
|
-
}());
|
|
1036
|
-
exports.DepositVault = DepositVault;
|
|
1037
|
-
/* ============================== Exercise =============================== */
|
|
1038
|
-
function isExercise(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Exercise"; }
|
|
1039
|
-
var Exercise = /** @class */ (function () {
|
|
1040
|
-
function Exercise(typeArgs, fields) {
|
|
1041
|
-
this.$typeName = Exercise.$typeName;
|
|
1042
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Exercise.$typeName], __read(typeArgs), false));
|
|
1043
|
-
this.$typeArgs = typeArgs;
|
|
1044
|
-
this.signer = fields.signer;
|
|
1045
|
-
;
|
|
1046
|
-
this.index = fields.index;
|
|
1047
|
-
;
|
|
1048
|
-
this.depositToken = fields.depositToken;
|
|
1049
|
-
;
|
|
1050
|
-
this.incentiveToken = fields.incentiveToken;
|
|
1051
|
-
;
|
|
1052
|
-
this.amount = fields.amount;
|
|
1053
|
-
}
|
|
1054
|
-
Exercise.reified = function () {
|
|
1055
|
-
var _this = this;
|
|
1056
|
-
return { typeName: Exercise.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Exercise.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Exercise.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Exercise.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Exercise.fromBcs(data); }, bcs: Exercise.bcs, fromJSONField: function (field) { return Exercise.fromJSONField(field); }, fromJSON: function (json) { return Exercise.fromJSON(json); }, fromSuiParsedData: function (content) { return Exercise.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1057
|
-
return [2 /*return*/, Exercise.fetch(client, id)];
|
|
1058
|
-
}); }); }, new: function (fields) { return new Exercise([], fields); }, kind: "StructClassReified", };
|
|
1059
|
-
};
|
|
1060
|
-
Object.defineProperty(Exercise, "r", {
|
|
1061
|
-
get: function () { return Exercise.reified(); },
|
|
1062
|
-
enumerable: false,
|
|
1063
|
-
configurable: true
|
|
1064
|
-
});
|
|
1065
|
-
Exercise.phantom = function () { return (0, reified_1.phantom)(Exercise.reified()); };
|
|
1066
|
-
Object.defineProperty(Exercise, "p", {
|
|
1067
|
-
get: function () { return Exercise.phantom(); },
|
|
1068
|
-
enumerable: false,
|
|
1069
|
-
configurable: true
|
|
1070
|
-
});
|
|
1071
|
-
Object.defineProperty(Exercise, "bcs", {
|
|
1072
|
-
get: function () {
|
|
1073
|
-
return bcs_1.bcs.struct("Exercise", {
|
|
1074
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), deposit_token: structs_3.TypeName.bcs, incentive_token: structs_1.Option.bcs(structs_3.TypeName.bcs), amount: bcs_1.bcs.u64()
|
|
1075
|
-
});
|
|
1076
|
-
},
|
|
1077
|
-
enumerable: false,
|
|
1078
|
-
configurable: true
|
|
1079
|
-
});
|
|
1080
|
-
;
|
|
1081
|
-
Exercise.fromFields = function (fields) { return Exercise.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), depositToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.deposit_token), incentiveToken: (0, reified_1.decodeFromFields)(structs_1.Option.reified(structs_3.TypeName.reified()), fields.incentive_token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount) }); };
|
|
1082
|
-
Exercise.fromFieldsWithTypes = function (item) {
|
|
1083
|
-
if (!isExercise(item.type)) {
|
|
1084
|
-
throw new Error("not a Exercise type");
|
|
1085
|
-
}
|
|
1086
|
-
return Exercise.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), depositToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.deposit_token), incentiveToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(structs_3.TypeName.reified()), item.fields.incentive_token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount) });
|
|
1087
|
-
};
|
|
1088
|
-
Exercise.fromBcs = function (data) { return Exercise.fromFields(Exercise.bcs.parse(data)); };
|
|
1089
|
-
Exercise.prototype.toJSONField = function () {
|
|
1090
|
-
return {
|
|
1091
|
-
signer: this.signer, index: this.index.toString(), depositToken: this.depositToken.toJSONField(), incentiveToken: (0, reified_1.fieldToJSON)("0x1::option::Option<0x1::type_name::TypeName>", this.incentiveToken), amount: this.amount.toString(),
|
|
1092
|
-
};
|
|
1093
|
-
};
|
|
1094
|
-
Exercise.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1095
|
-
Exercise.fromJSONField = function (field) { return Exercise.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), depositToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.depositToken), incentiveToken: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(structs_3.TypeName.reified()), field.incentiveToken), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount) }); };
|
|
1096
|
-
Exercise.fromJSON = function (json) {
|
|
1097
|
-
if (json.$typeName !== Exercise.$typeName) {
|
|
1098
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1099
|
-
}
|
|
1100
|
-
;
|
|
1101
|
-
return Exercise.fromJSONField(json);
|
|
1102
|
-
};
|
|
1103
|
-
Exercise.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1104
|
-
throw new Error("not an object");
|
|
1105
|
-
} if (!isExercise(content.type)) {
|
|
1106
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Exercise object"));
|
|
1107
|
-
} return Exercise.fromFieldsWithTypes(content); };
|
|
1108
|
-
Exercise.fetch = function (client, id) {
|
|
1109
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1110
|
-
var res;
|
|
1111
|
-
var _a, _b;
|
|
1112
|
-
return __generator(this, function (_c) {
|
|
1113
|
-
switch (_c.label) {
|
|
1114
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1115
|
-
case 1:
|
|
1116
|
-
res = _c.sent();
|
|
1117
|
-
if (res.error) {
|
|
1118
|
-
throw new Error("error fetching Exercise object at id ".concat(id, ": ").concat(res.error.code));
|
|
1119
|
-
}
|
|
1120
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isExercise(res.data.bcs.type)) {
|
|
1121
|
-
throw new Error("object at id ".concat(id, " is not a Exercise object"));
|
|
1122
|
-
}
|
|
1123
|
-
return [2 /*return*/, Exercise.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1124
|
-
}
|
|
1125
|
-
});
|
|
1126
|
-
});
|
|
1127
|
-
};
|
|
1128
|
-
Exercise.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Exercise";
|
|
1129
|
-
Exercise.$numTypeParams = 0;
|
|
1130
|
-
return Exercise;
|
|
1131
|
-
}());
|
|
1132
|
-
exports.Exercise = Exercise;
|
|
1133
|
-
/* ============================== Harvest =============================== */
|
|
1134
|
-
function isHarvest(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Harvest"; }
|
|
1135
|
-
var Harvest = /** @class */ (function () {
|
|
1136
|
-
function Harvest(typeArgs, fields) {
|
|
1137
|
-
this.$typeName = Harvest.$typeName;
|
|
1138
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Harvest.$typeName], __read(typeArgs), false));
|
|
1139
|
-
this.$typeArgs = typeArgs;
|
|
1140
|
-
this.signer = fields.signer;
|
|
1141
|
-
;
|
|
1142
|
-
this.index = fields.index;
|
|
1143
|
-
;
|
|
1144
|
-
this.token = fields.token;
|
|
1145
|
-
;
|
|
1146
|
-
this.amount = fields.amount;
|
|
1147
|
-
;
|
|
1148
|
-
this.feeAmount = fields.feeAmount;
|
|
1149
|
-
;
|
|
1150
|
-
this.feeShareAmount = fields.feeShareAmount;
|
|
1151
|
-
;
|
|
1152
|
-
this.sharedFeePool = fields.sharedFeePool;
|
|
1153
|
-
}
|
|
1154
|
-
Harvest.reified = function () {
|
|
1155
|
-
var _this = this;
|
|
1156
|
-
return { typeName: Harvest.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Harvest.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Harvest.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Harvest.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Harvest.fromBcs(data); }, bcs: Harvest.bcs, fromJSONField: function (field) { return Harvest.fromJSONField(field); }, fromJSON: function (json) { return Harvest.fromJSON(json); }, fromSuiParsedData: function (content) { return Harvest.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1157
|
-
return [2 /*return*/, Harvest.fetch(client, id)];
|
|
1158
|
-
}); }); }, new: function (fields) { return new Harvest([], fields); }, kind: "StructClassReified", };
|
|
1159
|
-
};
|
|
1160
|
-
Object.defineProperty(Harvest, "r", {
|
|
1161
|
-
get: function () { return Harvest.reified(); },
|
|
1162
|
-
enumerable: false,
|
|
1163
|
-
configurable: true
|
|
1164
|
-
});
|
|
1165
|
-
Harvest.phantom = function () { return (0, reified_1.phantom)(Harvest.reified()); };
|
|
1166
|
-
Object.defineProperty(Harvest, "p", {
|
|
1167
|
-
get: function () { return Harvest.phantom(); },
|
|
1168
|
-
enumerable: false,
|
|
1169
|
-
configurable: true
|
|
1170
|
-
});
|
|
1171
|
-
Object.defineProperty(Harvest, "bcs", {
|
|
1172
|
-
get: function () {
|
|
1173
|
-
return bcs_1.bcs.struct("Harvest", {
|
|
1174
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64(), fee_amount: bcs_1.bcs.u64(), fee_share_amount: bcs_1.bcs.u64(), shared_fee_pool: structs_1.Option.bcs(bcs_1.bcs.vector(bcs_1.bcs.u8()))
|
|
1175
|
-
});
|
|
1176
|
-
},
|
|
1177
|
-
enumerable: false,
|
|
1178
|
-
configurable: true
|
|
1179
|
-
});
|
|
1180
|
-
;
|
|
1181
|
-
Harvest.fromFields = function (fields) { return Harvest.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount), feeAmount: (0, reified_1.decodeFromFields)("u64", fields.fee_amount), feeShareAmount: (0, reified_1.decodeFromFields)("u64", fields.fee_share_amount), sharedFeePool: (0, reified_1.decodeFromFields)(structs_1.Option.reified(reified.vector("u8")), fields.shared_fee_pool) }); };
|
|
1182
|
-
Harvest.fromFieldsWithTypes = function (item) {
|
|
1183
|
-
if (!isHarvest(item.type)) {
|
|
1184
|
-
throw new Error("not a Harvest type");
|
|
1185
|
-
}
|
|
1186
|
-
return Harvest.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount), feeAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_amount), feeShareAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_share_amount), sharedFeePool: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(reified.vector("u8")), item.fields.shared_fee_pool) });
|
|
1187
|
-
};
|
|
1188
|
-
Harvest.fromBcs = function (data) { return Harvest.fromFields(Harvest.bcs.parse(data)); };
|
|
1189
|
-
Harvest.prototype.toJSONField = function () {
|
|
1190
|
-
return {
|
|
1191
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), feeAmount: this.feeAmount.toString(), feeShareAmount: this.feeShareAmount.toString(), sharedFeePool: (0, reified_1.fieldToJSON)("0x1::option::Option<vector<u8>>", this.sharedFeePool),
|
|
1192
|
-
};
|
|
1193
|
-
};
|
|
1194
|
-
Harvest.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1195
|
-
Harvest.fromJSONField = function (field) { return Harvest.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount), feeAmount: (0, reified_1.decodeFromJSONField)("u64", field.feeAmount), feeShareAmount: (0, reified_1.decodeFromJSONField)("u64", field.feeShareAmount), sharedFeePool: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(reified.vector("u8")), field.sharedFeePool) }); };
|
|
1196
|
-
Harvest.fromJSON = function (json) {
|
|
1197
|
-
if (json.$typeName !== Harvest.$typeName) {
|
|
1198
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1199
|
-
}
|
|
1200
|
-
;
|
|
1201
|
-
return Harvest.fromJSONField(json);
|
|
1202
|
-
};
|
|
1203
|
-
Harvest.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1204
|
-
throw new Error("not an object");
|
|
1205
|
-
} if (!isHarvest(content.type)) {
|
|
1206
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Harvest object"));
|
|
1207
|
-
} return Harvest.fromFieldsWithTypes(content); };
|
|
1208
|
-
Harvest.fetch = function (client, id) {
|
|
1209
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1210
|
-
var res;
|
|
1211
|
-
var _a, _b;
|
|
1212
|
-
return __generator(this, function (_c) {
|
|
1213
|
-
switch (_c.label) {
|
|
1214
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1215
|
-
case 1:
|
|
1216
|
-
res = _c.sent();
|
|
1217
|
-
if (res.error) {
|
|
1218
|
-
throw new Error("error fetching Harvest object at id ".concat(id, ": ").concat(res.error.code));
|
|
1219
|
-
}
|
|
1220
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isHarvest(res.data.bcs.type)) {
|
|
1221
|
-
throw new Error("object at id ".concat(id, " is not a Harvest object"));
|
|
1222
|
-
}
|
|
1223
|
-
return [2 /*return*/, Harvest.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1224
|
-
}
|
|
1225
|
-
});
|
|
1226
|
-
});
|
|
1227
|
-
};
|
|
1228
|
-
Harvest.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Harvest";
|
|
1229
|
-
Harvest.$numTypeParams = 0;
|
|
1230
|
-
return Harvest;
|
|
1231
|
-
}());
|
|
1232
|
-
exports.Harvest = Harvest;
|
|
1233
|
-
/* ============================== IncentiviseBidder =============================== */
|
|
1234
|
-
function isIncentiviseBidder(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::IncentiviseBidder"; }
|
|
1235
|
-
var IncentiviseBidder = /** @class */ (function () {
|
|
1236
|
-
function IncentiviseBidder(typeArgs, fields) {
|
|
1237
|
-
this.$typeName = IncentiviseBidder.$typeName;
|
|
1238
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([IncentiviseBidder.$typeName], __read(typeArgs), false));
|
|
1239
|
-
this.$typeArgs = typeArgs;
|
|
1240
|
-
this.signer = fields.signer;
|
|
1241
|
-
;
|
|
1242
|
-
this.index = fields.index;
|
|
1243
|
-
;
|
|
1244
|
-
this.token = fields.token;
|
|
1245
|
-
;
|
|
1246
|
-
this.amount = fields.amount;
|
|
1247
|
-
}
|
|
1248
|
-
IncentiviseBidder.reified = function () {
|
|
1249
|
-
var _this = this;
|
|
1250
|
-
return { typeName: IncentiviseBidder.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([IncentiviseBidder.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return IncentiviseBidder.fromFields(fields); }, fromFieldsWithTypes: function (item) { return IncentiviseBidder.fromFieldsWithTypes(item); }, fromBcs: function (data) { return IncentiviseBidder.fromBcs(data); }, bcs: IncentiviseBidder.bcs, fromJSONField: function (field) { return IncentiviseBidder.fromJSONField(field); }, fromJSON: function (json) { return IncentiviseBidder.fromJSON(json); }, fromSuiParsedData: function (content) { return IncentiviseBidder.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1251
|
-
return [2 /*return*/, IncentiviseBidder.fetch(client, id)];
|
|
1252
|
-
}); }); }, new: function (fields) { return new IncentiviseBidder([], fields); }, kind: "StructClassReified", };
|
|
1253
|
-
};
|
|
1254
|
-
Object.defineProperty(IncentiviseBidder, "r", {
|
|
1255
|
-
get: function () { return IncentiviseBidder.reified(); },
|
|
1256
|
-
enumerable: false,
|
|
1257
|
-
configurable: true
|
|
1258
|
-
});
|
|
1259
|
-
IncentiviseBidder.phantom = function () { return (0, reified_1.phantom)(IncentiviseBidder.reified()); };
|
|
1260
|
-
Object.defineProperty(IncentiviseBidder, "p", {
|
|
1261
|
-
get: function () { return IncentiviseBidder.phantom(); },
|
|
1262
|
-
enumerable: false,
|
|
1263
|
-
configurable: true
|
|
1264
|
-
});
|
|
1265
|
-
Object.defineProperty(IncentiviseBidder, "bcs", {
|
|
1266
|
-
get: function () {
|
|
1267
|
-
return bcs_1.bcs.struct("IncentiviseBidder", {
|
|
1268
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64()
|
|
1269
|
-
});
|
|
1270
|
-
},
|
|
1271
|
-
enumerable: false,
|
|
1272
|
-
configurable: true
|
|
1273
|
-
});
|
|
1274
|
-
;
|
|
1275
|
-
IncentiviseBidder.fromFields = function (fields) { return IncentiviseBidder.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount) }); };
|
|
1276
|
-
IncentiviseBidder.fromFieldsWithTypes = function (item) {
|
|
1277
|
-
if (!isIncentiviseBidder(item.type)) {
|
|
1278
|
-
throw new Error("not a IncentiviseBidder type");
|
|
1279
|
-
}
|
|
1280
|
-
return IncentiviseBidder.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount) });
|
|
1281
|
-
};
|
|
1282
|
-
IncentiviseBidder.fromBcs = function (data) { return IncentiviseBidder.fromFields(IncentiviseBidder.bcs.parse(data)); };
|
|
1283
|
-
IncentiviseBidder.prototype.toJSONField = function () {
|
|
1284
|
-
return {
|
|
1285
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(),
|
|
1286
|
-
};
|
|
1287
|
-
};
|
|
1288
|
-
IncentiviseBidder.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1289
|
-
IncentiviseBidder.fromJSONField = function (field) { return IncentiviseBidder.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount) }); };
|
|
1290
|
-
IncentiviseBidder.fromJSON = function (json) {
|
|
1291
|
-
if (json.$typeName !== IncentiviseBidder.$typeName) {
|
|
1292
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1293
|
-
}
|
|
1294
|
-
;
|
|
1295
|
-
return IncentiviseBidder.fromJSONField(json);
|
|
1296
|
-
};
|
|
1297
|
-
IncentiviseBidder.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1298
|
-
throw new Error("not an object");
|
|
1299
|
-
} if (!isIncentiviseBidder(content.type)) {
|
|
1300
|
-
throw new Error("object at ".concat(content.fields.id, " is not a IncentiviseBidder object"));
|
|
1301
|
-
} return IncentiviseBidder.fromFieldsWithTypes(content); };
|
|
1302
|
-
IncentiviseBidder.fetch = function (client, id) {
|
|
1303
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1304
|
-
var res;
|
|
1305
|
-
var _a, _b;
|
|
1306
|
-
return __generator(this, function (_c) {
|
|
1307
|
-
switch (_c.label) {
|
|
1308
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1309
|
-
case 1:
|
|
1310
|
-
res = _c.sent();
|
|
1311
|
-
if (res.error) {
|
|
1312
|
-
throw new Error("error fetching IncentiviseBidder object at id ".concat(id, ": ").concat(res.error.code));
|
|
1313
|
-
}
|
|
1314
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isIncentiviseBidder(res.data.bcs.type)) {
|
|
1315
|
-
throw new Error("object at id ".concat(id, " is not a IncentiviseBidder object"));
|
|
1316
|
-
}
|
|
1317
|
-
return [2 /*return*/, IncentiviseBidder.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1318
|
-
}
|
|
1319
|
-
});
|
|
1320
|
-
});
|
|
1321
|
-
};
|
|
1322
|
-
IncentiviseBidder.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::IncentiviseBidder";
|
|
1323
|
-
IncentiviseBidder.$numTypeParams = 0;
|
|
1324
|
-
return IncentiviseBidder;
|
|
1325
|
-
}());
|
|
1326
|
-
exports.IncentiviseBidder = IncentiviseBidder;
|
|
1327
|
-
/* ============================== NewBidVault =============================== */
|
|
1328
|
-
function isNewBidVault(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::NewBidVault"; }
|
|
1329
|
-
var NewBidVault = /** @class */ (function () {
|
|
1330
|
-
function NewBidVault(typeArgs, fields) {
|
|
1331
|
-
this.$typeName = NewBidVault.$typeName;
|
|
1332
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([NewBidVault.$typeName], __read(typeArgs), false));
|
|
1333
|
-
this.$typeArgs = typeArgs;
|
|
1334
|
-
this.signer = fields.signer;
|
|
1335
|
-
;
|
|
1336
|
-
this.index = fields.index;
|
|
1337
|
-
;
|
|
1338
|
-
this.bidToken = fields.bidToken;
|
|
1339
|
-
}
|
|
1340
|
-
NewBidVault.reified = function () {
|
|
1341
|
-
var _this = this;
|
|
1342
|
-
return { typeName: NewBidVault.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([NewBidVault.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return NewBidVault.fromFields(fields); }, fromFieldsWithTypes: function (item) { return NewBidVault.fromFieldsWithTypes(item); }, fromBcs: function (data) { return NewBidVault.fromBcs(data); }, bcs: NewBidVault.bcs, fromJSONField: function (field) { return NewBidVault.fromJSONField(field); }, fromJSON: function (json) { return NewBidVault.fromJSON(json); }, fromSuiParsedData: function (content) { return NewBidVault.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1343
|
-
return [2 /*return*/, NewBidVault.fetch(client, id)];
|
|
1344
|
-
}); }); }, new: function (fields) { return new NewBidVault([], fields); }, kind: "StructClassReified", };
|
|
1345
|
-
};
|
|
1346
|
-
Object.defineProperty(NewBidVault, "r", {
|
|
1347
|
-
get: function () { return NewBidVault.reified(); },
|
|
1348
|
-
enumerable: false,
|
|
1349
|
-
configurable: true
|
|
1350
|
-
});
|
|
1351
|
-
NewBidVault.phantom = function () { return (0, reified_1.phantom)(NewBidVault.reified()); };
|
|
1352
|
-
Object.defineProperty(NewBidVault, "p", {
|
|
1353
|
-
get: function () { return NewBidVault.phantom(); },
|
|
1354
|
-
enumerable: false,
|
|
1355
|
-
configurable: true
|
|
1356
|
-
});
|
|
1357
|
-
Object.defineProperty(NewBidVault, "bcs", {
|
|
1358
|
-
get: function () {
|
|
1359
|
-
return bcs_1.bcs.struct("NewBidVault", {
|
|
1360
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), bid_token: structs_3.TypeName.bcs
|
|
1361
|
-
});
|
|
1362
|
-
},
|
|
1363
|
-
enumerable: false,
|
|
1364
|
-
configurable: true
|
|
1365
|
-
});
|
|
1366
|
-
;
|
|
1367
|
-
NewBidVault.fromFields = function (fields) { return NewBidVault.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), bidToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.bid_token) }); };
|
|
1368
|
-
NewBidVault.fromFieldsWithTypes = function (item) {
|
|
1369
|
-
if (!isNewBidVault(item.type)) {
|
|
1370
|
-
throw new Error("not a NewBidVault type");
|
|
1371
|
-
}
|
|
1372
|
-
return NewBidVault.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), bidToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.bid_token) });
|
|
1373
|
-
};
|
|
1374
|
-
NewBidVault.fromBcs = function (data) { return NewBidVault.fromFields(NewBidVault.bcs.parse(data)); };
|
|
1375
|
-
NewBidVault.prototype.toJSONField = function () {
|
|
1376
|
-
return {
|
|
1377
|
-
signer: this.signer, index: this.index.toString(), bidToken: this.bidToken.toJSONField(),
|
|
1378
|
-
};
|
|
1379
|
-
};
|
|
1380
|
-
NewBidVault.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1381
|
-
NewBidVault.fromJSONField = function (field) { return NewBidVault.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), bidToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bidToken) }); };
|
|
1382
|
-
NewBidVault.fromJSON = function (json) {
|
|
1383
|
-
if (json.$typeName !== NewBidVault.$typeName) {
|
|
1384
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1385
|
-
}
|
|
1386
|
-
;
|
|
1387
|
-
return NewBidVault.fromJSONField(json);
|
|
1388
|
-
};
|
|
1389
|
-
NewBidVault.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1390
|
-
throw new Error("not an object");
|
|
1391
|
-
} if (!isNewBidVault(content.type)) {
|
|
1392
|
-
throw new Error("object at ".concat(content.fields.id, " is not a NewBidVault object"));
|
|
1393
|
-
} return NewBidVault.fromFieldsWithTypes(content); };
|
|
1394
|
-
NewBidVault.fetch = function (client, id) {
|
|
1395
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1396
|
-
var res;
|
|
1397
|
-
var _a, _b;
|
|
1398
|
-
return __generator(this, function (_c) {
|
|
1399
|
-
switch (_c.label) {
|
|
1400
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1401
|
-
case 1:
|
|
1402
|
-
res = _c.sent();
|
|
1403
|
-
if (res.error) {
|
|
1404
|
-
throw new Error("error fetching NewBidVault object at id ".concat(id, ": ").concat(res.error.code));
|
|
1405
|
-
}
|
|
1406
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isNewBidVault(res.data.bcs.type)) {
|
|
1407
|
-
throw new Error("object at id ".concat(id, " is not a NewBidVault object"));
|
|
1408
|
-
}
|
|
1409
|
-
return [2 /*return*/, NewBidVault.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1410
|
-
}
|
|
1411
|
-
});
|
|
1412
|
-
});
|
|
1413
|
-
};
|
|
1414
|
-
NewBidVault.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::NewBidVault";
|
|
1415
|
-
NewBidVault.$numTypeParams = 0;
|
|
1416
|
-
return NewBidVault;
|
|
1417
|
-
}());
|
|
1418
|
-
exports.NewBidVault = NewBidVault;
|
|
1419
|
-
/* ============================== NewDepositVault =============================== */
|
|
1420
|
-
function isNewDepositVault(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::NewDepositVault"; }
|
|
1421
|
-
var NewDepositVault = /** @class */ (function () {
|
|
1422
|
-
function NewDepositVault(typeArgs, fields) {
|
|
1423
|
-
this.$typeName = NewDepositVault.$typeName;
|
|
1424
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([NewDepositVault.$typeName], __read(typeArgs), false));
|
|
1425
|
-
this.$typeArgs = typeArgs;
|
|
1426
|
-
this.signer = fields.signer;
|
|
1427
|
-
;
|
|
1428
|
-
this.index = fields.index;
|
|
1429
|
-
;
|
|
1430
|
-
this.depositToken = fields.depositToken;
|
|
1431
|
-
;
|
|
1432
|
-
this.bidToken = fields.bidToken;
|
|
1433
|
-
}
|
|
1434
|
-
NewDepositVault.reified = function () {
|
|
1435
|
-
var _this = this;
|
|
1436
|
-
return { typeName: NewDepositVault.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([NewDepositVault.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return NewDepositVault.fromFields(fields); }, fromFieldsWithTypes: function (item) { return NewDepositVault.fromFieldsWithTypes(item); }, fromBcs: function (data) { return NewDepositVault.fromBcs(data); }, bcs: NewDepositVault.bcs, fromJSONField: function (field) { return NewDepositVault.fromJSONField(field); }, fromJSON: function (json) { return NewDepositVault.fromJSON(json); }, fromSuiParsedData: function (content) { return NewDepositVault.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1437
|
-
return [2 /*return*/, NewDepositVault.fetch(client, id)];
|
|
1438
|
-
}); }); }, new: function (fields) { return new NewDepositVault([], fields); }, kind: "StructClassReified", };
|
|
1439
|
-
};
|
|
1440
|
-
Object.defineProperty(NewDepositVault, "r", {
|
|
1441
|
-
get: function () { return NewDepositVault.reified(); },
|
|
1442
|
-
enumerable: false,
|
|
1443
|
-
configurable: true
|
|
1444
|
-
});
|
|
1445
|
-
NewDepositVault.phantom = function () { return (0, reified_1.phantom)(NewDepositVault.reified()); };
|
|
1446
|
-
Object.defineProperty(NewDepositVault, "p", {
|
|
1447
|
-
get: function () { return NewDepositVault.phantom(); },
|
|
1448
|
-
enumerable: false,
|
|
1449
|
-
configurable: true
|
|
1450
|
-
});
|
|
1451
|
-
Object.defineProperty(NewDepositVault, "bcs", {
|
|
1452
|
-
get: function () {
|
|
1453
|
-
return bcs_1.bcs.struct("NewDepositVault", {
|
|
1454
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), deposit_token: structs_3.TypeName.bcs, bid_token: structs_3.TypeName.bcs
|
|
1455
|
-
});
|
|
1456
|
-
},
|
|
1457
|
-
enumerable: false,
|
|
1458
|
-
configurable: true
|
|
1459
|
-
});
|
|
1460
|
-
;
|
|
1461
|
-
NewDepositVault.fromFields = function (fields) { return NewDepositVault.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), depositToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.deposit_token), bidToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.bid_token) }); };
|
|
1462
|
-
NewDepositVault.fromFieldsWithTypes = function (item) {
|
|
1463
|
-
if (!isNewDepositVault(item.type)) {
|
|
1464
|
-
throw new Error("not a NewDepositVault type");
|
|
1465
|
-
}
|
|
1466
|
-
return NewDepositVault.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), depositToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.deposit_token), bidToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.bid_token) });
|
|
1467
|
-
};
|
|
1468
|
-
NewDepositVault.fromBcs = function (data) { return NewDepositVault.fromFields(NewDepositVault.bcs.parse(data)); };
|
|
1469
|
-
NewDepositVault.prototype.toJSONField = function () {
|
|
1470
|
-
return {
|
|
1471
|
-
signer: this.signer, index: this.index.toString(), depositToken: this.depositToken.toJSONField(), bidToken: this.bidToken.toJSONField(),
|
|
1472
|
-
};
|
|
1473
|
-
};
|
|
1474
|
-
NewDepositVault.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1475
|
-
NewDepositVault.fromJSONField = function (field) { return NewDepositVault.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), depositToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.depositToken), bidToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bidToken) }); };
|
|
1476
|
-
NewDepositVault.fromJSON = function (json) {
|
|
1477
|
-
if (json.$typeName !== NewDepositVault.$typeName) {
|
|
1478
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1479
|
-
}
|
|
1480
|
-
;
|
|
1481
|
-
return NewDepositVault.fromJSONField(json);
|
|
1482
|
-
};
|
|
1483
|
-
NewDepositVault.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1484
|
-
throw new Error("not an object");
|
|
1485
|
-
} if (!isNewDepositVault(content.type)) {
|
|
1486
|
-
throw new Error("object at ".concat(content.fields.id, " is not a NewDepositVault object"));
|
|
1487
|
-
} return NewDepositVault.fromFieldsWithTypes(content); };
|
|
1488
|
-
NewDepositVault.fetch = function (client, id) {
|
|
1489
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1490
|
-
var res;
|
|
1491
|
-
var _a, _b;
|
|
1492
|
-
return __generator(this, function (_c) {
|
|
1493
|
-
switch (_c.label) {
|
|
1494
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1495
|
-
case 1:
|
|
1496
|
-
res = _c.sent();
|
|
1497
|
-
if (res.error) {
|
|
1498
|
-
throw new Error("error fetching NewDepositVault object at id ".concat(id, ": ").concat(res.error.code));
|
|
1499
|
-
}
|
|
1500
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isNewDepositVault(res.data.bcs.type)) {
|
|
1501
|
-
throw new Error("object at id ".concat(id, " is not a NewDepositVault object"));
|
|
1502
|
-
}
|
|
1503
|
-
return [2 /*return*/, NewDepositVault.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1504
|
-
}
|
|
1505
|
-
});
|
|
1506
|
-
});
|
|
1507
|
-
};
|
|
1508
|
-
NewDepositVault.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::NewDepositVault";
|
|
1509
|
-
NewDepositVault.$numTypeParams = 0;
|
|
1510
|
-
return NewDepositVault;
|
|
1511
|
-
}());
|
|
1512
|
-
exports.NewDepositVault = NewDepositVault;
|
|
1513
|
-
/* ============================== NewRefundVault =============================== */
|
|
1514
|
-
function isNewRefundVault(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::NewRefundVault"; }
|
|
1515
|
-
var NewRefundVault = /** @class */ (function () {
|
|
1516
|
-
function NewRefundVault(typeArgs, fields) {
|
|
1517
|
-
this.$typeName = NewRefundVault.$typeName;
|
|
1518
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([NewRefundVault.$typeName], __read(typeArgs), false));
|
|
1519
|
-
this.$typeArgs = typeArgs;
|
|
1520
|
-
this.signer = fields.signer;
|
|
1521
|
-
;
|
|
1522
|
-
this.token = fields.token;
|
|
1523
|
-
}
|
|
1524
|
-
NewRefundVault.reified = function () {
|
|
1525
|
-
var _this = this;
|
|
1526
|
-
return { typeName: NewRefundVault.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([NewRefundVault.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return NewRefundVault.fromFields(fields); }, fromFieldsWithTypes: function (item) { return NewRefundVault.fromFieldsWithTypes(item); }, fromBcs: function (data) { return NewRefundVault.fromBcs(data); }, bcs: NewRefundVault.bcs, fromJSONField: function (field) { return NewRefundVault.fromJSONField(field); }, fromJSON: function (json) { return NewRefundVault.fromJSON(json); }, fromSuiParsedData: function (content) { return NewRefundVault.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1527
|
-
return [2 /*return*/, NewRefundVault.fetch(client, id)];
|
|
1528
|
-
}); }); }, new: function (fields) { return new NewRefundVault([], fields); }, kind: "StructClassReified", };
|
|
1529
|
-
};
|
|
1530
|
-
Object.defineProperty(NewRefundVault, "r", {
|
|
1531
|
-
get: function () { return NewRefundVault.reified(); },
|
|
1532
|
-
enumerable: false,
|
|
1533
|
-
configurable: true
|
|
1534
|
-
});
|
|
1535
|
-
NewRefundVault.phantom = function () { return (0, reified_1.phantom)(NewRefundVault.reified()); };
|
|
1536
|
-
Object.defineProperty(NewRefundVault, "p", {
|
|
1537
|
-
get: function () { return NewRefundVault.phantom(); },
|
|
1538
|
-
enumerable: false,
|
|
1539
|
-
configurable: true
|
|
1540
|
-
});
|
|
1541
|
-
Object.defineProperty(NewRefundVault, "bcs", {
|
|
1542
|
-
get: function () {
|
|
1543
|
-
return bcs_1.bcs.struct("NewRefundVault", {
|
|
1544
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), token: structs_3.TypeName.bcs
|
|
1545
|
-
});
|
|
1546
|
-
},
|
|
1547
|
-
enumerable: false,
|
|
1548
|
-
configurable: true
|
|
1549
|
-
});
|
|
1550
|
-
;
|
|
1551
|
-
NewRefundVault.fromFields = function (fields) { return NewRefundVault.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token) }); };
|
|
1552
|
-
NewRefundVault.fromFieldsWithTypes = function (item) {
|
|
1553
|
-
if (!isNewRefundVault(item.type)) {
|
|
1554
|
-
throw new Error("not a NewRefundVault type");
|
|
1555
|
-
}
|
|
1556
|
-
return NewRefundVault.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token) });
|
|
1557
|
-
};
|
|
1558
|
-
NewRefundVault.fromBcs = function (data) { return NewRefundVault.fromFields(NewRefundVault.bcs.parse(data)); };
|
|
1559
|
-
NewRefundVault.prototype.toJSONField = function () {
|
|
1560
|
-
return {
|
|
1561
|
-
signer: this.signer, token: this.token.toJSONField(),
|
|
1562
|
-
};
|
|
1563
|
-
};
|
|
1564
|
-
NewRefundVault.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1565
|
-
NewRefundVault.fromJSONField = function (field) { return NewRefundVault.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token) }); };
|
|
1566
|
-
NewRefundVault.fromJSON = function (json) {
|
|
1567
|
-
if (json.$typeName !== NewRefundVault.$typeName) {
|
|
1568
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1569
|
-
}
|
|
1570
|
-
;
|
|
1571
|
-
return NewRefundVault.fromJSONField(json);
|
|
1572
|
-
};
|
|
1573
|
-
NewRefundVault.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1574
|
-
throw new Error("not an object");
|
|
1575
|
-
} if (!isNewRefundVault(content.type)) {
|
|
1576
|
-
throw new Error("object at ".concat(content.fields.id, " is not a NewRefundVault object"));
|
|
1577
|
-
} return NewRefundVault.fromFieldsWithTypes(content); };
|
|
1578
|
-
NewRefundVault.fetch = function (client, id) {
|
|
1579
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1580
|
-
var res;
|
|
1581
|
-
var _a, _b;
|
|
1582
|
-
return __generator(this, function (_c) {
|
|
1583
|
-
switch (_c.label) {
|
|
1584
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1585
|
-
case 1:
|
|
1586
|
-
res = _c.sent();
|
|
1587
|
-
if (res.error) {
|
|
1588
|
-
throw new Error("error fetching NewRefundVault object at id ".concat(id, ": ").concat(res.error.code));
|
|
1589
|
-
}
|
|
1590
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isNewRefundVault(res.data.bcs.type)) {
|
|
1591
|
-
throw new Error("object at id ".concat(id, " is not a NewRefundVault object"));
|
|
1592
|
-
}
|
|
1593
|
-
return [2 /*return*/, NewRefundVault.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1594
|
-
}
|
|
1595
|
-
});
|
|
1596
|
-
});
|
|
1597
|
-
};
|
|
1598
|
-
NewRefundVault.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::NewRefundVault";
|
|
1599
|
-
NewRefundVault.$numTypeParams = 0;
|
|
1600
|
-
return NewRefundVault;
|
|
1601
|
-
}());
|
|
1602
|
-
exports.NewRefundVault = NewRefundVault;
|
|
1603
|
-
/* ============================== Recoup =============================== */
|
|
1604
|
-
function isRecoup(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Recoup"; }
|
|
1605
|
-
var Recoup = /** @class */ (function () {
|
|
1606
|
-
function Recoup(typeArgs, fields) {
|
|
1607
|
-
this.$typeName = Recoup.$typeName;
|
|
1608
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Recoup.$typeName], __read(typeArgs), false));
|
|
1609
|
-
this.$typeArgs = typeArgs;
|
|
1610
|
-
this.signer = fields.signer;
|
|
1611
|
-
;
|
|
1612
|
-
this.index = fields.index;
|
|
1613
|
-
;
|
|
1614
|
-
this.token = fields.token;
|
|
1615
|
-
;
|
|
1616
|
-
this.active = fields.active;
|
|
1617
|
-
;
|
|
1618
|
-
this.deactivating = fields.deactivating;
|
|
1619
|
-
}
|
|
1620
|
-
Recoup.reified = function () {
|
|
1621
|
-
var _this = this;
|
|
1622
|
-
return { typeName: Recoup.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Recoup.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Recoup.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Recoup.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Recoup.fromBcs(data); }, bcs: Recoup.bcs, fromJSONField: function (field) { return Recoup.fromJSONField(field); }, fromJSON: function (json) { return Recoup.fromJSON(json); }, fromSuiParsedData: function (content) { return Recoup.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1623
|
-
return [2 /*return*/, Recoup.fetch(client, id)];
|
|
1624
|
-
}); }); }, new: function (fields) { return new Recoup([], fields); }, kind: "StructClassReified", };
|
|
1625
|
-
};
|
|
1626
|
-
Object.defineProperty(Recoup, "r", {
|
|
1627
|
-
get: function () { return Recoup.reified(); },
|
|
1628
|
-
enumerable: false,
|
|
1629
|
-
configurable: true
|
|
1630
|
-
});
|
|
1631
|
-
Recoup.phantom = function () { return (0, reified_1.phantom)(Recoup.reified()); };
|
|
1632
|
-
Object.defineProperty(Recoup, "p", {
|
|
1633
|
-
get: function () { return Recoup.phantom(); },
|
|
1634
|
-
enumerable: false,
|
|
1635
|
-
configurable: true
|
|
1636
|
-
});
|
|
1637
|
-
Object.defineProperty(Recoup, "bcs", {
|
|
1638
|
-
get: function () {
|
|
1639
|
-
return bcs_1.bcs.struct("Recoup", {
|
|
1640
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, active: bcs_1.bcs.u64(), deactivating: bcs_1.bcs.u64()
|
|
1641
|
-
});
|
|
1642
|
-
},
|
|
1643
|
-
enumerable: false,
|
|
1644
|
-
configurable: true
|
|
1645
|
-
});
|
|
1646
|
-
;
|
|
1647
|
-
Recoup.fromFields = function (fields) { return Recoup.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), active: (0, reified_1.decodeFromFields)("u64", fields.active), deactivating: (0, reified_1.decodeFromFields)("u64", fields.deactivating) }); };
|
|
1648
|
-
Recoup.fromFieldsWithTypes = function (item) {
|
|
1649
|
-
if (!isRecoup(item.type)) {
|
|
1650
|
-
throw new Error("not a Recoup type");
|
|
1651
|
-
}
|
|
1652
|
-
return Recoup.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), active: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.active), deactivating: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deactivating) });
|
|
1653
|
-
};
|
|
1654
|
-
Recoup.fromBcs = function (data) { return Recoup.fromFields(Recoup.bcs.parse(data)); };
|
|
1655
|
-
Recoup.prototype.toJSONField = function () {
|
|
1656
|
-
return {
|
|
1657
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), active: this.active.toString(), deactivating: this.deactivating.toString(),
|
|
1658
|
-
};
|
|
1659
|
-
};
|
|
1660
|
-
Recoup.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1661
|
-
Recoup.fromJSONField = function (field) { return Recoup.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), active: (0, reified_1.decodeFromJSONField)("u64", field.active), deactivating: (0, reified_1.decodeFromJSONField)("u64", field.deactivating) }); };
|
|
1662
|
-
Recoup.fromJSON = function (json) {
|
|
1663
|
-
if (json.$typeName !== Recoup.$typeName) {
|
|
1664
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1665
|
-
}
|
|
1666
|
-
;
|
|
1667
|
-
return Recoup.fromJSONField(json);
|
|
1668
|
-
};
|
|
1669
|
-
Recoup.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1670
|
-
throw new Error("not an object");
|
|
1671
|
-
} if (!isRecoup(content.type)) {
|
|
1672
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Recoup object"));
|
|
1673
|
-
} return Recoup.fromFieldsWithTypes(content); };
|
|
1674
|
-
Recoup.fetch = function (client, id) {
|
|
1675
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1676
|
-
var res;
|
|
1677
|
-
var _a, _b;
|
|
1678
|
-
return __generator(this, function (_c) {
|
|
1679
|
-
switch (_c.label) {
|
|
1680
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1681
|
-
case 1:
|
|
1682
|
-
res = _c.sent();
|
|
1683
|
-
if (res.error) {
|
|
1684
|
-
throw new Error("error fetching Recoup object at id ".concat(id, ": ").concat(res.error.code));
|
|
1685
|
-
}
|
|
1686
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRecoup(res.data.bcs.type)) {
|
|
1687
|
-
throw new Error("object at id ".concat(id, " is not a Recoup object"));
|
|
1688
|
-
}
|
|
1689
|
-
return [2 /*return*/, Recoup.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1690
|
-
}
|
|
1691
|
-
});
|
|
1692
|
-
});
|
|
1693
|
-
};
|
|
1694
|
-
Recoup.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Recoup";
|
|
1695
|
-
Recoup.$numTypeParams = 0;
|
|
1696
|
-
return Recoup;
|
|
1697
|
-
}());
|
|
1698
|
-
exports.Recoup = Recoup;
|
|
1699
|
-
/* ============================== Redeem =============================== */
|
|
1700
|
-
function isRedeem(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Redeem"; }
|
|
1701
|
-
var Redeem = /** @class */ (function () {
|
|
1702
|
-
function Redeem(typeArgs, fields) {
|
|
1703
|
-
this.$typeName = Redeem.$typeName;
|
|
1704
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Redeem.$typeName], __read(typeArgs), false));
|
|
1705
|
-
this.$typeArgs = typeArgs;
|
|
1706
|
-
this.signer = fields.signer;
|
|
1707
|
-
;
|
|
1708
|
-
this.index = fields.index;
|
|
1709
|
-
;
|
|
1710
|
-
this.token = fields.token;
|
|
1711
|
-
;
|
|
1712
|
-
this.amount = fields.amount;
|
|
1713
|
-
}
|
|
1714
|
-
Redeem.reified = function () {
|
|
1715
|
-
var _this = this;
|
|
1716
|
-
return { typeName: Redeem.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Redeem.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Redeem.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Redeem.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Redeem.fromBcs(data); }, bcs: Redeem.bcs, fromJSONField: function (field) { return Redeem.fromJSONField(field); }, fromJSON: function (json) { return Redeem.fromJSON(json); }, fromSuiParsedData: function (content) { return Redeem.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1717
|
-
return [2 /*return*/, Redeem.fetch(client, id)];
|
|
1718
|
-
}); }); }, new: function (fields) { return new Redeem([], fields); }, kind: "StructClassReified", };
|
|
1719
|
-
};
|
|
1720
|
-
Object.defineProperty(Redeem, "r", {
|
|
1721
|
-
get: function () { return Redeem.reified(); },
|
|
1722
|
-
enumerable: false,
|
|
1723
|
-
configurable: true
|
|
1724
|
-
});
|
|
1725
|
-
Redeem.phantom = function () { return (0, reified_1.phantom)(Redeem.reified()); };
|
|
1726
|
-
Object.defineProperty(Redeem, "p", {
|
|
1727
|
-
get: function () { return Redeem.phantom(); },
|
|
1728
|
-
enumerable: false,
|
|
1729
|
-
configurable: true
|
|
1730
|
-
});
|
|
1731
|
-
Object.defineProperty(Redeem, "bcs", {
|
|
1732
|
-
get: function () {
|
|
1733
|
-
return bcs_1.bcs.struct("Redeem", {
|
|
1734
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64()
|
|
1735
|
-
});
|
|
1736
|
-
},
|
|
1737
|
-
enumerable: false,
|
|
1738
|
-
configurable: true
|
|
1739
|
-
});
|
|
1740
|
-
;
|
|
1741
|
-
Redeem.fromFields = function (fields) { return Redeem.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount) }); };
|
|
1742
|
-
Redeem.fromFieldsWithTypes = function (item) {
|
|
1743
|
-
if (!isRedeem(item.type)) {
|
|
1744
|
-
throw new Error("not a Redeem type");
|
|
1745
|
-
}
|
|
1746
|
-
return Redeem.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount) });
|
|
1747
|
-
};
|
|
1748
|
-
Redeem.fromBcs = function (data) { return Redeem.fromFields(Redeem.bcs.parse(data)); };
|
|
1749
|
-
Redeem.prototype.toJSONField = function () {
|
|
1750
|
-
return {
|
|
1751
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(),
|
|
1752
|
-
};
|
|
1753
|
-
};
|
|
1754
|
-
Redeem.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1755
|
-
Redeem.fromJSONField = function (field) { return Redeem.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount) }); };
|
|
1756
|
-
Redeem.fromJSON = function (json) {
|
|
1757
|
-
if (json.$typeName !== Redeem.$typeName) {
|
|
1758
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1759
|
-
}
|
|
1760
|
-
;
|
|
1761
|
-
return Redeem.fromJSONField(json);
|
|
1762
|
-
};
|
|
1763
|
-
Redeem.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1764
|
-
throw new Error("not an object");
|
|
1765
|
-
} if (!isRedeem(content.type)) {
|
|
1766
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Redeem object"));
|
|
1767
|
-
} return Redeem.fromFieldsWithTypes(content); };
|
|
1768
|
-
Redeem.fetch = function (client, id) {
|
|
1769
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1770
|
-
var res;
|
|
1771
|
-
var _a, _b;
|
|
1772
|
-
return __generator(this, function (_c) {
|
|
1773
|
-
switch (_c.label) {
|
|
1774
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1775
|
-
case 1:
|
|
1776
|
-
res = _c.sent();
|
|
1777
|
-
if (res.error) {
|
|
1778
|
-
throw new Error("error fetching Redeem object at id ".concat(id, ": ").concat(res.error.code));
|
|
1779
|
-
}
|
|
1780
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRedeem(res.data.bcs.type)) {
|
|
1781
|
-
throw new Error("object at id ".concat(id, " is not a Redeem object"));
|
|
1782
|
-
}
|
|
1783
|
-
return [2 /*return*/, Redeem.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1784
|
-
}
|
|
1785
|
-
});
|
|
1786
|
-
});
|
|
1787
|
-
};
|
|
1788
|
-
Redeem.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Redeem";
|
|
1789
|
-
Redeem.$numTypeParams = 0;
|
|
1790
|
-
return Redeem;
|
|
1791
|
-
}());
|
|
1792
|
-
exports.Redeem = Redeem;
|
|
1793
|
-
/* ============================== RefundShare =============================== */
|
|
1794
|
-
function isRefundShare(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::RefundShare"; }
|
|
1795
|
-
var RefundShare = /** @class */ (function () {
|
|
1796
|
-
function RefundShare(typeArgs, fields) {
|
|
1797
|
-
this.$typeName = RefundShare.$typeName;
|
|
1798
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([RefundShare.$typeName], __read(typeArgs), false));
|
|
1799
|
-
this.$typeArgs = typeArgs;
|
|
1800
|
-
this.user = fields.user;
|
|
1801
|
-
;
|
|
1802
|
-
this.share = fields.share;
|
|
1803
|
-
;
|
|
1804
|
-
this.u64Padding = fields.u64Padding;
|
|
1805
|
-
}
|
|
1806
|
-
RefundShare.reified = function () {
|
|
1807
|
-
var _this = this;
|
|
1808
|
-
return { typeName: RefundShare.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([RefundShare.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return RefundShare.fromFields(fields); }, fromFieldsWithTypes: function (item) { return RefundShare.fromFieldsWithTypes(item); }, fromBcs: function (data) { return RefundShare.fromBcs(data); }, bcs: RefundShare.bcs, fromJSONField: function (field) { return RefundShare.fromJSONField(field); }, fromJSON: function (json) { return RefundShare.fromJSON(json); }, fromSuiParsedData: function (content) { return RefundShare.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1809
|
-
return [2 /*return*/, RefundShare.fetch(client, id)];
|
|
1810
|
-
}); }); }, new: function (fields) { return new RefundShare([], fields); }, kind: "StructClassReified", };
|
|
1811
|
-
};
|
|
1812
|
-
Object.defineProperty(RefundShare, "r", {
|
|
1813
|
-
get: function () { return RefundShare.reified(); },
|
|
1814
|
-
enumerable: false,
|
|
1815
|
-
configurable: true
|
|
1816
|
-
});
|
|
1817
|
-
RefundShare.phantom = function () { return (0, reified_1.phantom)(RefundShare.reified()); };
|
|
1818
|
-
Object.defineProperty(RefundShare, "p", {
|
|
1819
|
-
get: function () { return RefundShare.phantom(); },
|
|
1820
|
-
enumerable: false,
|
|
1821
|
-
configurable: true
|
|
1822
|
-
});
|
|
1823
|
-
Object.defineProperty(RefundShare, "bcs", {
|
|
1824
|
-
get: function () {
|
|
1825
|
-
return bcs_1.bcs.struct("RefundShare", {
|
|
1826
|
-
user: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), share: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1827
|
-
});
|
|
1828
|
-
},
|
|
1829
|
-
enumerable: false,
|
|
1830
|
-
configurable: true
|
|
1831
|
-
});
|
|
1832
|
-
;
|
|
1833
|
-
RefundShare.fromFields = function (fields) { return RefundShare.reified().new({ user: (0, reified_1.decodeFromFields)("address", fields.user), share: (0, reified_1.decodeFromFields)("u64", fields.share), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1834
|
-
RefundShare.fromFieldsWithTypes = function (item) {
|
|
1835
|
-
if (!isRefundShare(item.type)) {
|
|
1836
|
-
throw new Error("not a RefundShare type");
|
|
1837
|
-
}
|
|
1838
|
-
return RefundShare.reified().new({ user: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.user), share: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1839
|
-
};
|
|
1840
|
-
RefundShare.fromBcs = function (data) { return RefundShare.fromFields(RefundShare.bcs.parse(data)); };
|
|
1841
|
-
RefundShare.prototype.toJSONField = function () {
|
|
1842
|
-
return {
|
|
1843
|
-
user: this.user, share: this.share.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1844
|
-
};
|
|
1845
|
-
};
|
|
1846
|
-
RefundShare.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1847
|
-
RefundShare.fromJSONField = function (field) { return RefundShare.reified().new({ user: (0, reified_1.decodeFromJSONField)("address", field.user), share: (0, reified_1.decodeFromJSONField)("u64", field.share), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
1848
|
-
RefundShare.fromJSON = function (json) {
|
|
1849
|
-
if (json.$typeName !== RefundShare.$typeName) {
|
|
1850
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1851
|
-
}
|
|
1852
|
-
;
|
|
1853
|
-
return RefundShare.fromJSONField(json);
|
|
1854
|
-
};
|
|
1855
|
-
RefundShare.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1856
|
-
throw new Error("not an object");
|
|
1857
|
-
} if (!isRefundShare(content.type)) {
|
|
1858
|
-
throw new Error("object at ".concat(content.fields.id, " is not a RefundShare object"));
|
|
1859
|
-
} return RefundShare.fromFieldsWithTypes(content); };
|
|
1860
|
-
RefundShare.fetch = function (client, id) {
|
|
1861
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1862
|
-
var res;
|
|
1863
|
-
var _a, _b;
|
|
1864
|
-
return __generator(this, function (_c) {
|
|
1865
|
-
switch (_c.label) {
|
|
1866
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1867
|
-
case 1:
|
|
1868
|
-
res = _c.sent();
|
|
1869
|
-
if (res.error) {
|
|
1870
|
-
throw new Error("error fetching RefundShare object at id ".concat(id, ": ").concat(res.error.code));
|
|
1871
|
-
}
|
|
1872
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRefundShare(res.data.bcs.type)) {
|
|
1873
|
-
throw new Error("object at id ".concat(id, " is not a RefundShare object"));
|
|
1874
|
-
}
|
|
1875
|
-
return [2 /*return*/, RefundShare.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1876
|
-
}
|
|
1877
|
-
});
|
|
1878
|
-
});
|
|
1879
|
-
};
|
|
1880
|
-
RefundShare.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::RefundShare";
|
|
1881
|
-
RefundShare.$numTypeParams = 0;
|
|
1882
|
-
return RefundShare;
|
|
1883
|
-
}());
|
|
1884
|
-
exports.RefundShare = RefundShare;
|
|
1885
|
-
/* ============================== RefundVault =============================== */
|
|
1886
|
-
function isRefundVault(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::RefundVault"; }
|
|
1887
|
-
var RefundVault = /** @class */ (function () {
|
|
1888
|
-
function RefundVault(typeArgs, fields) {
|
|
1889
|
-
this.$typeName = RefundVault.$typeName;
|
|
1890
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([RefundVault.$typeName], __read(typeArgs), false));
|
|
1891
|
-
this.$typeArgs = typeArgs;
|
|
1892
|
-
this.id = fields.id;
|
|
1893
|
-
;
|
|
1894
|
-
this.token = fields.token;
|
|
1895
|
-
;
|
|
1896
|
-
this.shareSupply = fields.shareSupply;
|
|
1897
|
-
;
|
|
1898
|
-
this.u64Padding = fields.u64Padding;
|
|
1899
|
-
;
|
|
1900
|
-
this.bcsPadding = fields.bcsPadding;
|
|
1901
|
-
}
|
|
1902
|
-
RefundVault.reified = function () {
|
|
1903
|
-
var _this = this;
|
|
1904
|
-
return { typeName: RefundVault.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([RefundVault.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return RefundVault.fromFields(fields); }, fromFieldsWithTypes: function (item) { return RefundVault.fromFieldsWithTypes(item); }, fromBcs: function (data) { return RefundVault.fromBcs(data); }, bcs: RefundVault.bcs, fromJSONField: function (field) { return RefundVault.fromJSONField(field); }, fromJSON: function (json) { return RefundVault.fromJSON(json); }, fromSuiParsedData: function (content) { return RefundVault.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1905
|
-
return [2 /*return*/, RefundVault.fetch(client, id)];
|
|
1906
|
-
}); }); }, new: function (fields) { return new RefundVault([], fields); }, kind: "StructClassReified", };
|
|
1907
|
-
};
|
|
1908
|
-
Object.defineProperty(RefundVault, "r", {
|
|
1909
|
-
get: function () { return RefundVault.reified(); },
|
|
1910
|
-
enumerable: false,
|
|
1911
|
-
configurable: true
|
|
1912
|
-
});
|
|
1913
|
-
RefundVault.phantom = function () { return (0, reified_1.phantom)(RefundVault.reified()); };
|
|
1914
|
-
Object.defineProperty(RefundVault, "p", {
|
|
1915
|
-
get: function () { return RefundVault.phantom(); },
|
|
1916
|
-
enumerable: false,
|
|
1917
|
-
configurable: true
|
|
1918
|
-
});
|
|
1919
|
-
Object.defineProperty(RefundVault, "bcs", {
|
|
1920
|
-
get: function () {
|
|
1921
|
-
return bcs_1.bcs.struct("RefundVault", {
|
|
1922
|
-
id: structs_4.UID.bcs, token: structs_3.TypeName.bcs, share_supply: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()), bcs_padding: bcs_1.bcs.vector(bcs_1.bcs.u8())
|
|
1923
|
-
});
|
|
1924
|
-
},
|
|
1925
|
-
enumerable: false,
|
|
1926
|
-
configurable: true
|
|
1927
|
-
});
|
|
1928
|
-
;
|
|
1929
|
-
RefundVault.fromFields = function (fields) { return RefundVault.reified().new({ id: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.id), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), shareSupply: (0, reified_1.decodeFromFields)("u64", fields.share_supply), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFields)(reified.vector("u8"), fields.bcs_padding) }); };
|
|
1930
|
-
RefundVault.fromFieldsWithTypes = function (item) {
|
|
1931
|
-
if (!isRefundVault(item.type)) {
|
|
1932
|
-
throw new Error("not a RefundVault type");
|
|
1933
|
-
}
|
|
1934
|
-
return RefundVault.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.id), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), shareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share_supply), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u8"), item.fields.bcs_padding) });
|
|
1935
|
-
};
|
|
1936
|
-
RefundVault.fromBcs = function (data) { return RefundVault.fromFields(RefundVault.bcs.parse(data)); };
|
|
1937
|
-
RefundVault.prototype.toJSONField = function () {
|
|
1938
|
-
return {
|
|
1939
|
-
id: this.id, token: this.token.toJSONField(), shareSupply: this.shareSupply.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding), bcsPadding: (0, reified_1.fieldToJSON)("vector<u8>", this.bcsPadding),
|
|
1940
|
-
};
|
|
1941
|
-
};
|
|
1942
|
-
RefundVault.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1943
|
-
RefundVault.fromJSONField = function (field) { return RefundVault.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.id), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), shareSupply: (0, reified_1.decodeFromJSONField)("u64", field.shareSupply), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding), bcsPadding: (0, reified_1.decodeFromJSONField)(reified.vector("u8"), field.bcsPadding) }); };
|
|
1944
|
-
RefundVault.fromJSON = function (json) {
|
|
1945
|
-
if (json.$typeName !== RefundVault.$typeName) {
|
|
1946
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1947
|
-
}
|
|
1948
|
-
;
|
|
1949
|
-
return RefundVault.fromJSONField(json);
|
|
1950
|
-
};
|
|
1951
|
-
RefundVault.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1952
|
-
throw new Error("not an object");
|
|
1953
|
-
} if (!isRefundVault(content.type)) {
|
|
1954
|
-
throw new Error("object at ".concat(content.fields.id, " is not a RefundVault object"));
|
|
1955
|
-
} return RefundVault.fromFieldsWithTypes(content); };
|
|
1956
|
-
RefundVault.fetch = function (client, id) {
|
|
1957
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1958
|
-
var res;
|
|
1959
|
-
var _a, _b;
|
|
1960
|
-
return __generator(this, function (_c) {
|
|
1961
|
-
switch (_c.label) {
|
|
1962
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1963
|
-
case 1:
|
|
1964
|
-
res = _c.sent();
|
|
1965
|
-
if (res.error) {
|
|
1966
|
-
throw new Error("error fetching RefundVault object at id ".concat(id, ": ").concat(res.error.code));
|
|
1967
|
-
}
|
|
1968
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRefundVault(res.data.bcs.type)) {
|
|
1969
|
-
throw new Error("object at id ".concat(id, " is not a RefundVault object"));
|
|
1970
|
-
}
|
|
1971
|
-
return [2 /*return*/, RefundVault.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1972
|
-
}
|
|
1973
|
-
});
|
|
1974
|
-
});
|
|
1975
|
-
};
|
|
1976
|
-
RefundVault.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::RefundVault";
|
|
1977
|
-
RefundVault.$numTypeParams = 0;
|
|
1978
|
-
return RefundVault;
|
|
1979
|
-
}());
|
|
1980
|
-
exports.RefundVault = RefundVault;
|
|
1981
|
-
/* ============================== Settle =============================== */
|
|
1982
|
-
function isSettle(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Settle"; }
|
|
1983
|
-
var Settle = /** @class */ (function () {
|
|
1984
|
-
function Settle(typeArgs, fields) {
|
|
1985
|
-
this.$typeName = Settle.$typeName;
|
|
1986
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Settle.$typeName], __read(typeArgs), false));
|
|
1987
|
-
this.$typeArgs = typeArgs;
|
|
1988
|
-
this.signer = fields.signer;
|
|
1989
|
-
;
|
|
1990
|
-
this.index = fields.index;
|
|
1991
|
-
;
|
|
1992
|
-
this.depositToken = fields.depositToken;
|
|
1993
|
-
;
|
|
1994
|
-
this.bidToken = fields.bidToken;
|
|
1995
|
-
;
|
|
1996
|
-
this.sharePrice = fields.sharePrice;
|
|
1997
|
-
;
|
|
1998
|
-
this.sharePriceDecimal = fields.sharePriceDecimal;
|
|
1999
|
-
}
|
|
2000
|
-
Settle.reified = function () {
|
|
2001
|
-
var _this = this;
|
|
2002
|
-
return { typeName: Settle.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Settle.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Settle.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Settle.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Settle.fromBcs(data); }, bcs: Settle.bcs, fromJSONField: function (field) { return Settle.fromJSONField(field); }, fromJSON: function (json) { return Settle.fromJSON(json); }, fromSuiParsedData: function (content) { return Settle.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2003
|
-
return [2 /*return*/, Settle.fetch(client, id)];
|
|
2004
|
-
}); }); }, new: function (fields) { return new Settle([], fields); }, kind: "StructClassReified", };
|
|
2005
|
-
};
|
|
2006
|
-
Object.defineProperty(Settle, "r", {
|
|
2007
|
-
get: function () { return Settle.reified(); },
|
|
2008
|
-
enumerable: false,
|
|
2009
|
-
configurable: true
|
|
2010
|
-
});
|
|
2011
|
-
Settle.phantom = function () { return (0, reified_1.phantom)(Settle.reified()); };
|
|
2012
|
-
Object.defineProperty(Settle, "p", {
|
|
2013
|
-
get: function () { return Settle.phantom(); },
|
|
2014
|
-
enumerable: false,
|
|
2015
|
-
configurable: true
|
|
2016
|
-
});
|
|
2017
|
-
Object.defineProperty(Settle, "bcs", {
|
|
2018
|
-
get: function () {
|
|
2019
|
-
return bcs_1.bcs.struct("Settle", {
|
|
2020
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), deposit_token: structs_3.TypeName.bcs, bid_token: structs_3.TypeName.bcs, share_price: bcs_1.bcs.u64(), share_price_decimal: bcs_1.bcs.u64()
|
|
2021
|
-
});
|
|
2022
|
-
},
|
|
2023
|
-
enumerable: false,
|
|
2024
|
-
configurable: true
|
|
2025
|
-
});
|
|
2026
|
-
;
|
|
2027
|
-
Settle.fromFields = function (fields) { return Settle.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), depositToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.deposit_token), bidToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.bid_token), sharePrice: (0, reified_1.decodeFromFields)("u64", fields.share_price), sharePriceDecimal: (0, reified_1.decodeFromFields)("u64", fields.share_price_decimal) }); };
|
|
2028
|
-
Settle.fromFieldsWithTypes = function (item) {
|
|
2029
|
-
if (!isSettle(item.type)) {
|
|
2030
|
-
throw new Error("not a Settle type");
|
|
2031
|
-
}
|
|
2032
|
-
return Settle.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), depositToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.deposit_token), bidToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.bid_token), sharePrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share_price), sharePriceDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share_price_decimal) });
|
|
2033
|
-
};
|
|
2034
|
-
Settle.fromBcs = function (data) { return Settle.fromFields(Settle.bcs.parse(data)); };
|
|
2035
|
-
Settle.prototype.toJSONField = function () {
|
|
2036
|
-
return {
|
|
2037
|
-
signer: this.signer, index: this.index.toString(), depositToken: this.depositToken.toJSONField(), bidToken: this.bidToken.toJSONField(), sharePrice: this.sharePrice.toString(), sharePriceDecimal: this.sharePriceDecimal.toString(),
|
|
2038
|
-
};
|
|
2039
|
-
};
|
|
2040
|
-
Settle.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2041
|
-
Settle.fromJSONField = function (field) { return Settle.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), depositToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.depositToken), bidToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bidToken), sharePrice: (0, reified_1.decodeFromJSONField)("u64", field.sharePrice), sharePriceDecimal: (0, reified_1.decodeFromJSONField)("u64", field.sharePriceDecimal) }); };
|
|
2042
|
-
Settle.fromJSON = function (json) {
|
|
2043
|
-
if (json.$typeName !== Settle.$typeName) {
|
|
2044
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2045
|
-
}
|
|
2046
|
-
;
|
|
2047
|
-
return Settle.fromJSONField(json);
|
|
2048
|
-
};
|
|
2049
|
-
Settle.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2050
|
-
throw new Error("not an object");
|
|
2051
|
-
} if (!isSettle(content.type)) {
|
|
2052
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Settle object"));
|
|
2053
|
-
} return Settle.fromFieldsWithTypes(content); };
|
|
2054
|
-
Settle.fetch = function (client, id) {
|
|
2055
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2056
|
-
var res;
|
|
2057
|
-
var _a, _b;
|
|
2058
|
-
return __generator(this, function (_c) {
|
|
2059
|
-
switch (_c.label) {
|
|
2060
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2061
|
-
case 1:
|
|
2062
|
-
res = _c.sent();
|
|
2063
|
-
if (res.error) {
|
|
2064
|
-
throw new Error("error fetching Settle object at id ".concat(id, ": ").concat(res.error.code));
|
|
2065
|
-
}
|
|
2066
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSettle(res.data.bcs.type)) {
|
|
2067
|
-
throw new Error("object at id ".concat(id, " is not a Settle object"));
|
|
2068
|
-
}
|
|
2069
|
-
return [2 /*return*/, Settle.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2070
|
-
}
|
|
2071
|
-
});
|
|
2072
|
-
});
|
|
2073
|
-
};
|
|
2074
|
-
Settle.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Settle";
|
|
2075
|
-
Settle.$numTypeParams = 0;
|
|
2076
|
-
return Settle;
|
|
2077
|
-
}());
|
|
2078
|
-
exports.Settle = Settle;
|
|
2079
|
-
/* ============================== Terminate =============================== */
|
|
2080
|
-
function isTerminate(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Terminate"; }
|
|
2081
|
-
var Terminate = /** @class */ (function () {
|
|
2082
|
-
function Terminate(typeArgs, fields) {
|
|
2083
|
-
this.$typeName = Terminate.$typeName;
|
|
2084
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Terminate.$typeName], __read(typeArgs), false));
|
|
2085
|
-
this.$typeArgs = typeArgs;
|
|
2086
|
-
this.signer = fields.signer;
|
|
2087
|
-
;
|
|
2088
|
-
this.index = fields.index;
|
|
2089
|
-
;
|
|
2090
|
-
this.token = fields.token;
|
|
2091
|
-
}
|
|
2092
|
-
Terminate.reified = function () {
|
|
2093
|
-
var _this = this;
|
|
2094
|
-
return { typeName: Terminate.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Terminate.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Terminate.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Terminate.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Terminate.fromBcs(data); }, bcs: Terminate.bcs, fromJSONField: function (field) { return Terminate.fromJSONField(field); }, fromJSON: function (json) { return Terminate.fromJSON(json); }, fromSuiParsedData: function (content) { return Terminate.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2095
|
-
return [2 /*return*/, Terminate.fetch(client, id)];
|
|
2096
|
-
}); }); }, new: function (fields) { return new Terminate([], fields); }, kind: "StructClassReified", };
|
|
2097
|
-
};
|
|
2098
|
-
Object.defineProperty(Terminate, "r", {
|
|
2099
|
-
get: function () { return Terminate.reified(); },
|
|
2100
|
-
enumerable: false,
|
|
2101
|
-
configurable: true
|
|
2102
|
-
});
|
|
2103
|
-
Terminate.phantom = function () { return (0, reified_1.phantom)(Terminate.reified()); };
|
|
2104
|
-
Object.defineProperty(Terminate, "p", {
|
|
2105
|
-
get: function () { return Terminate.phantom(); },
|
|
2106
|
-
enumerable: false,
|
|
2107
|
-
configurable: true
|
|
2108
|
-
});
|
|
2109
|
-
Object.defineProperty(Terminate, "bcs", {
|
|
2110
|
-
get: function () {
|
|
2111
|
-
return bcs_1.bcs.struct("Terminate", {
|
|
2112
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs
|
|
2113
|
-
});
|
|
2114
|
-
},
|
|
2115
|
-
enumerable: false,
|
|
2116
|
-
configurable: true
|
|
2117
|
-
});
|
|
2118
|
-
;
|
|
2119
|
-
Terminate.fromFields = function (fields) { return Terminate.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token) }); };
|
|
2120
|
-
Terminate.fromFieldsWithTypes = function (item) {
|
|
2121
|
-
if (!isTerminate(item.type)) {
|
|
2122
|
-
throw new Error("not a Terminate type");
|
|
2123
|
-
}
|
|
2124
|
-
return Terminate.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token) });
|
|
2125
|
-
};
|
|
2126
|
-
Terminate.fromBcs = function (data) { return Terminate.fromFields(Terminate.bcs.parse(data)); };
|
|
2127
|
-
Terminate.prototype.toJSONField = function () {
|
|
2128
|
-
return {
|
|
2129
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(),
|
|
2130
|
-
};
|
|
2131
|
-
};
|
|
2132
|
-
Terminate.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2133
|
-
Terminate.fromJSONField = function (field) { return Terminate.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token) }); };
|
|
2134
|
-
Terminate.fromJSON = function (json) {
|
|
2135
|
-
if (json.$typeName !== Terminate.$typeName) {
|
|
2136
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2137
|
-
}
|
|
2138
|
-
;
|
|
2139
|
-
return Terminate.fromJSONField(json);
|
|
2140
|
-
};
|
|
2141
|
-
Terminate.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2142
|
-
throw new Error("not an object");
|
|
2143
|
-
} if (!isTerminate(content.type)) {
|
|
2144
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Terminate object"));
|
|
2145
|
-
} return Terminate.fromFieldsWithTypes(content); };
|
|
2146
|
-
Terminate.fetch = function (client, id) {
|
|
2147
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2148
|
-
var res;
|
|
2149
|
-
var _a, _b;
|
|
2150
|
-
return __generator(this, function (_c) {
|
|
2151
|
-
switch (_c.label) {
|
|
2152
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2153
|
-
case 1:
|
|
2154
|
-
res = _c.sent();
|
|
2155
|
-
if (res.error) {
|
|
2156
|
-
throw new Error("error fetching Terminate object at id ".concat(id, ": ").concat(res.error.code));
|
|
2157
|
-
}
|
|
2158
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTerminate(res.data.bcs.type)) {
|
|
2159
|
-
throw new Error("object at id ".concat(id, " is not a Terminate object"));
|
|
2160
|
-
}
|
|
2161
|
-
return [2 /*return*/, Terminate.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2162
|
-
}
|
|
2163
|
-
});
|
|
2164
|
-
});
|
|
2165
|
-
};
|
|
2166
|
-
Terminate.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Terminate";
|
|
2167
|
-
Terminate.$numTypeParams = 0;
|
|
2168
|
-
return Terminate;
|
|
2169
|
-
}());
|
|
2170
|
-
exports.Terminate = Terminate;
|
|
2171
|
-
/* ============================== TypusBidReceipt =============================== */
|
|
2172
|
-
function isTypusBidReceipt(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::TypusBidReceipt"; }
|
|
2173
|
-
var TypusBidReceipt = /** @class */ (function () {
|
|
2174
|
-
function TypusBidReceipt(typeArgs, fields) {
|
|
2175
|
-
this.$typeName = TypusBidReceipt.$typeName;
|
|
2176
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TypusBidReceipt.$typeName], __read(typeArgs), false));
|
|
2177
|
-
this.$typeArgs = typeArgs;
|
|
2178
|
-
this.id = fields.id;
|
|
2179
|
-
;
|
|
2180
|
-
this.vid = fields.vid;
|
|
2181
|
-
;
|
|
2182
|
-
this.index = fields.index;
|
|
2183
|
-
;
|
|
2184
|
-
this.metadata = fields.metadata;
|
|
2185
|
-
;
|
|
2186
|
-
this.u64Padding = fields.u64Padding;
|
|
2187
|
-
}
|
|
2188
|
-
TypusBidReceipt.reified = function () {
|
|
2189
|
-
var _this = this;
|
|
2190
|
-
return { typeName: TypusBidReceipt.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TypusBidReceipt.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return TypusBidReceipt.fromFields(fields); }, fromFieldsWithTypes: function (item) { return TypusBidReceipt.fromFieldsWithTypes(item); }, fromBcs: function (data) { return TypusBidReceipt.fromBcs(data); }, bcs: TypusBidReceipt.bcs, fromJSONField: function (field) { return TypusBidReceipt.fromJSONField(field); }, fromJSON: function (json) { return TypusBidReceipt.fromJSON(json); }, fromSuiParsedData: function (content) { return TypusBidReceipt.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2191
|
-
return [2 /*return*/, TypusBidReceipt.fetch(client, id)];
|
|
2192
|
-
}); }); }, new: function (fields) { return new TypusBidReceipt([], fields); }, kind: "StructClassReified", };
|
|
2193
|
-
};
|
|
2194
|
-
Object.defineProperty(TypusBidReceipt, "r", {
|
|
2195
|
-
get: function () { return TypusBidReceipt.reified(); },
|
|
2196
|
-
enumerable: false,
|
|
2197
|
-
configurable: true
|
|
2198
|
-
});
|
|
2199
|
-
TypusBidReceipt.phantom = function () { return (0, reified_1.phantom)(TypusBidReceipt.reified()); };
|
|
2200
|
-
Object.defineProperty(TypusBidReceipt, "p", {
|
|
2201
|
-
get: function () { return TypusBidReceipt.phantom(); },
|
|
2202
|
-
enumerable: false,
|
|
2203
|
-
configurable: true
|
|
2204
|
-
});
|
|
2205
|
-
Object.defineProperty(TypusBidReceipt, "bcs", {
|
|
2206
|
-
get: function () {
|
|
2207
|
-
return bcs_1.bcs.struct("TypusBidReceipt", {
|
|
2208
|
-
id: structs_4.UID.bcs, vid: structs_4.ID.bcs, index: bcs_1.bcs.u64(), metadata: structs_2.String.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2209
|
-
});
|
|
2210
|
-
},
|
|
2211
|
-
enumerable: false,
|
|
2212
|
-
configurable: true
|
|
2213
|
-
});
|
|
2214
|
-
;
|
|
2215
|
-
TypusBidReceipt.fromFields = function (fields) { return TypusBidReceipt.reified().new({ id: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.id), vid: (0, reified_1.decodeFromFields)(structs_4.ID.reified(), fields.vid), index: (0, reified_1.decodeFromFields)("u64", fields.index), metadata: (0, reified_1.decodeFromFields)(structs_2.String.reified(), fields.metadata), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
2216
|
-
TypusBidReceipt.fromFieldsWithTypes = function (item) {
|
|
2217
|
-
if (!isTypusBidReceipt(item.type)) {
|
|
2218
|
-
throw new Error("not a TypusBidReceipt type");
|
|
2219
|
-
}
|
|
2220
|
-
return TypusBidReceipt.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.id), vid: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.ID.reified(), item.fields.vid), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), metadata: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.String.reified(), item.fields.metadata), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
2221
|
-
};
|
|
2222
|
-
TypusBidReceipt.fromBcs = function (data) { return TypusBidReceipt.fromFields(TypusBidReceipt.bcs.parse(data)); };
|
|
2223
|
-
TypusBidReceipt.prototype.toJSONField = function () {
|
|
2224
|
-
return {
|
|
2225
|
-
id: this.id, vid: this.vid, index: this.index.toString(), metadata: this.metadata, u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
2226
|
-
};
|
|
2227
|
-
};
|
|
2228
|
-
TypusBidReceipt.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2229
|
-
TypusBidReceipt.fromJSONField = function (field) { return TypusBidReceipt.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.id), vid: (0, reified_1.decodeFromJSONField)(structs_4.ID.reified(), field.vid), index: (0, reified_1.decodeFromJSONField)("u64", field.index), metadata: (0, reified_1.decodeFromJSONField)(structs_2.String.reified(), field.metadata), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2230
|
-
TypusBidReceipt.fromJSON = function (json) {
|
|
2231
|
-
if (json.$typeName !== TypusBidReceipt.$typeName) {
|
|
2232
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2233
|
-
}
|
|
2234
|
-
;
|
|
2235
|
-
return TypusBidReceipt.fromJSONField(json);
|
|
2236
|
-
};
|
|
2237
|
-
TypusBidReceipt.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2238
|
-
throw new Error("not an object");
|
|
2239
|
-
} if (!isTypusBidReceipt(content.type)) {
|
|
2240
|
-
throw new Error("object at ".concat(content.fields.id, " is not a TypusBidReceipt object"));
|
|
2241
|
-
} return TypusBidReceipt.fromFieldsWithTypes(content); };
|
|
2242
|
-
TypusBidReceipt.fetch = function (client, id) {
|
|
2243
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2244
|
-
var res;
|
|
2245
|
-
var _a, _b;
|
|
2246
|
-
return __generator(this, function (_c) {
|
|
2247
|
-
switch (_c.label) {
|
|
2248
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2249
|
-
case 1:
|
|
2250
|
-
res = _c.sent();
|
|
2251
|
-
if (res.error) {
|
|
2252
|
-
throw new Error("error fetching TypusBidReceipt object at id ".concat(id, ": ").concat(res.error.code));
|
|
2253
|
-
}
|
|
2254
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTypusBidReceipt(res.data.bcs.type)) {
|
|
2255
|
-
throw new Error("object at id ".concat(id, " is not a TypusBidReceipt object"));
|
|
2256
|
-
}
|
|
2257
|
-
return [2 /*return*/, TypusBidReceipt.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2258
|
-
}
|
|
2259
|
-
});
|
|
2260
|
-
});
|
|
2261
|
-
};
|
|
2262
|
-
TypusBidReceipt.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::TypusBidReceipt";
|
|
2263
|
-
TypusBidReceipt.$numTypeParams = 0;
|
|
2264
|
-
return TypusBidReceipt;
|
|
2265
|
-
}());
|
|
2266
|
-
exports.TypusBidReceipt = TypusBidReceipt;
|
|
2267
|
-
/* ============================== TypusDepositReceipt =============================== */
|
|
2268
|
-
function isTypusDepositReceipt(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::TypusDepositReceipt"; }
|
|
2269
|
-
var TypusDepositReceipt = /** @class */ (function () {
|
|
2270
|
-
function TypusDepositReceipt(typeArgs, fields) {
|
|
2271
|
-
this.$typeName = TypusDepositReceipt.$typeName;
|
|
2272
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TypusDepositReceipt.$typeName], __read(typeArgs), false));
|
|
2273
|
-
this.$typeArgs = typeArgs;
|
|
2274
|
-
this.id = fields.id;
|
|
2275
|
-
;
|
|
2276
|
-
this.vid = fields.vid;
|
|
2277
|
-
;
|
|
2278
|
-
this.index = fields.index;
|
|
2279
|
-
;
|
|
2280
|
-
this.metadata = fields.metadata;
|
|
2281
|
-
;
|
|
2282
|
-
this.u64Padding = fields.u64Padding;
|
|
2283
|
-
}
|
|
2284
|
-
TypusDepositReceipt.reified = function () {
|
|
2285
|
-
var _this = this;
|
|
2286
|
-
return { typeName: TypusDepositReceipt.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TypusDepositReceipt.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return TypusDepositReceipt.fromFields(fields); }, fromFieldsWithTypes: function (item) { return TypusDepositReceipt.fromFieldsWithTypes(item); }, fromBcs: function (data) { return TypusDepositReceipt.fromBcs(data); }, bcs: TypusDepositReceipt.bcs, fromJSONField: function (field) { return TypusDepositReceipt.fromJSONField(field); }, fromJSON: function (json) { return TypusDepositReceipt.fromJSON(json); }, fromSuiParsedData: function (content) { return TypusDepositReceipt.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2287
|
-
return [2 /*return*/, TypusDepositReceipt.fetch(client, id)];
|
|
2288
|
-
}); }); }, new: function (fields) { return new TypusDepositReceipt([], fields); }, kind: "StructClassReified", };
|
|
2289
|
-
};
|
|
2290
|
-
Object.defineProperty(TypusDepositReceipt, "r", {
|
|
2291
|
-
get: function () { return TypusDepositReceipt.reified(); },
|
|
2292
|
-
enumerable: false,
|
|
2293
|
-
configurable: true
|
|
2294
|
-
});
|
|
2295
|
-
TypusDepositReceipt.phantom = function () { return (0, reified_1.phantom)(TypusDepositReceipt.reified()); };
|
|
2296
|
-
Object.defineProperty(TypusDepositReceipt, "p", {
|
|
2297
|
-
get: function () { return TypusDepositReceipt.phantom(); },
|
|
2298
|
-
enumerable: false,
|
|
2299
|
-
configurable: true
|
|
2300
|
-
});
|
|
2301
|
-
Object.defineProperty(TypusDepositReceipt, "bcs", {
|
|
2302
|
-
get: function () {
|
|
2303
|
-
return bcs_1.bcs.struct("TypusDepositReceipt", {
|
|
2304
|
-
id: structs_4.UID.bcs, vid: structs_4.ID.bcs, index: bcs_1.bcs.u64(), metadata: structs_2.String.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2305
|
-
});
|
|
2306
|
-
},
|
|
2307
|
-
enumerable: false,
|
|
2308
|
-
configurable: true
|
|
2309
|
-
});
|
|
2310
|
-
;
|
|
2311
|
-
TypusDepositReceipt.fromFields = function (fields) { return TypusDepositReceipt.reified().new({ id: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.id), vid: (0, reified_1.decodeFromFields)(structs_4.ID.reified(), fields.vid), index: (0, reified_1.decodeFromFields)("u64", fields.index), metadata: (0, reified_1.decodeFromFields)(structs_2.String.reified(), fields.metadata), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
2312
|
-
TypusDepositReceipt.fromFieldsWithTypes = function (item) {
|
|
2313
|
-
if (!isTypusDepositReceipt(item.type)) {
|
|
2314
|
-
throw new Error("not a TypusDepositReceipt type");
|
|
2315
|
-
}
|
|
2316
|
-
return TypusDepositReceipt.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.id), vid: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.ID.reified(), item.fields.vid), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), metadata: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.String.reified(), item.fields.metadata), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
2317
|
-
};
|
|
2318
|
-
TypusDepositReceipt.fromBcs = function (data) { return TypusDepositReceipt.fromFields(TypusDepositReceipt.bcs.parse(data)); };
|
|
2319
|
-
TypusDepositReceipt.prototype.toJSONField = function () {
|
|
2320
|
-
return {
|
|
2321
|
-
id: this.id, vid: this.vid, index: this.index.toString(), metadata: this.metadata, u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
2322
|
-
};
|
|
2323
|
-
};
|
|
2324
|
-
TypusDepositReceipt.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2325
|
-
TypusDepositReceipt.fromJSONField = function (field) { return TypusDepositReceipt.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.id), vid: (0, reified_1.decodeFromJSONField)(structs_4.ID.reified(), field.vid), index: (0, reified_1.decodeFromJSONField)("u64", field.index), metadata: (0, reified_1.decodeFromJSONField)(structs_2.String.reified(), field.metadata), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2326
|
-
TypusDepositReceipt.fromJSON = function (json) {
|
|
2327
|
-
if (json.$typeName !== TypusDepositReceipt.$typeName) {
|
|
2328
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2329
|
-
}
|
|
2330
|
-
;
|
|
2331
|
-
return TypusDepositReceipt.fromJSONField(json);
|
|
2332
|
-
};
|
|
2333
|
-
TypusDepositReceipt.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2334
|
-
throw new Error("not an object");
|
|
2335
|
-
} if (!isTypusDepositReceipt(content.type)) {
|
|
2336
|
-
throw new Error("object at ".concat(content.fields.id, " is not a TypusDepositReceipt object"));
|
|
2337
|
-
} return TypusDepositReceipt.fromFieldsWithTypes(content); };
|
|
2338
|
-
TypusDepositReceipt.fetch = function (client, id) {
|
|
2339
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2340
|
-
var res;
|
|
2341
|
-
var _a, _b;
|
|
2342
|
-
return __generator(this, function (_c) {
|
|
2343
|
-
switch (_c.label) {
|
|
2344
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2345
|
-
case 1:
|
|
2346
|
-
res = _c.sent();
|
|
2347
|
-
if (res.error) {
|
|
2348
|
-
throw new Error("error fetching TypusDepositReceipt object at id ".concat(id, ": ").concat(res.error.code));
|
|
2349
|
-
}
|
|
2350
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTypusDepositReceipt(res.data.bcs.type)) {
|
|
2351
|
-
throw new Error("object at id ".concat(id, " is not a TypusDepositReceipt object"));
|
|
2352
|
-
}
|
|
2353
|
-
return [2 /*return*/, TypusDepositReceipt.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2354
|
-
}
|
|
2355
|
-
});
|
|
2356
|
-
});
|
|
2357
|
-
};
|
|
2358
|
-
TypusDepositReceipt.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::TypusDepositReceipt";
|
|
2359
|
-
TypusDepositReceipt.$numTypeParams = 0;
|
|
2360
|
-
return TypusDepositReceipt;
|
|
2361
|
-
}());
|
|
2362
|
-
exports.TypusDepositReceipt = TypusDepositReceipt;
|
|
2363
|
-
/* ============================== Unsubscribe =============================== */
|
|
2364
|
-
function isUnsubscribe(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Unsubscribe"; }
|
|
2365
|
-
var Unsubscribe = /** @class */ (function () {
|
|
2366
|
-
function Unsubscribe(typeArgs, fields) {
|
|
2367
|
-
this.$typeName = Unsubscribe.$typeName;
|
|
2368
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Unsubscribe.$typeName], __read(typeArgs), false));
|
|
2369
|
-
this.$typeArgs = typeArgs;
|
|
2370
|
-
this.signer = fields.signer;
|
|
2371
|
-
;
|
|
2372
|
-
this.index = fields.index;
|
|
2373
|
-
;
|
|
2374
|
-
this.token = fields.token;
|
|
2375
|
-
;
|
|
2376
|
-
this.amount = fields.amount;
|
|
2377
|
-
}
|
|
2378
|
-
Unsubscribe.reified = function () {
|
|
2379
|
-
var _this = this;
|
|
2380
|
-
return { typeName: Unsubscribe.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Unsubscribe.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Unsubscribe.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Unsubscribe.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Unsubscribe.fromBcs(data); }, bcs: Unsubscribe.bcs, fromJSONField: function (field) { return Unsubscribe.fromJSONField(field); }, fromJSON: function (json) { return Unsubscribe.fromJSON(json); }, fromSuiParsedData: function (content) { return Unsubscribe.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2381
|
-
return [2 /*return*/, Unsubscribe.fetch(client, id)];
|
|
2382
|
-
}); }); }, new: function (fields) { return new Unsubscribe([], fields); }, kind: "StructClassReified", };
|
|
2383
|
-
};
|
|
2384
|
-
Object.defineProperty(Unsubscribe, "r", {
|
|
2385
|
-
get: function () { return Unsubscribe.reified(); },
|
|
2386
|
-
enumerable: false,
|
|
2387
|
-
configurable: true
|
|
2388
|
-
});
|
|
2389
|
-
Unsubscribe.phantom = function () { return (0, reified_1.phantom)(Unsubscribe.reified()); };
|
|
2390
|
-
Object.defineProperty(Unsubscribe, "p", {
|
|
2391
|
-
get: function () { return Unsubscribe.phantom(); },
|
|
2392
|
-
enumerable: false,
|
|
2393
|
-
configurable: true
|
|
2394
|
-
});
|
|
2395
|
-
Object.defineProperty(Unsubscribe, "bcs", {
|
|
2396
|
-
get: function () {
|
|
2397
|
-
return bcs_1.bcs.struct("Unsubscribe", {
|
|
2398
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64()
|
|
2399
|
-
});
|
|
2400
|
-
},
|
|
2401
|
-
enumerable: false,
|
|
2402
|
-
configurable: true
|
|
2403
|
-
});
|
|
2404
|
-
;
|
|
2405
|
-
Unsubscribe.fromFields = function (fields) { return Unsubscribe.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount) }); };
|
|
2406
|
-
Unsubscribe.fromFieldsWithTypes = function (item) {
|
|
2407
|
-
if (!isUnsubscribe(item.type)) {
|
|
2408
|
-
throw new Error("not a Unsubscribe type");
|
|
2409
|
-
}
|
|
2410
|
-
return Unsubscribe.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount) });
|
|
2411
|
-
};
|
|
2412
|
-
Unsubscribe.fromBcs = function (data) { return Unsubscribe.fromFields(Unsubscribe.bcs.parse(data)); };
|
|
2413
|
-
Unsubscribe.prototype.toJSONField = function () {
|
|
2414
|
-
return {
|
|
2415
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(),
|
|
2416
|
-
};
|
|
2417
|
-
};
|
|
2418
|
-
Unsubscribe.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2419
|
-
Unsubscribe.fromJSONField = function (field) { return Unsubscribe.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount) }); };
|
|
2420
|
-
Unsubscribe.fromJSON = function (json) {
|
|
2421
|
-
if (json.$typeName !== Unsubscribe.$typeName) {
|
|
2422
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2423
|
-
}
|
|
2424
|
-
;
|
|
2425
|
-
return Unsubscribe.fromJSONField(json);
|
|
2426
|
-
};
|
|
2427
|
-
Unsubscribe.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2428
|
-
throw new Error("not an object");
|
|
2429
|
-
} if (!isUnsubscribe(content.type)) {
|
|
2430
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Unsubscribe object"));
|
|
2431
|
-
} return Unsubscribe.fromFieldsWithTypes(content); };
|
|
2432
|
-
Unsubscribe.fetch = function (client, id) {
|
|
2433
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2434
|
-
var res;
|
|
2435
|
-
var _a, _b;
|
|
2436
|
-
return __generator(this, function (_c) {
|
|
2437
|
-
switch (_c.label) {
|
|
2438
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2439
|
-
case 1:
|
|
2440
|
-
res = _c.sent();
|
|
2441
|
-
if (res.error) {
|
|
2442
|
-
throw new Error("error fetching Unsubscribe object at id ".concat(id, ": ").concat(res.error.code));
|
|
2443
|
-
}
|
|
2444
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUnsubscribe(res.data.bcs.type)) {
|
|
2445
|
-
throw new Error("object at id ".concat(id, " is not a Unsubscribe object"));
|
|
2446
|
-
}
|
|
2447
|
-
return [2 /*return*/, Unsubscribe.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2448
|
-
}
|
|
2449
|
-
});
|
|
2450
|
-
});
|
|
2451
|
-
};
|
|
2452
|
-
Unsubscribe.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Unsubscribe";
|
|
2453
|
-
Unsubscribe.$numTypeParams = 0;
|
|
2454
|
-
return Unsubscribe;
|
|
2455
|
-
}());
|
|
2456
|
-
exports.Unsubscribe = Unsubscribe;
|
|
2457
|
-
/* ============================== UpdateFeeConfig =============================== */
|
|
2458
|
-
function isUpdateFeeConfig(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::UpdateFeeConfig"; }
|
|
2459
|
-
var UpdateFeeConfig = /** @class */ (function () {
|
|
2460
|
-
function UpdateFeeConfig(typeArgs, fields) {
|
|
2461
|
-
this.$typeName = UpdateFeeConfig.$typeName;
|
|
2462
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UpdateFeeConfig.$typeName], __read(typeArgs), false));
|
|
2463
|
-
this.$typeArgs = typeArgs;
|
|
2464
|
-
this.signer = fields.signer;
|
|
2465
|
-
;
|
|
2466
|
-
this.index = fields.index;
|
|
2467
|
-
;
|
|
2468
|
-
this.prevFeeBp = fields.prevFeeBp;
|
|
2469
|
-
;
|
|
2470
|
-
this.feeBp = fields.feeBp;
|
|
2471
|
-
}
|
|
2472
|
-
UpdateFeeConfig.reified = function () {
|
|
2473
|
-
var _this = this;
|
|
2474
|
-
return { typeName: UpdateFeeConfig.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UpdateFeeConfig.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return UpdateFeeConfig.fromFields(fields); }, fromFieldsWithTypes: function (item) { return UpdateFeeConfig.fromFieldsWithTypes(item); }, fromBcs: function (data) { return UpdateFeeConfig.fromBcs(data); }, bcs: UpdateFeeConfig.bcs, fromJSONField: function (field) { return UpdateFeeConfig.fromJSONField(field); }, fromJSON: function (json) { return UpdateFeeConfig.fromJSON(json); }, fromSuiParsedData: function (content) { return UpdateFeeConfig.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2475
|
-
return [2 /*return*/, UpdateFeeConfig.fetch(client, id)];
|
|
2476
|
-
}); }); }, new: function (fields) { return new UpdateFeeConfig([], fields); }, kind: "StructClassReified", };
|
|
2477
|
-
};
|
|
2478
|
-
Object.defineProperty(UpdateFeeConfig, "r", {
|
|
2479
|
-
get: function () { return UpdateFeeConfig.reified(); },
|
|
2480
|
-
enumerable: false,
|
|
2481
|
-
configurable: true
|
|
2482
|
-
});
|
|
2483
|
-
UpdateFeeConfig.phantom = function () { return (0, reified_1.phantom)(UpdateFeeConfig.reified()); };
|
|
2484
|
-
Object.defineProperty(UpdateFeeConfig, "p", {
|
|
2485
|
-
get: function () { return UpdateFeeConfig.phantom(); },
|
|
2486
|
-
enumerable: false,
|
|
2487
|
-
configurable: true
|
|
2488
|
-
});
|
|
2489
|
-
Object.defineProperty(UpdateFeeConfig, "bcs", {
|
|
2490
|
-
get: function () {
|
|
2491
|
-
return bcs_1.bcs.struct("UpdateFeeConfig", {
|
|
2492
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), prev_fee_bp: bcs_1.bcs.u64(), fee_bp: bcs_1.bcs.u64()
|
|
2493
|
-
});
|
|
2494
|
-
},
|
|
2495
|
-
enumerable: false,
|
|
2496
|
-
configurable: true
|
|
2497
|
-
});
|
|
2498
|
-
;
|
|
2499
|
-
UpdateFeeConfig.fromFields = function (fields) { return UpdateFeeConfig.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), prevFeeBp: (0, reified_1.decodeFromFields)("u64", fields.prev_fee_bp), feeBp: (0, reified_1.decodeFromFields)("u64", fields.fee_bp) }); };
|
|
2500
|
-
UpdateFeeConfig.fromFieldsWithTypes = function (item) {
|
|
2501
|
-
if (!isUpdateFeeConfig(item.type)) {
|
|
2502
|
-
throw new Error("not a UpdateFeeConfig type");
|
|
2503
|
-
}
|
|
2504
|
-
return UpdateFeeConfig.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), prevFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.prev_fee_bp), feeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_bp) });
|
|
2505
|
-
};
|
|
2506
|
-
UpdateFeeConfig.fromBcs = function (data) { return UpdateFeeConfig.fromFields(UpdateFeeConfig.bcs.parse(data)); };
|
|
2507
|
-
UpdateFeeConfig.prototype.toJSONField = function () {
|
|
2508
|
-
return {
|
|
2509
|
-
signer: this.signer, index: this.index.toString(), prevFeeBp: this.prevFeeBp.toString(), feeBp: this.feeBp.toString(),
|
|
2510
|
-
};
|
|
2511
|
-
};
|
|
2512
|
-
UpdateFeeConfig.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2513
|
-
UpdateFeeConfig.fromJSONField = function (field) { return UpdateFeeConfig.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), prevFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.prevFeeBp), feeBp: (0, reified_1.decodeFromJSONField)("u64", field.feeBp) }); };
|
|
2514
|
-
UpdateFeeConfig.fromJSON = function (json) {
|
|
2515
|
-
if (json.$typeName !== UpdateFeeConfig.$typeName) {
|
|
2516
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2517
|
-
}
|
|
2518
|
-
;
|
|
2519
|
-
return UpdateFeeConfig.fromJSONField(json);
|
|
2520
|
-
};
|
|
2521
|
-
UpdateFeeConfig.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2522
|
-
throw new Error("not an object");
|
|
2523
|
-
} if (!isUpdateFeeConfig(content.type)) {
|
|
2524
|
-
throw new Error("object at ".concat(content.fields.id, " is not a UpdateFeeConfig object"));
|
|
2525
|
-
} return UpdateFeeConfig.fromFieldsWithTypes(content); };
|
|
2526
|
-
UpdateFeeConfig.fetch = function (client, id) {
|
|
2527
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2528
|
-
var res;
|
|
2529
|
-
var _a, _b;
|
|
2530
|
-
return __generator(this, function (_c) {
|
|
2531
|
-
switch (_c.label) {
|
|
2532
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2533
|
-
case 1:
|
|
2534
|
-
res = _c.sent();
|
|
2535
|
-
if (res.error) {
|
|
2536
|
-
throw new Error("error fetching UpdateFeeConfig object at id ".concat(id, ": ").concat(res.error.code));
|
|
2537
|
-
}
|
|
2538
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUpdateFeeConfig(res.data.bcs.type)) {
|
|
2539
|
-
throw new Error("object at id ".concat(id, " is not a UpdateFeeConfig object"));
|
|
2540
|
-
}
|
|
2541
|
-
return [2 /*return*/, UpdateFeeConfig.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2542
|
-
}
|
|
2543
|
-
});
|
|
2544
|
-
});
|
|
2545
|
-
};
|
|
2546
|
-
UpdateFeeConfig.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::UpdateFeeConfig";
|
|
2547
|
-
UpdateFeeConfig.$numTypeParams = 0;
|
|
2548
|
-
return UpdateFeeConfig;
|
|
2549
|
-
}());
|
|
2550
|
-
exports.UpdateFeeConfig = UpdateFeeConfig;
|
|
2551
|
-
/* ============================== UpdateFeeShareConfig =============================== */
|
|
2552
|
-
function isUpdateFeeShareConfig(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::UpdateFeeShareConfig"; }
|
|
2553
|
-
var UpdateFeeShareConfig = /** @class */ (function () {
|
|
2554
|
-
function UpdateFeeShareConfig(typeArgs, fields) {
|
|
2555
|
-
this.$typeName = UpdateFeeShareConfig.$typeName;
|
|
2556
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UpdateFeeShareConfig.$typeName], __read(typeArgs), false));
|
|
2557
|
-
this.$typeArgs = typeArgs;
|
|
2558
|
-
this.signer = fields.signer;
|
|
2559
|
-
;
|
|
2560
|
-
this.index = fields.index;
|
|
2561
|
-
;
|
|
2562
|
-
this.prevFeeBp = fields.prevFeeBp;
|
|
2563
|
-
;
|
|
2564
|
-
this.prevSharedFeePool = fields.prevSharedFeePool;
|
|
2565
|
-
;
|
|
2566
|
-
this.feeBp = fields.feeBp;
|
|
2567
|
-
;
|
|
2568
|
-
this.sharedFeePool = fields.sharedFeePool;
|
|
2569
|
-
}
|
|
2570
|
-
UpdateFeeShareConfig.reified = function () {
|
|
2571
|
-
var _this = this;
|
|
2572
|
-
return { typeName: UpdateFeeShareConfig.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UpdateFeeShareConfig.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return UpdateFeeShareConfig.fromFields(fields); }, fromFieldsWithTypes: function (item) { return UpdateFeeShareConfig.fromFieldsWithTypes(item); }, fromBcs: function (data) { return UpdateFeeShareConfig.fromBcs(data); }, bcs: UpdateFeeShareConfig.bcs, fromJSONField: function (field) { return UpdateFeeShareConfig.fromJSONField(field); }, fromJSON: function (json) { return UpdateFeeShareConfig.fromJSON(json); }, fromSuiParsedData: function (content) { return UpdateFeeShareConfig.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2573
|
-
return [2 /*return*/, UpdateFeeShareConfig.fetch(client, id)];
|
|
2574
|
-
}); }); }, new: function (fields) { return new UpdateFeeShareConfig([], fields); }, kind: "StructClassReified", };
|
|
2575
|
-
};
|
|
2576
|
-
Object.defineProperty(UpdateFeeShareConfig, "r", {
|
|
2577
|
-
get: function () { return UpdateFeeShareConfig.reified(); },
|
|
2578
|
-
enumerable: false,
|
|
2579
|
-
configurable: true
|
|
2580
|
-
});
|
|
2581
|
-
UpdateFeeShareConfig.phantom = function () { return (0, reified_1.phantom)(UpdateFeeShareConfig.reified()); };
|
|
2582
|
-
Object.defineProperty(UpdateFeeShareConfig, "p", {
|
|
2583
|
-
get: function () { return UpdateFeeShareConfig.phantom(); },
|
|
2584
|
-
enumerable: false,
|
|
2585
|
-
configurable: true
|
|
2586
|
-
});
|
|
2587
|
-
Object.defineProperty(UpdateFeeShareConfig, "bcs", {
|
|
2588
|
-
get: function () {
|
|
2589
|
-
return bcs_1.bcs.struct("UpdateFeeShareConfig", {
|
|
2590
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), prev_fee_bp: bcs_1.bcs.u64(), prev_shared_fee_pool: structs_1.Option.bcs(bcs_1.bcs.vector(bcs_1.bcs.u8())), fee_bp: bcs_1.bcs.u64(), shared_fee_pool: structs_1.Option.bcs(bcs_1.bcs.vector(bcs_1.bcs.u8()))
|
|
2591
|
-
});
|
|
2592
|
-
},
|
|
2593
|
-
enumerable: false,
|
|
2594
|
-
configurable: true
|
|
2595
|
-
});
|
|
2596
|
-
;
|
|
2597
|
-
UpdateFeeShareConfig.fromFields = function (fields) { return UpdateFeeShareConfig.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), prevFeeBp: (0, reified_1.decodeFromFields)("u64", fields.prev_fee_bp), prevSharedFeePool: (0, reified_1.decodeFromFields)(structs_1.Option.reified(reified.vector("u8")), fields.prev_shared_fee_pool), feeBp: (0, reified_1.decodeFromFields)("u64", fields.fee_bp), sharedFeePool: (0, reified_1.decodeFromFields)(structs_1.Option.reified(reified.vector("u8")), fields.shared_fee_pool) }); };
|
|
2598
|
-
UpdateFeeShareConfig.fromFieldsWithTypes = function (item) {
|
|
2599
|
-
if (!isUpdateFeeShareConfig(item.type)) {
|
|
2600
|
-
throw new Error("not a UpdateFeeShareConfig type");
|
|
2601
|
-
}
|
|
2602
|
-
return UpdateFeeShareConfig.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), prevFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.prev_fee_bp), prevSharedFeePool: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(reified.vector("u8")), item.fields.prev_shared_fee_pool), feeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_bp), sharedFeePool: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(reified.vector("u8")), item.fields.shared_fee_pool) });
|
|
2603
|
-
};
|
|
2604
|
-
UpdateFeeShareConfig.fromBcs = function (data) { return UpdateFeeShareConfig.fromFields(UpdateFeeShareConfig.bcs.parse(data)); };
|
|
2605
|
-
UpdateFeeShareConfig.prototype.toJSONField = function () {
|
|
2606
|
-
return {
|
|
2607
|
-
signer: this.signer, index: this.index.toString(), prevFeeBp: this.prevFeeBp.toString(), prevSharedFeePool: (0, reified_1.fieldToJSON)("0x1::option::Option<vector<u8>>", this.prevSharedFeePool), feeBp: this.feeBp.toString(), sharedFeePool: (0, reified_1.fieldToJSON)("0x1::option::Option<vector<u8>>", this.sharedFeePool),
|
|
2608
|
-
};
|
|
2609
|
-
};
|
|
2610
|
-
UpdateFeeShareConfig.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2611
|
-
UpdateFeeShareConfig.fromJSONField = function (field) { return UpdateFeeShareConfig.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), prevFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.prevFeeBp), prevSharedFeePool: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(reified.vector("u8")), field.prevSharedFeePool), feeBp: (0, reified_1.decodeFromJSONField)("u64", field.feeBp), sharedFeePool: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(reified.vector("u8")), field.sharedFeePool) }); };
|
|
2612
|
-
UpdateFeeShareConfig.fromJSON = function (json) {
|
|
2613
|
-
if (json.$typeName !== UpdateFeeShareConfig.$typeName) {
|
|
2614
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2615
|
-
}
|
|
2616
|
-
;
|
|
2617
|
-
return UpdateFeeShareConfig.fromJSONField(json);
|
|
2618
|
-
};
|
|
2619
|
-
UpdateFeeShareConfig.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2620
|
-
throw new Error("not an object");
|
|
2621
|
-
} if (!isUpdateFeeShareConfig(content.type)) {
|
|
2622
|
-
throw new Error("object at ".concat(content.fields.id, " is not a UpdateFeeShareConfig object"));
|
|
2623
|
-
} return UpdateFeeShareConfig.fromFieldsWithTypes(content); };
|
|
2624
|
-
UpdateFeeShareConfig.fetch = function (client, id) {
|
|
2625
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2626
|
-
var res;
|
|
2627
|
-
var _a, _b;
|
|
2628
|
-
return __generator(this, function (_c) {
|
|
2629
|
-
switch (_c.label) {
|
|
2630
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2631
|
-
case 1:
|
|
2632
|
-
res = _c.sent();
|
|
2633
|
-
if (res.error) {
|
|
2634
|
-
throw new Error("error fetching UpdateFeeShareConfig object at id ".concat(id, ": ").concat(res.error.code));
|
|
2635
|
-
}
|
|
2636
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUpdateFeeShareConfig(res.data.bcs.type)) {
|
|
2637
|
-
throw new Error("object at id ".concat(id, " is not a UpdateFeeShareConfig object"));
|
|
2638
|
-
}
|
|
2639
|
-
return [2 /*return*/, UpdateFeeShareConfig.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2640
|
-
}
|
|
2641
|
-
});
|
|
2642
|
-
});
|
|
2643
|
-
};
|
|
2644
|
-
UpdateFeeShareConfig.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::UpdateFeeShareConfig";
|
|
2645
|
-
UpdateFeeShareConfig.$numTypeParams = 0;
|
|
2646
|
-
return UpdateFeeShareConfig;
|
|
2647
|
-
}());
|
|
2648
|
-
exports.UpdateFeeShareConfig = UpdateFeeShareConfig;
|
|
2649
|
-
/* ============================== VAULT =============================== */
|
|
2650
|
-
function isVAULT(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::VAULT"; }
|
|
2651
|
-
var VAULT = /** @class */ (function () {
|
|
2652
|
-
function VAULT(typeArgs, fields) {
|
|
2653
|
-
this.$typeName = VAULT.$typeName;
|
|
2654
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([VAULT.$typeName], __read(typeArgs), false));
|
|
2655
|
-
this.$typeArgs = typeArgs;
|
|
2656
|
-
this.dummyField = fields.dummyField;
|
|
2657
|
-
}
|
|
2658
|
-
VAULT.reified = function () {
|
|
2659
|
-
var _this = this;
|
|
2660
|
-
return { typeName: VAULT.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([VAULT.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return VAULT.fromFields(fields); }, fromFieldsWithTypes: function (item) { return VAULT.fromFieldsWithTypes(item); }, fromBcs: function (data) { return VAULT.fromBcs(data); }, bcs: VAULT.bcs, fromJSONField: function (field) { return VAULT.fromJSONField(field); }, fromJSON: function (json) { return VAULT.fromJSON(json); }, fromSuiParsedData: function (content) { return VAULT.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2661
|
-
return [2 /*return*/, VAULT.fetch(client, id)];
|
|
2662
|
-
}); }); }, new: function (fields) { return new VAULT([], fields); }, kind: "StructClassReified", };
|
|
2663
|
-
};
|
|
2664
|
-
Object.defineProperty(VAULT, "r", {
|
|
2665
|
-
get: function () { return VAULT.reified(); },
|
|
2666
|
-
enumerable: false,
|
|
2667
|
-
configurable: true
|
|
2668
|
-
});
|
|
2669
|
-
VAULT.phantom = function () { return (0, reified_1.phantom)(VAULT.reified()); };
|
|
2670
|
-
Object.defineProperty(VAULT, "p", {
|
|
2671
|
-
get: function () { return VAULT.phantom(); },
|
|
2672
|
-
enumerable: false,
|
|
2673
|
-
configurable: true
|
|
2674
|
-
});
|
|
2675
|
-
Object.defineProperty(VAULT, "bcs", {
|
|
2676
|
-
get: function () {
|
|
2677
|
-
return bcs_1.bcs.struct("VAULT", {
|
|
2678
|
-
dummy_field: bcs_1.bcs.bool()
|
|
2679
|
-
});
|
|
2680
|
-
},
|
|
2681
|
-
enumerable: false,
|
|
2682
|
-
configurable: true
|
|
2683
|
-
});
|
|
2684
|
-
;
|
|
2685
|
-
VAULT.fromFields = function (fields) { return VAULT.reified().new({ dummyField: (0, reified_1.decodeFromFields)("bool", fields.dummy_field) }); };
|
|
2686
|
-
VAULT.fromFieldsWithTypes = function (item) {
|
|
2687
|
-
if (!isVAULT(item.type)) {
|
|
2688
|
-
throw new Error("not a VAULT type");
|
|
2689
|
-
}
|
|
2690
|
-
return VAULT.reified().new({ dummyField: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.dummy_field) });
|
|
2691
|
-
};
|
|
2692
|
-
VAULT.fromBcs = function (data) { return VAULT.fromFields(VAULT.bcs.parse(data)); };
|
|
2693
|
-
VAULT.prototype.toJSONField = function () {
|
|
2694
|
-
return {
|
|
2695
|
-
dummyField: this.dummyField,
|
|
2696
|
-
};
|
|
2697
|
-
};
|
|
2698
|
-
VAULT.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2699
|
-
VAULT.fromJSONField = function (field) { return VAULT.reified().new({ dummyField: (0, reified_1.decodeFromJSONField)("bool", field.dummyField) }); };
|
|
2700
|
-
VAULT.fromJSON = function (json) {
|
|
2701
|
-
if (json.$typeName !== VAULT.$typeName) {
|
|
2702
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2703
|
-
}
|
|
2704
|
-
;
|
|
2705
|
-
return VAULT.fromJSONField(json);
|
|
2706
|
-
};
|
|
2707
|
-
VAULT.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2708
|
-
throw new Error("not an object");
|
|
2709
|
-
} if (!isVAULT(content.type)) {
|
|
2710
|
-
throw new Error("object at ".concat(content.fields.id, " is not a VAULT object"));
|
|
2711
|
-
} return VAULT.fromFieldsWithTypes(content); };
|
|
2712
|
-
VAULT.fetch = function (client, id) {
|
|
2713
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2714
|
-
var res;
|
|
2715
|
-
var _a, _b;
|
|
2716
|
-
return __generator(this, function (_c) {
|
|
2717
|
-
switch (_c.label) {
|
|
2718
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2719
|
-
case 1:
|
|
2720
|
-
res = _c.sent();
|
|
2721
|
-
if (res.error) {
|
|
2722
|
-
throw new Error("error fetching VAULT object at id ".concat(id, ": ").concat(res.error.code));
|
|
2723
|
-
}
|
|
2724
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isVAULT(res.data.bcs.type)) {
|
|
2725
|
-
throw new Error("object at id ".concat(id, " is not a VAULT object"));
|
|
2726
|
-
}
|
|
2727
|
-
return [2 /*return*/, VAULT.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2728
|
-
}
|
|
2729
|
-
});
|
|
2730
|
-
});
|
|
2731
|
-
};
|
|
2732
|
-
VAULT.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::VAULT";
|
|
2733
|
-
VAULT.$numTypeParams = 0;
|
|
2734
|
-
return VAULT;
|
|
2735
|
-
}());
|
|
2736
|
-
exports.VAULT = VAULT;
|
|
2737
|
-
/* ============================== Withdraw =============================== */
|
|
2738
|
-
function isWithdraw(type) { type = (0, util_1.compressSuiType)(type); return type === "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Withdraw"; }
|
|
2739
|
-
var Withdraw = /** @class */ (function () {
|
|
2740
|
-
function Withdraw(typeArgs, fields) {
|
|
2741
|
-
this.$typeName = Withdraw.$typeName;
|
|
2742
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Withdraw.$typeName], __read(typeArgs), false));
|
|
2743
|
-
this.$typeArgs = typeArgs;
|
|
2744
|
-
this.signer = fields.signer;
|
|
2745
|
-
;
|
|
2746
|
-
this.index = fields.index;
|
|
2747
|
-
;
|
|
2748
|
-
this.token = fields.token;
|
|
2749
|
-
;
|
|
2750
|
-
this.amount = fields.amount;
|
|
2751
|
-
}
|
|
2752
|
-
Withdraw.reified = function () {
|
|
2753
|
-
var _this = this;
|
|
2754
|
-
return { typeName: Withdraw.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Withdraw.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Withdraw.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Withdraw.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Withdraw.fromBcs(data); }, bcs: Withdraw.bcs, fromJSONField: function (field) { return Withdraw.fromJSONField(field); }, fromJSON: function (json) { return Withdraw.fromJSON(json); }, fromSuiParsedData: function (content) { return Withdraw.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2755
|
-
return [2 /*return*/, Withdraw.fetch(client, id)];
|
|
2756
|
-
}); }); }, new: function (fields) { return new Withdraw([], fields); }, kind: "StructClassReified", };
|
|
2757
|
-
};
|
|
2758
|
-
Object.defineProperty(Withdraw, "r", {
|
|
2759
|
-
get: function () { return Withdraw.reified(); },
|
|
2760
|
-
enumerable: false,
|
|
2761
|
-
configurable: true
|
|
2762
|
-
});
|
|
2763
|
-
Withdraw.phantom = function () { return (0, reified_1.phantom)(Withdraw.reified()); };
|
|
2764
|
-
Object.defineProperty(Withdraw, "p", {
|
|
2765
|
-
get: function () { return Withdraw.phantom(); },
|
|
2766
|
-
enumerable: false,
|
|
2767
|
-
configurable: true
|
|
2768
|
-
});
|
|
2769
|
-
Object.defineProperty(Withdraw, "bcs", {
|
|
2770
|
-
get: function () {
|
|
2771
|
-
return bcs_1.bcs.struct("Withdraw", {
|
|
2772
|
-
signer: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), index: bcs_1.bcs.u64(), token: structs_3.TypeName.bcs, amount: bcs_1.bcs.u64()
|
|
2773
|
-
});
|
|
2774
|
-
},
|
|
2775
|
-
enumerable: false,
|
|
2776
|
-
configurable: true
|
|
2777
|
-
});
|
|
2778
|
-
;
|
|
2779
|
-
Withdraw.fromFields = function (fields) { return Withdraw.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount) }); };
|
|
2780
|
-
Withdraw.fromFieldsWithTypes = function (item) {
|
|
2781
|
-
if (!isWithdraw(item.type)) {
|
|
2782
|
-
throw new Error("not a Withdraw type");
|
|
2783
|
-
}
|
|
2784
|
-
return Withdraw.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount) });
|
|
2785
|
-
};
|
|
2786
|
-
Withdraw.fromBcs = function (data) { return Withdraw.fromFields(Withdraw.bcs.parse(data)); };
|
|
2787
|
-
Withdraw.prototype.toJSONField = function () {
|
|
2788
|
-
return {
|
|
2789
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(),
|
|
2790
|
-
};
|
|
2791
|
-
};
|
|
2792
|
-
Withdraw.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2793
|
-
Withdraw.fromJSONField = function (field) { return Withdraw.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount) }); };
|
|
2794
|
-
Withdraw.fromJSON = function (json) {
|
|
2795
|
-
if (json.$typeName !== Withdraw.$typeName) {
|
|
2796
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2797
|
-
}
|
|
2798
|
-
;
|
|
2799
|
-
return Withdraw.fromJSONField(json);
|
|
2800
|
-
};
|
|
2801
|
-
Withdraw.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2802
|
-
throw new Error("not an object");
|
|
2803
|
-
} if (!isWithdraw(content.type)) {
|
|
2804
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Withdraw object"));
|
|
2805
|
-
} return Withdraw.fromFieldsWithTypes(content); };
|
|
2806
|
-
Withdraw.fetch = function (client, id) {
|
|
2807
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2808
|
-
var res;
|
|
2809
|
-
var _a, _b;
|
|
2810
|
-
return __generator(this, function (_c) {
|
|
2811
|
-
switch (_c.label) {
|
|
2812
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2813
|
-
case 1:
|
|
2814
|
-
res = _c.sent();
|
|
2815
|
-
if (res.error) {
|
|
2816
|
-
throw new Error("error fetching Withdraw object at id ".concat(id, ": ").concat(res.error.code));
|
|
2817
|
-
}
|
|
2818
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isWithdraw(res.data.bcs.type)) {
|
|
2819
|
-
throw new Error("object at id ".concat(id, " is not a Withdraw object"));
|
|
2820
|
-
}
|
|
2821
|
-
return [2 /*return*/, Withdraw.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2822
|
-
}
|
|
2823
|
-
});
|
|
2824
|
-
});
|
|
2825
|
-
};
|
|
2826
|
-
Withdraw.$typeName = "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::Withdraw";
|
|
2827
|
-
Withdraw.$numTypeParams = 0;
|
|
2828
|
-
return Withdraw;
|
|
2829
|
-
}());
|
|
2830
|
-
exports.Withdraw = Withdraw;
|