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