@typus/typus-sdk 1.4.84 → 1.5.0
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/index.d.ts +0 -1
- package/dist/src/typus-dov-single-v2/function/index.js +1 -1
- 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 +10 -9
- 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 +43 -35
- 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 +18 -18
- 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,3796 +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.WithdrawEvent = exports.VaultConfig = exports.UnsubscribeEvent = exports.TransferBidReceiptEvent = exports.TerminateVaultEvent = exports.TerminateAuctionEvent = exports.TYPUS_DOV_SINGLE = exports.SettlementInfo = exports.SettleEvent = exports.RefundEvent = exports.ReduceFundEvent = exports.RedeemEvent = exports.RecoupEvent = exports.RaiseFundEvent = exports.PortfolioVault = exports.PayoffConfig = exports.OtcEvent = exports.OracleInfo = exports.NewBidEvent = exports.NewAuctionEvent = exports.Info = exports.HarvestEvent = exports.ExerciseEvent = exports.DropVaultEvent = exports.DepositSnapshot = exports.DepositEvent = exports.DeliveryInfos = exports.DeliveryInfo = exports.DeliveryEvent = exports.CompoundEvent = exports.CloseEvent = exports.ClaimEvent = exports.AdditionalConfig = exports.ActivateEvent = exports.Registry = exports.Config = void 0;
|
|
99
|
-
exports.isConfig = isConfig;
|
|
100
|
-
exports.isRegistry = isRegistry;
|
|
101
|
-
exports.isActivateEvent = isActivateEvent;
|
|
102
|
-
exports.isAdditionalConfig = isAdditionalConfig;
|
|
103
|
-
exports.isClaimEvent = isClaimEvent;
|
|
104
|
-
exports.isCloseEvent = isCloseEvent;
|
|
105
|
-
exports.isCompoundEvent = isCompoundEvent;
|
|
106
|
-
exports.isDeliveryEvent = isDeliveryEvent;
|
|
107
|
-
exports.isDeliveryInfo = isDeliveryInfo;
|
|
108
|
-
exports.isDeliveryInfos = isDeliveryInfos;
|
|
109
|
-
exports.isDepositEvent = isDepositEvent;
|
|
110
|
-
exports.isDepositSnapshot = isDepositSnapshot;
|
|
111
|
-
exports.isDropVaultEvent = isDropVaultEvent;
|
|
112
|
-
exports.isExerciseEvent = isExerciseEvent;
|
|
113
|
-
exports.isHarvestEvent = isHarvestEvent;
|
|
114
|
-
exports.isInfo = isInfo;
|
|
115
|
-
exports.isNewAuctionEvent = isNewAuctionEvent;
|
|
116
|
-
exports.isNewBidEvent = isNewBidEvent;
|
|
117
|
-
exports.isOracleInfo = isOracleInfo;
|
|
118
|
-
exports.isOtcEvent = isOtcEvent;
|
|
119
|
-
exports.isPayoffConfig = isPayoffConfig;
|
|
120
|
-
exports.isPortfolioVault = isPortfolioVault;
|
|
121
|
-
exports.isRaiseFundEvent = isRaiseFundEvent;
|
|
122
|
-
exports.isRecoupEvent = isRecoupEvent;
|
|
123
|
-
exports.isRedeemEvent = isRedeemEvent;
|
|
124
|
-
exports.isReduceFundEvent = isReduceFundEvent;
|
|
125
|
-
exports.isRefundEvent = isRefundEvent;
|
|
126
|
-
exports.isSettleEvent = isSettleEvent;
|
|
127
|
-
exports.isSettlementInfo = isSettlementInfo;
|
|
128
|
-
exports.isTYPUS_DOV_SINGLE = isTYPUS_DOV_SINGLE;
|
|
129
|
-
exports.isTerminateAuctionEvent = isTerminateAuctionEvent;
|
|
130
|
-
exports.isTerminateVaultEvent = isTerminateVaultEvent;
|
|
131
|
-
exports.isTransferBidReceiptEvent = isTransferBidReceiptEvent;
|
|
132
|
-
exports.isUnsubscribeEvent = isUnsubscribeEvent;
|
|
133
|
-
exports.isVaultConfig = isVaultConfig;
|
|
134
|
-
exports.isWithdrawEvent = isWithdrawEvent;
|
|
135
|
-
var reified = __importStar(require("../../../../_framework/reified"));
|
|
136
|
-
var reified_1 = require("../../../../_framework/reified");
|
|
137
|
-
var util_1 = require("../../../../_framework/util");
|
|
138
|
-
var structs_1 = require("../../0x1/option/structs");
|
|
139
|
-
var structs_2 = require("../../0x1/string/structs");
|
|
140
|
-
var structs_3 = require("../../0x1/type-name/structs");
|
|
141
|
-
var structs_4 = require("../../0x2/object/structs");
|
|
142
|
-
var structs_5 = require("../../0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs");
|
|
143
|
-
var structs_6 = require("../../0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs");
|
|
144
|
-
var bcs_1 = require("@mysten/bcs");
|
|
145
|
-
/* ============================== Config =============================== */
|
|
146
|
-
function isConfig(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::Config"; }
|
|
147
|
-
var Config = /** @class */ (function () {
|
|
148
|
-
function Config(typeArgs, fields) {
|
|
149
|
-
this.$typeName = Config.$typeName;
|
|
150
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Config.$typeName], __read(typeArgs), false));
|
|
151
|
-
this.$typeArgs = typeArgs;
|
|
152
|
-
this.oracleId = fields.oracleId;
|
|
153
|
-
;
|
|
154
|
-
this.depositLotSize = fields.depositLotSize;
|
|
155
|
-
;
|
|
156
|
-
this.bidLotSize = fields.bidLotSize;
|
|
157
|
-
;
|
|
158
|
-
this.minDepositSize = fields.minDepositSize;
|
|
159
|
-
;
|
|
160
|
-
this.minBidSize = fields.minBidSize;
|
|
161
|
-
;
|
|
162
|
-
this.maxDepositEntry = fields.maxDepositEntry;
|
|
163
|
-
;
|
|
164
|
-
this.maxBidEntry = fields.maxBidEntry;
|
|
165
|
-
;
|
|
166
|
-
this.depositFeeBp = fields.depositFeeBp;
|
|
167
|
-
;
|
|
168
|
-
this.depositFeeShareBp = fields.depositFeeShareBp;
|
|
169
|
-
;
|
|
170
|
-
this.depositSharedFeePool = fields.depositSharedFeePool;
|
|
171
|
-
;
|
|
172
|
-
this.bidFeeBp = fields.bidFeeBp;
|
|
173
|
-
;
|
|
174
|
-
this.depositIncentiveBp = fields.depositIncentiveBp;
|
|
175
|
-
;
|
|
176
|
-
this.bidIncentiveBp = fields.bidIncentiveBp;
|
|
177
|
-
;
|
|
178
|
-
this.auctionDelayTsMs = fields.auctionDelayTsMs;
|
|
179
|
-
;
|
|
180
|
-
this.auctionDurationTsMs = fields.auctionDurationTsMs;
|
|
181
|
-
;
|
|
182
|
-
this.recoupDelayTsMs = fields.recoupDelayTsMs;
|
|
183
|
-
;
|
|
184
|
-
this.capacity = fields.capacity;
|
|
185
|
-
;
|
|
186
|
-
this.leverage = fields.leverage;
|
|
187
|
-
;
|
|
188
|
-
this.riskLevel = fields.riskLevel;
|
|
189
|
-
;
|
|
190
|
-
this.hasNext = fields.hasNext;
|
|
191
|
-
;
|
|
192
|
-
this.activeVaultConfig = fields.activeVaultConfig;
|
|
193
|
-
;
|
|
194
|
-
this.warmupVaultConfig = fields.warmupVaultConfig;
|
|
195
|
-
;
|
|
196
|
-
this.u64Padding = fields.u64Padding;
|
|
197
|
-
;
|
|
198
|
-
this.bcsPadding = fields.bcsPadding;
|
|
199
|
-
}
|
|
200
|
-
Config.reified = function () {
|
|
201
|
-
var _this = this;
|
|
202
|
-
return { typeName: Config.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Config.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Config.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Config.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Config.fromBcs(data); }, bcs: Config.bcs, fromJSONField: function (field) { return Config.fromJSONField(field); }, fromJSON: function (json) { return Config.fromJSON(json); }, fromSuiParsedData: function (content) { return Config.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
203
|
-
return [2 /*return*/, Config.fetch(client, id)];
|
|
204
|
-
}); }); }, new: function (fields) { return new Config([], fields); }, kind: "StructClassReified", };
|
|
205
|
-
};
|
|
206
|
-
Object.defineProperty(Config, "r", {
|
|
207
|
-
get: function () { return Config.reified(); },
|
|
208
|
-
enumerable: false,
|
|
209
|
-
configurable: true
|
|
210
|
-
});
|
|
211
|
-
Config.phantom = function () { return (0, reified_1.phantom)(Config.reified()); };
|
|
212
|
-
Object.defineProperty(Config, "p", {
|
|
213
|
-
get: function () { return Config.phantom(); },
|
|
214
|
-
enumerable: false,
|
|
215
|
-
configurable: true
|
|
216
|
-
});
|
|
217
|
-
Object.defineProperty(Config, "bcs", {
|
|
218
|
-
get: function () {
|
|
219
|
-
return bcs_1.bcs.struct("Config", {
|
|
220
|
-
oracle_id: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), deposit_lot_size: bcs_1.bcs.u64(), bid_lot_size: bcs_1.bcs.u64(), min_deposit_size: bcs_1.bcs.u64(), min_bid_size: bcs_1.bcs.u64(), max_deposit_entry: bcs_1.bcs.u64(), max_bid_entry: bcs_1.bcs.u64(), deposit_fee_bp: bcs_1.bcs.u64(), deposit_fee_share_bp: bcs_1.bcs.u64(), deposit_shared_fee_pool: structs_1.Option.bcs(bcs_1.bcs.vector(bcs_1.bcs.u8())), bid_fee_bp: bcs_1.bcs.u64(), deposit_incentive_bp: bcs_1.bcs.u64(), bid_incentive_bp: bcs_1.bcs.u64(), auction_delay_ts_ms: bcs_1.bcs.u64(), auction_duration_ts_ms: bcs_1.bcs.u64(), recoup_delay_ts_ms: bcs_1.bcs.u64(), capacity: bcs_1.bcs.u64(), leverage: bcs_1.bcs.u64(), risk_level: bcs_1.bcs.u64(), has_next: bcs_1.bcs.bool(), active_vault_config: VaultConfig.bcs, warmup_vault_config: VaultConfig.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()), bcs_padding: bcs_1.bcs.vector(bcs_1.bcs.u8())
|
|
221
|
-
});
|
|
222
|
-
},
|
|
223
|
-
enumerable: false,
|
|
224
|
-
configurable: true
|
|
225
|
-
});
|
|
226
|
-
;
|
|
227
|
-
Config.fromFields = function (fields) { return Config.reified().new({ oracleId: (0, reified_1.decodeFromFields)("address", fields.oracle_id), depositLotSize: (0, reified_1.decodeFromFields)("u64", fields.deposit_lot_size), bidLotSize: (0, reified_1.decodeFromFields)("u64", fields.bid_lot_size), minDepositSize: (0, reified_1.decodeFromFields)("u64", fields.min_deposit_size), minBidSize: (0, reified_1.decodeFromFields)("u64", fields.min_bid_size), maxDepositEntry: (0, reified_1.decodeFromFields)("u64", fields.max_deposit_entry), maxBidEntry: (0, reified_1.decodeFromFields)("u64", fields.max_bid_entry), depositFeeBp: (0, reified_1.decodeFromFields)("u64", fields.deposit_fee_bp), depositFeeShareBp: (0, reified_1.decodeFromFields)("u64", fields.deposit_fee_share_bp), depositSharedFeePool: (0, reified_1.decodeFromFields)(structs_1.Option.reified(reified.vector("u8")), fields.deposit_shared_fee_pool), bidFeeBp: (0, reified_1.decodeFromFields)("u64", fields.bid_fee_bp), depositIncentiveBp: (0, reified_1.decodeFromFields)("u64", fields.deposit_incentive_bp), bidIncentiveBp: (0, reified_1.decodeFromFields)("u64", fields.bid_incentive_bp), auctionDelayTsMs: (0, reified_1.decodeFromFields)("u64", fields.auction_delay_ts_ms), auctionDurationTsMs: (0, reified_1.decodeFromFields)("u64", fields.auction_duration_ts_ms), recoupDelayTsMs: (0, reified_1.decodeFromFields)("u64", fields.recoup_delay_ts_ms), capacity: (0, reified_1.decodeFromFields)("u64", fields.capacity), leverage: (0, reified_1.decodeFromFields)("u64", fields.leverage), riskLevel: (0, reified_1.decodeFromFields)("u64", fields.risk_level), hasNext: (0, reified_1.decodeFromFields)("bool", fields.has_next), activeVaultConfig: (0, reified_1.decodeFromFields)(VaultConfig.reified(), fields.active_vault_config), warmupVaultConfig: (0, reified_1.decodeFromFields)(VaultConfig.reified(), fields.warmup_vault_config), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFields)(reified.vector("u8"), fields.bcs_padding) }); };
|
|
228
|
-
Config.fromFieldsWithTypes = function (item) {
|
|
229
|
-
if (!isConfig(item.type)) {
|
|
230
|
-
throw new Error("not a Config type");
|
|
231
|
-
}
|
|
232
|
-
return Config.reified().new({ oracleId: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.oracle_id), depositLotSize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deposit_lot_size), bidLotSize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bid_lot_size), minDepositSize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.min_deposit_size), minBidSize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.min_bid_size), maxDepositEntry: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.max_deposit_entry), maxBidEntry: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.max_bid_entry), depositFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deposit_fee_bp), depositFeeShareBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deposit_fee_share_bp), depositSharedFeePool: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(reified.vector("u8")), item.fields.deposit_shared_fee_pool), bidFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bid_fee_bp), depositIncentiveBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deposit_incentive_bp), bidIncentiveBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bid_incentive_bp), auctionDelayTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.auction_delay_ts_ms), auctionDurationTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.auction_duration_ts_ms), recoupDelayTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.recoup_delay_ts_ms), capacity: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.capacity), leverage: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.leverage), riskLevel: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.risk_level), hasNext: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.has_next), activeVaultConfig: (0, reified_1.decodeFromFieldsWithTypes)(VaultConfig.reified(), item.fields.active_vault_config), warmupVaultConfig: (0, reified_1.decodeFromFieldsWithTypes)(VaultConfig.reified(), item.fields.warmup_vault_config), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u8"), item.fields.bcs_padding) });
|
|
233
|
-
};
|
|
234
|
-
Config.fromBcs = function (data) { return Config.fromFields(Config.bcs.parse(data)); };
|
|
235
|
-
Config.prototype.toJSONField = function () {
|
|
236
|
-
return {
|
|
237
|
-
oracleId: this.oracleId, depositLotSize: this.depositLotSize.toString(), bidLotSize: this.bidLotSize.toString(), minDepositSize: this.minDepositSize.toString(), minBidSize: this.minBidSize.toString(), maxDepositEntry: this.maxDepositEntry.toString(), maxBidEntry: this.maxBidEntry.toString(), depositFeeBp: this.depositFeeBp.toString(), depositFeeShareBp: this.depositFeeShareBp.toString(), depositSharedFeePool: (0, reified_1.fieldToJSON)("0x1::option::Option<vector<u8>>", this.depositSharedFeePool), bidFeeBp: this.bidFeeBp.toString(), depositIncentiveBp: this.depositIncentiveBp.toString(), bidIncentiveBp: this.bidIncentiveBp.toString(), auctionDelayTsMs: this.auctionDelayTsMs.toString(), auctionDurationTsMs: this.auctionDurationTsMs.toString(), recoupDelayTsMs: this.recoupDelayTsMs.toString(), capacity: this.capacity.toString(), leverage: this.leverage.toString(), riskLevel: this.riskLevel.toString(), hasNext: this.hasNext, activeVaultConfig: this.activeVaultConfig.toJSONField(), warmupVaultConfig: this.warmupVaultConfig.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding), bcsPadding: (0, reified_1.fieldToJSON)("vector<u8>", this.bcsPadding),
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
Config.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
241
|
-
Config.fromJSONField = function (field) { return Config.reified().new({ oracleId: (0, reified_1.decodeFromJSONField)("address", field.oracleId), depositLotSize: (0, reified_1.decodeFromJSONField)("u64", field.depositLotSize), bidLotSize: (0, reified_1.decodeFromJSONField)("u64", field.bidLotSize), minDepositSize: (0, reified_1.decodeFromJSONField)("u64", field.minDepositSize), minBidSize: (0, reified_1.decodeFromJSONField)("u64", field.minBidSize), maxDepositEntry: (0, reified_1.decodeFromJSONField)("u64", field.maxDepositEntry), maxBidEntry: (0, reified_1.decodeFromJSONField)("u64", field.maxBidEntry), depositFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.depositFeeBp), depositFeeShareBp: (0, reified_1.decodeFromJSONField)("u64", field.depositFeeShareBp), depositSharedFeePool: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(reified.vector("u8")), field.depositSharedFeePool), bidFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.bidFeeBp), depositIncentiveBp: (0, reified_1.decodeFromJSONField)("u64", field.depositIncentiveBp), bidIncentiveBp: (0, reified_1.decodeFromJSONField)("u64", field.bidIncentiveBp), auctionDelayTsMs: (0, reified_1.decodeFromJSONField)("u64", field.auctionDelayTsMs), auctionDurationTsMs: (0, reified_1.decodeFromJSONField)("u64", field.auctionDurationTsMs), recoupDelayTsMs: (0, reified_1.decodeFromJSONField)("u64", field.recoupDelayTsMs), capacity: (0, reified_1.decodeFromJSONField)("u64", field.capacity), leverage: (0, reified_1.decodeFromJSONField)("u64", field.leverage), riskLevel: (0, reified_1.decodeFromJSONField)("u64", field.riskLevel), hasNext: (0, reified_1.decodeFromJSONField)("bool", field.hasNext), activeVaultConfig: (0, reified_1.decodeFromJSONField)(VaultConfig.reified(), field.activeVaultConfig), warmupVaultConfig: (0, reified_1.decodeFromJSONField)(VaultConfig.reified(), field.warmupVaultConfig), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding), bcsPadding: (0, reified_1.decodeFromJSONField)(reified.vector("u8"), field.bcsPadding) }); };
|
|
242
|
-
Config.fromJSON = function (json) {
|
|
243
|
-
if (json.$typeName !== Config.$typeName) {
|
|
244
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
245
|
-
}
|
|
246
|
-
;
|
|
247
|
-
return Config.fromJSONField(json);
|
|
248
|
-
};
|
|
249
|
-
Config.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
250
|
-
throw new Error("not an object");
|
|
251
|
-
} if (!isConfig(content.type)) {
|
|
252
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Config object"));
|
|
253
|
-
} return Config.fromFieldsWithTypes(content); };
|
|
254
|
-
Config.fetch = function (client, id) {
|
|
255
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
256
|
-
var res;
|
|
257
|
-
var _a, _b;
|
|
258
|
-
return __generator(this, function (_c) {
|
|
259
|
-
switch (_c.label) {
|
|
260
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
261
|
-
case 1:
|
|
262
|
-
res = _c.sent();
|
|
263
|
-
if (res.error) {
|
|
264
|
-
throw new Error("error fetching Config object at id ".concat(id, ": ").concat(res.error.code));
|
|
265
|
-
}
|
|
266
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isConfig(res.data.bcs.type)) {
|
|
267
|
-
throw new Error("object at id ".concat(id, " is not a Config object"));
|
|
268
|
-
}
|
|
269
|
-
return [2 /*return*/, Config.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
};
|
|
274
|
-
Config.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::Config";
|
|
275
|
-
Config.$numTypeParams = 0;
|
|
276
|
-
return Config;
|
|
277
|
-
}());
|
|
278
|
-
exports.Config = Config;
|
|
279
|
-
/* ============================== Registry =============================== */
|
|
280
|
-
function isRegistry(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::Registry"; }
|
|
281
|
-
var Registry = /** @class */ (function () {
|
|
282
|
-
function Registry(typeArgs, fields) {
|
|
283
|
-
this.$typeName = Registry.$typeName;
|
|
284
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Registry.$typeName], __read(typeArgs), false));
|
|
285
|
-
this.$typeArgs = typeArgs;
|
|
286
|
-
this.id = fields.id;
|
|
287
|
-
;
|
|
288
|
-
this.numOfVault = fields.numOfVault;
|
|
289
|
-
;
|
|
290
|
-
this.authority = fields.authority;
|
|
291
|
-
;
|
|
292
|
-
this.feePool = fields.feePool;
|
|
293
|
-
;
|
|
294
|
-
this.portfolioVaultRegistry = fields.portfolioVaultRegistry;
|
|
295
|
-
;
|
|
296
|
-
this.depositVaultRegistry = fields.depositVaultRegistry;
|
|
297
|
-
;
|
|
298
|
-
this.auctionRegistry = fields.auctionRegistry;
|
|
299
|
-
;
|
|
300
|
-
this.bidVaultRegistry = fields.bidVaultRegistry;
|
|
301
|
-
;
|
|
302
|
-
this.refundVaultRegistry = fields.refundVaultRegistry;
|
|
303
|
-
;
|
|
304
|
-
this.additionalConfigRegistry = fields.additionalConfigRegistry;
|
|
305
|
-
;
|
|
306
|
-
this.version = fields.version;
|
|
307
|
-
;
|
|
308
|
-
this.transactionSuspended = fields.transactionSuspended;
|
|
309
|
-
}
|
|
310
|
-
Registry.reified = function () {
|
|
311
|
-
var _this = this;
|
|
312
|
-
return { typeName: Registry.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Registry.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Registry.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Registry.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Registry.fromBcs(data); }, bcs: Registry.bcs, fromJSONField: function (field) { return Registry.fromJSONField(field); }, fromJSON: function (json) { return Registry.fromJSON(json); }, fromSuiParsedData: function (content) { return Registry.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
313
|
-
return [2 /*return*/, Registry.fetch(client, id)];
|
|
314
|
-
}); }); }, new: function (fields) { return new Registry([], fields); }, kind: "StructClassReified", };
|
|
315
|
-
};
|
|
316
|
-
Object.defineProperty(Registry, "r", {
|
|
317
|
-
get: function () { return Registry.reified(); },
|
|
318
|
-
enumerable: false,
|
|
319
|
-
configurable: true
|
|
320
|
-
});
|
|
321
|
-
Registry.phantom = function () { return (0, reified_1.phantom)(Registry.reified()); };
|
|
322
|
-
Object.defineProperty(Registry, "p", {
|
|
323
|
-
get: function () { return Registry.phantom(); },
|
|
324
|
-
enumerable: false,
|
|
325
|
-
configurable: true
|
|
326
|
-
});
|
|
327
|
-
Object.defineProperty(Registry, "bcs", {
|
|
328
|
-
get: function () {
|
|
329
|
-
return bcs_1.bcs.struct("Registry", {
|
|
330
|
-
id: structs_4.UID.bcs, num_of_vault: bcs_1.bcs.u64(), authority: structs_5.Authority.bcs, fee_pool: structs_6.BalancePool.bcs, portfolio_vault_registry: structs_4.UID.bcs, deposit_vault_registry: structs_4.UID.bcs, auction_registry: structs_4.UID.bcs, bid_vault_registry: structs_4.UID.bcs, refund_vault_registry: structs_4.UID.bcs, additional_config_registry: structs_4.UID.bcs, version: bcs_1.bcs.u64(), transaction_suspended: bcs_1.bcs.bool()
|
|
331
|
-
});
|
|
332
|
-
},
|
|
333
|
-
enumerable: false,
|
|
334
|
-
configurable: true
|
|
335
|
-
});
|
|
336
|
-
;
|
|
337
|
-
Registry.fromFields = function (fields) { return Registry.reified().new({ id: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.id), numOfVault: (0, reified_1.decodeFromFields)("u64", fields.num_of_vault), authority: (0, reified_1.decodeFromFields)(structs_5.Authority.reified(), fields.authority), feePool: (0, reified_1.decodeFromFields)(structs_6.BalancePool.reified(), fields.fee_pool), portfolioVaultRegistry: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.portfolio_vault_registry), depositVaultRegistry: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.deposit_vault_registry), auctionRegistry: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.auction_registry), bidVaultRegistry: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.bid_vault_registry), refundVaultRegistry: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.refund_vault_registry), additionalConfigRegistry: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.additional_config_registry), version: (0, reified_1.decodeFromFields)("u64", fields.version), transactionSuspended: (0, reified_1.decodeFromFields)("bool", fields.transaction_suspended) }); };
|
|
338
|
-
Registry.fromFieldsWithTypes = function (item) {
|
|
339
|
-
if (!isRegistry(item.type)) {
|
|
340
|
-
throw new Error("not a Registry type");
|
|
341
|
-
}
|
|
342
|
-
return Registry.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.id), numOfVault: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.num_of_vault), authority: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.Authority.reified(), item.fields.authority), feePool: (0, reified_1.decodeFromFieldsWithTypes)(structs_6.BalancePool.reified(), item.fields.fee_pool), portfolioVaultRegistry: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.portfolio_vault_registry), depositVaultRegistry: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.deposit_vault_registry), auctionRegistry: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.auction_registry), bidVaultRegistry: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.bid_vault_registry), refundVaultRegistry: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.refund_vault_registry), additionalConfigRegistry: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.additional_config_registry), version: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.version), transactionSuspended: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.transaction_suspended) });
|
|
343
|
-
};
|
|
344
|
-
Registry.fromBcs = function (data) { return Registry.fromFields(Registry.bcs.parse(data)); };
|
|
345
|
-
Registry.prototype.toJSONField = function () {
|
|
346
|
-
return {
|
|
347
|
-
id: this.id, numOfVault: this.numOfVault.toString(), authority: this.authority.toJSONField(), feePool: this.feePool.toJSONField(), portfolioVaultRegistry: this.portfolioVaultRegistry, depositVaultRegistry: this.depositVaultRegistry, auctionRegistry: this.auctionRegistry, bidVaultRegistry: this.bidVaultRegistry, refundVaultRegistry: this.refundVaultRegistry, additionalConfigRegistry: this.additionalConfigRegistry, version: this.version.toString(), transactionSuspended: this.transactionSuspended,
|
|
348
|
-
};
|
|
349
|
-
};
|
|
350
|
-
Registry.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
351
|
-
Registry.fromJSONField = function (field) { return Registry.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.id), numOfVault: (0, reified_1.decodeFromJSONField)("u64", field.numOfVault), authority: (0, reified_1.decodeFromJSONField)(structs_5.Authority.reified(), field.authority), feePool: (0, reified_1.decodeFromJSONField)(structs_6.BalancePool.reified(), field.feePool), portfolioVaultRegistry: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.portfolioVaultRegistry), depositVaultRegistry: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.depositVaultRegistry), auctionRegistry: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.auctionRegistry), bidVaultRegistry: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.bidVaultRegistry), refundVaultRegistry: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.refundVaultRegistry), additionalConfigRegistry: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.additionalConfigRegistry), version: (0, reified_1.decodeFromJSONField)("u64", field.version), transactionSuspended: (0, reified_1.decodeFromJSONField)("bool", field.transactionSuspended) }); };
|
|
352
|
-
Registry.fromJSON = function (json) {
|
|
353
|
-
if (json.$typeName !== Registry.$typeName) {
|
|
354
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
355
|
-
}
|
|
356
|
-
;
|
|
357
|
-
return Registry.fromJSONField(json);
|
|
358
|
-
};
|
|
359
|
-
Registry.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
360
|
-
throw new Error("not an object");
|
|
361
|
-
} if (!isRegistry(content.type)) {
|
|
362
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Registry object"));
|
|
363
|
-
} return Registry.fromFieldsWithTypes(content); };
|
|
364
|
-
Registry.fetch = function (client, id) {
|
|
365
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
366
|
-
var res;
|
|
367
|
-
var _a, _b;
|
|
368
|
-
return __generator(this, function (_c) {
|
|
369
|
-
switch (_c.label) {
|
|
370
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
371
|
-
case 1:
|
|
372
|
-
res = _c.sent();
|
|
373
|
-
if (res.error) {
|
|
374
|
-
throw new Error("error fetching Registry object at id ".concat(id, ": ").concat(res.error.code));
|
|
375
|
-
}
|
|
376
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRegistry(res.data.bcs.type)) {
|
|
377
|
-
throw new Error("object at id ".concat(id, " is not a Registry object"));
|
|
378
|
-
}
|
|
379
|
-
return [2 /*return*/, Registry.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
});
|
|
383
|
-
};
|
|
384
|
-
Registry.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::Registry";
|
|
385
|
-
Registry.$numTypeParams = 0;
|
|
386
|
-
return Registry;
|
|
387
|
-
}());
|
|
388
|
-
exports.Registry = Registry;
|
|
389
|
-
/* ============================== ActivateEvent =============================== */
|
|
390
|
-
function isActivateEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::ActivateEvent"; }
|
|
391
|
-
var ActivateEvent = /** @class */ (function () {
|
|
392
|
-
function ActivateEvent(typeArgs, fields) {
|
|
393
|
-
this.$typeName = ActivateEvent.$typeName;
|
|
394
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ActivateEvent.$typeName], __read(typeArgs), false));
|
|
395
|
-
this.$typeArgs = typeArgs;
|
|
396
|
-
this.signer = fields.signer;
|
|
397
|
-
;
|
|
398
|
-
this.index = fields.index;
|
|
399
|
-
;
|
|
400
|
-
this.round = fields.round;
|
|
401
|
-
;
|
|
402
|
-
this.depositAmount = fields.depositAmount;
|
|
403
|
-
;
|
|
404
|
-
this.dTokenDecimal = fields.dTokenDecimal;
|
|
405
|
-
;
|
|
406
|
-
this.contractSize = fields.contractSize;
|
|
407
|
-
;
|
|
408
|
-
this.oTokenDecimal = fields.oTokenDecimal;
|
|
409
|
-
;
|
|
410
|
-
this.oracleInfo = fields.oracleInfo;
|
|
411
|
-
;
|
|
412
|
-
this.u64Padding = fields.u64Padding;
|
|
413
|
-
}
|
|
414
|
-
ActivateEvent.reified = function () {
|
|
415
|
-
var _this = this;
|
|
416
|
-
return { typeName: ActivateEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ActivateEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return ActivateEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return ActivateEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return ActivateEvent.fromBcs(data); }, bcs: ActivateEvent.bcs, fromJSONField: function (field) { return ActivateEvent.fromJSONField(field); }, fromJSON: function (json) { return ActivateEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return ActivateEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
417
|
-
return [2 /*return*/, ActivateEvent.fetch(client, id)];
|
|
418
|
-
}); }); }, new: function (fields) { return new ActivateEvent([], fields); }, kind: "StructClassReified", };
|
|
419
|
-
};
|
|
420
|
-
Object.defineProperty(ActivateEvent, "r", {
|
|
421
|
-
get: function () { return ActivateEvent.reified(); },
|
|
422
|
-
enumerable: false,
|
|
423
|
-
configurable: true
|
|
424
|
-
});
|
|
425
|
-
ActivateEvent.phantom = function () { return (0, reified_1.phantom)(ActivateEvent.reified()); };
|
|
426
|
-
Object.defineProperty(ActivateEvent, "p", {
|
|
427
|
-
get: function () { return ActivateEvent.phantom(); },
|
|
428
|
-
enumerable: false,
|
|
429
|
-
configurable: true
|
|
430
|
-
});
|
|
431
|
-
Object.defineProperty(ActivateEvent, "bcs", {
|
|
432
|
-
get: function () {
|
|
433
|
-
return bcs_1.bcs.struct("ActivateEvent", {
|
|
434
|
-
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(), round: bcs_1.bcs.u64(), deposit_amount: bcs_1.bcs.u64(), d_token_decimal: bcs_1.bcs.u64(), contract_size: bcs_1.bcs.u64(), o_token_decimal: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
435
|
-
});
|
|
436
|
-
},
|
|
437
|
-
enumerable: false,
|
|
438
|
-
configurable: true
|
|
439
|
-
});
|
|
440
|
-
;
|
|
441
|
-
ActivateEvent.fromFields = function (fields) { return ActivateEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), depositAmount: (0, reified_1.decodeFromFields)("u64", fields.deposit_amount), dTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.d_token_decimal), contractSize: (0, reified_1.decodeFromFields)("u64", fields.contract_size), oTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.o_token_decimal), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
442
|
-
ActivateEvent.fromFieldsWithTypes = function (item) {
|
|
443
|
-
if (!isActivateEvent(item.type)) {
|
|
444
|
-
throw new Error("not a ActivateEvent type");
|
|
445
|
-
}
|
|
446
|
-
return ActivateEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), depositAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deposit_amount), dTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.d_token_decimal), contractSize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.contract_size), oTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.o_token_decimal), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
447
|
-
};
|
|
448
|
-
ActivateEvent.fromBcs = function (data) { return ActivateEvent.fromFields(ActivateEvent.bcs.parse(data)); };
|
|
449
|
-
ActivateEvent.prototype.toJSONField = function () {
|
|
450
|
-
return {
|
|
451
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), depositAmount: this.depositAmount.toString(), dTokenDecimal: this.dTokenDecimal.toString(), contractSize: this.contractSize.toString(), oTokenDecimal: this.oTokenDecimal.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
452
|
-
};
|
|
453
|
-
};
|
|
454
|
-
ActivateEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
455
|
-
ActivateEvent.fromJSONField = function (field) { return ActivateEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), depositAmount: (0, reified_1.decodeFromJSONField)("u64", field.depositAmount), dTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.dTokenDecimal), contractSize: (0, reified_1.decodeFromJSONField)("u64", field.contractSize), oTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.oTokenDecimal), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
456
|
-
ActivateEvent.fromJSON = function (json) {
|
|
457
|
-
if (json.$typeName !== ActivateEvent.$typeName) {
|
|
458
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
459
|
-
}
|
|
460
|
-
;
|
|
461
|
-
return ActivateEvent.fromJSONField(json);
|
|
462
|
-
};
|
|
463
|
-
ActivateEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
464
|
-
throw new Error("not an object");
|
|
465
|
-
} if (!isActivateEvent(content.type)) {
|
|
466
|
-
throw new Error("object at ".concat(content.fields.id, " is not a ActivateEvent object"));
|
|
467
|
-
} return ActivateEvent.fromFieldsWithTypes(content); };
|
|
468
|
-
ActivateEvent.fetch = function (client, id) {
|
|
469
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
470
|
-
var res;
|
|
471
|
-
var _a, _b;
|
|
472
|
-
return __generator(this, function (_c) {
|
|
473
|
-
switch (_c.label) {
|
|
474
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
475
|
-
case 1:
|
|
476
|
-
res = _c.sent();
|
|
477
|
-
if (res.error) {
|
|
478
|
-
throw new Error("error fetching ActivateEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
479
|
-
}
|
|
480
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isActivateEvent(res.data.bcs.type)) {
|
|
481
|
-
throw new Error("object at id ".concat(id, " is not a ActivateEvent object"));
|
|
482
|
-
}
|
|
483
|
-
return [2 /*return*/, ActivateEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
});
|
|
487
|
-
};
|
|
488
|
-
ActivateEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::ActivateEvent";
|
|
489
|
-
ActivateEvent.$numTypeParams = 0;
|
|
490
|
-
return ActivateEvent;
|
|
491
|
-
}());
|
|
492
|
-
exports.ActivateEvent = ActivateEvent;
|
|
493
|
-
/* ============================== AdditionalConfig =============================== */
|
|
494
|
-
function isAdditionalConfig(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::AdditionalConfig"; }
|
|
495
|
-
var AdditionalConfig = /** @class */ (function () {
|
|
496
|
-
function AdditionalConfig(typeArgs, fields) {
|
|
497
|
-
this.$typeName = AdditionalConfig.$typeName;
|
|
498
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([AdditionalConfig.$typeName], __read(typeArgs), false));
|
|
499
|
-
this.$typeArgs = typeArgs;
|
|
500
|
-
this.id = fields.id;
|
|
501
|
-
}
|
|
502
|
-
AdditionalConfig.reified = function () {
|
|
503
|
-
var _this = this;
|
|
504
|
-
return { typeName: AdditionalConfig.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([AdditionalConfig.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return AdditionalConfig.fromFields(fields); }, fromFieldsWithTypes: function (item) { return AdditionalConfig.fromFieldsWithTypes(item); }, fromBcs: function (data) { return AdditionalConfig.fromBcs(data); }, bcs: AdditionalConfig.bcs, fromJSONField: function (field) { return AdditionalConfig.fromJSONField(field); }, fromJSON: function (json) { return AdditionalConfig.fromJSON(json); }, fromSuiParsedData: function (content) { return AdditionalConfig.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
505
|
-
return [2 /*return*/, AdditionalConfig.fetch(client, id)];
|
|
506
|
-
}); }); }, new: function (fields) { return new AdditionalConfig([], fields); }, kind: "StructClassReified", };
|
|
507
|
-
};
|
|
508
|
-
Object.defineProperty(AdditionalConfig, "r", {
|
|
509
|
-
get: function () { return AdditionalConfig.reified(); },
|
|
510
|
-
enumerable: false,
|
|
511
|
-
configurable: true
|
|
512
|
-
});
|
|
513
|
-
AdditionalConfig.phantom = function () { return (0, reified_1.phantom)(AdditionalConfig.reified()); };
|
|
514
|
-
Object.defineProperty(AdditionalConfig, "p", {
|
|
515
|
-
get: function () { return AdditionalConfig.phantom(); },
|
|
516
|
-
enumerable: false,
|
|
517
|
-
configurable: true
|
|
518
|
-
});
|
|
519
|
-
Object.defineProperty(AdditionalConfig, "bcs", {
|
|
520
|
-
get: function () {
|
|
521
|
-
return bcs_1.bcs.struct("AdditionalConfig", {
|
|
522
|
-
id: structs_4.UID.bcs
|
|
523
|
-
});
|
|
524
|
-
},
|
|
525
|
-
enumerable: false,
|
|
526
|
-
configurable: true
|
|
527
|
-
});
|
|
528
|
-
;
|
|
529
|
-
AdditionalConfig.fromFields = function (fields) { return AdditionalConfig.reified().new({ id: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.id) }); };
|
|
530
|
-
AdditionalConfig.fromFieldsWithTypes = function (item) {
|
|
531
|
-
if (!isAdditionalConfig(item.type)) {
|
|
532
|
-
throw new Error("not a AdditionalConfig type");
|
|
533
|
-
}
|
|
534
|
-
return AdditionalConfig.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.id) });
|
|
535
|
-
};
|
|
536
|
-
AdditionalConfig.fromBcs = function (data) { return AdditionalConfig.fromFields(AdditionalConfig.bcs.parse(data)); };
|
|
537
|
-
AdditionalConfig.prototype.toJSONField = function () {
|
|
538
|
-
return {
|
|
539
|
-
id: this.id,
|
|
540
|
-
};
|
|
541
|
-
};
|
|
542
|
-
AdditionalConfig.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
543
|
-
AdditionalConfig.fromJSONField = function (field) { return AdditionalConfig.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.id) }); };
|
|
544
|
-
AdditionalConfig.fromJSON = function (json) {
|
|
545
|
-
if (json.$typeName !== AdditionalConfig.$typeName) {
|
|
546
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
547
|
-
}
|
|
548
|
-
;
|
|
549
|
-
return AdditionalConfig.fromJSONField(json);
|
|
550
|
-
};
|
|
551
|
-
AdditionalConfig.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
552
|
-
throw new Error("not an object");
|
|
553
|
-
} if (!isAdditionalConfig(content.type)) {
|
|
554
|
-
throw new Error("object at ".concat(content.fields.id, " is not a AdditionalConfig object"));
|
|
555
|
-
} return AdditionalConfig.fromFieldsWithTypes(content); };
|
|
556
|
-
AdditionalConfig.fetch = function (client, id) {
|
|
557
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
558
|
-
var res;
|
|
559
|
-
var _a, _b;
|
|
560
|
-
return __generator(this, function (_c) {
|
|
561
|
-
switch (_c.label) {
|
|
562
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
563
|
-
case 1:
|
|
564
|
-
res = _c.sent();
|
|
565
|
-
if (res.error) {
|
|
566
|
-
throw new Error("error fetching AdditionalConfig object at id ".concat(id, ": ").concat(res.error.code));
|
|
567
|
-
}
|
|
568
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isAdditionalConfig(res.data.bcs.type)) {
|
|
569
|
-
throw new Error("object at id ".concat(id, " is not a AdditionalConfig object"));
|
|
570
|
-
}
|
|
571
|
-
return [2 /*return*/, AdditionalConfig.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
572
|
-
}
|
|
573
|
-
});
|
|
574
|
-
});
|
|
575
|
-
};
|
|
576
|
-
AdditionalConfig.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::AdditionalConfig";
|
|
577
|
-
AdditionalConfig.$numTypeParams = 0;
|
|
578
|
-
return AdditionalConfig;
|
|
579
|
-
}());
|
|
580
|
-
exports.AdditionalConfig = AdditionalConfig;
|
|
581
|
-
/* ============================== ClaimEvent =============================== */
|
|
582
|
-
function isClaimEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::ClaimEvent"; }
|
|
583
|
-
var ClaimEvent = /** @class */ (function () {
|
|
584
|
-
function ClaimEvent(typeArgs, fields) {
|
|
585
|
-
this.$typeName = ClaimEvent.$typeName;
|
|
586
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ClaimEvent.$typeName], __read(typeArgs), false));
|
|
587
|
-
this.$typeArgs = typeArgs;
|
|
588
|
-
this.signer = fields.signer;
|
|
589
|
-
;
|
|
590
|
-
this.index = fields.index;
|
|
591
|
-
;
|
|
592
|
-
this.token = fields.token;
|
|
593
|
-
;
|
|
594
|
-
this.amount = fields.amount;
|
|
595
|
-
;
|
|
596
|
-
this.decimal = fields.decimal;
|
|
597
|
-
;
|
|
598
|
-
this.oracleInfo = fields.oracleInfo;
|
|
599
|
-
;
|
|
600
|
-
this.u64Padding = fields.u64Padding;
|
|
601
|
-
}
|
|
602
|
-
ClaimEvent.reified = function () {
|
|
603
|
-
var _this = this;
|
|
604
|
-
return { typeName: ClaimEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ClaimEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return ClaimEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return ClaimEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return ClaimEvent.fromBcs(data); }, bcs: ClaimEvent.bcs, fromJSONField: function (field) { return ClaimEvent.fromJSONField(field); }, fromJSON: function (json) { return ClaimEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return ClaimEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
605
|
-
return [2 /*return*/, ClaimEvent.fetch(client, id)];
|
|
606
|
-
}); }); }, new: function (fields) { return new ClaimEvent([], fields); }, kind: "StructClassReified", };
|
|
607
|
-
};
|
|
608
|
-
Object.defineProperty(ClaimEvent, "r", {
|
|
609
|
-
get: function () { return ClaimEvent.reified(); },
|
|
610
|
-
enumerable: false,
|
|
611
|
-
configurable: true
|
|
612
|
-
});
|
|
613
|
-
ClaimEvent.phantom = function () { return (0, reified_1.phantom)(ClaimEvent.reified()); };
|
|
614
|
-
Object.defineProperty(ClaimEvent, "p", {
|
|
615
|
-
get: function () { return ClaimEvent.phantom(); },
|
|
616
|
-
enumerable: false,
|
|
617
|
-
configurable: true
|
|
618
|
-
});
|
|
619
|
-
Object.defineProperty(ClaimEvent, "bcs", {
|
|
620
|
-
get: function () {
|
|
621
|
-
return bcs_1.bcs.struct("ClaimEvent", {
|
|
622
|
-
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(), decimal: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
623
|
-
});
|
|
624
|
-
},
|
|
625
|
-
enumerable: false,
|
|
626
|
-
configurable: true
|
|
627
|
-
});
|
|
628
|
-
;
|
|
629
|
-
ClaimEvent.fromFields = function (fields) { return ClaimEvent.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), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
630
|
-
ClaimEvent.fromFieldsWithTypes = function (item) {
|
|
631
|
-
if (!isClaimEvent(item.type)) {
|
|
632
|
-
throw new Error("not a ClaimEvent type");
|
|
633
|
-
}
|
|
634
|
-
return ClaimEvent.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), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
635
|
-
};
|
|
636
|
-
ClaimEvent.fromBcs = function (data) { return ClaimEvent.fromFields(ClaimEvent.bcs.parse(data)); };
|
|
637
|
-
ClaimEvent.prototype.toJSONField = function () {
|
|
638
|
-
return {
|
|
639
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), decimal: this.decimal.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
640
|
-
};
|
|
641
|
-
};
|
|
642
|
-
ClaimEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
643
|
-
ClaimEvent.fromJSONField = function (field) { return ClaimEvent.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), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
644
|
-
ClaimEvent.fromJSON = function (json) {
|
|
645
|
-
if (json.$typeName !== ClaimEvent.$typeName) {
|
|
646
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
647
|
-
}
|
|
648
|
-
;
|
|
649
|
-
return ClaimEvent.fromJSONField(json);
|
|
650
|
-
};
|
|
651
|
-
ClaimEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
652
|
-
throw new Error("not an object");
|
|
653
|
-
} if (!isClaimEvent(content.type)) {
|
|
654
|
-
throw new Error("object at ".concat(content.fields.id, " is not a ClaimEvent object"));
|
|
655
|
-
} return ClaimEvent.fromFieldsWithTypes(content); };
|
|
656
|
-
ClaimEvent.fetch = function (client, id) {
|
|
657
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
658
|
-
var res;
|
|
659
|
-
var _a, _b;
|
|
660
|
-
return __generator(this, function (_c) {
|
|
661
|
-
switch (_c.label) {
|
|
662
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
663
|
-
case 1:
|
|
664
|
-
res = _c.sent();
|
|
665
|
-
if (res.error) {
|
|
666
|
-
throw new Error("error fetching ClaimEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
667
|
-
}
|
|
668
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isClaimEvent(res.data.bcs.type)) {
|
|
669
|
-
throw new Error("object at id ".concat(id, " is not a ClaimEvent object"));
|
|
670
|
-
}
|
|
671
|
-
return [2 /*return*/, ClaimEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
672
|
-
}
|
|
673
|
-
});
|
|
674
|
-
});
|
|
675
|
-
};
|
|
676
|
-
ClaimEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::ClaimEvent";
|
|
677
|
-
ClaimEvent.$numTypeParams = 0;
|
|
678
|
-
return ClaimEvent;
|
|
679
|
-
}());
|
|
680
|
-
exports.ClaimEvent = ClaimEvent;
|
|
681
|
-
/* ============================== CloseEvent =============================== */
|
|
682
|
-
function isCloseEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::CloseEvent"; }
|
|
683
|
-
var CloseEvent = /** @class */ (function () {
|
|
684
|
-
function CloseEvent(typeArgs, fields) {
|
|
685
|
-
this.$typeName = CloseEvent.$typeName;
|
|
686
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([CloseEvent.$typeName], __read(typeArgs), false));
|
|
687
|
-
this.$typeArgs = typeArgs;
|
|
688
|
-
this.signer = fields.signer;
|
|
689
|
-
;
|
|
690
|
-
this.index = fields.index;
|
|
691
|
-
;
|
|
692
|
-
this.round = fields.round;
|
|
693
|
-
;
|
|
694
|
-
this.u64Padding = fields.u64Padding;
|
|
695
|
-
}
|
|
696
|
-
CloseEvent.reified = function () {
|
|
697
|
-
var _this = this;
|
|
698
|
-
return { typeName: CloseEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([CloseEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return CloseEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return CloseEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return CloseEvent.fromBcs(data); }, bcs: CloseEvent.bcs, fromJSONField: function (field) { return CloseEvent.fromJSONField(field); }, fromJSON: function (json) { return CloseEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return CloseEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
699
|
-
return [2 /*return*/, CloseEvent.fetch(client, id)];
|
|
700
|
-
}); }); }, new: function (fields) { return new CloseEvent([], fields); }, kind: "StructClassReified", };
|
|
701
|
-
};
|
|
702
|
-
Object.defineProperty(CloseEvent, "r", {
|
|
703
|
-
get: function () { return CloseEvent.reified(); },
|
|
704
|
-
enumerable: false,
|
|
705
|
-
configurable: true
|
|
706
|
-
});
|
|
707
|
-
CloseEvent.phantom = function () { return (0, reified_1.phantom)(CloseEvent.reified()); };
|
|
708
|
-
Object.defineProperty(CloseEvent, "p", {
|
|
709
|
-
get: function () { return CloseEvent.phantom(); },
|
|
710
|
-
enumerable: false,
|
|
711
|
-
configurable: true
|
|
712
|
-
});
|
|
713
|
-
Object.defineProperty(CloseEvent, "bcs", {
|
|
714
|
-
get: function () {
|
|
715
|
-
return bcs_1.bcs.struct("CloseEvent", {
|
|
716
|
-
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(), round: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
717
|
-
});
|
|
718
|
-
},
|
|
719
|
-
enumerable: false,
|
|
720
|
-
configurable: true
|
|
721
|
-
});
|
|
722
|
-
;
|
|
723
|
-
CloseEvent.fromFields = function (fields) { return CloseEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
724
|
-
CloseEvent.fromFieldsWithTypes = function (item) {
|
|
725
|
-
if (!isCloseEvent(item.type)) {
|
|
726
|
-
throw new Error("not a CloseEvent type");
|
|
727
|
-
}
|
|
728
|
-
return CloseEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
729
|
-
};
|
|
730
|
-
CloseEvent.fromBcs = function (data) { return CloseEvent.fromFields(CloseEvent.bcs.parse(data)); };
|
|
731
|
-
CloseEvent.prototype.toJSONField = function () {
|
|
732
|
-
return {
|
|
733
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
734
|
-
};
|
|
735
|
-
};
|
|
736
|
-
CloseEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
737
|
-
CloseEvent.fromJSONField = function (field) { return CloseEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
738
|
-
CloseEvent.fromJSON = function (json) {
|
|
739
|
-
if (json.$typeName !== CloseEvent.$typeName) {
|
|
740
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
741
|
-
}
|
|
742
|
-
;
|
|
743
|
-
return CloseEvent.fromJSONField(json);
|
|
744
|
-
};
|
|
745
|
-
CloseEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
746
|
-
throw new Error("not an object");
|
|
747
|
-
} if (!isCloseEvent(content.type)) {
|
|
748
|
-
throw new Error("object at ".concat(content.fields.id, " is not a CloseEvent object"));
|
|
749
|
-
} return CloseEvent.fromFieldsWithTypes(content); };
|
|
750
|
-
CloseEvent.fetch = function (client, id) {
|
|
751
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
752
|
-
var res;
|
|
753
|
-
var _a, _b;
|
|
754
|
-
return __generator(this, function (_c) {
|
|
755
|
-
switch (_c.label) {
|
|
756
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
757
|
-
case 1:
|
|
758
|
-
res = _c.sent();
|
|
759
|
-
if (res.error) {
|
|
760
|
-
throw new Error("error fetching CloseEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
761
|
-
}
|
|
762
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isCloseEvent(res.data.bcs.type)) {
|
|
763
|
-
throw new Error("object at id ".concat(id, " is not a CloseEvent object"));
|
|
764
|
-
}
|
|
765
|
-
return [2 /*return*/, CloseEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
|
-
});
|
|
769
|
-
};
|
|
770
|
-
CloseEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::CloseEvent";
|
|
771
|
-
CloseEvent.$numTypeParams = 0;
|
|
772
|
-
return CloseEvent;
|
|
773
|
-
}());
|
|
774
|
-
exports.CloseEvent = CloseEvent;
|
|
775
|
-
/* ============================== CompoundEvent =============================== */
|
|
776
|
-
function isCompoundEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::CompoundEvent"; }
|
|
777
|
-
var CompoundEvent = /** @class */ (function () {
|
|
778
|
-
function CompoundEvent(typeArgs, fields) {
|
|
779
|
-
this.$typeName = CompoundEvent.$typeName;
|
|
780
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([CompoundEvent.$typeName], __read(typeArgs), false));
|
|
781
|
-
this.$typeArgs = typeArgs;
|
|
782
|
-
this.signer = fields.signer;
|
|
783
|
-
;
|
|
784
|
-
this.index = fields.index;
|
|
785
|
-
;
|
|
786
|
-
this.token = fields.token;
|
|
787
|
-
;
|
|
788
|
-
this.amount = fields.amount;
|
|
789
|
-
;
|
|
790
|
-
this.decimal = fields.decimal;
|
|
791
|
-
;
|
|
792
|
-
this.oracleInfo = fields.oracleInfo;
|
|
793
|
-
;
|
|
794
|
-
this.u64Padding = fields.u64Padding;
|
|
795
|
-
}
|
|
796
|
-
CompoundEvent.reified = function () {
|
|
797
|
-
var _this = this;
|
|
798
|
-
return { typeName: CompoundEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([CompoundEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return CompoundEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return CompoundEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return CompoundEvent.fromBcs(data); }, bcs: CompoundEvent.bcs, fromJSONField: function (field) { return CompoundEvent.fromJSONField(field); }, fromJSON: function (json) { return CompoundEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return CompoundEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
799
|
-
return [2 /*return*/, CompoundEvent.fetch(client, id)];
|
|
800
|
-
}); }); }, new: function (fields) { return new CompoundEvent([], fields); }, kind: "StructClassReified", };
|
|
801
|
-
};
|
|
802
|
-
Object.defineProperty(CompoundEvent, "r", {
|
|
803
|
-
get: function () { return CompoundEvent.reified(); },
|
|
804
|
-
enumerable: false,
|
|
805
|
-
configurable: true
|
|
806
|
-
});
|
|
807
|
-
CompoundEvent.phantom = function () { return (0, reified_1.phantom)(CompoundEvent.reified()); };
|
|
808
|
-
Object.defineProperty(CompoundEvent, "p", {
|
|
809
|
-
get: function () { return CompoundEvent.phantom(); },
|
|
810
|
-
enumerable: false,
|
|
811
|
-
configurable: true
|
|
812
|
-
});
|
|
813
|
-
Object.defineProperty(CompoundEvent, "bcs", {
|
|
814
|
-
get: function () {
|
|
815
|
-
return bcs_1.bcs.struct("CompoundEvent", {
|
|
816
|
-
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(), decimal: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
817
|
-
});
|
|
818
|
-
},
|
|
819
|
-
enumerable: false,
|
|
820
|
-
configurable: true
|
|
821
|
-
});
|
|
822
|
-
;
|
|
823
|
-
CompoundEvent.fromFields = function (fields) { return CompoundEvent.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), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
824
|
-
CompoundEvent.fromFieldsWithTypes = function (item) {
|
|
825
|
-
if (!isCompoundEvent(item.type)) {
|
|
826
|
-
throw new Error("not a CompoundEvent type");
|
|
827
|
-
}
|
|
828
|
-
return CompoundEvent.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), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
829
|
-
};
|
|
830
|
-
CompoundEvent.fromBcs = function (data) { return CompoundEvent.fromFields(CompoundEvent.bcs.parse(data)); };
|
|
831
|
-
CompoundEvent.prototype.toJSONField = function () {
|
|
832
|
-
return {
|
|
833
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), decimal: this.decimal.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
834
|
-
};
|
|
835
|
-
};
|
|
836
|
-
CompoundEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
837
|
-
CompoundEvent.fromJSONField = function (field) { return CompoundEvent.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), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
838
|
-
CompoundEvent.fromJSON = function (json) {
|
|
839
|
-
if (json.$typeName !== CompoundEvent.$typeName) {
|
|
840
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
841
|
-
}
|
|
842
|
-
;
|
|
843
|
-
return CompoundEvent.fromJSONField(json);
|
|
844
|
-
};
|
|
845
|
-
CompoundEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
846
|
-
throw new Error("not an object");
|
|
847
|
-
} if (!isCompoundEvent(content.type)) {
|
|
848
|
-
throw new Error("object at ".concat(content.fields.id, " is not a CompoundEvent object"));
|
|
849
|
-
} return CompoundEvent.fromFieldsWithTypes(content); };
|
|
850
|
-
CompoundEvent.fetch = function (client, id) {
|
|
851
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
852
|
-
var res;
|
|
853
|
-
var _a, _b;
|
|
854
|
-
return __generator(this, function (_c) {
|
|
855
|
-
switch (_c.label) {
|
|
856
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
857
|
-
case 1:
|
|
858
|
-
res = _c.sent();
|
|
859
|
-
if (res.error) {
|
|
860
|
-
throw new Error("error fetching CompoundEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
861
|
-
}
|
|
862
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isCompoundEvent(res.data.bcs.type)) {
|
|
863
|
-
throw new Error("object at id ".concat(id, " is not a CompoundEvent object"));
|
|
864
|
-
}
|
|
865
|
-
return [2 /*return*/, CompoundEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
866
|
-
}
|
|
867
|
-
});
|
|
868
|
-
});
|
|
869
|
-
};
|
|
870
|
-
CompoundEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::CompoundEvent";
|
|
871
|
-
CompoundEvent.$numTypeParams = 0;
|
|
872
|
-
return CompoundEvent;
|
|
873
|
-
}());
|
|
874
|
-
exports.CompoundEvent = CompoundEvent;
|
|
875
|
-
/* ============================== DeliveryEvent =============================== */
|
|
876
|
-
function isDeliveryEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DeliveryEvent"; }
|
|
877
|
-
var DeliveryEvent = /** @class */ (function () {
|
|
878
|
-
function DeliveryEvent(typeArgs, fields) {
|
|
879
|
-
this.$typeName = DeliveryEvent.$typeName;
|
|
880
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DeliveryEvent.$typeName], __read(typeArgs), false));
|
|
881
|
-
this.$typeArgs = typeArgs;
|
|
882
|
-
this.signer = fields.signer;
|
|
883
|
-
;
|
|
884
|
-
this.index = fields.index;
|
|
885
|
-
;
|
|
886
|
-
this.round = fields.round;
|
|
887
|
-
;
|
|
888
|
-
this.early = fields.early;
|
|
889
|
-
;
|
|
890
|
-
this.deliveryPrice = fields.deliveryPrice;
|
|
891
|
-
;
|
|
892
|
-
this.deliverySize = fields.deliverySize;
|
|
893
|
-
;
|
|
894
|
-
this.oTokenDecimal = fields.oTokenDecimal;
|
|
895
|
-
;
|
|
896
|
-
this.oToken = fields.oToken;
|
|
897
|
-
;
|
|
898
|
-
this.bidderBidValue = fields.bidderBidValue;
|
|
899
|
-
;
|
|
900
|
-
this.bidderFee = fields.bidderFee;
|
|
901
|
-
;
|
|
902
|
-
this.incentiveBidValue = fields.incentiveBidValue;
|
|
903
|
-
;
|
|
904
|
-
this.incentiveFee = fields.incentiveFee;
|
|
905
|
-
;
|
|
906
|
-
this.bTokenDecimal = fields.bTokenDecimal;
|
|
907
|
-
;
|
|
908
|
-
this.bToken = fields.bToken;
|
|
909
|
-
;
|
|
910
|
-
this.depositorIncentiveValue = fields.depositorIncentiveValue;
|
|
911
|
-
;
|
|
912
|
-
this.u64Padding = fields.u64Padding;
|
|
913
|
-
}
|
|
914
|
-
DeliveryEvent.reified = function () {
|
|
915
|
-
var _this = this;
|
|
916
|
-
return { typeName: DeliveryEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DeliveryEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return DeliveryEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return DeliveryEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return DeliveryEvent.fromBcs(data); }, bcs: DeliveryEvent.bcs, fromJSONField: function (field) { return DeliveryEvent.fromJSONField(field); }, fromJSON: function (json) { return DeliveryEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return DeliveryEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
917
|
-
return [2 /*return*/, DeliveryEvent.fetch(client, id)];
|
|
918
|
-
}); }); }, new: function (fields) { return new DeliveryEvent([], fields); }, kind: "StructClassReified", };
|
|
919
|
-
};
|
|
920
|
-
Object.defineProperty(DeliveryEvent, "r", {
|
|
921
|
-
get: function () { return DeliveryEvent.reified(); },
|
|
922
|
-
enumerable: false,
|
|
923
|
-
configurable: true
|
|
924
|
-
});
|
|
925
|
-
DeliveryEvent.phantom = function () { return (0, reified_1.phantom)(DeliveryEvent.reified()); };
|
|
926
|
-
Object.defineProperty(DeliveryEvent, "p", {
|
|
927
|
-
get: function () { return DeliveryEvent.phantom(); },
|
|
928
|
-
enumerable: false,
|
|
929
|
-
configurable: true
|
|
930
|
-
});
|
|
931
|
-
Object.defineProperty(DeliveryEvent, "bcs", {
|
|
932
|
-
get: function () {
|
|
933
|
-
return bcs_1.bcs.struct("DeliveryEvent", {
|
|
934
|
-
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(), round: bcs_1.bcs.u64(), early: bcs_1.bcs.bool(), delivery_price: bcs_1.bcs.u64(), delivery_size: bcs_1.bcs.u64(), o_token_decimal: bcs_1.bcs.u64(), o_token: structs_3.TypeName.bcs, bidder_bid_value: bcs_1.bcs.u64(), bidder_fee: bcs_1.bcs.u64(), incentive_bid_value: bcs_1.bcs.u64(), incentive_fee: bcs_1.bcs.u64(), b_token_decimal: bcs_1.bcs.u64(), b_token: structs_3.TypeName.bcs, depositor_incentive_value: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
935
|
-
});
|
|
936
|
-
},
|
|
937
|
-
enumerable: false,
|
|
938
|
-
configurable: true
|
|
939
|
-
});
|
|
940
|
-
;
|
|
941
|
-
DeliveryEvent.fromFields = function (fields) { return DeliveryEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), early: (0, reified_1.decodeFromFields)("bool", fields.early), deliveryPrice: (0, reified_1.decodeFromFields)("u64", fields.delivery_price), deliverySize: (0, reified_1.decodeFromFields)("u64", fields.delivery_size), oTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.o_token_decimal), oToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.o_token), bidderBidValue: (0, reified_1.decodeFromFields)("u64", fields.bidder_bid_value), bidderFee: (0, reified_1.decodeFromFields)("u64", fields.bidder_fee), incentiveBidValue: (0, reified_1.decodeFromFields)("u64", fields.incentive_bid_value), incentiveFee: (0, reified_1.decodeFromFields)("u64", fields.incentive_fee), bTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.b_token_decimal), bToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.b_token), depositorIncentiveValue: (0, reified_1.decodeFromFields)("u64", fields.depositor_incentive_value), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
942
|
-
DeliveryEvent.fromFieldsWithTypes = function (item) {
|
|
943
|
-
if (!isDeliveryEvent(item.type)) {
|
|
944
|
-
throw new Error("not a DeliveryEvent type");
|
|
945
|
-
}
|
|
946
|
-
return DeliveryEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), early: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.early), deliveryPrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.delivery_price), deliverySize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.delivery_size), oTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.o_token_decimal), oToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.o_token), bidderBidValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bidder_bid_value), bidderFee: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bidder_fee), incentiveBidValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_bid_value), incentiveFee: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_fee), bTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.b_token_decimal), bToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.b_token), depositorIncentiveValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.depositor_incentive_value), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
947
|
-
};
|
|
948
|
-
DeliveryEvent.fromBcs = function (data) { return DeliveryEvent.fromFields(DeliveryEvent.bcs.parse(data)); };
|
|
949
|
-
DeliveryEvent.prototype.toJSONField = function () {
|
|
950
|
-
return {
|
|
951
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), early: this.early, deliveryPrice: this.deliveryPrice.toString(), deliverySize: this.deliverySize.toString(), oTokenDecimal: this.oTokenDecimal.toString(), oToken: this.oToken.toJSONField(), bidderBidValue: this.bidderBidValue.toString(), bidderFee: this.bidderFee.toString(), incentiveBidValue: this.incentiveBidValue.toString(), incentiveFee: this.incentiveFee.toString(), bTokenDecimal: this.bTokenDecimal.toString(), bToken: this.bToken.toJSONField(), depositorIncentiveValue: this.depositorIncentiveValue.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
952
|
-
};
|
|
953
|
-
};
|
|
954
|
-
DeliveryEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
955
|
-
DeliveryEvent.fromJSONField = function (field) { return DeliveryEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), early: (0, reified_1.decodeFromJSONField)("bool", field.early), deliveryPrice: (0, reified_1.decodeFromJSONField)("u64", field.deliveryPrice), deliverySize: (0, reified_1.decodeFromJSONField)("u64", field.deliverySize), oTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.oTokenDecimal), oToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.oToken), bidderBidValue: (0, reified_1.decodeFromJSONField)("u64", field.bidderBidValue), bidderFee: (0, reified_1.decodeFromJSONField)("u64", field.bidderFee), incentiveBidValue: (0, reified_1.decodeFromJSONField)("u64", field.incentiveBidValue), incentiveFee: (0, reified_1.decodeFromJSONField)("u64", field.incentiveFee), bTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.bTokenDecimal), bToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bToken), depositorIncentiveValue: (0, reified_1.decodeFromJSONField)("u64", field.depositorIncentiveValue), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
956
|
-
DeliveryEvent.fromJSON = function (json) {
|
|
957
|
-
if (json.$typeName !== DeliveryEvent.$typeName) {
|
|
958
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
959
|
-
}
|
|
960
|
-
;
|
|
961
|
-
return DeliveryEvent.fromJSONField(json);
|
|
962
|
-
};
|
|
963
|
-
DeliveryEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
964
|
-
throw new Error("not an object");
|
|
965
|
-
} if (!isDeliveryEvent(content.type)) {
|
|
966
|
-
throw new Error("object at ".concat(content.fields.id, " is not a DeliveryEvent object"));
|
|
967
|
-
} return DeliveryEvent.fromFieldsWithTypes(content); };
|
|
968
|
-
DeliveryEvent.fetch = function (client, id) {
|
|
969
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
970
|
-
var res;
|
|
971
|
-
var _a, _b;
|
|
972
|
-
return __generator(this, function (_c) {
|
|
973
|
-
switch (_c.label) {
|
|
974
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
975
|
-
case 1:
|
|
976
|
-
res = _c.sent();
|
|
977
|
-
if (res.error) {
|
|
978
|
-
throw new Error("error fetching DeliveryEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
979
|
-
}
|
|
980
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDeliveryEvent(res.data.bcs.type)) {
|
|
981
|
-
throw new Error("object at id ".concat(id, " is not a DeliveryEvent object"));
|
|
982
|
-
}
|
|
983
|
-
return [2 /*return*/, DeliveryEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
984
|
-
}
|
|
985
|
-
});
|
|
986
|
-
});
|
|
987
|
-
};
|
|
988
|
-
DeliveryEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DeliveryEvent";
|
|
989
|
-
DeliveryEvent.$numTypeParams = 0;
|
|
990
|
-
return DeliveryEvent;
|
|
991
|
-
}());
|
|
992
|
-
exports.DeliveryEvent = DeliveryEvent;
|
|
993
|
-
/* ============================== DeliveryInfo =============================== */
|
|
994
|
-
function isDeliveryInfo(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DeliveryInfo"; }
|
|
995
|
-
var DeliveryInfo = /** @class */ (function () {
|
|
996
|
-
function DeliveryInfo(typeArgs, fields) {
|
|
997
|
-
this.$typeName = DeliveryInfo.$typeName;
|
|
998
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DeliveryInfo.$typeName], __read(typeArgs), false));
|
|
999
|
-
this.$typeArgs = typeArgs;
|
|
1000
|
-
this.auctionType = fields.auctionType;
|
|
1001
|
-
;
|
|
1002
|
-
this.deliveryPrice = fields.deliveryPrice;
|
|
1003
|
-
;
|
|
1004
|
-
this.deliverySize = fields.deliverySize;
|
|
1005
|
-
;
|
|
1006
|
-
this.bidderBidValue = fields.bidderBidValue;
|
|
1007
|
-
;
|
|
1008
|
-
this.bidderFee = fields.bidderFee;
|
|
1009
|
-
;
|
|
1010
|
-
this.incentiveBidValue = fields.incentiveBidValue;
|
|
1011
|
-
;
|
|
1012
|
-
this.incentiveFee = fields.incentiveFee;
|
|
1013
|
-
;
|
|
1014
|
-
this.tsMs = fields.tsMs;
|
|
1015
|
-
;
|
|
1016
|
-
this.u64Padding = fields.u64Padding;
|
|
1017
|
-
}
|
|
1018
|
-
DeliveryInfo.reified = function () {
|
|
1019
|
-
var _this = this;
|
|
1020
|
-
return { typeName: DeliveryInfo.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DeliveryInfo.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return DeliveryInfo.fromFields(fields); }, fromFieldsWithTypes: function (item) { return DeliveryInfo.fromFieldsWithTypes(item); }, fromBcs: function (data) { return DeliveryInfo.fromBcs(data); }, bcs: DeliveryInfo.bcs, fromJSONField: function (field) { return DeliveryInfo.fromJSONField(field); }, fromJSON: function (json) { return DeliveryInfo.fromJSON(json); }, fromSuiParsedData: function (content) { return DeliveryInfo.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1021
|
-
return [2 /*return*/, DeliveryInfo.fetch(client, id)];
|
|
1022
|
-
}); }); }, new: function (fields) { return new DeliveryInfo([], fields); }, kind: "StructClassReified", };
|
|
1023
|
-
};
|
|
1024
|
-
Object.defineProperty(DeliveryInfo, "r", {
|
|
1025
|
-
get: function () { return DeliveryInfo.reified(); },
|
|
1026
|
-
enumerable: false,
|
|
1027
|
-
configurable: true
|
|
1028
|
-
});
|
|
1029
|
-
DeliveryInfo.phantom = function () { return (0, reified_1.phantom)(DeliveryInfo.reified()); };
|
|
1030
|
-
Object.defineProperty(DeliveryInfo, "p", {
|
|
1031
|
-
get: function () { return DeliveryInfo.phantom(); },
|
|
1032
|
-
enumerable: false,
|
|
1033
|
-
configurable: true
|
|
1034
|
-
});
|
|
1035
|
-
Object.defineProperty(DeliveryInfo, "bcs", {
|
|
1036
|
-
get: function () {
|
|
1037
|
-
return bcs_1.bcs.struct("DeliveryInfo", {
|
|
1038
|
-
auction_type: bcs_1.bcs.u64(), delivery_price: bcs_1.bcs.u64(), delivery_size: bcs_1.bcs.u64(), bidder_bid_value: bcs_1.bcs.u64(), bidder_fee: bcs_1.bcs.u64(), incentive_bid_value: bcs_1.bcs.u64(), incentive_fee: bcs_1.bcs.u64(), ts_ms: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1039
|
-
});
|
|
1040
|
-
},
|
|
1041
|
-
enumerable: false,
|
|
1042
|
-
configurable: true
|
|
1043
|
-
});
|
|
1044
|
-
;
|
|
1045
|
-
DeliveryInfo.fromFields = function (fields) { return DeliveryInfo.reified().new({ auctionType: (0, reified_1.decodeFromFields)("u64", fields.auction_type), deliveryPrice: (0, reified_1.decodeFromFields)("u64", fields.delivery_price), deliverySize: (0, reified_1.decodeFromFields)("u64", fields.delivery_size), bidderBidValue: (0, reified_1.decodeFromFields)("u64", fields.bidder_bid_value), bidderFee: (0, reified_1.decodeFromFields)("u64", fields.bidder_fee), incentiveBidValue: (0, reified_1.decodeFromFields)("u64", fields.incentive_bid_value), incentiveFee: (0, reified_1.decodeFromFields)("u64", fields.incentive_fee), tsMs: (0, reified_1.decodeFromFields)("u64", fields.ts_ms), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1046
|
-
DeliveryInfo.fromFieldsWithTypes = function (item) {
|
|
1047
|
-
if (!isDeliveryInfo(item.type)) {
|
|
1048
|
-
throw new Error("not a DeliveryInfo type");
|
|
1049
|
-
}
|
|
1050
|
-
return DeliveryInfo.reified().new({ auctionType: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.auction_type), deliveryPrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.delivery_price), deliverySize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.delivery_size), bidderBidValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bidder_bid_value), bidderFee: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bidder_fee), incentiveBidValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_bid_value), incentiveFee: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_fee), tsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.ts_ms), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1051
|
-
};
|
|
1052
|
-
DeliveryInfo.fromBcs = function (data) { return DeliveryInfo.fromFields(DeliveryInfo.bcs.parse(data)); };
|
|
1053
|
-
DeliveryInfo.prototype.toJSONField = function () {
|
|
1054
|
-
return {
|
|
1055
|
-
auctionType: this.auctionType.toString(), deliveryPrice: this.deliveryPrice.toString(), deliverySize: this.deliverySize.toString(), bidderBidValue: this.bidderBidValue.toString(), bidderFee: this.bidderFee.toString(), incentiveBidValue: this.incentiveBidValue.toString(), incentiveFee: this.incentiveFee.toString(), tsMs: this.tsMs.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1056
|
-
};
|
|
1057
|
-
};
|
|
1058
|
-
DeliveryInfo.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1059
|
-
DeliveryInfo.fromJSONField = function (field) { return DeliveryInfo.reified().new({ auctionType: (0, reified_1.decodeFromJSONField)("u64", field.auctionType), deliveryPrice: (0, reified_1.decodeFromJSONField)("u64", field.deliveryPrice), deliverySize: (0, reified_1.decodeFromJSONField)("u64", field.deliverySize), bidderBidValue: (0, reified_1.decodeFromJSONField)("u64", field.bidderBidValue), bidderFee: (0, reified_1.decodeFromJSONField)("u64", field.bidderFee), incentiveBidValue: (0, reified_1.decodeFromJSONField)("u64", field.incentiveBidValue), incentiveFee: (0, reified_1.decodeFromJSONField)("u64", field.incentiveFee), tsMs: (0, reified_1.decodeFromJSONField)("u64", field.tsMs), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
1060
|
-
DeliveryInfo.fromJSON = function (json) {
|
|
1061
|
-
if (json.$typeName !== DeliveryInfo.$typeName) {
|
|
1062
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1063
|
-
}
|
|
1064
|
-
;
|
|
1065
|
-
return DeliveryInfo.fromJSONField(json);
|
|
1066
|
-
};
|
|
1067
|
-
DeliveryInfo.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1068
|
-
throw new Error("not an object");
|
|
1069
|
-
} if (!isDeliveryInfo(content.type)) {
|
|
1070
|
-
throw new Error("object at ".concat(content.fields.id, " is not a DeliveryInfo object"));
|
|
1071
|
-
} return DeliveryInfo.fromFieldsWithTypes(content); };
|
|
1072
|
-
DeliveryInfo.fetch = function (client, id) {
|
|
1073
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1074
|
-
var res;
|
|
1075
|
-
var _a, _b;
|
|
1076
|
-
return __generator(this, function (_c) {
|
|
1077
|
-
switch (_c.label) {
|
|
1078
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1079
|
-
case 1:
|
|
1080
|
-
res = _c.sent();
|
|
1081
|
-
if (res.error) {
|
|
1082
|
-
throw new Error("error fetching DeliveryInfo object at id ".concat(id, ": ").concat(res.error.code));
|
|
1083
|
-
}
|
|
1084
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDeliveryInfo(res.data.bcs.type)) {
|
|
1085
|
-
throw new Error("object at id ".concat(id, " is not a DeliveryInfo object"));
|
|
1086
|
-
}
|
|
1087
|
-
return [2 /*return*/, DeliveryInfo.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1088
|
-
}
|
|
1089
|
-
});
|
|
1090
|
-
});
|
|
1091
|
-
};
|
|
1092
|
-
DeliveryInfo.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DeliveryInfo";
|
|
1093
|
-
DeliveryInfo.$numTypeParams = 0;
|
|
1094
|
-
return DeliveryInfo;
|
|
1095
|
-
}());
|
|
1096
|
-
exports.DeliveryInfo = DeliveryInfo;
|
|
1097
|
-
/* ============================== DeliveryInfos =============================== */
|
|
1098
|
-
function isDeliveryInfos(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DeliveryInfos"; }
|
|
1099
|
-
var DeliveryInfos = /** @class */ (function () {
|
|
1100
|
-
function DeliveryInfos(typeArgs, fields) {
|
|
1101
|
-
this.$typeName = DeliveryInfos.$typeName;
|
|
1102
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DeliveryInfos.$typeName], __read(typeArgs), false));
|
|
1103
|
-
this.$typeArgs = typeArgs;
|
|
1104
|
-
this.round = fields.round;
|
|
1105
|
-
;
|
|
1106
|
-
this.maxSize = fields.maxSize;
|
|
1107
|
-
;
|
|
1108
|
-
this.totalDeliverySize = fields.totalDeliverySize;
|
|
1109
|
-
;
|
|
1110
|
-
this.totalBidderBidValue = fields.totalBidderBidValue;
|
|
1111
|
-
;
|
|
1112
|
-
this.totalBidderFee = fields.totalBidderFee;
|
|
1113
|
-
;
|
|
1114
|
-
this.totalIncentiveBidValue = fields.totalIncentiveBidValue;
|
|
1115
|
-
;
|
|
1116
|
-
this.totalIncentiveFee = fields.totalIncentiveFee;
|
|
1117
|
-
;
|
|
1118
|
-
this.deliveryInfo = fields.deliveryInfo;
|
|
1119
|
-
;
|
|
1120
|
-
this.u64Padding = fields.u64Padding;
|
|
1121
|
-
}
|
|
1122
|
-
DeliveryInfos.reified = function () {
|
|
1123
|
-
var _this = this;
|
|
1124
|
-
return { typeName: DeliveryInfos.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DeliveryInfos.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return DeliveryInfos.fromFields(fields); }, fromFieldsWithTypes: function (item) { return DeliveryInfos.fromFieldsWithTypes(item); }, fromBcs: function (data) { return DeliveryInfos.fromBcs(data); }, bcs: DeliveryInfos.bcs, fromJSONField: function (field) { return DeliveryInfos.fromJSONField(field); }, fromJSON: function (json) { return DeliveryInfos.fromJSON(json); }, fromSuiParsedData: function (content) { return DeliveryInfos.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1125
|
-
return [2 /*return*/, DeliveryInfos.fetch(client, id)];
|
|
1126
|
-
}); }); }, new: function (fields) { return new DeliveryInfos([], fields); }, kind: "StructClassReified", };
|
|
1127
|
-
};
|
|
1128
|
-
Object.defineProperty(DeliveryInfos, "r", {
|
|
1129
|
-
get: function () { return DeliveryInfos.reified(); },
|
|
1130
|
-
enumerable: false,
|
|
1131
|
-
configurable: true
|
|
1132
|
-
});
|
|
1133
|
-
DeliveryInfos.phantom = function () { return (0, reified_1.phantom)(DeliveryInfos.reified()); };
|
|
1134
|
-
Object.defineProperty(DeliveryInfos, "p", {
|
|
1135
|
-
get: function () { return DeliveryInfos.phantom(); },
|
|
1136
|
-
enumerable: false,
|
|
1137
|
-
configurable: true
|
|
1138
|
-
});
|
|
1139
|
-
Object.defineProperty(DeliveryInfos, "bcs", {
|
|
1140
|
-
get: function () {
|
|
1141
|
-
return bcs_1.bcs.struct("DeliveryInfos", {
|
|
1142
|
-
round: bcs_1.bcs.u64(), max_size: bcs_1.bcs.u64(), total_delivery_size: bcs_1.bcs.u64(), total_bidder_bid_value: bcs_1.bcs.u64(), total_bidder_fee: bcs_1.bcs.u64(), total_incentive_bid_value: bcs_1.bcs.u64(), total_incentive_fee: bcs_1.bcs.u64(), delivery_info: bcs_1.bcs.vector(DeliveryInfo.bcs), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1143
|
-
});
|
|
1144
|
-
},
|
|
1145
|
-
enumerable: false,
|
|
1146
|
-
configurable: true
|
|
1147
|
-
});
|
|
1148
|
-
;
|
|
1149
|
-
DeliveryInfos.fromFields = function (fields) { return DeliveryInfos.reified().new({ round: (0, reified_1.decodeFromFields)("u64", fields.round), maxSize: (0, reified_1.decodeFromFields)("u64", fields.max_size), totalDeliverySize: (0, reified_1.decodeFromFields)("u64", fields.total_delivery_size), totalBidderBidValue: (0, reified_1.decodeFromFields)("u64", fields.total_bidder_bid_value), totalBidderFee: (0, reified_1.decodeFromFields)("u64", fields.total_bidder_fee), totalIncentiveBidValue: (0, reified_1.decodeFromFields)("u64", fields.total_incentive_bid_value), totalIncentiveFee: (0, reified_1.decodeFromFields)("u64", fields.total_incentive_fee), deliveryInfo: (0, reified_1.decodeFromFields)(reified.vector(DeliveryInfo.reified()), fields.delivery_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1150
|
-
DeliveryInfos.fromFieldsWithTypes = function (item) {
|
|
1151
|
-
if (!isDeliveryInfos(item.type)) {
|
|
1152
|
-
throw new Error("not a DeliveryInfos type");
|
|
1153
|
-
}
|
|
1154
|
-
return DeliveryInfos.reified().new({ round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), maxSize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.max_size), totalDeliverySize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.total_delivery_size), totalBidderBidValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.total_bidder_bid_value), totalBidderFee: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.total_bidder_fee), totalIncentiveBidValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.total_incentive_bid_value), totalIncentiveFee: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.total_incentive_fee), deliveryInfo: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(DeliveryInfo.reified()), item.fields.delivery_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1155
|
-
};
|
|
1156
|
-
DeliveryInfos.fromBcs = function (data) { return DeliveryInfos.fromFields(DeliveryInfos.bcs.parse(data)); };
|
|
1157
|
-
DeliveryInfos.prototype.toJSONField = function () {
|
|
1158
|
-
return {
|
|
1159
|
-
round: this.round.toString(), maxSize: this.maxSize.toString(), totalDeliverySize: this.totalDeliverySize.toString(), totalBidderBidValue: this.totalBidderBidValue.toString(), totalBidderFee: this.totalBidderFee.toString(), totalIncentiveBidValue: this.totalIncentiveBidValue.toString(), totalIncentiveFee: this.totalIncentiveFee.toString(), deliveryInfo: (0, reified_1.fieldToJSON)("vector<0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DeliveryInfo>", this.deliveryInfo), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1160
|
-
};
|
|
1161
|
-
};
|
|
1162
|
-
DeliveryInfos.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1163
|
-
DeliveryInfos.fromJSONField = function (field) { return DeliveryInfos.reified().new({ round: (0, reified_1.decodeFromJSONField)("u64", field.round), maxSize: (0, reified_1.decodeFromJSONField)("u64", field.maxSize), totalDeliverySize: (0, reified_1.decodeFromJSONField)("u64", field.totalDeliverySize), totalBidderBidValue: (0, reified_1.decodeFromJSONField)("u64", field.totalBidderBidValue), totalBidderFee: (0, reified_1.decodeFromJSONField)("u64", field.totalBidderFee), totalIncentiveBidValue: (0, reified_1.decodeFromJSONField)("u64", field.totalIncentiveBidValue), totalIncentiveFee: (0, reified_1.decodeFromJSONField)("u64", field.totalIncentiveFee), deliveryInfo: (0, reified_1.decodeFromJSONField)(reified.vector(DeliveryInfo.reified()), field.deliveryInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
1164
|
-
DeliveryInfos.fromJSON = function (json) {
|
|
1165
|
-
if (json.$typeName !== DeliveryInfos.$typeName) {
|
|
1166
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1167
|
-
}
|
|
1168
|
-
;
|
|
1169
|
-
return DeliveryInfos.fromJSONField(json);
|
|
1170
|
-
};
|
|
1171
|
-
DeliveryInfos.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1172
|
-
throw new Error("not an object");
|
|
1173
|
-
} if (!isDeliveryInfos(content.type)) {
|
|
1174
|
-
throw new Error("object at ".concat(content.fields.id, " is not a DeliveryInfos object"));
|
|
1175
|
-
} return DeliveryInfos.fromFieldsWithTypes(content); };
|
|
1176
|
-
DeliveryInfos.fetch = function (client, id) {
|
|
1177
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1178
|
-
var res;
|
|
1179
|
-
var _a, _b;
|
|
1180
|
-
return __generator(this, function (_c) {
|
|
1181
|
-
switch (_c.label) {
|
|
1182
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1183
|
-
case 1:
|
|
1184
|
-
res = _c.sent();
|
|
1185
|
-
if (res.error) {
|
|
1186
|
-
throw new Error("error fetching DeliveryInfos object at id ".concat(id, ": ").concat(res.error.code));
|
|
1187
|
-
}
|
|
1188
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDeliveryInfos(res.data.bcs.type)) {
|
|
1189
|
-
throw new Error("object at id ".concat(id, " is not a DeliveryInfos object"));
|
|
1190
|
-
}
|
|
1191
|
-
return [2 /*return*/, DeliveryInfos.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1192
|
-
}
|
|
1193
|
-
});
|
|
1194
|
-
});
|
|
1195
|
-
};
|
|
1196
|
-
DeliveryInfos.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DeliveryInfos";
|
|
1197
|
-
DeliveryInfos.$numTypeParams = 0;
|
|
1198
|
-
return DeliveryInfos;
|
|
1199
|
-
}());
|
|
1200
|
-
exports.DeliveryInfos = DeliveryInfos;
|
|
1201
|
-
/* ============================== DepositEvent =============================== */
|
|
1202
|
-
function isDepositEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DepositEvent"; }
|
|
1203
|
-
var DepositEvent = /** @class */ (function () {
|
|
1204
|
-
function DepositEvent(typeArgs, fields) {
|
|
1205
|
-
this.$typeName = DepositEvent.$typeName;
|
|
1206
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DepositEvent.$typeName], __read(typeArgs), false));
|
|
1207
|
-
this.$typeArgs = typeArgs;
|
|
1208
|
-
this.signer = fields.signer;
|
|
1209
|
-
;
|
|
1210
|
-
this.index = fields.index;
|
|
1211
|
-
;
|
|
1212
|
-
this.token = fields.token;
|
|
1213
|
-
;
|
|
1214
|
-
this.amount = fields.amount;
|
|
1215
|
-
;
|
|
1216
|
-
this.decimal = fields.decimal;
|
|
1217
|
-
;
|
|
1218
|
-
this.oracleInfo = fields.oracleInfo;
|
|
1219
|
-
;
|
|
1220
|
-
this.u64Padding = fields.u64Padding;
|
|
1221
|
-
}
|
|
1222
|
-
DepositEvent.reified = function () {
|
|
1223
|
-
var _this = this;
|
|
1224
|
-
return { typeName: DepositEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DepositEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return DepositEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return DepositEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return DepositEvent.fromBcs(data); }, bcs: DepositEvent.bcs, fromJSONField: function (field) { return DepositEvent.fromJSONField(field); }, fromJSON: function (json) { return DepositEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return DepositEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1225
|
-
return [2 /*return*/, DepositEvent.fetch(client, id)];
|
|
1226
|
-
}); }); }, new: function (fields) { return new DepositEvent([], fields); }, kind: "StructClassReified", };
|
|
1227
|
-
};
|
|
1228
|
-
Object.defineProperty(DepositEvent, "r", {
|
|
1229
|
-
get: function () { return DepositEvent.reified(); },
|
|
1230
|
-
enumerable: false,
|
|
1231
|
-
configurable: true
|
|
1232
|
-
});
|
|
1233
|
-
DepositEvent.phantom = function () { return (0, reified_1.phantom)(DepositEvent.reified()); };
|
|
1234
|
-
Object.defineProperty(DepositEvent, "p", {
|
|
1235
|
-
get: function () { return DepositEvent.phantom(); },
|
|
1236
|
-
enumerable: false,
|
|
1237
|
-
configurable: true
|
|
1238
|
-
});
|
|
1239
|
-
Object.defineProperty(DepositEvent, "bcs", {
|
|
1240
|
-
get: function () {
|
|
1241
|
-
return bcs_1.bcs.struct("DepositEvent", {
|
|
1242
|
-
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(), decimal: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1243
|
-
});
|
|
1244
|
-
},
|
|
1245
|
-
enumerable: false,
|
|
1246
|
-
configurable: true
|
|
1247
|
-
});
|
|
1248
|
-
;
|
|
1249
|
-
DepositEvent.fromFields = function (fields) { return DepositEvent.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), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1250
|
-
DepositEvent.fromFieldsWithTypes = function (item) {
|
|
1251
|
-
if (!isDepositEvent(item.type)) {
|
|
1252
|
-
throw new Error("not a DepositEvent type");
|
|
1253
|
-
}
|
|
1254
|
-
return DepositEvent.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), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1255
|
-
};
|
|
1256
|
-
DepositEvent.fromBcs = function (data) { return DepositEvent.fromFields(DepositEvent.bcs.parse(data)); };
|
|
1257
|
-
DepositEvent.prototype.toJSONField = function () {
|
|
1258
|
-
return {
|
|
1259
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), decimal: this.decimal.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1260
|
-
};
|
|
1261
|
-
};
|
|
1262
|
-
DepositEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1263
|
-
DepositEvent.fromJSONField = function (field) { return DepositEvent.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), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
1264
|
-
DepositEvent.fromJSON = function (json) {
|
|
1265
|
-
if (json.$typeName !== DepositEvent.$typeName) {
|
|
1266
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1267
|
-
}
|
|
1268
|
-
;
|
|
1269
|
-
return DepositEvent.fromJSONField(json);
|
|
1270
|
-
};
|
|
1271
|
-
DepositEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1272
|
-
throw new Error("not an object");
|
|
1273
|
-
} if (!isDepositEvent(content.type)) {
|
|
1274
|
-
throw new Error("object at ".concat(content.fields.id, " is not a DepositEvent object"));
|
|
1275
|
-
} return DepositEvent.fromFieldsWithTypes(content); };
|
|
1276
|
-
DepositEvent.fetch = function (client, id) {
|
|
1277
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1278
|
-
var res;
|
|
1279
|
-
var _a, _b;
|
|
1280
|
-
return __generator(this, function (_c) {
|
|
1281
|
-
switch (_c.label) {
|
|
1282
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1283
|
-
case 1:
|
|
1284
|
-
res = _c.sent();
|
|
1285
|
-
if (res.error) {
|
|
1286
|
-
throw new Error("error fetching DepositEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
1287
|
-
}
|
|
1288
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDepositEvent(res.data.bcs.type)) {
|
|
1289
|
-
throw new Error("object at id ".concat(id, " is not a DepositEvent object"));
|
|
1290
|
-
}
|
|
1291
|
-
return [2 /*return*/, DepositEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1292
|
-
}
|
|
1293
|
-
});
|
|
1294
|
-
});
|
|
1295
|
-
};
|
|
1296
|
-
DepositEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DepositEvent";
|
|
1297
|
-
DepositEvent.$numTypeParams = 0;
|
|
1298
|
-
return DepositEvent;
|
|
1299
|
-
}());
|
|
1300
|
-
exports.DepositEvent = DepositEvent;
|
|
1301
|
-
/* ============================== DepositSnapshot =============================== */
|
|
1302
|
-
function isDepositSnapshot(type) { type = (0, util_1.compressSuiType)(type); return type === "0x10250db78795fda6ce62b76efa324eb1a7dc50beeed1229fba40c50e4305ef9a::typus_dov_single::DepositSnapshot"; }
|
|
1303
|
-
var DepositSnapshot = /** @class */ (function () {
|
|
1304
|
-
function DepositSnapshot(typeArgs, fields) {
|
|
1305
|
-
this.$typeName = DepositSnapshot.$typeName;
|
|
1306
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DepositSnapshot.$typeName], __read(typeArgs), false));
|
|
1307
|
-
this.$typeArgs = typeArgs;
|
|
1308
|
-
this.snapshots = fields.snapshots;
|
|
1309
|
-
;
|
|
1310
|
-
this.totalDeposit = fields.totalDeposit;
|
|
1311
|
-
;
|
|
1312
|
-
this.snapshotTsMs = fields.snapshotTsMs;
|
|
1313
|
-
}
|
|
1314
|
-
DepositSnapshot.reified = function () {
|
|
1315
|
-
var _this = this;
|
|
1316
|
-
return { typeName: DepositSnapshot.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DepositSnapshot.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return DepositSnapshot.fromFields(fields); }, fromFieldsWithTypes: function (item) { return DepositSnapshot.fromFieldsWithTypes(item); }, fromBcs: function (data) { return DepositSnapshot.fromBcs(data); }, bcs: DepositSnapshot.bcs, fromJSONField: function (field) { return DepositSnapshot.fromJSONField(field); }, fromJSON: function (json) { return DepositSnapshot.fromJSON(json); }, fromSuiParsedData: function (content) { return DepositSnapshot.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1317
|
-
return [2 /*return*/, DepositSnapshot.fetch(client, id)];
|
|
1318
|
-
}); }); }, new: function (fields) { return new DepositSnapshot([], fields); }, kind: "StructClassReified", };
|
|
1319
|
-
};
|
|
1320
|
-
Object.defineProperty(DepositSnapshot, "r", {
|
|
1321
|
-
get: function () { return DepositSnapshot.reified(); },
|
|
1322
|
-
enumerable: false,
|
|
1323
|
-
configurable: true
|
|
1324
|
-
});
|
|
1325
|
-
DepositSnapshot.phantom = function () { return (0, reified_1.phantom)(DepositSnapshot.reified()); };
|
|
1326
|
-
Object.defineProperty(DepositSnapshot, "p", {
|
|
1327
|
-
get: function () { return DepositSnapshot.phantom(); },
|
|
1328
|
-
enumerable: false,
|
|
1329
|
-
configurable: true
|
|
1330
|
-
});
|
|
1331
|
-
Object.defineProperty(DepositSnapshot, "bcs", {
|
|
1332
|
-
get: function () {
|
|
1333
|
-
return bcs_1.bcs.struct("DepositSnapshot", {
|
|
1334
|
-
snapshots: bcs_1.bcs.vector(bcs_1.bcs.u64()), total_deposit: bcs_1.bcs.u64(), snapshot_ts_ms: bcs_1.bcs.u64()
|
|
1335
|
-
});
|
|
1336
|
-
},
|
|
1337
|
-
enumerable: false,
|
|
1338
|
-
configurable: true
|
|
1339
|
-
});
|
|
1340
|
-
;
|
|
1341
|
-
DepositSnapshot.fromFields = function (fields) { return DepositSnapshot.reified().new({ snapshots: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.snapshots), totalDeposit: (0, reified_1.decodeFromFields)("u64", fields.total_deposit), snapshotTsMs: (0, reified_1.decodeFromFields)("u64", fields.snapshot_ts_ms) }); };
|
|
1342
|
-
DepositSnapshot.fromFieldsWithTypes = function (item) {
|
|
1343
|
-
if (!isDepositSnapshot(item.type)) {
|
|
1344
|
-
throw new Error("not a DepositSnapshot type");
|
|
1345
|
-
}
|
|
1346
|
-
return DepositSnapshot.reified().new({ snapshots: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.snapshots), totalDeposit: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.total_deposit), snapshotTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.snapshot_ts_ms) });
|
|
1347
|
-
};
|
|
1348
|
-
DepositSnapshot.fromBcs = function (data) { return DepositSnapshot.fromFields(DepositSnapshot.bcs.parse(data)); };
|
|
1349
|
-
DepositSnapshot.prototype.toJSONField = function () {
|
|
1350
|
-
return {
|
|
1351
|
-
snapshots: (0, reified_1.fieldToJSON)("vector<u64>", this.snapshots), totalDeposit: this.totalDeposit.toString(), snapshotTsMs: this.snapshotTsMs.toString(),
|
|
1352
|
-
};
|
|
1353
|
-
};
|
|
1354
|
-
DepositSnapshot.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1355
|
-
DepositSnapshot.fromJSONField = function (field) { return DepositSnapshot.reified().new({ snapshots: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.snapshots), totalDeposit: (0, reified_1.decodeFromJSONField)("u64", field.totalDeposit), snapshotTsMs: (0, reified_1.decodeFromJSONField)("u64", field.snapshotTsMs) }); };
|
|
1356
|
-
DepositSnapshot.fromJSON = function (json) {
|
|
1357
|
-
if (json.$typeName !== DepositSnapshot.$typeName) {
|
|
1358
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1359
|
-
}
|
|
1360
|
-
;
|
|
1361
|
-
return DepositSnapshot.fromJSONField(json);
|
|
1362
|
-
};
|
|
1363
|
-
DepositSnapshot.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1364
|
-
throw new Error("not an object");
|
|
1365
|
-
} if (!isDepositSnapshot(content.type)) {
|
|
1366
|
-
throw new Error("object at ".concat(content.fields.id, " is not a DepositSnapshot object"));
|
|
1367
|
-
} return DepositSnapshot.fromFieldsWithTypes(content); };
|
|
1368
|
-
DepositSnapshot.fetch = function (client, id) {
|
|
1369
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1370
|
-
var res;
|
|
1371
|
-
var _a, _b;
|
|
1372
|
-
return __generator(this, function (_c) {
|
|
1373
|
-
switch (_c.label) {
|
|
1374
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1375
|
-
case 1:
|
|
1376
|
-
res = _c.sent();
|
|
1377
|
-
if (res.error) {
|
|
1378
|
-
throw new Error("error fetching DepositSnapshot object at id ".concat(id, ": ").concat(res.error.code));
|
|
1379
|
-
}
|
|
1380
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDepositSnapshot(res.data.bcs.type)) {
|
|
1381
|
-
throw new Error("object at id ".concat(id, " is not a DepositSnapshot object"));
|
|
1382
|
-
}
|
|
1383
|
-
return [2 /*return*/, DepositSnapshot.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1384
|
-
}
|
|
1385
|
-
});
|
|
1386
|
-
});
|
|
1387
|
-
};
|
|
1388
|
-
DepositSnapshot.$typeName = "0x10250db78795fda6ce62b76efa324eb1a7dc50beeed1229fba40c50e4305ef9a::typus_dov_single::DepositSnapshot";
|
|
1389
|
-
DepositSnapshot.$numTypeParams = 0;
|
|
1390
|
-
return DepositSnapshot;
|
|
1391
|
-
}());
|
|
1392
|
-
exports.DepositSnapshot = DepositSnapshot;
|
|
1393
|
-
/* ============================== DropVaultEvent =============================== */
|
|
1394
|
-
function isDropVaultEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DropVaultEvent"; }
|
|
1395
|
-
var DropVaultEvent = /** @class */ (function () {
|
|
1396
|
-
function DropVaultEvent(typeArgs, fields) {
|
|
1397
|
-
this.$typeName = DropVaultEvent.$typeName;
|
|
1398
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DropVaultEvent.$typeName], __read(typeArgs), false));
|
|
1399
|
-
this.$typeArgs = typeArgs;
|
|
1400
|
-
this.signer = fields.signer;
|
|
1401
|
-
;
|
|
1402
|
-
this.index = fields.index;
|
|
1403
|
-
;
|
|
1404
|
-
this.round = fields.round;
|
|
1405
|
-
;
|
|
1406
|
-
this.u64Padding = fields.u64Padding;
|
|
1407
|
-
}
|
|
1408
|
-
DropVaultEvent.reified = function () {
|
|
1409
|
-
var _this = this;
|
|
1410
|
-
return { typeName: DropVaultEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DropVaultEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return DropVaultEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return DropVaultEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return DropVaultEvent.fromBcs(data); }, bcs: DropVaultEvent.bcs, fromJSONField: function (field) { return DropVaultEvent.fromJSONField(field); }, fromJSON: function (json) { return DropVaultEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return DropVaultEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1411
|
-
return [2 /*return*/, DropVaultEvent.fetch(client, id)];
|
|
1412
|
-
}); }); }, new: function (fields) { return new DropVaultEvent([], fields); }, kind: "StructClassReified", };
|
|
1413
|
-
};
|
|
1414
|
-
Object.defineProperty(DropVaultEvent, "r", {
|
|
1415
|
-
get: function () { return DropVaultEvent.reified(); },
|
|
1416
|
-
enumerable: false,
|
|
1417
|
-
configurable: true
|
|
1418
|
-
});
|
|
1419
|
-
DropVaultEvent.phantom = function () { return (0, reified_1.phantom)(DropVaultEvent.reified()); };
|
|
1420
|
-
Object.defineProperty(DropVaultEvent, "p", {
|
|
1421
|
-
get: function () { return DropVaultEvent.phantom(); },
|
|
1422
|
-
enumerable: false,
|
|
1423
|
-
configurable: true
|
|
1424
|
-
});
|
|
1425
|
-
Object.defineProperty(DropVaultEvent, "bcs", {
|
|
1426
|
-
get: function () {
|
|
1427
|
-
return bcs_1.bcs.struct("DropVaultEvent", {
|
|
1428
|
-
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(), round: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1429
|
-
});
|
|
1430
|
-
},
|
|
1431
|
-
enumerable: false,
|
|
1432
|
-
configurable: true
|
|
1433
|
-
});
|
|
1434
|
-
;
|
|
1435
|
-
DropVaultEvent.fromFields = function (fields) { return DropVaultEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1436
|
-
DropVaultEvent.fromFieldsWithTypes = function (item) {
|
|
1437
|
-
if (!isDropVaultEvent(item.type)) {
|
|
1438
|
-
throw new Error("not a DropVaultEvent type");
|
|
1439
|
-
}
|
|
1440
|
-
return DropVaultEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1441
|
-
};
|
|
1442
|
-
DropVaultEvent.fromBcs = function (data) { return DropVaultEvent.fromFields(DropVaultEvent.bcs.parse(data)); };
|
|
1443
|
-
DropVaultEvent.prototype.toJSONField = function () {
|
|
1444
|
-
return {
|
|
1445
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1446
|
-
};
|
|
1447
|
-
};
|
|
1448
|
-
DropVaultEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1449
|
-
DropVaultEvent.fromJSONField = function (field) { return DropVaultEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
1450
|
-
DropVaultEvent.fromJSON = function (json) {
|
|
1451
|
-
if (json.$typeName !== DropVaultEvent.$typeName) {
|
|
1452
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1453
|
-
}
|
|
1454
|
-
;
|
|
1455
|
-
return DropVaultEvent.fromJSONField(json);
|
|
1456
|
-
};
|
|
1457
|
-
DropVaultEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1458
|
-
throw new Error("not an object");
|
|
1459
|
-
} if (!isDropVaultEvent(content.type)) {
|
|
1460
|
-
throw new Error("object at ".concat(content.fields.id, " is not a DropVaultEvent object"));
|
|
1461
|
-
} return DropVaultEvent.fromFieldsWithTypes(content); };
|
|
1462
|
-
DropVaultEvent.fetch = function (client, id) {
|
|
1463
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1464
|
-
var res;
|
|
1465
|
-
var _a, _b;
|
|
1466
|
-
return __generator(this, function (_c) {
|
|
1467
|
-
switch (_c.label) {
|
|
1468
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1469
|
-
case 1:
|
|
1470
|
-
res = _c.sent();
|
|
1471
|
-
if (res.error) {
|
|
1472
|
-
throw new Error("error fetching DropVaultEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
1473
|
-
}
|
|
1474
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDropVaultEvent(res.data.bcs.type)) {
|
|
1475
|
-
throw new Error("object at id ".concat(id, " is not a DropVaultEvent object"));
|
|
1476
|
-
}
|
|
1477
|
-
return [2 /*return*/, DropVaultEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1478
|
-
}
|
|
1479
|
-
});
|
|
1480
|
-
});
|
|
1481
|
-
};
|
|
1482
|
-
DropVaultEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::DropVaultEvent";
|
|
1483
|
-
DropVaultEvent.$numTypeParams = 0;
|
|
1484
|
-
return DropVaultEvent;
|
|
1485
|
-
}());
|
|
1486
|
-
exports.DropVaultEvent = DropVaultEvent;
|
|
1487
|
-
/* ============================== ExerciseEvent =============================== */
|
|
1488
|
-
function isExerciseEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::ExerciseEvent"; }
|
|
1489
|
-
var ExerciseEvent = /** @class */ (function () {
|
|
1490
|
-
function ExerciseEvent(typeArgs, fields) {
|
|
1491
|
-
this.$typeName = ExerciseEvent.$typeName;
|
|
1492
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ExerciseEvent.$typeName], __read(typeArgs), false));
|
|
1493
|
-
this.$typeArgs = typeArgs;
|
|
1494
|
-
this.signer = fields.signer;
|
|
1495
|
-
;
|
|
1496
|
-
this.index = fields.index;
|
|
1497
|
-
;
|
|
1498
|
-
this.token = fields.token;
|
|
1499
|
-
;
|
|
1500
|
-
this.amount = fields.amount;
|
|
1501
|
-
;
|
|
1502
|
-
this.decimal = fields.decimal;
|
|
1503
|
-
;
|
|
1504
|
-
this.incentiveToken = fields.incentiveToken;
|
|
1505
|
-
;
|
|
1506
|
-
this.incentiveAmount = fields.incentiveAmount;
|
|
1507
|
-
;
|
|
1508
|
-
this.u64Padding = fields.u64Padding;
|
|
1509
|
-
}
|
|
1510
|
-
ExerciseEvent.reified = function () {
|
|
1511
|
-
var _this = this;
|
|
1512
|
-
return { typeName: ExerciseEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ExerciseEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return ExerciseEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return ExerciseEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return ExerciseEvent.fromBcs(data); }, bcs: ExerciseEvent.bcs, fromJSONField: function (field) { return ExerciseEvent.fromJSONField(field); }, fromJSON: function (json) { return ExerciseEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return ExerciseEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1513
|
-
return [2 /*return*/, ExerciseEvent.fetch(client, id)];
|
|
1514
|
-
}); }); }, new: function (fields) { return new ExerciseEvent([], fields); }, kind: "StructClassReified", };
|
|
1515
|
-
};
|
|
1516
|
-
Object.defineProperty(ExerciseEvent, "r", {
|
|
1517
|
-
get: function () { return ExerciseEvent.reified(); },
|
|
1518
|
-
enumerable: false,
|
|
1519
|
-
configurable: true
|
|
1520
|
-
});
|
|
1521
|
-
ExerciseEvent.phantom = function () { return (0, reified_1.phantom)(ExerciseEvent.reified()); };
|
|
1522
|
-
Object.defineProperty(ExerciseEvent, "p", {
|
|
1523
|
-
get: function () { return ExerciseEvent.phantom(); },
|
|
1524
|
-
enumerable: false,
|
|
1525
|
-
configurable: true
|
|
1526
|
-
});
|
|
1527
|
-
Object.defineProperty(ExerciseEvent, "bcs", {
|
|
1528
|
-
get: function () {
|
|
1529
|
-
return bcs_1.bcs.struct("ExerciseEvent", {
|
|
1530
|
-
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(), decimal: bcs_1.bcs.u64(), incentive_token: structs_1.Option.bcs(structs_3.TypeName.bcs), incentive_amount: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1531
|
-
});
|
|
1532
|
-
},
|
|
1533
|
-
enumerable: false,
|
|
1534
|
-
configurable: true
|
|
1535
|
-
});
|
|
1536
|
-
;
|
|
1537
|
-
ExerciseEvent.fromFields = function (fields) { return ExerciseEvent.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), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), incentiveToken: (0, reified_1.decodeFromFields)(structs_1.Option.reified(structs_3.TypeName.reified()), fields.incentive_token), incentiveAmount: (0, reified_1.decodeFromFields)("u64", fields.incentive_amount), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1538
|
-
ExerciseEvent.fromFieldsWithTypes = function (item) {
|
|
1539
|
-
if (!isExerciseEvent(item.type)) {
|
|
1540
|
-
throw new Error("not a ExerciseEvent type");
|
|
1541
|
-
}
|
|
1542
|
-
return ExerciseEvent.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), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), incentiveToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(structs_3.TypeName.reified()), item.fields.incentive_token), incentiveAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_amount), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1543
|
-
};
|
|
1544
|
-
ExerciseEvent.fromBcs = function (data) { return ExerciseEvent.fromFields(ExerciseEvent.bcs.parse(data)); };
|
|
1545
|
-
ExerciseEvent.prototype.toJSONField = function () {
|
|
1546
|
-
return {
|
|
1547
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), decimal: this.decimal.toString(), incentiveToken: (0, reified_1.fieldToJSON)("0x1::option::Option<0x1::type_name::TypeName>", this.incentiveToken), incentiveAmount: this.incentiveAmount.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1548
|
-
};
|
|
1549
|
-
};
|
|
1550
|
-
ExerciseEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1551
|
-
ExerciseEvent.fromJSONField = function (field) { return ExerciseEvent.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), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), incentiveToken: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(structs_3.TypeName.reified()), field.incentiveToken), incentiveAmount: (0, reified_1.decodeFromJSONField)("u64", field.incentiveAmount), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
1552
|
-
ExerciseEvent.fromJSON = function (json) {
|
|
1553
|
-
if (json.$typeName !== ExerciseEvent.$typeName) {
|
|
1554
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1555
|
-
}
|
|
1556
|
-
;
|
|
1557
|
-
return ExerciseEvent.fromJSONField(json);
|
|
1558
|
-
};
|
|
1559
|
-
ExerciseEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1560
|
-
throw new Error("not an object");
|
|
1561
|
-
} if (!isExerciseEvent(content.type)) {
|
|
1562
|
-
throw new Error("object at ".concat(content.fields.id, " is not a ExerciseEvent object"));
|
|
1563
|
-
} return ExerciseEvent.fromFieldsWithTypes(content); };
|
|
1564
|
-
ExerciseEvent.fetch = function (client, id) {
|
|
1565
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1566
|
-
var res;
|
|
1567
|
-
var _a, _b;
|
|
1568
|
-
return __generator(this, function (_c) {
|
|
1569
|
-
switch (_c.label) {
|
|
1570
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1571
|
-
case 1:
|
|
1572
|
-
res = _c.sent();
|
|
1573
|
-
if (res.error) {
|
|
1574
|
-
throw new Error("error fetching ExerciseEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
1575
|
-
}
|
|
1576
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isExerciseEvent(res.data.bcs.type)) {
|
|
1577
|
-
throw new Error("object at id ".concat(id, " is not a ExerciseEvent object"));
|
|
1578
|
-
}
|
|
1579
|
-
return [2 /*return*/, ExerciseEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1580
|
-
}
|
|
1581
|
-
});
|
|
1582
|
-
});
|
|
1583
|
-
};
|
|
1584
|
-
ExerciseEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::ExerciseEvent";
|
|
1585
|
-
ExerciseEvent.$numTypeParams = 0;
|
|
1586
|
-
return ExerciseEvent;
|
|
1587
|
-
}());
|
|
1588
|
-
exports.ExerciseEvent = ExerciseEvent;
|
|
1589
|
-
/* ============================== HarvestEvent =============================== */
|
|
1590
|
-
function isHarvestEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::HarvestEvent"; }
|
|
1591
|
-
var HarvestEvent = /** @class */ (function () {
|
|
1592
|
-
function HarvestEvent(typeArgs, fields) {
|
|
1593
|
-
this.$typeName = HarvestEvent.$typeName;
|
|
1594
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([HarvestEvent.$typeName], __read(typeArgs), false));
|
|
1595
|
-
this.$typeArgs = typeArgs;
|
|
1596
|
-
this.signer = fields.signer;
|
|
1597
|
-
;
|
|
1598
|
-
this.index = fields.index;
|
|
1599
|
-
;
|
|
1600
|
-
this.token = fields.token;
|
|
1601
|
-
;
|
|
1602
|
-
this.amount = fields.amount;
|
|
1603
|
-
;
|
|
1604
|
-
this.feeAmount = fields.feeAmount;
|
|
1605
|
-
;
|
|
1606
|
-
this.decimal = fields.decimal;
|
|
1607
|
-
;
|
|
1608
|
-
this.oracleInfo = fields.oracleInfo;
|
|
1609
|
-
;
|
|
1610
|
-
this.u64Padding = fields.u64Padding;
|
|
1611
|
-
}
|
|
1612
|
-
HarvestEvent.reified = function () {
|
|
1613
|
-
var _this = this;
|
|
1614
|
-
return { typeName: HarvestEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([HarvestEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return HarvestEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return HarvestEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return HarvestEvent.fromBcs(data); }, bcs: HarvestEvent.bcs, fromJSONField: function (field) { return HarvestEvent.fromJSONField(field); }, fromJSON: function (json) { return HarvestEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return HarvestEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1615
|
-
return [2 /*return*/, HarvestEvent.fetch(client, id)];
|
|
1616
|
-
}); }); }, new: function (fields) { return new HarvestEvent([], fields); }, kind: "StructClassReified", };
|
|
1617
|
-
};
|
|
1618
|
-
Object.defineProperty(HarvestEvent, "r", {
|
|
1619
|
-
get: function () { return HarvestEvent.reified(); },
|
|
1620
|
-
enumerable: false,
|
|
1621
|
-
configurable: true
|
|
1622
|
-
});
|
|
1623
|
-
HarvestEvent.phantom = function () { return (0, reified_1.phantom)(HarvestEvent.reified()); };
|
|
1624
|
-
Object.defineProperty(HarvestEvent, "p", {
|
|
1625
|
-
get: function () { return HarvestEvent.phantom(); },
|
|
1626
|
-
enumerable: false,
|
|
1627
|
-
configurable: true
|
|
1628
|
-
});
|
|
1629
|
-
Object.defineProperty(HarvestEvent, "bcs", {
|
|
1630
|
-
get: function () {
|
|
1631
|
-
return bcs_1.bcs.struct("HarvestEvent", {
|
|
1632
|
-
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(), decimal: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1633
|
-
});
|
|
1634
|
-
},
|
|
1635
|
-
enumerable: false,
|
|
1636
|
-
configurable: true
|
|
1637
|
-
});
|
|
1638
|
-
;
|
|
1639
|
-
HarvestEvent.fromFields = function (fields) { return HarvestEvent.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), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1640
|
-
HarvestEvent.fromFieldsWithTypes = function (item) {
|
|
1641
|
-
if (!isHarvestEvent(item.type)) {
|
|
1642
|
-
throw new Error("not a HarvestEvent type");
|
|
1643
|
-
}
|
|
1644
|
-
return HarvestEvent.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), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1645
|
-
};
|
|
1646
|
-
HarvestEvent.fromBcs = function (data) { return HarvestEvent.fromFields(HarvestEvent.bcs.parse(data)); };
|
|
1647
|
-
HarvestEvent.prototype.toJSONField = function () {
|
|
1648
|
-
return {
|
|
1649
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), feeAmount: this.feeAmount.toString(), decimal: this.decimal.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1650
|
-
};
|
|
1651
|
-
};
|
|
1652
|
-
HarvestEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1653
|
-
HarvestEvent.fromJSONField = function (field) { return HarvestEvent.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), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
1654
|
-
HarvestEvent.fromJSON = function (json) {
|
|
1655
|
-
if (json.$typeName !== HarvestEvent.$typeName) {
|
|
1656
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1657
|
-
}
|
|
1658
|
-
;
|
|
1659
|
-
return HarvestEvent.fromJSONField(json);
|
|
1660
|
-
};
|
|
1661
|
-
HarvestEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1662
|
-
throw new Error("not an object");
|
|
1663
|
-
} if (!isHarvestEvent(content.type)) {
|
|
1664
|
-
throw new Error("object at ".concat(content.fields.id, " is not a HarvestEvent object"));
|
|
1665
|
-
} return HarvestEvent.fromFieldsWithTypes(content); };
|
|
1666
|
-
HarvestEvent.fetch = function (client, id) {
|
|
1667
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1668
|
-
var res;
|
|
1669
|
-
var _a, _b;
|
|
1670
|
-
return __generator(this, function (_c) {
|
|
1671
|
-
switch (_c.label) {
|
|
1672
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1673
|
-
case 1:
|
|
1674
|
-
res = _c.sent();
|
|
1675
|
-
if (res.error) {
|
|
1676
|
-
throw new Error("error fetching HarvestEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
1677
|
-
}
|
|
1678
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isHarvestEvent(res.data.bcs.type)) {
|
|
1679
|
-
throw new Error("object at id ".concat(id, " is not a HarvestEvent object"));
|
|
1680
|
-
}
|
|
1681
|
-
return [2 /*return*/, HarvestEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1682
|
-
}
|
|
1683
|
-
});
|
|
1684
|
-
});
|
|
1685
|
-
};
|
|
1686
|
-
HarvestEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::HarvestEvent";
|
|
1687
|
-
HarvestEvent.$numTypeParams = 0;
|
|
1688
|
-
return HarvestEvent;
|
|
1689
|
-
}());
|
|
1690
|
-
exports.HarvestEvent = HarvestEvent;
|
|
1691
|
-
/* ============================== Info =============================== */
|
|
1692
|
-
function isInfo(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::Info"; }
|
|
1693
|
-
var Info = /** @class */ (function () {
|
|
1694
|
-
function Info(typeArgs, fields) {
|
|
1695
|
-
this.$typeName = Info.$typeName;
|
|
1696
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Info.$typeName], __read(typeArgs), false));
|
|
1697
|
-
this.$typeArgs = typeArgs;
|
|
1698
|
-
this.index = fields.index;
|
|
1699
|
-
;
|
|
1700
|
-
this.optionType = fields.optionType;
|
|
1701
|
-
;
|
|
1702
|
-
this.period = fields.period;
|
|
1703
|
-
;
|
|
1704
|
-
this.activationTsMs = fields.activationTsMs;
|
|
1705
|
-
;
|
|
1706
|
-
this.expirationTsMs = fields.expirationTsMs;
|
|
1707
|
-
;
|
|
1708
|
-
this.depositToken = fields.depositToken;
|
|
1709
|
-
;
|
|
1710
|
-
this.bidToken = fields.bidToken;
|
|
1711
|
-
;
|
|
1712
|
-
this.settlementBase = fields.settlementBase;
|
|
1713
|
-
;
|
|
1714
|
-
this.settlementQuote = fields.settlementQuote;
|
|
1715
|
-
;
|
|
1716
|
-
this.settlementBaseName = fields.settlementBaseName;
|
|
1717
|
-
;
|
|
1718
|
-
this.settlementQuoteName = fields.settlementQuoteName;
|
|
1719
|
-
;
|
|
1720
|
-
this.dTokenDecimal = fields.dTokenDecimal;
|
|
1721
|
-
;
|
|
1722
|
-
this.bTokenDecimal = fields.bTokenDecimal;
|
|
1723
|
-
;
|
|
1724
|
-
this.oTokenDecimal = fields.oTokenDecimal;
|
|
1725
|
-
;
|
|
1726
|
-
this.creator = fields.creator;
|
|
1727
|
-
;
|
|
1728
|
-
this.createTsMs = fields.createTsMs;
|
|
1729
|
-
;
|
|
1730
|
-
this.round = fields.round;
|
|
1731
|
-
;
|
|
1732
|
-
this.status = fields.status;
|
|
1733
|
-
;
|
|
1734
|
-
this.oracleInfo = fields.oracleInfo;
|
|
1735
|
-
;
|
|
1736
|
-
this.deliveryInfos = fields.deliveryInfos;
|
|
1737
|
-
;
|
|
1738
|
-
this.settlementInfo = fields.settlementInfo;
|
|
1739
|
-
;
|
|
1740
|
-
this.u64Padding = fields.u64Padding;
|
|
1741
|
-
;
|
|
1742
|
-
this.bcsPadding = fields.bcsPadding;
|
|
1743
|
-
}
|
|
1744
|
-
Info.reified = function () {
|
|
1745
|
-
var _this = this;
|
|
1746
|
-
return { typeName: Info.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Info.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return Info.fromFields(fields); }, fromFieldsWithTypes: function (item) { return Info.fromFieldsWithTypes(item); }, fromBcs: function (data) { return Info.fromBcs(data); }, bcs: Info.bcs, fromJSONField: function (field) { return Info.fromJSONField(field); }, fromJSON: function (json) { return Info.fromJSON(json); }, fromSuiParsedData: function (content) { return Info.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1747
|
-
return [2 /*return*/, Info.fetch(client, id)];
|
|
1748
|
-
}); }); }, new: function (fields) { return new Info([], fields); }, kind: "StructClassReified", };
|
|
1749
|
-
};
|
|
1750
|
-
Object.defineProperty(Info, "r", {
|
|
1751
|
-
get: function () { return Info.reified(); },
|
|
1752
|
-
enumerable: false,
|
|
1753
|
-
configurable: true
|
|
1754
|
-
});
|
|
1755
|
-
Info.phantom = function () { return (0, reified_1.phantom)(Info.reified()); };
|
|
1756
|
-
Object.defineProperty(Info, "p", {
|
|
1757
|
-
get: function () { return Info.phantom(); },
|
|
1758
|
-
enumerable: false,
|
|
1759
|
-
configurable: true
|
|
1760
|
-
});
|
|
1761
|
-
Object.defineProperty(Info, "bcs", {
|
|
1762
|
-
get: function () {
|
|
1763
|
-
return bcs_1.bcs.struct("Info", {
|
|
1764
|
-
index: bcs_1.bcs.u64(), option_type: bcs_1.bcs.u64(), period: bcs_1.bcs.u8(), activation_ts_ms: bcs_1.bcs.u64(), expiration_ts_ms: bcs_1.bcs.u64(), deposit_token: structs_3.TypeName.bcs, bid_token: structs_3.TypeName.bcs, settlement_base: structs_3.TypeName.bcs, settlement_quote: structs_3.TypeName.bcs, settlement_base_name: structs_2.String.bcs, settlement_quote_name: structs_2.String.bcs, d_token_decimal: bcs_1.bcs.u64(), b_token_decimal: bcs_1.bcs.u64(), o_token_decimal: bcs_1.bcs.u64(), creator: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), create_ts_ms: bcs_1.bcs.u64(), round: bcs_1.bcs.u64(), status: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, delivery_infos: DeliveryInfos.bcs, settlement_info: structs_1.Option.bcs(SettlementInfo.bcs), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()), bcs_padding: bcs_1.bcs.vector(bcs_1.bcs.u8())
|
|
1765
|
-
});
|
|
1766
|
-
},
|
|
1767
|
-
enumerable: false,
|
|
1768
|
-
configurable: true
|
|
1769
|
-
});
|
|
1770
|
-
;
|
|
1771
|
-
Info.fromFields = function (fields) { return Info.reified().new({ index: (0, reified_1.decodeFromFields)("u64", fields.index), optionType: (0, reified_1.decodeFromFields)("u64", fields.option_type), period: (0, reified_1.decodeFromFields)("u8", fields.period), activationTsMs: (0, reified_1.decodeFromFields)("u64", fields.activation_ts_ms), expirationTsMs: (0, reified_1.decodeFromFields)("u64", fields.expiration_ts_ms), depositToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.deposit_token), bidToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.bid_token), settlementBase: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.settlement_base), settlementQuote: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.settlement_quote), settlementBaseName: (0, reified_1.decodeFromFields)(structs_2.String.reified(), fields.settlement_base_name), settlementQuoteName: (0, reified_1.decodeFromFields)(structs_2.String.reified(), fields.settlement_quote_name), dTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.d_token_decimal), bTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.b_token_decimal), oTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.o_token_decimal), creator: (0, reified_1.decodeFromFields)("address", fields.creator), createTsMs: (0, reified_1.decodeFromFields)("u64", fields.create_ts_ms), round: (0, reified_1.decodeFromFields)("u64", fields.round), status: (0, reified_1.decodeFromFields)("u64", fields.status), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), deliveryInfos: (0, reified_1.decodeFromFields)(DeliveryInfos.reified(), fields.delivery_infos), settlementInfo: (0, reified_1.decodeFromFields)(structs_1.Option.reified(SettlementInfo.reified()), fields.settlement_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFields)(reified.vector("u8"), fields.bcs_padding) }); };
|
|
1772
|
-
Info.fromFieldsWithTypes = function (item) {
|
|
1773
|
-
if (!isInfo(item.type)) {
|
|
1774
|
-
throw new Error("not a Info type");
|
|
1775
|
-
}
|
|
1776
|
-
return Info.reified().new({ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), optionType: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.option_type), period: (0, reified_1.decodeFromFieldsWithTypes)("u8", item.fields.period), activationTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.activation_ts_ms), expirationTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.expiration_ts_ms), 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), settlementBase: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.settlement_base), settlementQuote: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.settlement_quote), settlementBaseName: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.String.reified(), item.fields.settlement_base_name), settlementQuoteName: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.String.reified(), item.fields.settlement_quote_name), dTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.d_token_decimal), bTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.b_token_decimal), oTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.o_token_decimal), creator: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.creator), createTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.create_ts_ms), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), status: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.status), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), deliveryInfos: (0, reified_1.decodeFromFieldsWithTypes)(DeliveryInfos.reified(), item.fields.delivery_infos), settlementInfo: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified(SettlementInfo.reified()), item.fields.settlement_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding), bcsPadding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u8"), item.fields.bcs_padding) });
|
|
1777
|
-
};
|
|
1778
|
-
Info.fromBcs = function (data) { return Info.fromFields(Info.bcs.parse(data)); };
|
|
1779
|
-
Info.prototype.toJSONField = function () {
|
|
1780
|
-
return {
|
|
1781
|
-
index: this.index.toString(), optionType: this.optionType.toString(), period: this.period, activationTsMs: this.activationTsMs.toString(), expirationTsMs: this.expirationTsMs.toString(), depositToken: this.depositToken.toJSONField(), bidToken: this.bidToken.toJSONField(), settlementBase: this.settlementBase.toJSONField(), settlementQuote: this.settlementQuote.toJSONField(), settlementBaseName: this.settlementBaseName, settlementQuoteName: this.settlementQuoteName, dTokenDecimal: this.dTokenDecimal.toString(), bTokenDecimal: this.bTokenDecimal.toString(), oTokenDecimal: this.oTokenDecimal.toString(), creator: this.creator, createTsMs: this.createTsMs.toString(), round: this.round.toString(), status: this.status.toString(), oracleInfo: this.oracleInfo.toJSONField(), deliveryInfos: this.deliveryInfos.toJSONField(), settlementInfo: (0, reified_1.fieldToJSON)("0x1::option::Option<0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::SettlementInfo>", this.settlementInfo), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding), bcsPadding: (0, reified_1.fieldToJSON)("vector<u8>", this.bcsPadding),
|
|
1782
|
-
};
|
|
1783
|
-
};
|
|
1784
|
-
Info.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1785
|
-
Info.fromJSONField = function (field) { return Info.reified().new({ index: (0, reified_1.decodeFromJSONField)("u64", field.index), optionType: (0, reified_1.decodeFromJSONField)("u64", field.optionType), period: (0, reified_1.decodeFromJSONField)("u8", field.period), activationTsMs: (0, reified_1.decodeFromJSONField)("u64", field.activationTsMs), expirationTsMs: (0, reified_1.decodeFromJSONField)("u64", field.expirationTsMs), depositToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.depositToken), bidToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bidToken), settlementBase: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.settlementBase), settlementQuote: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.settlementQuote), settlementBaseName: (0, reified_1.decodeFromJSONField)(structs_2.String.reified(), field.settlementBaseName), settlementQuoteName: (0, reified_1.decodeFromJSONField)(structs_2.String.reified(), field.settlementQuoteName), dTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.dTokenDecimal), bTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.bTokenDecimal), oTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.oTokenDecimal), creator: (0, reified_1.decodeFromJSONField)("address", field.creator), createTsMs: (0, reified_1.decodeFromJSONField)("u64", field.createTsMs), round: (0, reified_1.decodeFromJSONField)("u64", field.round), status: (0, reified_1.decodeFromJSONField)("u64", field.status), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), deliveryInfos: (0, reified_1.decodeFromJSONField)(DeliveryInfos.reified(), field.deliveryInfos), settlementInfo: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified(SettlementInfo.reified()), field.settlementInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding), bcsPadding: (0, reified_1.decodeFromJSONField)(reified.vector("u8"), field.bcsPadding) }); };
|
|
1786
|
-
Info.fromJSON = function (json) {
|
|
1787
|
-
if (json.$typeName !== Info.$typeName) {
|
|
1788
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1789
|
-
}
|
|
1790
|
-
;
|
|
1791
|
-
return Info.fromJSONField(json);
|
|
1792
|
-
};
|
|
1793
|
-
Info.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1794
|
-
throw new Error("not an object");
|
|
1795
|
-
} if (!isInfo(content.type)) {
|
|
1796
|
-
throw new Error("object at ".concat(content.fields.id, " is not a Info object"));
|
|
1797
|
-
} return Info.fromFieldsWithTypes(content); };
|
|
1798
|
-
Info.fetch = function (client, id) {
|
|
1799
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1800
|
-
var res;
|
|
1801
|
-
var _a, _b;
|
|
1802
|
-
return __generator(this, function (_c) {
|
|
1803
|
-
switch (_c.label) {
|
|
1804
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1805
|
-
case 1:
|
|
1806
|
-
res = _c.sent();
|
|
1807
|
-
if (res.error) {
|
|
1808
|
-
throw new Error("error fetching Info object at id ".concat(id, ": ").concat(res.error.code));
|
|
1809
|
-
}
|
|
1810
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isInfo(res.data.bcs.type)) {
|
|
1811
|
-
throw new Error("object at id ".concat(id, " is not a Info object"));
|
|
1812
|
-
}
|
|
1813
|
-
return [2 /*return*/, Info.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1814
|
-
}
|
|
1815
|
-
});
|
|
1816
|
-
});
|
|
1817
|
-
};
|
|
1818
|
-
Info.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::Info";
|
|
1819
|
-
Info.$numTypeParams = 0;
|
|
1820
|
-
return Info;
|
|
1821
|
-
}());
|
|
1822
|
-
exports.Info = Info;
|
|
1823
|
-
/* ============================== NewAuctionEvent =============================== */
|
|
1824
|
-
function isNewAuctionEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::NewAuctionEvent"; }
|
|
1825
|
-
var NewAuctionEvent = /** @class */ (function () {
|
|
1826
|
-
function NewAuctionEvent(typeArgs, fields) {
|
|
1827
|
-
this.$typeName = NewAuctionEvent.$typeName;
|
|
1828
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([NewAuctionEvent.$typeName], __read(typeArgs), false));
|
|
1829
|
-
this.$typeArgs = typeArgs;
|
|
1830
|
-
this.signer = fields.signer;
|
|
1831
|
-
;
|
|
1832
|
-
this.index = fields.index;
|
|
1833
|
-
;
|
|
1834
|
-
this.round = fields.round;
|
|
1835
|
-
;
|
|
1836
|
-
this.startTsMs = fields.startTsMs;
|
|
1837
|
-
;
|
|
1838
|
-
this.endTsMs = fields.endTsMs;
|
|
1839
|
-
;
|
|
1840
|
-
this.size = fields.size;
|
|
1841
|
-
;
|
|
1842
|
-
this.vaultConfig = fields.vaultConfig;
|
|
1843
|
-
;
|
|
1844
|
-
this.oracleInfo = fields.oracleInfo;
|
|
1845
|
-
;
|
|
1846
|
-
this.u64Padding = fields.u64Padding;
|
|
1847
|
-
}
|
|
1848
|
-
NewAuctionEvent.reified = function () {
|
|
1849
|
-
var _this = this;
|
|
1850
|
-
return { typeName: NewAuctionEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([NewAuctionEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return NewAuctionEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return NewAuctionEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return NewAuctionEvent.fromBcs(data); }, bcs: NewAuctionEvent.bcs, fromJSONField: function (field) { return NewAuctionEvent.fromJSONField(field); }, fromJSON: function (json) { return NewAuctionEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return NewAuctionEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1851
|
-
return [2 /*return*/, NewAuctionEvent.fetch(client, id)];
|
|
1852
|
-
}); }); }, new: function (fields) { return new NewAuctionEvent([], fields); }, kind: "StructClassReified", };
|
|
1853
|
-
};
|
|
1854
|
-
Object.defineProperty(NewAuctionEvent, "r", {
|
|
1855
|
-
get: function () { return NewAuctionEvent.reified(); },
|
|
1856
|
-
enumerable: false,
|
|
1857
|
-
configurable: true
|
|
1858
|
-
});
|
|
1859
|
-
NewAuctionEvent.phantom = function () { return (0, reified_1.phantom)(NewAuctionEvent.reified()); };
|
|
1860
|
-
Object.defineProperty(NewAuctionEvent, "p", {
|
|
1861
|
-
get: function () { return NewAuctionEvent.phantom(); },
|
|
1862
|
-
enumerable: false,
|
|
1863
|
-
configurable: true
|
|
1864
|
-
});
|
|
1865
|
-
Object.defineProperty(NewAuctionEvent, "bcs", {
|
|
1866
|
-
get: function () {
|
|
1867
|
-
return bcs_1.bcs.struct("NewAuctionEvent", {
|
|
1868
|
-
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(), round: bcs_1.bcs.u64(), start_ts_ms: bcs_1.bcs.u64(), end_ts_ms: bcs_1.bcs.u64(), size: bcs_1.bcs.u64(), vault_config: VaultConfig.bcs, oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1869
|
-
});
|
|
1870
|
-
},
|
|
1871
|
-
enumerable: false,
|
|
1872
|
-
configurable: true
|
|
1873
|
-
});
|
|
1874
|
-
;
|
|
1875
|
-
NewAuctionEvent.fromFields = function (fields) { return NewAuctionEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), startTsMs: (0, reified_1.decodeFromFields)("u64", fields.start_ts_ms), endTsMs: (0, reified_1.decodeFromFields)("u64", fields.end_ts_ms), size: (0, reified_1.decodeFromFields)("u64", fields.size), vaultConfig: (0, reified_1.decodeFromFields)(VaultConfig.reified(), fields.vault_config), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1876
|
-
NewAuctionEvent.fromFieldsWithTypes = function (item) {
|
|
1877
|
-
if (!isNewAuctionEvent(item.type)) {
|
|
1878
|
-
throw new Error("not a NewAuctionEvent type");
|
|
1879
|
-
}
|
|
1880
|
-
return NewAuctionEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), startTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.start_ts_ms), endTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.end_ts_ms), size: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.size), vaultConfig: (0, reified_1.decodeFromFieldsWithTypes)(VaultConfig.reified(), item.fields.vault_config), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1881
|
-
};
|
|
1882
|
-
NewAuctionEvent.fromBcs = function (data) { return NewAuctionEvent.fromFields(NewAuctionEvent.bcs.parse(data)); };
|
|
1883
|
-
NewAuctionEvent.prototype.toJSONField = function () {
|
|
1884
|
-
return {
|
|
1885
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), startTsMs: this.startTsMs.toString(), endTsMs: this.endTsMs.toString(), size: this.size.toString(), vaultConfig: this.vaultConfig.toJSONField(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1886
|
-
};
|
|
1887
|
-
};
|
|
1888
|
-
NewAuctionEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
1889
|
-
NewAuctionEvent.fromJSONField = function (field) { return NewAuctionEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), startTsMs: (0, reified_1.decodeFromJSONField)("u64", field.startTsMs), endTsMs: (0, reified_1.decodeFromJSONField)("u64", field.endTsMs), size: (0, reified_1.decodeFromJSONField)("u64", field.size), vaultConfig: (0, reified_1.decodeFromJSONField)(VaultConfig.reified(), field.vaultConfig), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
1890
|
-
NewAuctionEvent.fromJSON = function (json) {
|
|
1891
|
-
if (json.$typeName !== NewAuctionEvent.$typeName) {
|
|
1892
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
1893
|
-
}
|
|
1894
|
-
;
|
|
1895
|
-
return NewAuctionEvent.fromJSONField(json);
|
|
1896
|
-
};
|
|
1897
|
-
NewAuctionEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
1898
|
-
throw new Error("not an object");
|
|
1899
|
-
} if (!isNewAuctionEvent(content.type)) {
|
|
1900
|
-
throw new Error("object at ".concat(content.fields.id, " is not a NewAuctionEvent object"));
|
|
1901
|
-
} return NewAuctionEvent.fromFieldsWithTypes(content); };
|
|
1902
|
-
NewAuctionEvent.fetch = function (client, id) {
|
|
1903
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1904
|
-
var res;
|
|
1905
|
-
var _a, _b;
|
|
1906
|
-
return __generator(this, function (_c) {
|
|
1907
|
-
switch (_c.label) {
|
|
1908
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
1909
|
-
case 1:
|
|
1910
|
-
res = _c.sent();
|
|
1911
|
-
if (res.error) {
|
|
1912
|
-
throw new Error("error fetching NewAuctionEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
1913
|
-
}
|
|
1914
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isNewAuctionEvent(res.data.bcs.type)) {
|
|
1915
|
-
throw new Error("object at id ".concat(id, " is not a NewAuctionEvent object"));
|
|
1916
|
-
}
|
|
1917
|
-
return [2 /*return*/, NewAuctionEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
1918
|
-
}
|
|
1919
|
-
});
|
|
1920
|
-
});
|
|
1921
|
-
};
|
|
1922
|
-
NewAuctionEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::NewAuctionEvent";
|
|
1923
|
-
NewAuctionEvent.$numTypeParams = 0;
|
|
1924
|
-
return NewAuctionEvent;
|
|
1925
|
-
}());
|
|
1926
|
-
exports.NewAuctionEvent = NewAuctionEvent;
|
|
1927
|
-
/* ============================== NewBidEvent =============================== */
|
|
1928
|
-
function isNewBidEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::NewBidEvent"; }
|
|
1929
|
-
var NewBidEvent = /** @class */ (function () {
|
|
1930
|
-
function NewBidEvent(typeArgs, fields) {
|
|
1931
|
-
this.$typeName = NewBidEvent.$typeName;
|
|
1932
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([NewBidEvent.$typeName], __read(typeArgs), false));
|
|
1933
|
-
this.$typeArgs = typeArgs;
|
|
1934
|
-
this.signer = fields.signer;
|
|
1935
|
-
;
|
|
1936
|
-
this.index = fields.index;
|
|
1937
|
-
;
|
|
1938
|
-
this.bidIndex = fields.bidIndex;
|
|
1939
|
-
;
|
|
1940
|
-
this.price = fields.price;
|
|
1941
|
-
;
|
|
1942
|
-
this.size = fields.size;
|
|
1943
|
-
;
|
|
1944
|
-
this.bToken = fields.bToken;
|
|
1945
|
-
;
|
|
1946
|
-
this.oToken = fields.oToken;
|
|
1947
|
-
;
|
|
1948
|
-
this.bidderBalance = fields.bidderBalance;
|
|
1949
|
-
;
|
|
1950
|
-
this.incentiveBalance = fields.incentiveBalance;
|
|
1951
|
-
;
|
|
1952
|
-
this.decimal = fields.decimal;
|
|
1953
|
-
;
|
|
1954
|
-
this.tsMs = fields.tsMs;
|
|
1955
|
-
;
|
|
1956
|
-
this.oracleInfo = fields.oracleInfo;
|
|
1957
|
-
;
|
|
1958
|
-
this.u64Padding = fields.u64Padding;
|
|
1959
|
-
}
|
|
1960
|
-
NewBidEvent.reified = function () {
|
|
1961
|
-
var _this = this;
|
|
1962
|
-
return { typeName: NewBidEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([NewBidEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return NewBidEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return NewBidEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return NewBidEvent.fromBcs(data); }, bcs: NewBidEvent.bcs, fromJSONField: function (field) { return NewBidEvent.fromJSONField(field); }, fromJSON: function (json) { return NewBidEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return NewBidEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1963
|
-
return [2 /*return*/, NewBidEvent.fetch(client, id)];
|
|
1964
|
-
}); }); }, new: function (fields) { return new NewBidEvent([], fields); }, kind: "StructClassReified", };
|
|
1965
|
-
};
|
|
1966
|
-
Object.defineProperty(NewBidEvent, "r", {
|
|
1967
|
-
get: function () { return NewBidEvent.reified(); },
|
|
1968
|
-
enumerable: false,
|
|
1969
|
-
configurable: true
|
|
1970
|
-
});
|
|
1971
|
-
NewBidEvent.phantom = function () { return (0, reified_1.phantom)(NewBidEvent.reified()); };
|
|
1972
|
-
Object.defineProperty(NewBidEvent, "p", {
|
|
1973
|
-
get: function () { return NewBidEvent.phantom(); },
|
|
1974
|
-
enumerable: false,
|
|
1975
|
-
configurable: true
|
|
1976
|
-
});
|
|
1977
|
-
Object.defineProperty(NewBidEvent, "bcs", {
|
|
1978
|
-
get: function () {
|
|
1979
|
-
return bcs_1.bcs.struct("NewBidEvent", {
|
|
1980
|
-
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_index: bcs_1.bcs.u64(), price: bcs_1.bcs.u64(), size: bcs_1.bcs.u64(), b_token: structs_3.TypeName.bcs, o_token: structs_3.TypeName.bcs, bidder_balance: bcs_1.bcs.u64(), incentive_balance: bcs_1.bcs.u64(), decimal: bcs_1.bcs.u64(), ts_ms: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
1981
|
-
});
|
|
1982
|
-
},
|
|
1983
|
-
enumerable: false,
|
|
1984
|
-
configurable: true
|
|
1985
|
-
});
|
|
1986
|
-
;
|
|
1987
|
-
NewBidEvent.fromFields = function (fields) { return NewBidEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), bidIndex: (0, reified_1.decodeFromFields)("u64", fields.bid_index), price: (0, reified_1.decodeFromFields)("u64", fields.price), size: (0, reified_1.decodeFromFields)("u64", fields.size), bToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.b_token), oToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.o_token), bidderBalance: (0, reified_1.decodeFromFields)("u64", fields.bidder_balance), incentiveBalance: (0, reified_1.decodeFromFields)("u64", fields.incentive_balance), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), tsMs: (0, reified_1.decodeFromFields)("u64", fields.ts_ms), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
1988
|
-
NewBidEvent.fromFieldsWithTypes = function (item) {
|
|
1989
|
-
if (!isNewBidEvent(item.type)) {
|
|
1990
|
-
throw new Error("not a NewBidEvent type");
|
|
1991
|
-
}
|
|
1992
|
-
return NewBidEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), bidIndex: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bid_index), price: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.price), size: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.size), bToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.b_token), oToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.o_token), bidderBalance: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bidder_balance), incentiveBalance: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_balance), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), tsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.ts_ms), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
1993
|
-
};
|
|
1994
|
-
NewBidEvent.fromBcs = function (data) { return NewBidEvent.fromFields(NewBidEvent.bcs.parse(data)); };
|
|
1995
|
-
NewBidEvent.prototype.toJSONField = function () {
|
|
1996
|
-
return {
|
|
1997
|
-
signer: this.signer, index: this.index.toString(), bidIndex: this.bidIndex.toString(), price: this.price.toString(), size: this.size.toString(), bToken: this.bToken.toJSONField(), oToken: this.oToken.toJSONField(), bidderBalance: this.bidderBalance.toString(), incentiveBalance: this.incentiveBalance.toString(), decimal: this.decimal.toString(), tsMs: this.tsMs.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
1998
|
-
};
|
|
1999
|
-
};
|
|
2000
|
-
NewBidEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2001
|
-
NewBidEvent.fromJSONField = function (field) { return NewBidEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), bidIndex: (0, reified_1.decodeFromJSONField)("u64", field.bidIndex), price: (0, reified_1.decodeFromJSONField)("u64", field.price), size: (0, reified_1.decodeFromJSONField)("u64", field.size), bToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bToken), oToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.oToken), bidderBalance: (0, reified_1.decodeFromJSONField)("u64", field.bidderBalance), incentiveBalance: (0, reified_1.decodeFromJSONField)("u64", field.incentiveBalance), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), tsMs: (0, reified_1.decodeFromJSONField)("u64", field.tsMs), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2002
|
-
NewBidEvent.fromJSON = function (json) {
|
|
2003
|
-
if (json.$typeName !== NewBidEvent.$typeName) {
|
|
2004
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2005
|
-
}
|
|
2006
|
-
;
|
|
2007
|
-
return NewBidEvent.fromJSONField(json);
|
|
2008
|
-
};
|
|
2009
|
-
NewBidEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2010
|
-
throw new Error("not an object");
|
|
2011
|
-
} if (!isNewBidEvent(content.type)) {
|
|
2012
|
-
throw new Error("object at ".concat(content.fields.id, " is not a NewBidEvent object"));
|
|
2013
|
-
} return NewBidEvent.fromFieldsWithTypes(content); };
|
|
2014
|
-
NewBidEvent.fetch = function (client, id) {
|
|
2015
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2016
|
-
var res;
|
|
2017
|
-
var _a, _b;
|
|
2018
|
-
return __generator(this, function (_c) {
|
|
2019
|
-
switch (_c.label) {
|
|
2020
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2021
|
-
case 1:
|
|
2022
|
-
res = _c.sent();
|
|
2023
|
-
if (res.error) {
|
|
2024
|
-
throw new Error("error fetching NewBidEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
2025
|
-
}
|
|
2026
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isNewBidEvent(res.data.bcs.type)) {
|
|
2027
|
-
throw new Error("object at id ".concat(id, " is not a NewBidEvent object"));
|
|
2028
|
-
}
|
|
2029
|
-
return [2 /*return*/, NewBidEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2030
|
-
}
|
|
2031
|
-
});
|
|
2032
|
-
});
|
|
2033
|
-
};
|
|
2034
|
-
NewBidEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::NewBidEvent";
|
|
2035
|
-
NewBidEvent.$numTypeParams = 0;
|
|
2036
|
-
return NewBidEvent;
|
|
2037
|
-
}());
|
|
2038
|
-
exports.NewBidEvent = NewBidEvent;
|
|
2039
|
-
/* ============================== OracleInfo =============================== */
|
|
2040
|
-
function isOracleInfo(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::OracleInfo"; }
|
|
2041
|
-
var OracleInfo = /** @class */ (function () {
|
|
2042
|
-
function OracleInfo(typeArgs, fields) {
|
|
2043
|
-
this.$typeName = OracleInfo.$typeName;
|
|
2044
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([OracleInfo.$typeName], __read(typeArgs), false));
|
|
2045
|
-
this.$typeArgs = typeArgs;
|
|
2046
|
-
this.price = fields.price;
|
|
2047
|
-
;
|
|
2048
|
-
this.decimal = fields.decimal;
|
|
2049
|
-
}
|
|
2050
|
-
OracleInfo.reified = function () {
|
|
2051
|
-
var _this = this;
|
|
2052
|
-
return { typeName: OracleInfo.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([OracleInfo.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return OracleInfo.fromFields(fields); }, fromFieldsWithTypes: function (item) { return OracleInfo.fromFieldsWithTypes(item); }, fromBcs: function (data) { return OracleInfo.fromBcs(data); }, bcs: OracleInfo.bcs, fromJSONField: function (field) { return OracleInfo.fromJSONField(field); }, fromJSON: function (json) { return OracleInfo.fromJSON(json); }, fromSuiParsedData: function (content) { return OracleInfo.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2053
|
-
return [2 /*return*/, OracleInfo.fetch(client, id)];
|
|
2054
|
-
}); }); }, new: function (fields) { return new OracleInfo([], fields); }, kind: "StructClassReified", };
|
|
2055
|
-
};
|
|
2056
|
-
Object.defineProperty(OracleInfo, "r", {
|
|
2057
|
-
get: function () { return OracleInfo.reified(); },
|
|
2058
|
-
enumerable: false,
|
|
2059
|
-
configurable: true
|
|
2060
|
-
});
|
|
2061
|
-
OracleInfo.phantom = function () { return (0, reified_1.phantom)(OracleInfo.reified()); };
|
|
2062
|
-
Object.defineProperty(OracleInfo, "p", {
|
|
2063
|
-
get: function () { return OracleInfo.phantom(); },
|
|
2064
|
-
enumerable: false,
|
|
2065
|
-
configurable: true
|
|
2066
|
-
});
|
|
2067
|
-
Object.defineProperty(OracleInfo, "bcs", {
|
|
2068
|
-
get: function () {
|
|
2069
|
-
return bcs_1.bcs.struct("OracleInfo", {
|
|
2070
|
-
price: bcs_1.bcs.u64(), decimal: bcs_1.bcs.u64()
|
|
2071
|
-
});
|
|
2072
|
-
},
|
|
2073
|
-
enumerable: false,
|
|
2074
|
-
configurable: true
|
|
2075
|
-
});
|
|
2076
|
-
;
|
|
2077
|
-
OracleInfo.fromFields = function (fields) { return OracleInfo.reified().new({ price: (0, reified_1.decodeFromFields)("u64", fields.price), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal) }); };
|
|
2078
|
-
OracleInfo.fromFieldsWithTypes = function (item) {
|
|
2079
|
-
if (!isOracleInfo(item.type)) {
|
|
2080
|
-
throw new Error("not a OracleInfo type");
|
|
2081
|
-
}
|
|
2082
|
-
return OracleInfo.reified().new({ price: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.price), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal) });
|
|
2083
|
-
};
|
|
2084
|
-
OracleInfo.fromBcs = function (data) { return OracleInfo.fromFields(OracleInfo.bcs.parse(data)); };
|
|
2085
|
-
OracleInfo.prototype.toJSONField = function () {
|
|
2086
|
-
return {
|
|
2087
|
-
price: this.price.toString(), decimal: this.decimal.toString(),
|
|
2088
|
-
};
|
|
2089
|
-
};
|
|
2090
|
-
OracleInfo.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2091
|
-
OracleInfo.fromJSONField = function (field) { return OracleInfo.reified().new({ price: (0, reified_1.decodeFromJSONField)("u64", field.price), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal) }); };
|
|
2092
|
-
OracleInfo.fromJSON = function (json) {
|
|
2093
|
-
if (json.$typeName !== OracleInfo.$typeName) {
|
|
2094
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2095
|
-
}
|
|
2096
|
-
;
|
|
2097
|
-
return OracleInfo.fromJSONField(json);
|
|
2098
|
-
};
|
|
2099
|
-
OracleInfo.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2100
|
-
throw new Error("not an object");
|
|
2101
|
-
} if (!isOracleInfo(content.type)) {
|
|
2102
|
-
throw new Error("object at ".concat(content.fields.id, " is not a OracleInfo object"));
|
|
2103
|
-
} return OracleInfo.fromFieldsWithTypes(content); };
|
|
2104
|
-
OracleInfo.fetch = function (client, id) {
|
|
2105
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2106
|
-
var res;
|
|
2107
|
-
var _a, _b;
|
|
2108
|
-
return __generator(this, function (_c) {
|
|
2109
|
-
switch (_c.label) {
|
|
2110
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2111
|
-
case 1:
|
|
2112
|
-
res = _c.sent();
|
|
2113
|
-
if (res.error) {
|
|
2114
|
-
throw new Error("error fetching OracleInfo object at id ".concat(id, ": ").concat(res.error.code));
|
|
2115
|
-
}
|
|
2116
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isOracleInfo(res.data.bcs.type)) {
|
|
2117
|
-
throw new Error("object at id ".concat(id, " is not a OracleInfo object"));
|
|
2118
|
-
}
|
|
2119
|
-
return [2 /*return*/, OracleInfo.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2120
|
-
}
|
|
2121
|
-
});
|
|
2122
|
-
});
|
|
2123
|
-
};
|
|
2124
|
-
OracleInfo.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::OracleInfo";
|
|
2125
|
-
OracleInfo.$numTypeParams = 0;
|
|
2126
|
-
return OracleInfo;
|
|
2127
|
-
}());
|
|
2128
|
-
exports.OracleInfo = OracleInfo;
|
|
2129
|
-
/* ============================== OtcEvent =============================== */
|
|
2130
|
-
function isOtcEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::OtcEvent"; }
|
|
2131
|
-
var OtcEvent = /** @class */ (function () {
|
|
2132
|
-
function OtcEvent(typeArgs, fields) {
|
|
2133
|
-
this.$typeName = OtcEvent.$typeName;
|
|
2134
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([OtcEvent.$typeName], __read(typeArgs), false));
|
|
2135
|
-
this.$typeArgs = typeArgs;
|
|
2136
|
-
this.signer = fields.signer;
|
|
2137
|
-
;
|
|
2138
|
-
this.index = fields.index;
|
|
2139
|
-
;
|
|
2140
|
-
this.round = fields.round;
|
|
2141
|
-
;
|
|
2142
|
-
this.deliveryPrice = fields.deliveryPrice;
|
|
2143
|
-
;
|
|
2144
|
-
this.deliverySize = fields.deliverySize;
|
|
2145
|
-
;
|
|
2146
|
-
this.oTokenDecimal = fields.oTokenDecimal;
|
|
2147
|
-
;
|
|
2148
|
-
this.bidderBidValue = fields.bidderBidValue;
|
|
2149
|
-
;
|
|
2150
|
-
this.bidderFee = fields.bidderFee;
|
|
2151
|
-
;
|
|
2152
|
-
this.incentiveBidValue = fields.incentiveBidValue;
|
|
2153
|
-
;
|
|
2154
|
-
this.incentiveFee = fields.incentiveFee;
|
|
2155
|
-
;
|
|
2156
|
-
this.bTokenDecimal = fields.bTokenDecimal;
|
|
2157
|
-
;
|
|
2158
|
-
this.depositorIncentiveValue = fields.depositorIncentiveValue;
|
|
2159
|
-
;
|
|
2160
|
-
this.u64Padding = fields.u64Padding;
|
|
2161
|
-
}
|
|
2162
|
-
OtcEvent.reified = function () {
|
|
2163
|
-
var _this = this;
|
|
2164
|
-
return { typeName: OtcEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([OtcEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return OtcEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return OtcEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return OtcEvent.fromBcs(data); }, bcs: OtcEvent.bcs, fromJSONField: function (field) { return OtcEvent.fromJSONField(field); }, fromJSON: function (json) { return OtcEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return OtcEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2165
|
-
return [2 /*return*/, OtcEvent.fetch(client, id)];
|
|
2166
|
-
}); }); }, new: function (fields) { return new OtcEvent([], fields); }, kind: "StructClassReified", };
|
|
2167
|
-
};
|
|
2168
|
-
Object.defineProperty(OtcEvent, "r", {
|
|
2169
|
-
get: function () { return OtcEvent.reified(); },
|
|
2170
|
-
enumerable: false,
|
|
2171
|
-
configurable: true
|
|
2172
|
-
});
|
|
2173
|
-
OtcEvent.phantom = function () { return (0, reified_1.phantom)(OtcEvent.reified()); };
|
|
2174
|
-
Object.defineProperty(OtcEvent, "p", {
|
|
2175
|
-
get: function () { return OtcEvent.phantom(); },
|
|
2176
|
-
enumerable: false,
|
|
2177
|
-
configurable: true
|
|
2178
|
-
});
|
|
2179
|
-
Object.defineProperty(OtcEvent, "bcs", {
|
|
2180
|
-
get: function () {
|
|
2181
|
-
return bcs_1.bcs.struct("OtcEvent", {
|
|
2182
|
-
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(), round: bcs_1.bcs.u64(), delivery_price: bcs_1.bcs.u64(), delivery_size: bcs_1.bcs.u64(), o_token_decimal: bcs_1.bcs.u64(), bidder_bid_value: bcs_1.bcs.u64(), bidder_fee: bcs_1.bcs.u64(), incentive_bid_value: bcs_1.bcs.u64(), incentive_fee: bcs_1.bcs.u64(), b_token_decimal: bcs_1.bcs.u64(), depositor_incentive_value: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2183
|
-
});
|
|
2184
|
-
},
|
|
2185
|
-
enumerable: false,
|
|
2186
|
-
configurable: true
|
|
2187
|
-
});
|
|
2188
|
-
;
|
|
2189
|
-
OtcEvent.fromFields = function (fields) { return OtcEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), deliveryPrice: (0, reified_1.decodeFromFields)("u64", fields.delivery_price), deliverySize: (0, reified_1.decodeFromFields)("u64", fields.delivery_size), oTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.o_token_decimal), bidderBidValue: (0, reified_1.decodeFromFields)("u64", fields.bidder_bid_value), bidderFee: (0, reified_1.decodeFromFields)("u64", fields.bidder_fee), incentiveBidValue: (0, reified_1.decodeFromFields)("u64", fields.incentive_bid_value), incentiveFee: (0, reified_1.decodeFromFields)("u64", fields.incentive_fee), bTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.b_token_decimal), depositorIncentiveValue: (0, reified_1.decodeFromFields)("u64", fields.depositor_incentive_value), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
2190
|
-
OtcEvent.fromFieldsWithTypes = function (item) {
|
|
2191
|
-
if (!isOtcEvent(item.type)) {
|
|
2192
|
-
throw new Error("not a OtcEvent type");
|
|
2193
|
-
}
|
|
2194
|
-
return OtcEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), deliveryPrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.delivery_price), deliverySize: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.delivery_size), oTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.o_token_decimal), bidderBidValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bidder_bid_value), bidderFee: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.bidder_fee), incentiveBidValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_bid_value), incentiveFee: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.incentive_fee), bTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.b_token_decimal), depositorIncentiveValue: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.depositor_incentive_value), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
2195
|
-
};
|
|
2196
|
-
OtcEvent.fromBcs = function (data) { return OtcEvent.fromFields(OtcEvent.bcs.parse(data)); };
|
|
2197
|
-
OtcEvent.prototype.toJSONField = function () {
|
|
2198
|
-
return {
|
|
2199
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), deliveryPrice: this.deliveryPrice.toString(), deliverySize: this.deliverySize.toString(), oTokenDecimal: this.oTokenDecimal.toString(), bidderBidValue: this.bidderBidValue.toString(), bidderFee: this.bidderFee.toString(), incentiveBidValue: this.incentiveBidValue.toString(), incentiveFee: this.incentiveFee.toString(), bTokenDecimal: this.bTokenDecimal.toString(), depositorIncentiveValue: this.depositorIncentiveValue.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
2200
|
-
};
|
|
2201
|
-
};
|
|
2202
|
-
OtcEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2203
|
-
OtcEvent.fromJSONField = function (field) { return OtcEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), deliveryPrice: (0, reified_1.decodeFromJSONField)("u64", field.deliveryPrice), deliverySize: (0, reified_1.decodeFromJSONField)("u64", field.deliverySize), oTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.oTokenDecimal), bidderBidValue: (0, reified_1.decodeFromJSONField)("u64", field.bidderBidValue), bidderFee: (0, reified_1.decodeFromJSONField)("u64", field.bidderFee), incentiveBidValue: (0, reified_1.decodeFromJSONField)("u64", field.incentiveBidValue), incentiveFee: (0, reified_1.decodeFromJSONField)("u64", field.incentiveFee), bTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.bTokenDecimal), depositorIncentiveValue: (0, reified_1.decodeFromJSONField)("u64", field.depositorIncentiveValue), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2204
|
-
OtcEvent.fromJSON = function (json) {
|
|
2205
|
-
if (json.$typeName !== OtcEvent.$typeName) {
|
|
2206
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2207
|
-
}
|
|
2208
|
-
;
|
|
2209
|
-
return OtcEvent.fromJSONField(json);
|
|
2210
|
-
};
|
|
2211
|
-
OtcEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2212
|
-
throw new Error("not an object");
|
|
2213
|
-
} if (!isOtcEvent(content.type)) {
|
|
2214
|
-
throw new Error("object at ".concat(content.fields.id, " is not a OtcEvent object"));
|
|
2215
|
-
} return OtcEvent.fromFieldsWithTypes(content); };
|
|
2216
|
-
OtcEvent.fetch = function (client, id) {
|
|
2217
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2218
|
-
var res;
|
|
2219
|
-
var _a, _b;
|
|
2220
|
-
return __generator(this, function (_c) {
|
|
2221
|
-
switch (_c.label) {
|
|
2222
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2223
|
-
case 1:
|
|
2224
|
-
res = _c.sent();
|
|
2225
|
-
if (res.error) {
|
|
2226
|
-
throw new Error("error fetching OtcEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
2227
|
-
}
|
|
2228
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isOtcEvent(res.data.bcs.type)) {
|
|
2229
|
-
throw new Error("object at id ".concat(id, " is not a OtcEvent object"));
|
|
2230
|
-
}
|
|
2231
|
-
return [2 /*return*/, OtcEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2232
|
-
}
|
|
2233
|
-
});
|
|
2234
|
-
});
|
|
2235
|
-
};
|
|
2236
|
-
OtcEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::OtcEvent";
|
|
2237
|
-
OtcEvent.$numTypeParams = 0;
|
|
2238
|
-
return OtcEvent;
|
|
2239
|
-
}());
|
|
2240
|
-
exports.OtcEvent = OtcEvent;
|
|
2241
|
-
/* ============================== PayoffConfig =============================== */
|
|
2242
|
-
function isPayoffConfig(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::PayoffConfig"; }
|
|
2243
|
-
var PayoffConfig = /** @class */ (function () {
|
|
2244
|
-
function PayoffConfig(typeArgs, fields) {
|
|
2245
|
-
this.$typeName = PayoffConfig.$typeName;
|
|
2246
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([PayoffConfig.$typeName], __read(typeArgs), false));
|
|
2247
|
-
this.$typeArgs = typeArgs;
|
|
2248
|
-
this.strikeBp = fields.strikeBp;
|
|
2249
|
-
;
|
|
2250
|
-
this.weight = fields.weight;
|
|
2251
|
-
;
|
|
2252
|
-
this.isBuyer = fields.isBuyer;
|
|
2253
|
-
;
|
|
2254
|
-
this.strike = fields.strike;
|
|
2255
|
-
;
|
|
2256
|
-
this.u64Padding = fields.u64Padding;
|
|
2257
|
-
}
|
|
2258
|
-
PayoffConfig.reified = function () {
|
|
2259
|
-
var _this = this;
|
|
2260
|
-
return { typeName: PayoffConfig.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([PayoffConfig.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return PayoffConfig.fromFields(fields); }, fromFieldsWithTypes: function (item) { return PayoffConfig.fromFieldsWithTypes(item); }, fromBcs: function (data) { return PayoffConfig.fromBcs(data); }, bcs: PayoffConfig.bcs, fromJSONField: function (field) { return PayoffConfig.fromJSONField(field); }, fromJSON: function (json) { return PayoffConfig.fromJSON(json); }, fromSuiParsedData: function (content) { return PayoffConfig.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2261
|
-
return [2 /*return*/, PayoffConfig.fetch(client, id)];
|
|
2262
|
-
}); }); }, new: function (fields) { return new PayoffConfig([], fields); }, kind: "StructClassReified", };
|
|
2263
|
-
};
|
|
2264
|
-
Object.defineProperty(PayoffConfig, "r", {
|
|
2265
|
-
get: function () { return PayoffConfig.reified(); },
|
|
2266
|
-
enumerable: false,
|
|
2267
|
-
configurable: true
|
|
2268
|
-
});
|
|
2269
|
-
PayoffConfig.phantom = function () { return (0, reified_1.phantom)(PayoffConfig.reified()); };
|
|
2270
|
-
Object.defineProperty(PayoffConfig, "p", {
|
|
2271
|
-
get: function () { return PayoffConfig.phantom(); },
|
|
2272
|
-
enumerable: false,
|
|
2273
|
-
configurable: true
|
|
2274
|
-
});
|
|
2275
|
-
Object.defineProperty(PayoffConfig, "bcs", {
|
|
2276
|
-
get: function () {
|
|
2277
|
-
return bcs_1.bcs.struct("PayoffConfig", {
|
|
2278
|
-
strike_bp: bcs_1.bcs.u64(), weight: bcs_1.bcs.u64(), is_buyer: bcs_1.bcs.bool(), strike: structs_1.Option.bcs(bcs_1.bcs.u64()), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2279
|
-
});
|
|
2280
|
-
},
|
|
2281
|
-
enumerable: false,
|
|
2282
|
-
configurable: true
|
|
2283
|
-
});
|
|
2284
|
-
;
|
|
2285
|
-
PayoffConfig.fromFields = function (fields) { return PayoffConfig.reified().new({ strikeBp: (0, reified_1.decodeFromFields)("u64", fields.strike_bp), weight: (0, reified_1.decodeFromFields)("u64", fields.weight), isBuyer: (0, reified_1.decodeFromFields)("bool", fields.is_buyer), strike: (0, reified_1.decodeFromFields)(structs_1.Option.reified("u64"), fields.strike), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
2286
|
-
PayoffConfig.fromFieldsWithTypes = function (item) {
|
|
2287
|
-
if (!isPayoffConfig(item.type)) {
|
|
2288
|
-
throw new Error("not a PayoffConfig type");
|
|
2289
|
-
}
|
|
2290
|
-
return PayoffConfig.reified().new({ strikeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.strike_bp), weight: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.weight), isBuyer: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.is_buyer), strike: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Option.reified("u64"), item.fields.strike), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
2291
|
-
};
|
|
2292
|
-
PayoffConfig.fromBcs = function (data) { return PayoffConfig.fromFields(PayoffConfig.bcs.parse(data)); };
|
|
2293
|
-
PayoffConfig.prototype.toJSONField = function () {
|
|
2294
|
-
return {
|
|
2295
|
-
strikeBp: this.strikeBp.toString(), weight: this.weight.toString(), isBuyer: this.isBuyer, strike: (0, reified_1.fieldToJSON)("0x1::option::Option<u64>", this.strike), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
2296
|
-
};
|
|
2297
|
-
};
|
|
2298
|
-
PayoffConfig.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2299
|
-
PayoffConfig.fromJSONField = function (field) { return PayoffConfig.reified().new({ strikeBp: (0, reified_1.decodeFromJSONField)("u64", field.strikeBp), weight: (0, reified_1.decodeFromJSONField)("u64", field.weight), isBuyer: (0, reified_1.decodeFromJSONField)("bool", field.isBuyer), strike: (0, reified_1.decodeFromJSONField)(structs_1.Option.reified("u64"), field.strike), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2300
|
-
PayoffConfig.fromJSON = function (json) {
|
|
2301
|
-
if (json.$typeName !== PayoffConfig.$typeName) {
|
|
2302
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2303
|
-
}
|
|
2304
|
-
;
|
|
2305
|
-
return PayoffConfig.fromJSONField(json);
|
|
2306
|
-
};
|
|
2307
|
-
PayoffConfig.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2308
|
-
throw new Error("not an object");
|
|
2309
|
-
} if (!isPayoffConfig(content.type)) {
|
|
2310
|
-
throw new Error("object at ".concat(content.fields.id, " is not a PayoffConfig object"));
|
|
2311
|
-
} return PayoffConfig.fromFieldsWithTypes(content); };
|
|
2312
|
-
PayoffConfig.fetch = function (client, id) {
|
|
2313
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2314
|
-
var res;
|
|
2315
|
-
var _a, _b;
|
|
2316
|
-
return __generator(this, function (_c) {
|
|
2317
|
-
switch (_c.label) {
|
|
2318
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2319
|
-
case 1:
|
|
2320
|
-
res = _c.sent();
|
|
2321
|
-
if (res.error) {
|
|
2322
|
-
throw new Error("error fetching PayoffConfig object at id ".concat(id, ": ").concat(res.error.code));
|
|
2323
|
-
}
|
|
2324
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isPayoffConfig(res.data.bcs.type)) {
|
|
2325
|
-
throw new Error("object at id ".concat(id, " is not a PayoffConfig object"));
|
|
2326
|
-
}
|
|
2327
|
-
return [2 /*return*/, PayoffConfig.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2328
|
-
}
|
|
2329
|
-
});
|
|
2330
|
-
});
|
|
2331
|
-
};
|
|
2332
|
-
PayoffConfig.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::PayoffConfig";
|
|
2333
|
-
PayoffConfig.$numTypeParams = 0;
|
|
2334
|
-
return PayoffConfig;
|
|
2335
|
-
}());
|
|
2336
|
-
exports.PayoffConfig = PayoffConfig;
|
|
2337
|
-
/* ============================== PortfolioVault =============================== */
|
|
2338
|
-
function isPortfolioVault(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::PortfolioVault"; }
|
|
2339
|
-
var PortfolioVault = /** @class */ (function () {
|
|
2340
|
-
function PortfolioVault(typeArgs, fields) {
|
|
2341
|
-
this.$typeName = PortfolioVault.$typeName;
|
|
2342
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([PortfolioVault.$typeName], __read(typeArgs), false));
|
|
2343
|
-
this.$typeArgs = typeArgs;
|
|
2344
|
-
this.id = fields.id;
|
|
2345
|
-
;
|
|
2346
|
-
this.info = fields.info;
|
|
2347
|
-
;
|
|
2348
|
-
this.config = fields.config;
|
|
2349
|
-
;
|
|
2350
|
-
this.authority = fields.authority;
|
|
2351
|
-
}
|
|
2352
|
-
PortfolioVault.reified = function () {
|
|
2353
|
-
var _this = this;
|
|
2354
|
-
return { typeName: PortfolioVault.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([PortfolioVault.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return PortfolioVault.fromFields(fields); }, fromFieldsWithTypes: function (item) { return PortfolioVault.fromFieldsWithTypes(item); }, fromBcs: function (data) { return PortfolioVault.fromBcs(data); }, bcs: PortfolioVault.bcs, fromJSONField: function (field) { return PortfolioVault.fromJSONField(field); }, fromJSON: function (json) { return PortfolioVault.fromJSON(json); }, fromSuiParsedData: function (content) { return PortfolioVault.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2355
|
-
return [2 /*return*/, PortfolioVault.fetch(client, id)];
|
|
2356
|
-
}); }); }, new: function (fields) { return new PortfolioVault([], fields); }, kind: "StructClassReified", };
|
|
2357
|
-
};
|
|
2358
|
-
Object.defineProperty(PortfolioVault, "r", {
|
|
2359
|
-
get: function () { return PortfolioVault.reified(); },
|
|
2360
|
-
enumerable: false,
|
|
2361
|
-
configurable: true
|
|
2362
|
-
});
|
|
2363
|
-
PortfolioVault.phantom = function () { return (0, reified_1.phantom)(PortfolioVault.reified()); };
|
|
2364
|
-
Object.defineProperty(PortfolioVault, "p", {
|
|
2365
|
-
get: function () { return PortfolioVault.phantom(); },
|
|
2366
|
-
enumerable: false,
|
|
2367
|
-
configurable: true
|
|
2368
|
-
});
|
|
2369
|
-
Object.defineProperty(PortfolioVault, "bcs", {
|
|
2370
|
-
get: function () {
|
|
2371
|
-
return bcs_1.bcs.struct("PortfolioVault", {
|
|
2372
|
-
id: structs_4.UID.bcs, info: Info.bcs, config: Config.bcs, authority: structs_5.Authority.bcs
|
|
2373
|
-
});
|
|
2374
|
-
},
|
|
2375
|
-
enumerable: false,
|
|
2376
|
-
configurable: true
|
|
2377
|
-
});
|
|
2378
|
-
;
|
|
2379
|
-
PortfolioVault.fromFields = function (fields) { return PortfolioVault.reified().new({ id: (0, reified_1.decodeFromFields)(structs_4.UID.reified(), fields.id), info: (0, reified_1.decodeFromFields)(Info.reified(), fields.info), config: (0, reified_1.decodeFromFields)(Config.reified(), fields.config), authority: (0, reified_1.decodeFromFields)(structs_5.Authority.reified(), fields.authority) }); };
|
|
2380
|
-
PortfolioVault.fromFieldsWithTypes = function (item) {
|
|
2381
|
-
if (!isPortfolioVault(item.type)) {
|
|
2382
|
-
throw new Error("not a PortfolioVault type");
|
|
2383
|
-
}
|
|
2384
|
-
return PortfolioVault.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.UID.reified(), item.fields.id), info: (0, reified_1.decodeFromFieldsWithTypes)(Info.reified(), item.fields.info), config: (0, reified_1.decodeFromFieldsWithTypes)(Config.reified(), item.fields.config), authority: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.Authority.reified(), item.fields.authority) });
|
|
2385
|
-
};
|
|
2386
|
-
PortfolioVault.fromBcs = function (data) { return PortfolioVault.fromFields(PortfolioVault.bcs.parse(data)); };
|
|
2387
|
-
PortfolioVault.prototype.toJSONField = function () {
|
|
2388
|
-
return {
|
|
2389
|
-
id: this.id, info: this.info.toJSONField(), config: this.config.toJSONField(), authority: this.authority.toJSONField(),
|
|
2390
|
-
};
|
|
2391
|
-
};
|
|
2392
|
-
PortfolioVault.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2393
|
-
PortfolioVault.fromJSONField = function (field) { return PortfolioVault.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_4.UID.reified(), field.id), info: (0, reified_1.decodeFromJSONField)(Info.reified(), field.info), config: (0, reified_1.decodeFromJSONField)(Config.reified(), field.config), authority: (0, reified_1.decodeFromJSONField)(structs_5.Authority.reified(), field.authority) }); };
|
|
2394
|
-
PortfolioVault.fromJSON = function (json) {
|
|
2395
|
-
if (json.$typeName !== PortfolioVault.$typeName) {
|
|
2396
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2397
|
-
}
|
|
2398
|
-
;
|
|
2399
|
-
return PortfolioVault.fromJSONField(json);
|
|
2400
|
-
};
|
|
2401
|
-
PortfolioVault.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2402
|
-
throw new Error("not an object");
|
|
2403
|
-
} if (!isPortfolioVault(content.type)) {
|
|
2404
|
-
throw new Error("object at ".concat(content.fields.id, " is not a PortfolioVault object"));
|
|
2405
|
-
} return PortfolioVault.fromFieldsWithTypes(content); };
|
|
2406
|
-
PortfolioVault.fetch = function (client, id) {
|
|
2407
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2408
|
-
var res;
|
|
2409
|
-
var _a, _b;
|
|
2410
|
-
return __generator(this, function (_c) {
|
|
2411
|
-
switch (_c.label) {
|
|
2412
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2413
|
-
case 1:
|
|
2414
|
-
res = _c.sent();
|
|
2415
|
-
if (res.error) {
|
|
2416
|
-
throw new Error("error fetching PortfolioVault object at id ".concat(id, ": ").concat(res.error.code));
|
|
2417
|
-
}
|
|
2418
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isPortfolioVault(res.data.bcs.type)) {
|
|
2419
|
-
throw new Error("object at id ".concat(id, " is not a PortfolioVault object"));
|
|
2420
|
-
}
|
|
2421
|
-
return [2 /*return*/, PortfolioVault.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2422
|
-
}
|
|
2423
|
-
});
|
|
2424
|
-
});
|
|
2425
|
-
};
|
|
2426
|
-
PortfolioVault.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::PortfolioVault";
|
|
2427
|
-
PortfolioVault.$numTypeParams = 0;
|
|
2428
|
-
return PortfolioVault;
|
|
2429
|
-
}());
|
|
2430
|
-
exports.PortfolioVault = PortfolioVault;
|
|
2431
|
-
/* ============================== RaiseFundEvent =============================== */
|
|
2432
|
-
function isRaiseFundEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x10250db78795fda6ce62b76efa324eb1a7dc50beeed1229fba40c50e4305ef9a::typus_dov_single::RaiseFundEvent"; }
|
|
2433
|
-
var RaiseFundEvent = /** @class */ (function () {
|
|
2434
|
-
function RaiseFundEvent(typeArgs, fields) {
|
|
2435
|
-
this.$typeName = RaiseFundEvent.$typeName;
|
|
2436
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([RaiseFundEvent.$typeName], __read(typeArgs), false));
|
|
2437
|
-
this.$typeArgs = typeArgs;
|
|
2438
|
-
this.signer = fields.signer;
|
|
2439
|
-
;
|
|
2440
|
-
this.token = fields.token;
|
|
2441
|
-
;
|
|
2442
|
-
this.log = fields.log;
|
|
2443
|
-
}
|
|
2444
|
-
RaiseFundEvent.reified = function () {
|
|
2445
|
-
var _this = this;
|
|
2446
|
-
return { typeName: RaiseFundEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([RaiseFundEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return RaiseFundEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return RaiseFundEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return RaiseFundEvent.fromBcs(data); }, bcs: RaiseFundEvent.bcs, fromJSONField: function (field) { return RaiseFundEvent.fromJSONField(field); }, fromJSON: function (json) { return RaiseFundEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return RaiseFundEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2447
|
-
return [2 /*return*/, RaiseFundEvent.fetch(client, id)];
|
|
2448
|
-
}); }); }, new: function (fields) { return new RaiseFundEvent([], fields); }, kind: "StructClassReified", };
|
|
2449
|
-
};
|
|
2450
|
-
Object.defineProperty(RaiseFundEvent, "r", {
|
|
2451
|
-
get: function () { return RaiseFundEvent.reified(); },
|
|
2452
|
-
enumerable: false,
|
|
2453
|
-
configurable: true
|
|
2454
|
-
});
|
|
2455
|
-
RaiseFundEvent.phantom = function () { return (0, reified_1.phantom)(RaiseFundEvent.reified()); };
|
|
2456
|
-
Object.defineProperty(RaiseFundEvent, "p", {
|
|
2457
|
-
get: function () { return RaiseFundEvent.phantom(); },
|
|
2458
|
-
enumerable: false,
|
|
2459
|
-
configurable: true
|
|
2460
|
-
});
|
|
2461
|
-
Object.defineProperty(RaiseFundEvent, "bcs", {
|
|
2462
|
-
get: function () {
|
|
2463
|
-
return bcs_1.bcs.struct("RaiseFundEvent", {
|
|
2464
|
-
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, log: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2465
|
-
});
|
|
2466
|
-
},
|
|
2467
|
-
enumerable: false,
|
|
2468
|
-
configurable: true
|
|
2469
|
-
});
|
|
2470
|
-
;
|
|
2471
|
-
RaiseFundEvent.fromFields = function (fields) { return RaiseFundEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), log: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.log) }); };
|
|
2472
|
-
RaiseFundEvent.fromFieldsWithTypes = function (item) {
|
|
2473
|
-
if (!isRaiseFundEvent(item.type)) {
|
|
2474
|
-
throw new Error("not a RaiseFundEvent type");
|
|
2475
|
-
}
|
|
2476
|
-
return RaiseFundEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), log: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.log) });
|
|
2477
|
-
};
|
|
2478
|
-
RaiseFundEvent.fromBcs = function (data) { return RaiseFundEvent.fromFields(RaiseFundEvent.bcs.parse(data)); };
|
|
2479
|
-
RaiseFundEvent.prototype.toJSONField = function () {
|
|
2480
|
-
return {
|
|
2481
|
-
signer: this.signer, token: this.token.toJSONField(), log: (0, reified_1.fieldToJSON)("vector<u64>", this.log),
|
|
2482
|
-
};
|
|
2483
|
-
};
|
|
2484
|
-
RaiseFundEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2485
|
-
RaiseFundEvent.fromJSONField = function (field) { return RaiseFundEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), log: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.log) }); };
|
|
2486
|
-
RaiseFundEvent.fromJSON = function (json) {
|
|
2487
|
-
if (json.$typeName !== RaiseFundEvent.$typeName) {
|
|
2488
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2489
|
-
}
|
|
2490
|
-
;
|
|
2491
|
-
return RaiseFundEvent.fromJSONField(json);
|
|
2492
|
-
};
|
|
2493
|
-
RaiseFundEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2494
|
-
throw new Error("not an object");
|
|
2495
|
-
} if (!isRaiseFundEvent(content.type)) {
|
|
2496
|
-
throw new Error("object at ".concat(content.fields.id, " is not a RaiseFundEvent object"));
|
|
2497
|
-
} return RaiseFundEvent.fromFieldsWithTypes(content); };
|
|
2498
|
-
RaiseFundEvent.fetch = function (client, id) {
|
|
2499
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2500
|
-
var res;
|
|
2501
|
-
var _a, _b;
|
|
2502
|
-
return __generator(this, function (_c) {
|
|
2503
|
-
switch (_c.label) {
|
|
2504
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2505
|
-
case 1:
|
|
2506
|
-
res = _c.sent();
|
|
2507
|
-
if (res.error) {
|
|
2508
|
-
throw new Error("error fetching RaiseFundEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
2509
|
-
}
|
|
2510
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRaiseFundEvent(res.data.bcs.type)) {
|
|
2511
|
-
throw new Error("object at id ".concat(id, " is not a RaiseFundEvent object"));
|
|
2512
|
-
}
|
|
2513
|
-
return [2 /*return*/, RaiseFundEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2514
|
-
}
|
|
2515
|
-
});
|
|
2516
|
-
});
|
|
2517
|
-
};
|
|
2518
|
-
RaiseFundEvent.$typeName = "0x10250db78795fda6ce62b76efa324eb1a7dc50beeed1229fba40c50e4305ef9a::typus_dov_single::RaiseFundEvent";
|
|
2519
|
-
RaiseFundEvent.$numTypeParams = 0;
|
|
2520
|
-
return RaiseFundEvent;
|
|
2521
|
-
}());
|
|
2522
|
-
exports.RaiseFundEvent = RaiseFundEvent;
|
|
2523
|
-
/* ============================== RecoupEvent =============================== */
|
|
2524
|
-
function isRecoupEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::RecoupEvent"; }
|
|
2525
|
-
var RecoupEvent = /** @class */ (function () {
|
|
2526
|
-
function RecoupEvent(typeArgs, fields) {
|
|
2527
|
-
this.$typeName = RecoupEvent.$typeName;
|
|
2528
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([RecoupEvent.$typeName], __read(typeArgs), false));
|
|
2529
|
-
this.$typeArgs = typeArgs;
|
|
2530
|
-
this.signer = fields.signer;
|
|
2531
|
-
;
|
|
2532
|
-
this.index = fields.index;
|
|
2533
|
-
;
|
|
2534
|
-
this.round = fields.round;
|
|
2535
|
-
;
|
|
2536
|
-
this.activeAmount = fields.activeAmount;
|
|
2537
|
-
;
|
|
2538
|
-
this.deactivatingAmount = fields.deactivatingAmount;
|
|
2539
|
-
;
|
|
2540
|
-
this.dTokenDecimal = fields.dTokenDecimal;
|
|
2541
|
-
;
|
|
2542
|
-
this.u64Padding = fields.u64Padding;
|
|
2543
|
-
}
|
|
2544
|
-
RecoupEvent.reified = function () {
|
|
2545
|
-
var _this = this;
|
|
2546
|
-
return { typeName: RecoupEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([RecoupEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return RecoupEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return RecoupEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return RecoupEvent.fromBcs(data); }, bcs: RecoupEvent.bcs, fromJSONField: function (field) { return RecoupEvent.fromJSONField(field); }, fromJSON: function (json) { return RecoupEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return RecoupEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2547
|
-
return [2 /*return*/, RecoupEvent.fetch(client, id)];
|
|
2548
|
-
}); }); }, new: function (fields) { return new RecoupEvent([], fields); }, kind: "StructClassReified", };
|
|
2549
|
-
};
|
|
2550
|
-
Object.defineProperty(RecoupEvent, "r", {
|
|
2551
|
-
get: function () { return RecoupEvent.reified(); },
|
|
2552
|
-
enumerable: false,
|
|
2553
|
-
configurable: true
|
|
2554
|
-
});
|
|
2555
|
-
RecoupEvent.phantom = function () { return (0, reified_1.phantom)(RecoupEvent.reified()); };
|
|
2556
|
-
Object.defineProperty(RecoupEvent, "p", {
|
|
2557
|
-
get: function () { return RecoupEvent.phantom(); },
|
|
2558
|
-
enumerable: false,
|
|
2559
|
-
configurable: true
|
|
2560
|
-
});
|
|
2561
|
-
Object.defineProperty(RecoupEvent, "bcs", {
|
|
2562
|
-
get: function () {
|
|
2563
|
-
return bcs_1.bcs.struct("RecoupEvent", {
|
|
2564
|
-
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(), round: bcs_1.bcs.u64(), active_amount: bcs_1.bcs.u64(), deactivating_amount: bcs_1.bcs.u64(), d_token_decimal: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2565
|
-
});
|
|
2566
|
-
},
|
|
2567
|
-
enumerable: false,
|
|
2568
|
-
configurable: true
|
|
2569
|
-
});
|
|
2570
|
-
;
|
|
2571
|
-
RecoupEvent.fromFields = function (fields) { return RecoupEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), activeAmount: (0, reified_1.decodeFromFields)("u64", fields.active_amount), deactivatingAmount: (0, reified_1.decodeFromFields)("u64", fields.deactivating_amount), dTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.d_token_decimal), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
2572
|
-
RecoupEvent.fromFieldsWithTypes = function (item) {
|
|
2573
|
-
if (!isRecoupEvent(item.type)) {
|
|
2574
|
-
throw new Error("not a RecoupEvent type");
|
|
2575
|
-
}
|
|
2576
|
-
return RecoupEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), activeAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.active_amount), deactivatingAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deactivating_amount), dTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.d_token_decimal), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
2577
|
-
};
|
|
2578
|
-
RecoupEvent.fromBcs = function (data) { return RecoupEvent.fromFields(RecoupEvent.bcs.parse(data)); };
|
|
2579
|
-
RecoupEvent.prototype.toJSONField = function () {
|
|
2580
|
-
return {
|
|
2581
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), activeAmount: this.activeAmount.toString(), deactivatingAmount: this.deactivatingAmount.toString(), dTokenDecimal: this.dTokenDecimal.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
2582
|
-
};
|
|
2583
|
-
};
|
|
2584
|
-
RecoupEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2585
|
-
RecoupEvent.fromJSONField = function (field) { return RecoupEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), activeAmount: (0, reified_1.decodeFromJSONField)("u64", field.activeAmount), deactivatingAmount: (0, reified_1.decodeFromJSONField)("u64", field.deactivatingAmount), dTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.dTokenDecimal), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2586
|
-
RecoupEvent.fromJSON = function (json) {
|
|
2587
|
-
if (json.$typeName !== RecoupEvent.$typeName) {
|
|
2588
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2589
|
-
}
|
|
2590
|
-
;
|
|
2591
|
-
return RecoupEvent.fromJSONField(json);
|
|
2592
|
-
};
|
|
2593
|
-
RecoupEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2594
|
-
throw new Error("not an object");
|
|
2595
|
-
} if (!isRecoupEvent(content.type)) {
|
|
2596
|
-
throw new Error("object at ".concat(content.fields.id, " is not a RecoupEvent object"));
|
|
2597
|
-
} return RecoupEvent.fromFieldsWithTypes(content); };
|
|
2598
|
-
RecoupEvent.fetch = function (client, id) {
|
|
2599
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2600
|
-
var res;
|
|
2601
|
-
var _a, _b;
|
|
2602
|
-
return __generator(this, function (_c) {
|
|
2603
|
-
switch (_c.label) {
|
|
2604
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2605
|
-
case 1:
|
|
2606
|
-
res = _c.sent();
|
|
2607
|
-
if (res.error) {
|
|
2608
|
-
throw new Error("error fetching RecoupEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
2609
|
-
}
|
|
2610
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRecoupEvent(res.data.bcs.type)) {
|
|
2611
|
-
throw new Error("object at id ".concat(id, " is not a RecoupEvent object"));
|
|
2612
|
-
}
|
|
2613
|
-
return [2 /*return*/, RecoupEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2614
|
-
}
|
|
2615
|
-
});
|
|
2616
|
-
});
|
|
2617
|
-
};
|
|
2618
|
-
RecoupEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::RecoupEvent";
|
|
2619
|
-
RecoupEvent.$numTypeParams = 0;
|
|
2620
|
-
return RecoupEvent;
|
|
2621
|
-
}());
|
|
2622
|
-
exports.RecoupEvent = RecoupEvent;
|
|
2623
|
-
/* ============================== RedeemEvent =============================== */
|
|
2624
|
-
function isRedeemEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::RedeemEvent"; }
|
|
2625
|
-
var RedeemEvent = /** @class */ (function () {
|
|
2626
|
-
function RedeemEvent(typeArgs, fields) {
|
|
2627
|
-
this.$typeName = RedeemEvent.$typeName;
|
|
2628
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([RedeemEvent.$typeName], __read(typeArgs), false));
|
|
2629
|
-
this.$typeArgs = typeArgs;
|
|
2630
|
-
this.signer = fields.signer;
|
|
2631
|
-
;
|
|
2632
|
-
this.index = fields.index;
|
|
2633
|
-
;
|
|
2634
|
-
this.token = fields.token;
|
|
2635
|
-
;
|
|
2636
|
-
this.amount = fields.amount;
|
|
2637
|
-
;
|
|
2638
|
-
this.oracleInfo = fields.oracleInfo;
|
|
2639
|
-
;
|
|
2640
|
-
this.u64Padding = fields.u64Padding;
|
|
2641
|
-
}
|
|
2642
|
-
RedeemEvent.reified = function () {
|
|
2643
|
-
var _this = this;
|
|
2644
|
-
return { typeName: RedeemEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([RedeemEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return RedeemEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return RedeemEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return RedeemEvent.fromBcs(data); }, bcs: RedeemEvent.bcs, fromJSONField: function (field) { return RedeemEvent.fromJSONField(field); }, fromJSON: function (json) { return RedeemEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return RedeemEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2645
|
-
return [2 /*return*/, RedeemEvent.fetch(client, id)];
|
|
2646
|
-
}); }); }, new: function (fields) { return new RedeemEvent([], fields); }, kind: "StructClassReified", };
|
|
2647
|
-
};
|
|
2648
|
-
Object.defineProperty(RedeemEvent, "r", {
|
|
2649
|
-
get: function () { return RedeemEvent.reified(); },
|
|
2650
|
-
enumerable: false,
|
|
2651
|
-
configurable: true
|
|
2652
|
-
});
|
|
2653
|
-
RedeemEvent.phantom = function () { return (0, reified_1.phantom)(RedeemEvent.reified()); };
|
|
2654
|
-
Object.defineProperty(RedeemEvent, "p", {
|
|
2655
|
-
get: function () { return RedeemEvent.phantom(); },
|
|
2656
|
-
enumerable: false,
|
|
2657
|
-
configurable: true
|
|
2658
|
-
});
|
|
2659
|
-
Object.defineProperty(RedeemEvent, "bcs", {
|
|
2660
|
-
get: function () {
|
|
2661
|
-
return bcs_1.bcs.struct("RedeemEvent", {
|
|
2662
|
-
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(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2663
|
-
});
|
|
2664
|
-
},
|
|
2665
|
-
enumerable: false,
|
|
2666
|
-
configurable: true
|
|
2667
|
-
});
|
|
2668
|
-
;
|
|
2669
|
-
RedeemEvent.fromFields = function (fields) { return RedeemEvent.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), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
2670
|
-
RedeemEvent.fromFieldsWithTypes = function (item) {
|
|
2671
|
-
if (!isRedeemEvent(item.type)) {
|
|
2672
|
-
throw new Error("not a RedeemEvent type");
|
|
2673
|
-
}
|
|
2674
|
-
return RedeemEvent.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), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
2675
|
-
};
|
|
2676
|
-
RedeemEvent.fromBcs = function (data) { return RedeemEvent.fromFields(RedeemEvent.bcs.parse(data)); };
|
|
2677
|
-
RedeemEvent.prototype.toJSONField = function () {
|
|
2678
|
-
return {
|
|
2679
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
2680
|
-
};
|
|
2681
|
-
};
|
|
2682
|
-
RedeemEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2683
|
-
RedeemEvent.fromJSONField = function (field) { return RedeemEvent.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), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2684
|
-
RedeemEvent.fromJSON = function (json) {
|
|
2685
|
-
if (json.$typeName !== RedeemEvent.$typeName) {
|
|
2686
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2687
|
-
}
|
|
2688
|
-
;
|
|
2689
|
-
return RedeemEvent.fromJSONField(json);
|
|
2690
|
-
};
|
|
2691
|
-
RedeemEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2692
|
-
throw new Error("not an object");
|
|
2693
|
-
} if (!isRedeemEvent(content.type)) {
|
|
2694
|
-
throw new Error("object at ".concat(content.fields.id, " is not a RedeemEvent object"));
|
|
2695
|
-
} return RedeemEvent.fromFieldsWithTypes(content); };
|
|
2696
|
-
RedeemEvent.fetch = function (client, id) {
|
|
2697
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2698
|
-
var res;
|
|
2699
|
-
var _a, _b;
|
|
2700
|
-
return __generator(this, function (_c) {
|
|
2701
|
-
switch (_c.label) {
|
|
2702
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2703
|
-
case 1:
|
|
2704
|
-
res = _c.sent();
|
|
2705
|
-
if (res.error) {
|
|
2706
|
-
throw new Error("error fetching RedeemEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
2707
|
-
}
|
|
2708
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRedeemEvent(res.data.bcs.type)) {
|
|
2709
|
-
throw new Error("object at id ".concat(id, " is not a RedeemEvent object"));
|
|
2710
|
-
}
|
|
2711
|
-
return [2 /*return*/, RedeemEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2712
|
-
}
|
|
2713
|
-
});
|
|
2714
|
-
});
|
|
2715
|
-
};
|
|
2716
|
-
RedeemEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::RedeemEvent";
|
|
2717
|
-
RedeemEvent.$numTypeParams = 0;
|
|
2718
|
-
return RedeemEvent;
|
|
2719
|
-
}());
|
|
2720
|
-
exports.RedeemEvent = RedeemEvent;
|
|
2721
|
-
/* ============================== ReduceFundEvent =============================== */
|
|
2722
|
-
function isReduceFundEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x10250db78795fda6ce62b76efa324eb1a7dc50beeed1229fba40c50e4305ef9a::typus_dov_single::ReduceFundEvent"; }
|
|
2723
|
-
var ReduceFundEvent = /** @class */ (function () {
|
|
2724
|
-
function ReduceFundEvent(typeArgs, fields) {
|
|
2725
|
-
this.$typeName = ReduceFundEvent.$typeName;
|
|
2726
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ReduceFundEvent.$typeName], __read(typeArgs), false));
|
|
2727
|
-
this.$typeArgs = typeArgs;
|
|
2728
|
-
this.signer = fields.signer;
|
|
2729
|
-
;
|
|
2730
|
-
this.dToken = fields.dToken;
|
|
2731
|
-
;
|
|
2732
|
-
this.bToken = fields.bToken;
|
|
2733
|
-
;
|
|
2734
|
-
this.iToken = fields.iToken;
|
|
2735
|
-
;
|
|
2736
|
-
this.log = fields.log;
|
|
2737
|
-
}
|
|
2738
|
-
ReduceFundEvent.reified = function () {
|
|
2739
|
-
var _this = this;
|
|
2740
|
-
return { typeName: ReduceFundEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ReduceFundEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return ReduceFundEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return ReduceFundEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return ReduceFundEvent.fromBcs(data); }, bcs: ReduceFundEvent.bcs, fromJSONField: function (field) { return ReduceFundEvent.fromJSONField(field); }, fromJSON: function (json) { return ReduceFundEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return ReduceFundEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2741
|
-
return [2 /*return*/, ReduceFundEvent.fetch(client, id)];
|
|
2742
|
-
}); }); }, new: function (fields) { return new ReduceFundEvent([], fields); }, kind: "StructClassReified", };
|
|
2743
|
-
};
|
|
2744
|
-
Object.defineProperty(ReduceFundEvent, "r", {
|
|
2745
|
-
get: function () { return ReduceFundEvent.reified(); },
|
|
2746
|
-
enumerable: false,
|
|
2747
|
-
configurable: true
|
|
2748
|
-
});
|
|
2749
|
-
ReduceFundEvent.phantom = function () { return (0, reified_1.phantom)(ReduceFundEvent.reified()); };
|
|
2750
|
-
Object.defineProperty(ReduceFundEvent, "p", {
|
|
2751
|
-
get: function () { return ReduceFundEvent.phantom(); },
|
|
2752
|
-
enumerable: false,
|
|
2753
|
-
configurable: true
|
|
2754
|
-
});
|
|
2755
|
-
Object.defineProperty(ReduceFundEvent, "bcs", {
|
|
2756
|
-
get: function () {
|
|
2757
|
-
return bcs_1.bcs.struct("ReduceFundEvent", {
|
|
2758
|
-
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); }, }), d_token: structs_3.TypeName.bcs, b_token: structs_3.TypeName.bcs, i_token: structs_3.TypeName.bcs, log: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2759
|
-
});
|
|
2760
|
-
},
|
|
2761
|
-
enumerable: false,
|
|
2762
|
-
configurable: true
|
|
2763
|
-
});
|
|
2764
|
-
;
|
|
2765
|
-
ReduceFundEvent.fromFields = function (fields) { return ReduceFundEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), dToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.d_token), bToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.b_token), iToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.i_token), log: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.log) }); };
|
|
2766
|
-
ReduceFundEvent.fromFieldsWithTypes = function (item) {
|
|
2767
|
-
if (!isReduceFundEvent(item.type)) {
|
|
2768
|
-
throw new Error("not a ReduceFundEvent type");
|
|
2769
|
-
}
|
|
2770
|
-
return ReduceFundEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), dToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.d_token), bToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.b_token), iToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.i_token), log: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.log) });
|
|
2771
|
-
};
|
|
2772
|
-
ReduceFundEvent.fromBcs = function (data) { return ReduceFundEvent.fromFields(ReduceFundEvent.bcs.parse(data)); };
|
|
2773
|
-
ReduceFundEvent.prototype.toJSONField = function () {
|
|
2774
|
-
return {
|
|
2775
|
-
signer: this.signer, dToken: this.dToken.toJSONField(), bToken: this.bToken.toJSONField(), iToken: this.iToken.toJSONField(), log: (0, reified_1.fieldToJSON)("vector<u64>", this.log),
|
|
2776
|
-
};
|
|
2777
|
-
};
|
|
2778
|
-
ReduceFundEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2779
|
-
ReduceFundEvent.fromJSONField = function (field) { return ReduceFundEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), dToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.dToken), bToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.bToken), iToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.iToken), log: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.log) }); };
|
|
2780
|
-
ReduceFundEvent.fromJSON = function (json) {
|
|
2781
|
-
if (json.$typeName !== ReduceFundEvent.$typeName) {
|
|
2782
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2783
|
-
}
|
|
2784
|
-
;
|
|
2785
|
-
return ReduceFundEvent.fromJSONField(json);
|
|
2786
|
-
};
|
|
2787
|
-
ReduceFundEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2788
|
-
throw new Error("not an object");
|
|
2789
|
-
} if (!isReduceFundEvent(content.type)) {
|
|
2790
|
-
throw new Error("object at ".concat(content.fields.id, " is not a ReduceFundEvent object"));
|
|
2791
|
-
} return ReduceFundEvent.fromFieldsWithTypes(content); };
|
|
2792
|
-
ReduceFundEvent.fetch = function (client, id) {
|
|
2793
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2794
|
-
var res;
|
|
2795
|
-
var _a, _b;
|
|
2796
|
-
return __generator(this, function (_c) {
|
|
2797
|
-
switch (_c.label) {
|
|
2798
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2799
|
-
case 1:
|
|
2800
|
-
res = _c.sent();
|
|
2801
|
-
if (res.error) {
|
|
2802
|
-
throw new Error("error fetching ReduceFundEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
2803
|
-
}
|
|
2804
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isReduceFundEvent(res.data.bcs.type)) {
|
|
2805
|
-
throw new Error("object at id ".concat(id, " is not a ReduceFundEvent object"));
|
|
2806
|
-
}
|
|
2807
|
-
return [2 /*return*/, ReduceFundEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2808
|
-
}
|
|
2809
|
-
});
|
|
2810
|
-
});
|
|
2811
|
-
};
|
|
2812
|
-
ReduceFundEvent.$typeName = "0x10250db78795fda6ce62b76efa324eb1a7dc50beeed1229fba40c50e4305ef9a::typus_dov_single::ReduceFundEvent";
|
|
2813
|
-
ReduceFundEvent.$numTypeParams = 0;
|
|
2814
|
-
return ReduceFundEvent;
|
|
2815
|
-
}());
|
|
2816
|
-
exports.ReduceFundEvent = ReduceFundEvent;
|
|
2817
|
-
/* ============================== RefundEvent =============================== */
|
|
2818
|
-
function isRefundEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::RefundEvent"; }
|
|
2819
|
-
var RefundEvent = /** @class */ (function () {
|
|
2820
|
-
function RefundEvent(typeArgs, fields) {
|
|
2821
|
-
this.$typeName = RefundEvent.$typeName;
|
|
2822
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([RefundEvent.$typeName], __read(typeArgs), false));
|
|
2823
|
-
this.$typeArgs = typeArgs;
|
|
2824
|
-
this.signer = fields.signer;
|
|
2825
|
-
;
|
|
2826
|
-
this.token = fields.token;
|
|
2827
|
-
;
|
|
2828
|
-
this.amount = fields.amount;
|
|
2829
|
-
;
|
|
2830
|
-
this.u64Padding = fields.u64Padding;
|
|
2831
|
-
}
|
|
2832
|
-
RefundEvent.reified = function () {
|
|
2833
|
-
var _this = this;
|
|
2834
|
-
return { typeName: RefundEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([RefundEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return RefundEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return RefundEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return RefundEvent.fromBcs(data); }, bcs: RefundEvent.bcs, fromJSONField: function (field) { return RefundEvent.fromJSONField(field); }, fromJSON: function (json) { return RefundEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return RefundEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2835
|
-
return [2 /*return*/, RefundEvent.fetch(client, id)];
|
|
2836
|
-
}); }); }, new: function (fields) { return new RefundEvent([], fields); }, kind: "StructClassReified", };
|
|
2837
|
-
};
|
|
2838
|
-
Object.defineProperty(RefundEvent, "r", {
|
|
2839
|
-
get: function () { return RefundEvent.reified(); },
|
|
2840
|
-
enumerable: false,
|
|
2841
|
-
configurable: true
|
|
2842
|
-
});
|
|
2843
|
-
RefundEvent.phantom = function () { return (0, reified_1.phantom)(RefundEvent.reified()); };
|
|
2844
|
-
Object.defineProperty(RefundEvent, "p", {
|
|
2845
|
-
get: function () { return RefundEvent.phantom(); },
|
|
2846
|
-
enumerable: false,
|
|
2847
|
-
configurable: true
|
|
2848
|
-
});
|
|
2849
|
-
Object.defineProperty(RefundEvent, "bcs", {
|
|
2850
|
-
get: function () {
|
|
2851
|
-
return bcs_1.bcs.struct("RefundEvent", {
|
|
2852
|
-
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, amount: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2853
|
-
});
|
|
2854
|
-
},
|
|
2855
|
-
enumerable: false,
|
|
2856
|
-
configurable: true
|
|
2857
|
-
});
|
|
2858
|
-
;
|
|
2859
|
-
RefundEvent.fromFields = function (fields) { return RefundEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), token: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.token), amount: (0, reified_1.decodeFromFields)("u64", fields.amount), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
2860
|
-
RefundEvent.fromFieldsWithTypes = function (item) {
|
|
2861
|
-
if (!isRefundEvent(item.type)) {
|
|
2862
|
-
throw new Error("not a RefundEvent type");
|
|
2863
|
-
}
|
|
2864
|
-
return RefundEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), token: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.token), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
2865
|
-
};
|
|
2866
|
-
RefundEvent.fromBcs = function (data) { return RefundEvent.fromFields(RefundEvent.bcs.parse(data)); };
|
|
2867
|
-
RefundEvent.prototype.toJSONField = function () {
|
|
2868
|
-
return {
|
|
2869
|
-
signer: this.signer, token: this.token.toJSONField(), amount: this.amount.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
2870
|
-
};
|
|
2871
|
-
};
|
|
2872
|
-
RefundEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2873
|
-
RefundEvent.fromJSONField = function (field) { return RefundEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), token: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.token), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2874
|
-
RefundEvent.fromJSON = function (json) {
|
|
2875
|
-
if (json.$typeName !== RefundEvent.$typeName) {
|
|
2876
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2877
|
-
}
|
|
2878
|
-
;
|
|
2879
|
-
return RefundEvent.fromJSONField(json);
|
|
2880
|
-
};
|
|
2881
|
-
RefundEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2882
|
-
throw new Error("not an object");
|
|
2883
|
-
} if (!isRefundEvent(content.type)) {
|
|
2884
|
-
throw new Error("object at ".concat(content.fields.id, " is not a RefundEvent object"));
|
|
2885
|
-
} return RefundEvent.fromFieldsWithTypes(content); };
|
|
2886
|
-
RefundEvent.fetch = function (client, id) {
|
|
2887
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2888
|
-
var res;
|
|
2889
|
-
var _a, _b;
|
|
2890
|
-
return __generator(this, function (_c) {
|
|
2891
|
-
switch (_c.label) {
|
|
2892
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
2893
|
-
case 1:
|
|
2894
|
-
res = _c.sent();
|
|
2895
|
-
if (res.error) {
|
|
2896
|
-
throw new Error("error fetching RefundEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
2897
|
-
}
|
|
2898
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRefundEvent(res.data.bcs.type)) {
|
|
2899
|
-
throw new Error("object at id ".concat(id, " is not a RefundEvent object"));
|
|
2900
|
-
}
|
|
2901
|
-
return [2 /*return*/, RefundEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
2902
|
-
}
|
|
2903
|
-
});
|
|
2904
|
-
});
|
|
2905
|
-
};
|
|
2906
|
-
RefundEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::RefundEvent";
|
|
2907
|
-
RefundEvent.$numTypeParams = 0;
|
|
2908
|
-
return RefundEvent;
|
|
2909
|
-
}());
|
|
2910
|
-
exports.RefundEvent = RefundEvent;
|
|
2911
|
-
/* ============================== SettleEvent =============================== */
|
|
2912
|
-
function isSettleEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::SettleEvent"; }
|
|
2913
|
-
var SettleEvent = /** @class */ (function () {
|
|
2914
|
-
function SettleEvent(typeArgs, fields) {
|
|
2915
|
-
this.$typeName = SettleEvent.$typeName;
|
|
2916
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SettleEvent.$typeName], __read(typeArgs), false));
|
|
2917
|
-
this.$typeArgs = typeArgs;
|
|
2918
|
-
this.signer = fields.signer;
|
|
2919
|
-
;
|
|
2920
|
-
this.index = fields.index;
|
|
2921
|
-
;
|
|
2922
|
-
this.round = fields.round;
|
|
2923
|
-
;
|
|
2924
|
-
this.oraclePrice = fields.oraclePrice;
|
|
2925
|
-
;
|
|
2926
|
-
this.oraclePriceDecimal = fields.oraclePriceDecimal;
|
|
2927
|
-
;
|
|
2928
|
-
this.settleBalance = fields.settleBalance;
|
|
2929
|
-
;
|
|
2930
|
-
this.settledBalance = fields.settledBalance;
|
|
2931
|
-
;
|
|
2932
|
-
this.dTokenDecimal = fields.dTokenDecimal;
|
|
2933
|
-
;
|
|
2934
|
-
this.dToken = fields.dToken;
|
|
2935
|
-
;
|
|
2936
|
-
this.sharePrice = fields.sharePrice;
|
|
2937
|
-
;
|
|
2938
|
-
this.u64Padding = fields.u64Padding;
|
|
2939
|
-
}
|
|
2940
|
-
SettleEvent.reified = function () {
|
|
2941
|
-
var _this = this;
|
|
2942
|
-
return { typeName: SettleEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SettleEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return SettleEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return SettleEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return SettleEvent.fromBcs(data); }, bcs: SettleEvent.bcs, fromJSONField: function (field) { return SettleEvent.fromJSONField(field); }, fromJSON: function (json) { return SettleEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return SettleEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2943
|
-
return [2 /*return*/, SettleEvent.fetch(client, id)];
|
|
2944
|
-
}); }); }, new: function (fields) { return new SettleEvent([], fields); }, kind: "StructClassReified", };
|
|
2945
|
-
};
|
|
2946
|
-
Object.defineProperty(SettleEvent, "r", {
|
|
2947
|
-
get: function () { return SettleEvent.reified(); },
|
|
2948
|
-
enumerable: false,
|
|
2949
|
-
configurable: true
|
|
2950
|
-
});
|
|
2951
|
-
SettleEvent.phantom = function () { return (0, reified_1.phantom)(SettleEvent.reified()); };
|
|
2952
|
-
Object.defineProperty(SettleEvent, "p", {
|
|
2953
|
-
get: function () { return SettleEvent.phantom(); },
|
|
2954
|
-
enumerable: false,
|
|
2955
|
-
configurable: true
|
|
2956
|
-
});
|
|
2957
|
-
Object.defineProperty(SettleEvent, "bcs", {
|
|
2958
|
-
get: function () {
|
|
2959
|
-
return bcs_1.bcs.struct("SettleEvent", {
|
|
2960
|
-
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(), round: bcs_1.bcs.u64(), oracle_price: bcs_1.bcs.u64(), oracle_price_decimal: bcs_1.bcs.u64(), settle_balance: bcs_1.bcs.u64(), settled_balance: bcs_1.bcs.u64(), d_token_decimal: bcs_1.bcs.u64(), d_token: structs_3.TypeName.bcs, share_price: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
2961
|
-
});
|
|
2962
|
-
},
|
|
2963
|
-
enumerable: false,
|
|
2964
|
-
configurable: true
|
|
2965
|
-
});
|
|
2966
|
-
;
|
|
2967
|
-
SettleEvent.fromFields = function (fields) { return SettleEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), oraclePrice: (0, reified_1.decodeFromFields)("u64", fields.oracle_price), oraclePriceDecimal: (0, reified_1.decodeFromFields)("u64", fields.oracle_price_decimal), settleBalance: (0, reified_1.decodeFromFields)("u64", fields.settle_balance), settledBalance: (0, reified_1.decodeFromFields)("u64", fields.settled_balance), dTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.d_token_decimal), dToken: (0, reified_1.decodeFromFields)(structs_3.TypeName.reified(), fields.d_token), sharePrice: (0, reified_1.decodeFromFields)("u64", fields.share_price), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
2968
|
-
SettleEvent.fromFieldsWithTypes = function (item) {
|
|
2969
|
-
if (!isSettleEvent(item.type)) {
|
|
2970
|
-
throw new Error("not a SettleEvent type");
|
|
2971
|
-
}
|
|
2972
|
-
return SettleEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), oraclePrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.oracle_price), oraclePriceDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.oracle_price_decimal), settleBalance: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.settle_balance), settledBalance: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.settled_balance), dTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.d_token_decimal), dToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TypeName.reified(), item.fields.d_token), sharePrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share_price), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
2973
|
-
};
|
|
2974
|
-
SettleEvent.fromBcs = function (data) { return SettleEvent.fromFields(SettleEvent.bcs.parse(data)); };
|
|
2975
|
-
SettleEvent.prototype.toJSONField = function () {
|
|
2976
|
-
return {
|
|
2977
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), oraclePrice: this.oraclePrice.toString(), oraclePriceDecimal: this.oraclePriceDecimal.toString(), settleBalance: this.settleBalance.toString(), settledBalance: this.settledBalance.toString(), dTokenDecimal: this.dTokenDecimal.toString(), dToken: this.dToken.toJSONField(), sharePrice: this.sharePrice.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
2978
|
-
};
|
|
2979
|
-
};
|
|
2980
|
-
SettleEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
2981
|
-
SettleEvent.fromJSONField = function (field) { return SettleEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), oraclePrice: (0, reified_1.decodeFromJSONField)("u64", field.oraclePrice), oraclePriceDecimal: (0, reified_1.decodeFromJSONField)("u64", field.oraclePriceDecimal), settleBalance: (0, reified_1.decodeFromJSONField)("u64", field.settleBalance), settledBalance: (0, reified_1.decodeFromJSONField)("u64", field.settledBalance), dTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.dTokenDecimal), dToken: (0, reified_1.decodeFromJSONField)(structs_3.TypeName.reified(), field.dToken), sharePrice: (0, reified_1.decodeFromJSONField)("u64", field.sharePrice), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
2982
|
-
SettleEvent.fromJSON = function (json) {
|
|
2983
|
-
if (json.$typeName !== SettleEvent.$typeName) {
|
|
2984
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
2985
|
-
}
|
|
2986
|
-
;
|
|
2987
|
-
return SettleEvent.fromJSONField(json);
|
|
2988
|
-
};
|
|
2989
|
-
SettleEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
2990
|
-
throw new Error("not an object");
|
|
2991
|
-
} if (!isSettleEvent(content.type)) {
|
|
2992
|
-
throw new Error("object at ".concat(content.fields.id, " is not a SettleEvent object"));
|
|
2993
|
-
} return SettleEvent.fromFieldsWithTypes(content); };
|
|
2994
|
-
SettleEvent.fetch = function (client, id) {
|
|
2995
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2996
|
-
var res;
|
|
2997
|
-
var _a, _b;
|
|
2998
|
-
return __generator(this, function (_c) {
|
|
2999
|
-
switch (_c.label) {
|
|
3000
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3001
|
-
case 1:
|
|
3002
|
-
res = _c.sent();
|
|
3003
|
-
if (res.error) {
|
|
3004
|
-
throw new Error("error fetching SettleEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3005
|
-
}
|
|
3006
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSettleEvent(res.data.bcs.type)) {
|
|
3007
|
-
throw new Error("object at id ".concat(id, " is not a SettleEvent object"));
|
|
3008
|
-
}
|
|
3009
|
-
return [2 /*return*/, SettleEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3010
|
-
}
|
|
3011
|
-
});
|
|
3012
|
-
});
|
|
3013
|
-
};
|
|
3014
|
-
SettleEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::SettleEvent";
|
|
3015
|
-
SettleEvent.$numTypeParams = 0;
|
|
3016
|
-
return SettleEvent;
|
|
3017
|
-
}());
|
|
3018
|
-
exports.SettleEvent = SettleEvent;
|
|
3019
|
-
/* ============================== SettlementInfo =============================== */
|
|
3020
|
-
function isSettlementInfo(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::SettlementInfo"; }
|
|
3021
|
-
var SettlementInfo = /** @class */ (function () {
|
|
3022
|
-
function SettlementInfo(typeArgs, fields) {
|
|
3023
|
-
this.$typeName = SettlementInfo.$typeName;
|
|
3024
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SettlementInfo.$typeName], __read(typeArgs), false));
|
|
3025
|
-
this.$typeArgs = typeArgs;
|
|
3026
|
-
this.round = fields.round;
|
|
3027
|
-
;
|
|
3028
|
-
this.oraclePrice = fields.oraclePrice;
|
|
3029
|
-
;
|
|
3030
|
-
this.oraclePriceDecimal = fields.oraclePriceDecimal;
|
|
3031
|
-
;
|
|
3032
|
-
this.settleBalance = fields.settleBalance;
|
|
3033
|
-
;
|
|
3034
|
-
this.settledBalance = fields.settledBalance;
|
|
3035
|
-
;
|
|
3036
|
-
this.sharePrice = fields.sharePrice;
|
|
3037
|
-
;
|
|
3038
|
-
this.sharePriceDecimal = fields.sharePriceDecimal;
|
|
3039
|
-
;
|
|
3040
|
-
this.tsMs = fields.tsMs;
|
|
3041
|
-
;
|
|
3042
|
-
this.u64Padding = fields.u64Padding;
|
|
3043
|
-
}
|
|
3044
|
-
SettlementInfo.reified = function () {
|
|
3045
|
-
var _this = this;
|
|
3046
|
-
return { typeName: SettlementInfo.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SettlementInfo.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return SettlementInfo.fromFields(fields); }, fromFieldsWithTypes: function (item) { return SettlementInfo.fromFieldsWithTypes(item); }, fromBcs: function (data) { return SettlementInfo.fromBcs(data); }, bcs: SettlementInfo.bcs, fromJSONField: function (field) { return SettlementInfo.fromJSONField(field); }, fromJSON: function (json) { return SettlementInfo.fromJSON(json); }, fromSuiParsedData: function (content) { return SettlementInfo.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3047
|
-
return [2 /*return*/, SettlementInfo.fetch(client, id)];
|
|
3048
|
-
}); }); }, new: function (fields) { return new SettlementInfo([], fields); }, kind: "StructClassReified", };
|
|
3049
|
-
};
|
|
3050
|
-
Object.defineProperty(SettlementInfo, "r", {
|
|
3051
|
-
get: function () { return SettlementInfo.reified(); },
|
|
3052
|
-
enumerable: false,
|
|
3053
|
-
configurable: true
|
|
3054
|
-
});
|
|
3055
|
-
SettlementInfo.phantom = function () { return (0, reified_1.phantom)(SettlementInfo.reified()); };
|
|
3056
|
-
Object.defineProperty(SettlementInfo, "p", {
|
|
3057
|
-
get: function () { return SettlementInfo.phantom(); },
|
|
3058
|
-
enumerable: false,
|
|
3059
|
-
configurable: true
|
|
3060
|
-
});
|
|
3061
|
-
Object.defineProperty(SettlementInfo, "bcs", {
|
|
3062
|
-
get: function () {
|
|
3063
|
-
return bcs_1.bcs.struct("SettlementInfo", {
|
|
3064
|
-
round: bcs_1.bcs.u64(), oracle_price: bcs_1.bcs.u64(), oracle_price_decimal: bcs_1.bcs.u64(), settle_balance: bcs_1.bcs.u64(), settled_balance: bcs_1.bcs.u64(), share_price: bcs_1.bcs.u64(), share_price_decimal: bcs_1.bcs.u64(), ts_ms: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
3065
|
-
});
|
|
3066
|
-
},
|
|
3067
|
-
enumerable: false,
|
|
3068
|
-
configurable: true
|
|
3069
|
-
});
|
|
3070
|
-
;
|
|
3071
|
-
SettlementInfo.fromFields = function (fields) { return SettlementInfo.reified().new({ round: (0, reified_1.decodeFromFields)("u64", fields.round), oraclePrice: (0, reified_1.decodeFromFields)("u64", fields.oracle_price), oraclePriceDecimal: (0, reified_1.decodeFromFields)("u64", fields.oracle_price_decimal), settleBalance: (0, reified_1.decodeFromFields)("u64", fields.settle_balance), settledBalance: (0, reified_1.decodeFromFields)("u64", fields.settled_balance), sharePrice: (0, reified_1.decodeFromFields)("u64", fields.share_price), sharePriceDecimal: (0, reified_1.decodeFromFields)("u64", fields.share_price_decimal), tsMs: (0, reified_1.decodeFromFields)("u64", fields.ts_ms), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
3072
|
-
SettlementInfo.fromFieldsWithTypes = function (item) {
|
|
3073
|
-
if (!isSettlementInfo(item.type)) {
|
|
3074
|
-
throw new Error("not a SettlementInfo type");
|
|
3075
|
-
}
|
|
3076
|
-
return SettlementInfo.reified().new({ round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), oraclePrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.oracle_price), oraclePriceDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.oracle_price_decimal), settleBalance: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.settle_balance), settledBalance: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.settled_balance), sharePrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share_price), sharePriceDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.share_price_decimal), tsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.ts_ms), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
3077
|
-
};
|
|
3078
|
-
SettlementInfo.fromBcs = function (data) { return SettlementInfo.fromFields(SettlementInfo.bcs.parse(data)); };
|
|
3079
|
-
SettlementInfo.prototype.toJSONField = function () {
|
|
3080
|
-
return {
|
|
3081
|
-
round: this.round.toString(), oraclePrice: this.oraclePrice.toString(), oraclePriceDecimal: this.oraclePriceDecimal.toString(), settleBalance: this.settleBalance.toString(), settledBalance: this.settledBalance.toString(), sharePrice: this.sharePrice.toString(), sharePriceDecimal: this.sharePriceDecimal.toString(), tsMs: this.tsMs.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3082
|
-
};
|
|
3083
|
-
};
|
|
3084
|
-
SettlementInfo.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
3085
|
-
SettlementInfo.fromJSONField = function (field) { return SettlementInfo.reified().new({ round: (0, reified_1.decodeFromJSONField)("u64", field.round), oraclePrice: (0, reified_1.decodeFromJSONField)("u64", field.oraclePrice), oraclePriceDecimal: (0, reified_1.decodeFromJSONField)("u64", field.oraclePriceDecimal), settleBalance: (0, reified_1.decodeFromJSONField)("u64", field.settleBalance), settledBalance: (0, reified_1.decodeFromJSONField)("u64", field.settledBalance), sharePrice: (0, reified_1.decodeFromJSONField)("u64", field.sharePrice), sharePriceDecimal: (0, reified_1.decodeFromJSONField)("u64", field.sharePriceDecimal), tsMs: (0, reified_1.decodeFromJSONField)("u64", field.tsMs), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
3086
|
-
SettlementInfo.fromJSON = function (json) {
|
|
3087
|
-
if (json.$typeName !== SettlementInfo.$typeName) {
|
|
3088
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
3089
|
-
}
|
|
3090
|
-
;
|
|
3091
|
-
return SettlementInfo.fromJSONField(json);
|
|
3092
|
-
};
|
|
3093
|
-
SettlementInfo.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
3094
|
-
throw new Error("not an object");
|
|
3095
|
-
} if (!isSettlementInfo(content.type)) {
|
|
3096
|
-
throw new Error("object at ".concat(content.fields.id, " is not a SettlementInfo object"));
|
|
3097
|
-
} return SettlementInfo.fromFieldsWithTypes(content); };
|
|
3098
|
-
SettlementInfo.fetch = function (client, id) {
|
|
3099
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3100
|
-
var res;
|
|
3101
|
-
var _a, _b;
|
|
3102
|
-
return __generator(this, function (_c) {
|
|
3103
|
-
switch (_c.label) {
|
|
3104
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3105
|
-
case 1:
|
|
3106
|
-
res = _c.sent();
|
|
3107
|
-
if (res.error) {
|
|
3108
|
-
throw new Error("error fetching SettlementInfo object at id ".concat(id, ": ").concat(res.error.code));
|
|
3109
|
-
}
|
|
3110
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSettlementInfo(res.data.bcs.type)) {
|
|
3111
|
-
throw new Error("object at id ".concat(id, " is not a SettlementInfo object"));
|
|
3112
|
-
}
|
|
3113
|
-
return [2 /*return*/, SettlementInfo.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3114
|
-
}
|
|
3115
|
-
});
|
|
3116
|
-
});
|
|
3117
|
-
};
|
|
3118
|
-
SettlementInfo.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::SettlementInfo";
|
|
3119
|
-
SettlementInfo.$numTypeParams = 0;
|
|
3120
|
-
return SettlementInfo;
|
|
3121
|
-
}());
|
|
3122
|
-
exports.SettlementInfo = SettlementInfo;
|
|
3123
|
-
/* ============================== TYPUS_DOV_SINGLE =============================== */
|
|
3124
|
-
function isTYPUS_DOV_SINGLE(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::TYPUS_DOV_SINGLE"; }
|
|
3125
|
-
var TYPUS_DOV_SINGLE = /** @class */ (function () {
|
|
3126
|
-
function TYPUS_DOV_SINGLE(typeArgs, fields) {
|
|
3127
|
-
this.$typeName = TYPUS_DOV_SINGLE.$typeName;
|
|
3128
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TYPUS_DOV_SINGLE.$typeName], __read(typeArgs), false));
|
|
3129
|
-
this.$typeArgs = typeArgs;
|
|
3130
|
-
this.dummyField = fields.dummyField;
|
|
3131
|
-
}
|
|
3132
|
-
TYPUS_DOV_SINGLE.reified = function () {
|
|
3133
|
-
var _this = this;
|
|
3134
|
-
return { typeName: TYPUS_DOV_SINGLE.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TYPUS_DOV_SINGLE.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return TYPUS_DOV_SINGLE.fromFields(fields); }, fromFieldsWithTypes: function (item) { return TYPUS_DOV_SINGLE.fromFieldsWithTypes(item); }, fromBcs: function (data) { return TYPUS_DOV_SINGLE.fromBcs(data); }, bcs: TYPUS_DOV_SINGLE.bcs, fromJSONField: function (field) { return TYPUS_DOV_SINGLE.fromJSONField(field); }, fromJSON: function (json) { return TYPUS_DOV_SINGLE.fromJSON(json); }, fromSuiParsedData: function (content) { return TYPUS_DOV_SINGLE.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3135
|
-
return [2 /*return*/, TYPUS_DOV_SINGLE.fetch(client, id)];
|
|
3136
|
-
}); }); }, new: function (fields) { return new TYPUS_DOV_SINGLE([], fields); }, kind: "StructClassReified", };
|
|
3137
|
-
};
|
|
3138
|
-
Object.defineProperty(TYPUS_DOV_SINGLE, "r", {
|
|
3139
|
-
get: function () { return TYPUS_DOV_SINGLE.reified(); },
|
|
3140
|
-
enumerable: false,
|
|
3141
|
-
configurable: true
|
|
3142
|
-
});
|
|
3143
|
-
TYPUS_DOV_SINGLE.phantom = function () { return (0, reified_1.phantom)(TYPUS_DOV_SINGLE.reified()); };
|
|
3144
|
-
Object.defineProperty(TYPUS_DOV_SINGLE, "p", {
|
|
3145
|
-
get: function () { return TYPUS_DOV_SINGLE.phantom(); },
|
|
3146
|
-
enumerable: false,
|
|
3147
|
-
configurable: true
|
|
3148
|
-
});
|
|
3149
|
-
Object.defineProperty(TYPUS_DOV_SINGLE, "bcs", {
|
|
3150
|
-
get: function () {
|
|
3151
|
-
return bcs_1.bcs.struct("TYPUS_DOV_SINGLE", {
|
|
3152
|
-
dummy_field: bcs_1.bcs.bool()
|
|
3153
|
-
});
|
|
3154
|
-
},
|
|
3155
|
-
enumerable: false,
|
|
3156
|
-
configurable: true
|
|
3157
|
-
});
|
|
3158
|
-
;
|
|
3159
|
-
TYPUS_DOV_SINGLE.fromFields = function (fields) { return TYPUS_DOV_SINGLE.reified().new({ dummyField: (0, reified_1.decodeFromFields)("bool", fields.dummy_field) }); };
|
|
3160
|
-
TYPUS_DOV_SINGLE.fromFieldsWithTypes = function (item) {
|
|
3161
|
-
if (!isTYPUS_DOV_SINGLE(item.type)) {
|
|
3162
|
-
throw new Error("not a TYPUS_DOV_SINGLE type");
|
|
3163
|
-
}
|
|
3164
|
-
return TYPUS_DOV_SINGLE.reified().new({ dummyField: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.dummy_field) });
|
|
3165
|
-
};
|
|
3166
|
-
TYPUS_DOV_SINGLE.fromBcs = function (data) { return TYPUS_DOV_SINGLE.fromFields(TYPUS_DOV_SINGLE.bcs.parse(data)); };
|
|
3167
|
-
TYPUS_DOV_SINGLE.prototype.toJSONField = function () {
|
|
3168
|
-
return {
|
|
3169
|
-
dummyField: this.dummyField,
|
|
3170
|
-
};
|
|
3171
|
-
};
|
|
3172
|
-
TYPUS_DOV_SINGLE.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
3173
|
-
TYPUS_DOV_SINGLE.fromJSONField = function (field) { return TYPUS_DOV_SINGLE.reified().new({ dummyField: (0, reified_1.decodeFromJSONField)("bool", field.dummyField) }); };
|
|
3174
|
-
TYPUS_DOV_SINGLE.fromJSON = function (json) {
|
|
3175
|
-
if (json.$typeName !== TYPUS_DOV_SINGLE.$typeName) {
|
|
3176
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
3177
|
-
}
|
|
3178
|
-
;
|
|
3179
|
-
return TYPUS_DOV_SINGLE.fromJSONField(json);
|
|
3180
|
-
};
|
|
3181
|
-
TYPUS_DOV_SINGLE.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
3182
|
-
throw new Error("not an object");
|
|
3183
|
-
} if (!isTYPUS_DOV_SINGLE(content.type)) {
|
|
3184
|
-
throw new Error("object at ".concat(content.fields.id, " is not a TYPUS_DOV_SINGLE object"));
|
|
3185
|
-
} return TYPUS_DOV_SINGLE.fromFieldsWithTypes(content); };
|
|
3186
|
-
TYPUS_DOV_SINGLE.fetch = function (client, id) {
|
|
3187
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3188
|
-
var res;
|
|
3189
|
-
var _a, _b;
|
|
3190
|
-
return __generator(this, function (_c) {
|
|
3191
|
-
switch (_c.label) {
|
|
3192
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3193
|
-
case 1:
|
|
3194
|
-
res = _c.sent();
|
|
3195
|
-
if (res.error) {
|
|
3196
|
-
throw new Error("error fetching TYPUS_DOV_SINGLE object at id ".concat(id, ": ").concat(res.error.code));
|
|
3197
|
-
}
|
|
3198
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTYPUS_DOV_SINGLE(res.data.bcs.type)) {
|
|
3199
|
-
throw new Error("object at id ".concat(id, " is not a TYPUS_DOV_SINGLE object"));
|
|
3200
|
-
}
|
|
3201
|
-
return [2 /*return*/, TYPUS_DOV_SINGLE.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3202
|
-
}
|
|
3203
|
-
});
|
|
3204
|
-
});
|
|
3205
|
-
};
|
|
3206
|
-
TYPUS_DOV_SINGLE.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::TYPUS_DOV_SINGLE";
|
|
3207
|
-
TYPUS_DOV_SINGLE.$numTypeParams = 0;
|
|
3208
|
-
return TYPUS_DOV_SINGLE;
|
|
3209
|
-
}());
|
|
3210
|
-
exports.TYPUS_DOV_SINGLE = TYPUS_DOV_SINGLE;
|
|
3211
|
-
/* ============================== TerminateAuctionEvent =============================== */
|
|
3212
|
-
function isTerminateAuctionEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::TerminateAuctionEvent"; }
|
|
3213
|
-
var TerminateAuctionEvent = /** @class */ (function () {
|
|
3214
|
-
function TerminateAuctionEvent(typeArgs, fields) {
|
|
3215
|
-
this.$typeName = TerminateAuctionEvent.$typeName;
|
|
3216
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TerminateAuctionEvent.$typeName], __read(typeArgs), false));
|
|
3217
|
-
this.$typeArgs = typeArgs;
|
|
3218
|
-
this.signer = fields.signer;
|
|
3219
|
-
;
|
|
3220
|
-
this.index = fields.index;
|
|
3221
|
-
;
|
|
3222
|
-
this.round = fields.round;
|
|
3223
|
-
;
|
|
3224
|
-
this.u64Padding = fields.u64Padding;
|
|
3225
|
-
}
|
|
3226
|
-
TerminateAuctionEvent.reified = function () {
|
|
3227
|
-
var _this = this;
|
|
3228
|
-
return { typeName: TerminateAuctionEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TerminateAuctionEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return TerminateAuctionEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return TerminateAuctionEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return TerminateAuctionEvent.fromBcs(data); }, bcs: TerminateAuctionEvent.bcs, fromJSONField: function (field) { return TerminateAuctionEvent.fromJSONField(field); }, fromJSON: function (json) { return TerminateAuctionEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return TerminateAuctionEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3229
|
-
return [2 /*return*/, TerminateAuctionEvent.fetch(client, id)];
|
|
3230
|
-
}); }); }, new: function (fields) { return new TerminateAuctionEvent([], fields); }, kind: "StructClassReified", };
|
|
3231
|
-
};
|
|
3232
|
-
Object.defineProperty(TerminateAuctionEvent, "r", {
|
|
3233
|
-
get: function () { return TerminateAuctionEvent.reified(); },
|
|
3234
|
-
enumerable: false,
|
|
3235
|
-
configurable: true
|
|
3236
|
-
});
|
|
3237
|
-
TerminateAuctionEvent.phantom = function () { return (0, reified_1.phantom)(TerminateAuctionEvent.reified()); };
|
|
3238
|
-
Object.defineProperty(TerminateAuctionEvent, "p", {
|
|
3239
|
-
get: function () { return TerminateAuctionEvent.phantom(); },
|
|
3240
|
-
enumerable: false,
|
|
3241
|
-
configurable: true
|
|
3242
|
-
});
|
|
3243
|
-
Object.defineProperty(TerminateAuctionEvent, "bcs", {
|
|
3244
|
-
get: function () {
|
|
3245
|
-
return bcs_1.bcs.struct("TerminateAuctionEvent", {
|
|
3246
|
-
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(), round: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
3247
|
-
});
|
|
3248
|
-
},
|
|
3249
|
-
enumerable: false,
|
|
3250
|
-
configurable: true
|
|
3251
|
-
});
|
|
3252
|
-
;
|
|
3253
|
-
TerminateAuctionEvent.fromFields = function (fields) { return TerminateAuctionEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
3254
|
-
TerminateAuctionEvent.fromFieldsWithTypes = function (item) {
|
|
3255
|
-
if (!isTerminateAuctionEvent(item.type)) {
|
|
3256
|
-
throw new Error("not a TerminateAuctionEvent type");
|
|
3257
|
-
}
|
|
3258
|
-
return TerminateAuctionEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
3259
|
-
};
|
|
3260
|
-
TerminateAuctionEvent.fromBcs = function (data) { return TerminateAuctionEvent.fromFields(TerminateAuctionEvent.bcs.parse(data)); };
|
|
3261
|
-
TerminateAuctionEvent.prototype.toJSONField = function () {
|
|
3262
|
-
return {
|
|
3263
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3264
|
-
};
|
|
3265
|
-
};
|
|
3266
|
-
TerminateAuctionEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
3267
|
-
TerminateAuctionEvent.fromJSONField = function (field) { return TerminateAuctionEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
3268
|
-
TerminateAuctionEvent.fromJSON = function (json) {
|
|
3269
|
-
if (json.$typeName !== TerminateAuctionEvent.$typeName) {
|
|
3270
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
3271
|
-
}
|
|
3272
|
-
;
|
|
3273
|
-
return TerminateAuctionEvent.fromJSONField(json);
|
|
3274
|
-
};
|
|
3275
|
-
TerminateAuctionEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
3276
|
-
throw new Error("not an object");
|
|
3277
|
-
} if (!isTerminateAuctionEvent(content.type)) {
|
|
3278
|
-
throw new Error("object at ".concat(content.fields.id, " is not a TerminateAuctionEvent object"));
|
|
3279
|
-
} return TerminateAuctionEvent.fromFieldsWithTypes(content); };
|
|
3280
|
-
TerminateAuctionEvent.fetch = function (client, id) {
|
|
3281
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3282
|
-
var res;
|
|
3283
|
-
var _a, _b;
|
|
3284
|
-
return __generator(this, function (_c) {
|
|
3285
|
-
switch (_c.label) {
|
|
3286
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3287
|
-
case 1:
|
|
3288
|
-
res = _c.sent();
|
|
3289
|
-
if (res.error) {
|
|
3290
|
-
throw new Error("error fetching TerminateAuctionEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3291
|
-
}
|
|
3292
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTerminateAuctionEvent(res.data.bcs.type)) {
|
|
3293
|
-
throw new Error("object at id ".concat(id, " is not a TerminateAuctionEvent object"));
|
|
3294
|
-
}
|
|
3295
|
-
return [2 /*return*/, TerminateAuctionEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3296
|
-
}
|
|
3297
|
-
});
|
|
3298
|
-
});
|
|
3299
|
-
};
|
|
3300
|
-
TerminateAuctionEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::TerminateAuctionEvent";
|
|
3301
|
-
TerminateAuctionEvent.$numTypeParams = 0;
|
|
3302
|
-
return TerminateAuctionEvent;
|
|
3303
|
-
}());
|
|
3304
|
-
exports.TerminateAuctionEvent = TerminateAuctionEvent;
|
|
3305
|
-
/* ============================== TerminateVaultEvent =============================== */
|
|
3306
|
-
function isTerminateVaultEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::TerminateVaultEvent"; }
|
|
3307
|
-
var TerminateVaultEvent = /** @class */ (function () {
|
|
3308
|
-
function TerminateVaultEvent(typeArgs, fields) {
|
|
3309
|
-
this.$typeName = TerminateVaultEvent.$typeName;
|
|
3310
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TerminateVaultEvent.$typeName], __read(typeArgs), false));
|
|
3311
|
-
this.$typeArgs = typeArgs;
|
|
3312
|
-
this.signer = fields.signer;
|
|
3313
|
-
;
|
|
3314
|
-
this.index = fields.index;
|
|
3315
|
-
;
|
|
3316
|
-
this.round = fields.round;
|
|
3317
|
-
;
|
|
3318
|
-
this.u64Padding = fields.u64Padding;
|
|
3319
|
-
}
|
|
3320
|
-
TerminateVaultEvent.reified = function () {
|
|
3321
|
-
var _this = this;
|
|
3322
|
-
return { typeName: TerminateVaultEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TerminateVaultEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return TerminateVaultEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return TerminateVaultEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return TerminateVaultEvent.fromBcs(data); }, bcs: TerminateVaultEvent.bcs, fromJSONField: function (field) { return TerminateVaultEvent.fromJSONField(field); }, fromJSON: function (json) { return TerminateVaultEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return TerminateVaultEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3323
|
-
return [2 /*return*/, TerminateVaultEvent.fetch(client, id)];
|
|
3324
|
-
}); }); }, new: function (fields) { return new TerminateVaultEvent([], fields); }, kind: "StructClassReified", };
|
|
3325
|
-
};
|
|
3326
|
-
Object.defineProperty(TerminateVaultEvent, "r", {
|
|
3327
|
-
get: function () { return TerminateVaultEvent.reified(); },
|
|
3328
|
-
enumerable: false,
|
|
3329
|
-
configurable: true
|
|
3330
|
-
});
|
|
3331
|
-
TerminateVaultEvent.phantom = function () { return (0, reified_1.phantom)(TerminateVaultEvent.reified()); };
|
|
3332
|
-
Object.defineProperty(TerminateVaultEvent, "p", {
|
|
3333
|
-
get: function () { return TerminateVaultEvent.phantom(); },
|
|
3334
|
-
enumerable: false,
|
|
3335
|
-
configurable: true
|
|
3336
|
-
});
|
|
3337
|
-
Object.defineProperty(TerminateVaultEvent, "bcs", {
|
|
3338
|
-
get: function () {
|
|
3339
|
-
return bcs_1.bcs.struct("TerminateVaultEvent", {
|
|
3340
|
-
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(), round: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
3341
|
-
});
|
|
3342
|
-
},
|
|
3343
|
-
enumerable: false,
|
|
3344
|
-
configurable: true
|
|
3345
|
-
});
|
|
3346
|
-
;
|
|
3347
|
-
TerminateVaultEvent.fromFields = function (fields) { return TerminateVaultEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), round: (0, reified_1.decodeFromFields)("u64", fields.round), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
3348
|
-
TerminateVaultEvent.fromFieldsWithTypes = function (item) {
|
|
3349
|
-
if (!isTerminateVaultEvent(item.type)) {
|
|
3350
|
-
throw new Error("not a TerminateVaultEvent type");
|
|
3351
|
-
}
|
|
3352
|
-
return TerminateVaultEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), round: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.round), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
3353
|
-
};
|
|
3354
|
-
TerminateVaultEvent.fromBcs = function (data) { return TerminateVaultEvent.fromFields(TerminateVaultEvent.bcs.parse(data)); };
|
|
3355
|
-
TerminateVaultEvent.prototype.toJSONField = function () {
|
|
3356
|
-
return {
|
|
3357
|
-
signer: this.signer, index: this.index.toString(), round: this.round.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3358
|
-
};
|
|
3359
|
-
};
|
|
3360
|
-
TerminateVaultEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
3361
|
-
TerminateVaultEvent.fromJSONField = function (field) { return TerminateVaultEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), round: (0, reified_1.decodeFromJSONField)("u64", field.round), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
3362
|
-
TerminateVaultEvent.fromJSON = function (json) {
|
|
3363
|
-
if (json.$typeName !== TerminateVaultEvent.$typeName) {
|
|
3364
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
3365
|
-
}
|
|
3366
|
-
;
|
|
3367
|
-
return TerminateVaultEvent.fromJSONField(json);
|
|
3368
|
-
};
|
|
3369
|
-
TerminateVaultEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
3370
|
-
throw new Error("not an object");
|
|
3371
|
-
} if (!isTerminateVaultEvent(content.type)) {
|
|
3372
|
-
throw new Error("object at ".concat(content.fields.id, " is not a TerminateVaultEvent object"));
|
|
3373
|
-
} return TerminateVaultEvent.fromFieldsWithTypes(content); };
|
|
3374
|
-
TerminateVaultEvent.fetch = function (client, id) {
|
|
3375
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3376
|
-
var res;
|
|
3377
|
-
var _a, _b;
|
|
3378
|
-
return __generator(this, function (_c) {
|
|
3379
|
-
switch (_c.label) {
|
|
3380
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3381
|
-
case 1:
|
|
3382
|
-
res = _c.sent();
|
|
3383
|
-
if (res.error) {
|
|
3384
|
-
throw new Error("error fetching TerminateVaultEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3385
|
-
}
|
|
3386
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTerminateVaultEvent(res.data.bcs.type)) {
|
|
3387
|
-
throw new Error("object at id ".concat(id, " is not a TerminateVaultEvent object"));
|
|
3388
|
-
}
|
|
3389
|
-
return [2 /*return*/, TerminateVaultEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3390
|
-
}
|
|
3391
|
-
});
|
|
3392
|
-
});
|
|
3393
|
-
};
|
|
3394
|
-
TerminateVaultEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::TerminateVaultEvent";
|
|
3395
|
-
TerminateVaultEvent.$numTypeParams = 0;
|
|
3396
|
-
return TerminateVaultEvent;
|
|
3397
|
-
}());
|
|
3398
|
-
exports.TerminateVaultEvent = TerminateVaultEvent;
|
|
3399
|
-
/* ============================== TransferBidReceiptEvent =============================== */
|
|
3400
|
-
function isTransferBidReceiptEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::TransferBidReceiptEvent"; }
|
|
3401
|
-
var TransferBidReceiptEvent = /** @class */ (function () {
|
|
3402
|
-
function TransferBidReceiptEvent(typeArgs, fields) {
|
|
3403
|
-
this.$typeName = TransferBidReceiptEvent.$typeName;
|
|
3404
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TransferBidReceiptEvent.$typeName], __read(typeArgs), false));
|
|
3405
|
-
this.$typeArgs = typeArgs;
|
|
3406
|
-
this.signer = fields.signer;
|
|
3407
|
-
;
|
|
3408
|
-
this.index = fields.index;
|
|
3409
|
-
;
|
|
3410
|
-
this.amount = fields.amount;
|
|
3411
|
-
;
|
|
3412
|
-
this.decimal = fields.decimal;
|
|
3413
|
-
;
|
|
3414
|
-
this.recipient = fields.recipient;
|
|
3415
|
-
;
|
|
3416
|
-
this.oracleInfo = fields.oracleInfo;
|
|
3417
|
-
;
|
|
3418
|
-
this.u64Padding = fields.u64Padding;
|
|
3419
|
-
}
|
|
3420
|
-
TransferBidReceiptEvent.reified = function () {
|
|
3421
|
-
var _this = this;
|
|
3422
|
-
return { typeName: TransferBidReceiptEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TransferBidReceiptEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return TransferBidReceiptEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return TransferBidReceiptEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return TransferBidReceiptEvent.fromBcs(data); }, bcs: TransferBidReceiptEvent.bcs, fromJSONField: function (field) { return TransferBidReceiptEvent.fromJSONField(field); }, fromJSON: function (json) { return TransferBidReceiptEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return TransferBidReceiptEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3423
|
-
return [2 /*return*/, TransferBidReceiptEvent.fetch(client, id)];
|
|
3424
|
-
}); }); }, new: function (fields) { return new TransferBidReceiptEvent([], fields); }, kind: "StructClassReified", };
|
|
3425
|
-
};
|
|
3426
|
-
Object.defineProperty(TransferBidReceiptEvent, "r", {
|
|
3427
|
-
get: function () { return TransferBidReceiptEvent.reified(); },
|
|
3428
|
-
enumerable: false,
|
|
3429
|
-
configurable: true
|
|
3430
|
-
});
|
|
3431
|
-
TransferBidReceiptEvent.phantom = function () { return (0, reified_1.phantom)(TransferBidReceiptEvent.reified()); };
|
|
3432
|
-
Object.defineProperty(TransferBidReceiptEvent, "p", {
|
|
3433
|
-
get: function () { return TransferBidReceiptEvent.phantom(); },
|
|
3434
|
-
enumerable: false,
|
|
3435
|
-
configurable: true
|
|
3436
|
-
});
|
|
3437
|
-
Object.defineProperty(TransferBidReceiptEvent, "bcs", {
|
|
3438
|
-
get: function () {
|
|
3439
|
-
return bcs_1.bcs.struct("TransferBidReceiptEvent", {
|
|
3440
|
-
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(), amount: bcs_1.bcs.u64(), decimal: bcs_1.bcs.u64(), recipient: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); }, }), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
3441
|
-
});
|
|
3442
|
-
},
|
|
3443
|
-
enumerable: false,
|
|
3444
|
-
configurable: true
|
|
3445
|
-
});
|
|
3446
|
-
;
|
|
3447
|
-
TransferBidReceiptEvent.fromFields = function (fields) { return TransferBidReceiptEvent.reified().new({ signer: (0, reified_1.decodeFromFields)("address", fields.signer), index: (0, reified_1.decodeFromFields)("u64", fields.index), amount: (0, reified_1.decodeFromFields)("u64", fields.amount), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), recipient: (0, reified_1.decodeFromFields)("address", fields.recipient), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
3448
|
-
TransferBidReceiptEvent.fromFieldsWithTypes = function (item) {
|
|
3449
|
-
if (!isTransferBidReceiptEvent(item.type)) {
|
|
3450
|
-
throw new Error("not a TransferBidReceiptEvent type");
|
|
3451
|
-
}
|
|
3452
|
-
return TransferBidReceiptEvent.reified().new({ signer: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.signer), index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index), amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), recipient: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.recipient), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
3453
|
-
};
|
|
3454
|
-
TransferBidReceiptEvent.fromBcs = function (data) { return TransferBidReceiptEvent.fromFields(TransferBidReceiptEvent.bcs.parse(data)); };
|
|
3455
|
-
TransferBidReceiptEvent.prototype.toJSONField = function () {
|
|
3456
|
-
return {
|
|
3457
|
-
signer: this.signer, index: this.index.toString(), amount: this.amount.toString(), decimal: this.decimal.toString(), recipient: this.recipient, oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3458
|
-
};
|
|
3459
|
-
};
|
|
3460
|
-
TransferBidReceiptEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
3461
|
-
TransferBidReceiptEvent.fromJSONField = function (field) { return TransferBidReceiptEvent.reified().new({ signer: (0, reified_1.decodeFromJSONField)("address", field.signer), index: (0, reified_1.decodeFromJSONField)("u64", field.index), amount: (0, reified_1.decodeFromJSONField)("u64", field.amount), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), recipient: (0, reified_1.decodeFromJSONField)("address", field.recipient), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
3462
|
-
TransferBidReceiptEvent.fromJSON = function (json) {
|
|
3463
|
-
if (json.$typeName !== TransferBidReceiptEvent.$typeName) {
|
|
3464
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
3465
|
-
}
|
|
3466
|
-
;
|
|
3467
|
-
return TransferBidReceiptEvent.fromJSONField(json);
|
|
3468
|
-
};
|
|
3469
|
-
TransferBidReceiptEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
3470
|
-
throw new Error("not an object");
|
|
3471
|
-
} if (!isTransferBidReceiptEvent(content.type)) {
|
|
3472
|
-
throw new Error("object at ".concat(content.fields.id, " is not a TransferBidReceiptEvent object"));
|
|
3473
|
-
} return TransferBidReceiptEvent.fromFieldsWithTypes(content); };
|
|
3474
|
-
TransferBidReceiptEvent.fetch = function (client, id) {
|
|
3475
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3476
|
-
var res;
|
|
3477
|
-
var _a, _b;
|
|
3478
|
-
return __generator(this, function (_c) {
|
|
3479
|
-
switch (_c.label) {
|
|
3480
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3481
|
-
case 1:
|
|
3482
|
-
res = _c.sent();
|
|
3483
|
-
if (res.error) {
|
|
3484
|
-
throw new Error("error fetching TransferBidReceiptEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3485
|
-
}
|
|
3486
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTransferBidReceiptEvent(res.data.bcs.type)) {
|
|
3487
|
-
throw new Error("object at id ".concat(id, " is not a TransferBidReceiptEvent object"));
|
|
3488
|
-
}
|
|
3489
|
-
return [2 /*return*/, TransferBidReceiptEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3490
|
-
}
|
|
3491
|
-
});
|
|
3492
|
-
});
|
|
3493
|
-
};
|
|
3494
|
-
TransferBidReceiptEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::TransferBidReceiptEvent";
|
|
3495
|
-
TransferBidReceiptEvent.$numTypeParams = 0;
|
|
3496
|
-
return TransferBidReceiptEvent;
|
|
3497
|
-
}());
|
|
3498
|
-
exports.TransferBidReceiptEvent = TransferBidReceiptEvent;
|
|
3499
|
-
/* ============================== UnsubscribeEvent =============================== */
|
|
3500
|
-
function isUnsubscribeEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::UnsubscribeEvent"; }
|
|
3501
|
-
var UnsubscribeEvent = /** @class */ (function () {
|
|
3502
|
-
function UnsubscribeEvent(typeArgs, fields) {
|
|
3503
|
-
this.$typeName = UnsubscribeEvent.$typeName;
|
|
3504
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UnsubscribeEvent.$typeName], __read(typeArgs), false));
|
|
3505
|
-
this.$typeArgs = typeArgs;
|
|
3506
|
-
this.signer = fields.signer;
|
|
3507
|
-
;
|
|
3508
|
-
this.index = fields.index;
|
|
3509
|
-
;
|
|
3510
|
-
this.token = fields.token;
|
|
3511
|
-
;
|
|
3512
|
-
this.amount = fields.amount;
|
|
3513
|
-
;
|
|
3514
|
-
this.decimal = fields.decimal;
|
|
3515
|
-
;
|
|
3516
|
-
this.oracleInfo = fields.oracleInfo;
|
|
3517
|
-
;
|
|
3518
|
-
this.u64Padding = fields.u64Padding;
|
|
3519
|
-
}
|
|
3520
|
-
UnsubscribeEvent.reified = function () {
|
|
3521
|
-
var _this = this;
|
|
3522
|
-
return { typeName: UnsubscribeEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UnsubscribeEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return UnsubscribeEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return UnsubscribeEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return UnsubscribeEvent.fromBcs(data); }, bcs: UnsubscribeEvent.bcs, fromJSONField: function (field) { return UnsubscribeEvent.fromJSONField(field); }, fromJSON: function (json) { return UnsubscribeEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return UnsubscribeEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3523
|
-
return [2 /*return*/, UnsubscribeEvent.fetch(client, id)];
|
|
3524
|
-
}); }); }, new: function (fields) { return new UnsubscribeEvent([], fields); }, kind: "StructClassReified", };
|
|
3525
|
-
};
|
|
3526
|
-
Object.defineProperty(UnsubscribeEvent, "r", {
|
|
3527
|
-
get: function () { return UnsubscribeEvent.reified(); },
|
|
3528
|
-
enumerable: false,
|
|
3529
|
-
configurable: true
|
|
3530
|
-
});
|
|
3531
|
-
UnsubscribeEvent.phantom = function () { return (0, reified_1.phantom)(UnsubscribeEvent.reified()); };
|
|
3532
|
-
Object.defineProperty(UnsubscribeEvent, "p", {
|
|
3533
|
-
get: function () { return UnsubscribeEvent.phantom(); },
|
|
3534
|
-
enumerable: false,
|
|
3535
|
-
configurable: true
|
|
3536
|
-
});
|
|
3537
|
-
Object.defineProperty(UnsubscribeEvent, "bcs", {
|
|
3538
|
-
get: function () {
|
|
3539
|
-
return bcs_1.bcs.struct("UnsubscribeEvent", {
|
|
3540
|
-
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(), decimal: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
3541
|
-
});
|
|
3542
|
-
},
|
|
3543
|
-
enumerable: false,
|
|
3544
|
-
configurable: true
|
|
3545
|
-
});
|
|
3546
|
-
;
|
|
3547
|
-
UnsubscribeEvent.fromFields = function (fields) { return UnsubscribeEvent.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), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
3548
|
-
UnsubscribeEvent.fromFieldsWithTypes = function (item) {
|
|
3549
|
-
if (!isUnsubscribeEvent(item.type)) {
|
|
3550
|
-
throw new Error("not a UnsubscribeEvent type");
|
|
3551
|
-
}
|
|
3552
|
-
return UnsubscribeEvent.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), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
3553
|
-
};
|
|
3554
|
-
UnsubscribeEvent.fromBcs = function (data) { return UnsubscribeEvent.fromFields(UnsubscribeEvent.bcs.parse(data)); };
|
|
3555
|
-
UnsubscribeEvent.prototype.toJSONField = function () {
|
|
3556
|
-
return {
|
|
3557
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), decimal: this.decimal.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3558
|
-
};
|
|
3559
|
-
};
|
|
3560
|
-
UnsubscribeEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
3561
|
-
UnsubscribeEvent.fromJSONField = function (field) { return UnsubscribeEvent.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), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
3562
|
-
UnsubscribeEvent.fromJSON = function (json) {
|
|
3563
|
-
if (json.$typeName !== UnsubscribeEvent.$typeName) {
|
|
3564
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
3565
|
-
}
|
|
3566
|
-
;
|
|
3567
|
-
return UnsubscribeEvent.fromJSONField(json);
|
|
3568
|
-
};
|
|
3569
|
-
UnsubscribeEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
3570
|
-
throw new Error("not an object");
|
|
3571
|
-
} if (!isUnsubscribeEvent(content.type)) {
|
|
3572
|
-
throw new Error("object at ".concat(content.fields.id, " is not a UnsubscribeEvent object"));
|
|
3573
|
-
} return UnsubscribeEvent.fromFieldsWithTypes(content); };
|
|
3574
|
-
UnsubscribeEvent.fetch = function (client, id) {
|
|
3575
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3576
|
-
var res;
|
|
3577
|
-
var _a, _b;
|
|
3578
|
-
return __generator(this, function (_c) {
|
|
3579
|
-
switch (_c.label) {
|
|
3580
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3581
|
-
case 1:
|
|
3582
|
-
res = _c.sent();
|
|
3583
|
-
if (res.error) {
|
|
3584
|
-
throw new Error("error fetching UnsubscribeEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3585
|
-
}
|
|
3586
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUnsubscribeEvent(res.data.bcs.type)) {
|
|
3587
|
-
throw new Error("object at id ".concat(id, " is not a UnsubscribeEvent object"));
|
|
3588
|
-
}
|
|
3589
|
-
return [2 /*return*/, UnsubscribeEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3590
|
-
}
|
|
3591
|
-
});
|
|
3592
|
-
});
|
|
3593
|
-
};
|
|
3594
|
-
UnsubscribeEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::UnsubscribeEvent";
|
|
3595
|
-
UnsubscribeEvent.$numTypeParams = 0;
|
|
3596
|
-
return UnsubscribeEvent;
|
|
3597
|
-
}());
|
|
3598
|
-
exports.UnsubscribeEvent = UnsubscribeEvent;
|
|
3599
|
-
/* ============================== VaultConfig =============================== */
|
|
3600
|
-
function isVaultConfig(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::VaultConfig"; }
|
|
3601
|
-
var VaultConfig = /** @class */ (function () {
|
|
3602
|
-
function VaultConfig(typeArgs, fields) {
|
|
3603
|
-
this.$typeName = VaultConfig.$typeName;
|
|
3604
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([VaultConfig.$typeName], __read(typeArgs), false));
|
|
3605
|
-
this.$typeArgs = typeArgs;
|
|
3606
|
-
this.payoffConfigs = fields.payoffConfigs;
|
|
3607
|
-
;
|
|
3608
|
-
this.strikeIncrement = fields.strikeIncrement;
|
|
3609
|
-
;
|
|
3610
|
-
this.decaySpeed = fields.decaySpeed;
|
|
3611
|
-
;
|
|
3612
|
-
this.initialPrice = fields.initialPrice;
|
|
3613
|
-
;
|
|
3614
|
-
this.finalPrice = fields.finalPrice;
|
|
3615
|
-
;
|
|
3616
|
-
this.u64Padding = fields.u64Padding;
|
|
3617
|
-
}
|
|
3618
|
-
VaultConfig.reified = function () {
|
|
3619
|
-
var _this = this;
|
|
3620
|
-
return { typeName: VaultConfig.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([VaultConfig.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return VaultConfig.fromFields(fields); }, fromFieldsWithTypes: function (item) { return VaultConfig.fromFieldsWithTypes(item); }, fromBcs: function (data) { return VaultConfig.fromBcs(data); }, bcs: VaultConfig.bcs, fromJSONField: function (field) { return VaultConfig.fromJSONField(field); }, fromJSON: function (json) { return VaultConfig.fromJSON(json); }, fromSuiParsedData: function (content) { return VaultConfig.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3621
|
-
return [2 /*return*/, VaultConfig.fetch(client, id)];
|
|
3622
|
-
}); }); }, new: function (fields) { return new VaultConfig([], fields); }, kind: "StructClassReified", };
|
|
3623
|
-
};
|
|
3624
|
-
Object.defineProperty(VaultConfig, "r", {
|
|
3625
|
-
get: function () { return VaultConfig.reified(); },
|
|
3626
|
-
enumerable: false,
|
|
3627
|
-
configurable: true
|
|
3628
|
-
});
|
|
3629
|
-
VaultConfig.phantom = function () { return (0, reified_1.phantom)(VaultConfig.reified()); };
|
|
3630
|
-
Object.defineProperty(VaultConfig, "p", {
|
|
3631
|
-
get: function () { return VaultConfig.phantom(); },
|
|
3632
|
-
enumerable: false,
|
|
3633
|
-
configurable: true
|
|
3634
|
-
});
|
|
3635
|
-
Object.defineProperty(VaultConfig, "bcs", {
|
|
3636
|
-
get: function () {
|
|
3637
|
-
return bcs_1.bcs.struct("VaultConfig", {
|
|
3638
|
-
payoff_configs: bcs_1.bcs.vector(PayoffConfig.bcs), strike_increment: bcs_1.bcs.u64(), decay_speed: bcs_1.bcs.u64(), initial_price: bcs_1.bcs.u64(), final_price: bcs_1.bcs.u64(), u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
3639
|
-
});
|
|
3640
|
-
},
|
|
3641
|
-
enumerable: false,
|
|
3642
|
-
configurable: true
|
|
3643
|
-
});
|
|
3644
|
-
;
|
|
3645
|
-
VaultConfig.fromFields = function (fields) { return VaultConfig.reified().new({ payoffConfigs: (0, reified_1.decodeFromFields)(reified.vector(PayoffConfig.reified()), fields.payoff_configs), strikeIncrement: (0, reified_1.decodeFromFields)("u64", fields.strike_increment), decaySpeed: (0, reified_1.decodeFromFields)("u64", fields.decay_speed), initialPrice: (0, reified_1.decodeFromFields)("u64", fields.initial_price), finalPrice: (0, reified_1.decodeFromFields)("u64", fields.final_price), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
3646
|
-
VaultConfig.fromFieldsWithTypes = function (item) {
|
|
3647
|
-
if (!isVaultConfig(item.type)) {
|
|
3648
|
-
throw new Error("not a VaultConfig type");
|
|
3649
|
-
}
|
|
3650
|
-
return VaultConfig.reified().new({ payoffConfigs: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(PayoffConfig.reified()), item.fields.payoff_configs), strikeIncrement: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.strike_increment), decaySpeed: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decay_speed), initialPrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.initial_price), finalPrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.final_price), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
3651
|
-
};
|
|
3652
|
-
VaultConfig.fromBcs = function (data) { return VaultConfig.fromFields(VaultConfig.bcs.parse(data)); };
|
|
3653
|
-
VaultConfig.prototype.toJSONField = function () {
|
|
3654
|
-
return {
|
|
3655
|
-
payoffConfigs: (0, reified_1.fieldToJSON)("vector<0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::PayoffConfig>", this.payoffConfigs), strikeIncrement: this.strikeIncrement.toString(), decaySpeed: this.decaySpeed.toString(), initialPrice: this.initialPrice.toString(), finalPrice: this.finalPrice.toString(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3656
|
-
};
|
|
3657
|
-
};
|
|
3658
|
-
VaultConfig.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
3659
|
-
VaultConfig.fromJSONField = function (field) { return VaultConfig.reified().new({ payoffConfigs: (0, reified_1.decodeFromJSONField)(reified.vector(PayoffConfig.reified()), field.payoffConfigs), strikeIncrement: (0, reified_1.decodeFromJSONField)("u64", field.strikeIncrement), decaySpeed: (0, reified_1.decodeFromJSONField)("u64", field.decaySpeed), initialPrice: (0, reified_1.decodeFromJSONField)("u64", field.initialPrice), finalPrice: (0, reified_1.decodeFromJSONField)("u64", field.finalPrice), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
3660
|
-
VaultConfig.fromJSON = function (json) {
|
|
3661
|
-
if (json.$typeName !== VaultConfig.$typeName) {
|
|
3662
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
3663
|
-
}
|
|
3664
|
-
;
|
|
3665
|
-
return VaultConfig.fromJSONField(json);
|
|
3666
|
-
};
|
|
3667
|
-
VaultConfig.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
3668
|
-
throw new Error("not an object");
|
|
3669
|
-
} if (!isVaultConfig(content.type)) {
|
|
3670
|
-
throw new Error("object at ".concat(content.fields.id, " is not a VaultConfig object"));
|
|
3671
|
-
} return VaultConfig.fromFieldsWithTypes(content); };
|
|
3672
|
-
VaultConfig.fetch = function (client, id) {
|
|
3673
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3674
|
-
var res;
|
|
3675
|
-
var _a, _b;
|
|
3676
|
-
return __generator(this, function (_c) {
|
|
3677
|
-
switch (_c.label) {
|
|
3678
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3679
|
-
case 1:
|
|
3680
|
-
res = _c.sent();
|
|
3681
|
-
if (res.error) {
|
|
3682
|
-
throw new Error("error fetching VaultConfig object at id ".concat(id, ": ").concat(res.error.code));
|
|
3683
|
-
}
|
|
3684
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isVaultConfig(res.data.bcs.type)) {
|
|
3685
|
-
throw new Error("object at id ".concat(id, " is not a VaultConfig object"));
|
|
3686
|
-
}
|
|
3687
|
-
return [2 /*return*/, VaultConfig.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3688
|
-
}
|
|
3689
|
-
});
|
|
3690
|
-
});
|
|
3691
|
-
};
|
|
3692
|
-
VaultConfig.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::VaultConfig";
|
|
3693
|
-
VaultConfig.$numTypeParams = 0;
|
|
3694
|
-
return VaultConfig;
|
|
3695
|
-
}());
|
|
3696
|
-
exports.VaultConfig = VaultConfig;
|
|
3697
|
-
/* ============================== WithdrawEvent =============================== */
|
|
3698
|
-
function isWithdrawEvent(type) { type = (0, util_1.compressSuiType)(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::WithdrawEvent"; }
|
|
3699
|
-
var WithdrawEvent = /** @class */ (function () {
|
|
3700
|
-
function WithdrawEvent(typeArgs, fields) {
|
|
3701
|
-
this.$typeName = WithdrawEvent.$typeName;
|
|
3702
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([WithdrawEvent.$typeName], __read(typeArgs), false));
|
|
3703
|
-
this.$typeArgs = typeArgs;
|
|
3704
|
-
this.signer = fields.signer;
|
|
3705
|
-
;
|
|
3706
|
-
this.index = fields.index;
|
|
3707
|
-
;
|
|
3708
|
-
this.token = fields.token;
|
|
3709
|
-
;
|
|
3710
|
-
this.amount = fields.amount;
|
|
3711
|
-
;
|
|
3712
|
-
this.decimal = fields.decimal;
|
|
3713
|
-
;
|
|
3714
|
-
this.oracleInfo = fields.oracleInfo;
|
|
3715
|
-
;
|
|
3716
|
-
this.u64Padding = fields.u64Padding;
|
|
3717
|
-
}
|
|
3718
|
-
WithdrawEvent.reified = function () {
|
|
3719
|
-
var _this = this;
|
|
3720
|
-
return { typeName: WithdrawEvent.$typeName, fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([WithdrawEvent.$typeName], [], false)), typeArgs: [], reifiedTypeArgs: [], fromFields: function (fields) { return WithdrawEvent.fromFields(fields); }, fromFieldsWithTypes: function (item) { return WithdrawEvent.fromFieldsWithTypes(item); }, fromBcs: function (data) { return WithdrawEvent.fromBcs(data); }, bcs: WithdrawEvent.bcs, fromJSONField: function (field) { return WithdrawEvent.fromJSONField(field); }, fromJSON: function (json) { return WithdrawEvent.fromJSON(json); }, fromSuiParsedData: function (content) { return WithdrawEvent.fromSuiParsedData(content); }, fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3721
|
-
return [2 /*return*/, WithdrawEvent.fetch(client, id)];
|
|
3722
|
-
}); }); }, new: function (fields) { return new WithdrawEvent([], fields); }, kind: "StructClassReified", };
|
|
3723
|
-
};
|
|
3724
|
-
Object.defineProperty(WithdrawEvent, "r", {
|
|
3725
|
-
get: function () { return WithdrawEvent.reified(); },
|
|
3726
|
-
enumerable: false,
|
|
3727
|
-
configurable: true
|
|
3728
|
-
});
|
|
3729
|
-
WithdrawEvent.phantom = function () { return (0, reified_1.phantom)(WithdrawEvent.reified()); };
|
|
3730
|
-
Object.defineProperty(WithdrawEvent, "p", {
|
|
3731
|
-
get: function () { return WithdrawEvent.phantom(); },
|
|
3732
|
-
enumerable: false,
|
|
3733
|
-
configurable: true
|
|
3734
|
-
});
|
|
3735
|
-
Object.defineProperty(WithdrawEvent, "bcs", {
|
|
3736
|
-
get: function () {
|
|
3737
|
-
return bcs_1.bcs.struct("WithdrawEvent", {
|
|
3738
|
-
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(), decimal: bcs_1.bcs.u64(), oracle_info: OracleInfo.bcs, u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
3739
|
-
});
|
|
3740
|
-
},
|
|
3741
|
-
enumerable: false,
|
|
3742
|
-
configurable: true
|
|
3743
|
-
});
|
|
3744
|
-
;
|
|
3745
|
-
WithdrawEvent.fromFields = function (fields) { return WithdrawEvent.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), decimal: (0, reified_1.decodeFromFields)("u64", fields.decimal), oracleInfo: (0, reified_1.decodeFromFields)(OracleInfo.reified(), fields.oracle_info), u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding) }); };
|
|
3746
|
-
WithdrawEvent.fromFieldsWithTypes = function (item) {
|
|
3747
|
-
if (!isWithdrawEvent(item.type)) {
|
|
3748
|
-
throw new Error("not a WithdrawEvent type");
|
|
3749
|
-
}
|
|
3750
|
-
return WithdrawEvent.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), decimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.decimal), oracleInfo: (0, reified_1.decodeFromFieldsWithTypes)(OracleInfo.reified(), item.fields.oracle_info), u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding) });
|
|
3751
|
-
};
|
|
3752
|
-
WithdrawEvent.fromBcs = function (data) { return WithdrawEvent.fromFields(WithdrawEvent.bcs.parse(data)); };
|
|
3753
|
-
WithdrawEvent.prototype.toJSONField = function () {
|
|
3754
|
-
return {
|
|
3755
|
-
signer: this.signer, index: this.index.toString(), token: this.token.toJSONField(), amount: this.amount.toString(), decimal: this.decimal.toString(), oracleInfo: this.oracleInfo.toJSONField(), u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3756
|
-
};
|
|
3757
|
-
};
|
|
3758
|
-
WithdrawEvent.prototype.toJSON = function () { return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField()); };
|
|
3759
|
-
WithdrawEvent.fromJSONField = function (field) { return WithdrawEvent.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), decimal: (0, reified_1.decodeFromJSONField)("u64", field.decimal), oracleInfo: (0, reified_1.decodeFromJSONField)(OracleInfo.reified(), field.oracleInfo), u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding) }); };
|
|
3760
|
-
WithdrawEvent.fromJSON = function (json) {
|
|
3761
|
-
if (json.$typeName !== WithdrawEvent.$typeName) {
|
|
3762
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
3763
|
-
}
|
|
3764
|
-
;
|
|
3765
|
-
return WithdrawEvent.fromJSONField(json);
|
|
3766
|
-
};
|
|
3767
|
-
WithdrawEvent.fromSuiParsedData = function (content) { if (content.dataType !== "moveObject") {
|
|
3768
|
-
throw new Error("not an object");
|
|
3769
|
-
} if (!isWithdrawEvent(content.type)) {
|
|
3770
|
-
throw new Error("object at ".concat(content.fields.id, " is not a WithdrawEvent object"));
|
|
3771
|
-
} return WithdrawEvent.fromFieldsWithTypes(content); };
|
|
3772
|
-
WithdrawEvent.fetch = function (client, id) {
|
|
3773
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3774
|
-
var res;
|
|
3775
|
-
var _a, _b;
|
|
3776
|
-
return __generator(this, function (_c) {
|
|
3777
|
-
switch (_c.label) {
|
|
3778
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true, }, })];
|
|
3779
|
-
case 1:
|
|
3780
|
-
res = _c.sent();
|
|
3781
|
-
if (res.error) {
|
|
3782
|
-
throw new Error("error fetching WithdrawEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3783
|
-
}
|
|
3784
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isWithdrawEvent(res.data.bcs.type)) {
|
|
3785
|
-
throw new Error("object at id ".concat(id, " is not a WithdrawEvent object"));
|
|
3786
|
-
}
|
|
3787
|
-
return [2 /*return*/, WithdrawEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
|
|
3788
|
-
}
|
|
3789
|
-
});
|
|
3790
|
-
});
|
|
3791
|
-
};
|
|
3792
|
-
WithdrawEvent.$typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::WithdrawEvent";
|
|
3793
|
-
WithdrawEvent.$numTypeParams = 0;
|
|
3794
|
-
return WithdrawEvent;
|
|
3795
|
-
}());
|
|
3796
|
-
exports.WithdrawEvent = WithdrawEvent;
|