@typus/typus-sdk 1.4.3-c → 1.4.3-e
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/package.json +10 -2
- package/src/_dependencies/source/0x1/ascii/structs.ts +135 -0
- package/src/_dependencies/source/0x1/bit-vector/structs.ts +70 -0
- package/src/_dependencies/source/0x1/fixed-point32/structs.ts +69 -0
- package/src/_dependencies/source/0x1/index.ts +1 -0
- package/src/_dependencies/source/0x1/init.ts +16 -0
- package/src/_dependencies/source/0x1/option/structs.ts +74 -0
- package/src/_dependencies/source/0x1/string/structs.ts +70 -0
- package/src/_dependencies/source/0x1/type-name/structs.ts +70 -0
- package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.ts +1 -0
- package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.ts +14 -0
- package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.ts +203 -0
- package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.ts +317 -0
- package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.ts +69 -0
- package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.ts +69 -0
- package/src/_dependencies/source/0x2/authenticator-state/structs.ts +332 -0
- package/src/_dependencies/source/0x2/bag/structs.ts +70 -0
- package/src/_dependencies/source/0x2/balance/structs.ts +134 -0
- package/src/_dependencies/source/0x2/bcs/structs.ts +70 -0
- package/src/_dependencies/source/0x2/bls12381/structs.ts +264 -0
- package/src/_dependencies/source/0x2/borrow/structs.ts +138 -0
- package/src/_dependencies/source/0x2/clock/structs.ts +70 -0
- package/src/_dependencies/source/0x2/coin/structs.ts +400 -0
- package/src/_dependencies/source/0x2/deny-list/structs.ts +139 -0
- package/src/_dependencies/source/0x2/display/structs.ts +202 -0
- package/src/_dependencies/source/0x2/dynamic-field/structs.ts +70 -0
- package/src/_dependencies/source/0x2/dynamic-object-field/structs.ts +71 -0
- package/src/_dependencies/source/0x2/groth16/structs.ts +265 -0
- package/src/_dependencies/source/0x2/group-ops/structs.ts +70 -0
- package/src/_dependencies/source/0x2/index.ts +1 -0
- package/src/_dependencies/source/0x2/init.ts +125 -0
- package/src/_dependencies/source/0x2/kiosk/structs.ts +658 -0
- package/src/_dependencies/source/0x2/kiosk-extension/structs.ts +135 -0
- package/src/_dependencies/source/0x2/linked-table/structs.ts +136 -0
- package/src/_dependencies/source/0x2/object/structs.ts +134 -0
- package/src/_dependencies/source/0x2/object-bag/structs.ts +70 -0
- package/src/_dependencies/source/0x2/object-table/structs.ts +70 -0
- package/src/_dependencies/source/0x2/package/structs.ts +267 -0
- package/src/_dependencies/source/0x2/priority-queue/structs.ts +139 -0
- package/src/_dependencies/source/0x2/random/structs.ts +202 -0
- package/src/_dependencies/source/0x2/sui/structs.ts +69 -0
- package/src/_dependencies/source/0x2/table/structs.ts +70 -0
- package/src/_dependencies/source/0x2/table-vec/structs.ts +71 -0
- package/src/_dependencies/source/0x2/token/structs.ts +401 -0
- package/src/_dependencies/source/0x2/transfer/structs.ts +70 -0
- package/src/_dependencies/source/0x2/transfer-policy/structs.ts +400 -0
- package/src/_dependencies/source/0x2/tx-context/structs.ts +70 -0
- package/src/_dependencies/source/0x2/url/structs.ts +70 -0
- package/src/_dependencies/source/0x2/vec-map/structs.ts +135 -0
- package/src/_dependencies/source/0x2/vec-set/structs.ts +72 -0
- package/src/_dependencies/source/0x2/versioned/structs.ts +135 -0
- package/src/_dependencies/source/0x2/zklogin-verified-id/structs.ts +71 -0
- package/src/_dependencies/source/0x2/zklogin-verified-issuer/structs.ts +71 -0
- package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.ts +1 -0
- package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.ts +5 -0
- package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.ts +70 -0
- package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.ts +1 -0
- package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.ts +8 -0
- package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.ts +69 -0
- package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.ts +135 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.ts +400 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.ts +372 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.ts +205 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.ts +333 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.ts +1 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.ts +48 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.ts +465 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.ts +136 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.ts +140 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.ts +268 -0
- package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.ts +332 -0
- package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.ts +466 -0
- package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.ts +1 -0
- package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.ts +36 -0
- package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.ts +134 -0
- package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.ts +333 -0
- package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.ts +71 -0
- package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.ts +856 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.ts +1049 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.ts +1 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.ts +104 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.ts +1054 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.ts +592 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.ts +461 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.ts +592 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.ts +69 -0
- package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.ts +2351 -0
- package/src/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.ts +1 -0
- package/src/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.ts +3 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.ts +71 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.ts +203 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.ts +70 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.ts +528 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.ts +69 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.ts +1 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.ts +54 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.ts +136 -0
- package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.ts +1829 -0
- package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.ts +398 -0
- package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.ts +1 -0
- package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.ts +18 -0
- package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.ts +71 -0
- package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.ts +69 -0
- package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.ts +71 -0
- package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.ts +70 -0
- package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.ts +1 -0
- package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.ts +11 -0
- package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.ts +134 -0
- package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.ts +134 -0
- package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.ts +69 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes20/structs.ts +70 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes32/structs.ts +70 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/consumed-vaas/structs.ts +72 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/cursor/structs.ts +72 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/emitter/structs.ts +200 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/external-address/structs.ts +70 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/fee-collector/structs.ts +72 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/governance-message/structs.ts +137 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian/structs.ts +70 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-set/structs.ts +71 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-signature/structs.ts +70 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.ts +1 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/init.ts +65 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/migrate/structs.ts +70 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/package-utils/structs.ts +266 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/publish-message/structs.ts +136 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set/structs.ts +136 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set-fee/structs.ts +134 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/setup/structs.ts +70 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/state/structs.ts +142 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/transfer-fee/structs.ts +134 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/update-guardian-set/structs.ts +201 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/upgrade-contract/structs.ts +201 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/vaa/structs.ts +72 -0
- package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/version-control/structs.ts +134 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/batch-price-attestation/structs.ts +136 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/contract-upgrade/structs.ts +136 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/data-source/structs.ts +70 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/event/structs.ts +135 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance/structs.ts +71 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-action/structs.ts +69 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-instruction/structs.ts +71 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/hot-potato-vector/structs.ts +72 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/i64/structs.ts +69 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.ts +1 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/init.ts +59 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/migrate/structs.ts +70 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price/structs.ts +70 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-feed/structs.ts +71 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-identifier/structs.ts +70 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-info/structs.ts +136 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-status/structs.ts +69 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set/structs.ts +138 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-data-sources/structs.ts +71 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-fee-recipient/structs.ts +69 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-governance-data-source/structs.ts +70 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-stale-price-threshold/structs.ts +69 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-update-fee/structs.ts +69 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/setup/structs.ts +70 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/state/structs.ts +203 -0
- package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.ts +134 -0
- package/src/_framework/init-source.ts +39 -0
- package/src/_framework/loader.ts +69 -0
- package/src/_framework/reified.ts +442 -0
- package/src/_framework/util.ts +265 -0
- package/src/airdrop/authority-entry.ts +101 -0
- package/src/airdrop/index.ts +3 -0
- package/src/airdrop/user-entry.ts +24 -0
- package/src/airdrop/view-function.ts +36 -0
- package/src/auto-bid/index.ts +2 -0
- package/src/auto-bid/user-entry.ts +256 -0
- package/src/auto-bid/view-function.ts +285 -0
- package/src/constants/constant.ts +32 -0
- package/src/constants/index.ts +2 -0
- package/src/constants/token.ts +194 -0
- package/src/index.ts +11 -0
- package/src/leaderboard/authority-entry.ts +63 -0
- package/src/leaderboard/index.ts +2 -0
- package/src/leaderboard/view-function.ts +66 -0
- package/src/tails-exp-dice/api.ts +46 -0
- package/src/tails-exp-dice/fetch.ts +347 -0
- package/src/tails-exp-dice/index.ts +4 -0
- package/src/tails-exp-dice/user-entry.ts +241 -0
- package/src/tails-exp-dice/view-function.ts +111 -0
- package/src/tails-staking/authority-entry.ts +333 -0
- package/src/tails-staking/index.ts +3 -0
- package/src/tails-staking/user-entry.ts +401 -0
- package/src/tails-staking/view-function.ts +86 -0
- package/src/typus-dov-single-v2/entry/authority-entry.ts +171 -0
- package/src/typus-dov-single-v2/entry/index.ts +3 -0
- package/src/typus-dov-single-v2/entry/mfud-user-entry.ts +591 -0
- package/src/typus-dov-single-v2/entry/user-entry.ts +573 -0
- package/src/typus-dov-single-v2/function/bidding.ts +823 -0
- package/src/typus-dov-single-v2/function/index.ts +3 -0
- package/src/typus-dov-single-v2/function/token.ts +38 -0
- package/src/typus-dov-single-v2/function/vault.ts +24 -0
- package/src/typus-dov-single-v2/history/index.ts +2 -0
- package/src/typus-dov-single-v2/history/user-history.ts +929 -0
- package/src/typus-dov-single-v2/history/vault-history.ts +452 -0
- package/src/typus-dov-single-v2/index.ts +4 -0
- package/src/typus-dov-single-v2/view-function.ts +705 -0
- package/src/typus-nft/fetch.ts +428 -0
- package/src/typus-nft/index.ts +2 -0
- package/src/typus-nft/user-entry.ts +113 -0
- package/src/typus-perp/admin/functions.ts +141 -0
- package/src/typus-perp/admin/structs.ts +793 -0
- package/src/typus-perp/fetch.ts +253 -0
- package/src/typus-perp/index.ts +9 -0
- package/src/typus-perp/init.ts +96 -0
- package/src/typus-perp/lp-pool/functions.ts +694 -0
- package/src/typus-perp/lp-pool/structs.ts +3884 -0
- package/src/typus-perp/math/functions.ts +53 -0
- package/src/typus-perp/oracle/functions.ts +32 -0
- package/src/typus-perp/oracle/structs.ts +317 -0
- package/src/typus-perp/position/functions.ts +887 -0
- package/src/typus-perp/position/structs.ts +1637 -0
- package/src/typus-perp/readVec.ts +118 -0
- package/src/typus-perp/stake-pool/functions.ts +421 -0
- package/src/typus-perp/stake-pool/structs.ts +3873 -0
- package/src/typus-perp/symbol/functions.ts +24 -0
- package/src/typus-perp/symbol/structs.ts +165 -0
- package/src/typus-perp/tlp/functions.ts +50 -0
- package/src/typus-perp/tlp/structs.ts +287 -0
- package/src/typus-perp/token-interface/functions.ts +29 -0
- package/src/typus-perp/trading/functions.ts +1046 -0
- package/src/typus-perp/trading/structs.ts +4541 -0
- package/src/typus-perp/treasury-caps/functions.ts +36 -0
- package/src/typus-perp/treasury-caps/structs.ts +151 -0
- package/src/typus-perp/user/order.ts +221 -0
- package/src/typus-perp/user/orderWithBidReceipt.ts +176 -0
- package/src/typus-perp/user/tlp.ts +234 -0
- package/src/user/index.ts +1 -0
- package/src/user/view-function.ts +33 -0
- package/src/utils/.DS_Store +0 -0
- package/src/utils/api/defillama/index.ts +1 -0
- package/src/utils/api/defillama/tvl.ts +11 -0
- package/src/utils/api/index.ts +3 -0
- package/src/utils/api/price.ts +101 -0
- package/src/utils/api/sentio/index.ts +2 -0
- package/src/utils/api/sentio/leader-board.ts +259 -0
- package/src/utils/api/sentio/reward-generated.ts +392 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/load_env.ts +5 -0
- package/src/utils/mint.ts +16 -0
- package/src/utils/pyth/constant.ts +71 -0
- package/src/utils/pyth/index.ts +2 -0
- package/src/utils/pyth/pythClient.ts +52 -0
- package/src/utils/tools.ts +38 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import * as reified from "../../../../_framework/reified";
|
|
2
|
+
import {PhantomReified, Reified, StructClass, ToField, ToTypeStr, Vector, decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, fieldToJSON, phantom} from "../../../../_framework/reified";
|
|
3
|
+
import {FieldsWithTypes, composeSuiType, compressSuiType} from "../../../../_framework/util";
|
|
4
|
+
import {TypeName} from "../../0x1/type-name/structs";
|
|
5
|
+
import {Config, VaultConfig} from "../typus-dov-single/structs";
|
|
6
|
+
import {bcs, fromB64, fromHEX, toHEX} from "@mysten/bcs";
|
|
7
|
+
import {SuiClient, SuiParsedData} from "@mysten/sui.js/client";
|
|
8
|
+
|
|
9
|
+
/* ============================== AddPortfolioVaultAuthorizedUserEvent =============================== */
|
|
10
|
+
|
|
11
|
+
export function isAddPortfolioVaultAuthorizedUserEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::AddPortfolioVaultAuthorizedUserEvent"; }
|
|
12
|
+
|
|
13
|
+
export interface AddPortfolioVaultAuthorizedUserEventFields { signer: ToField<"address">; index: ToField<"u64">; users: ToField<Vector<"address">> }
|
|
14
|
+
|
|
15
|
+
export type AddPortfolioVaultAuthorizedUserEventReified = Reified< AddPortfolioVaultAuthorizedUserEvent, AddPortfolioVaultAuthorizedUserEventFields >;
|
|
16
|
+
|
|
17
|
+
export class AddPortfolioVaultAuthorizedUserEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::AddPortfolioVaultAuthorizedUserEvent"; static readonly $numTypeParams = 0;
|
|
18
|
+
|
|
19
|
+
readonly $typeName = AddPortfolioVaultAuthorizedUserEvent.$typeName;
|
|
20
|
+
|
|
21
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::AddPortfolioVaultAuthorizedUserEvent";
|
|
22
|
+
|
|
23
|
+
readonly $typeArgs: [];
|
|
24
|
+
|
|
25
|
+
readonly signer: ToField<"address">; readonly index: ToField<"u64">; readonly users: ToField<Vector<"address">>
|
|
26
|
+
|
|
27
|
+
private constructor(typeArgs: [], fields: AddPortfolioVaultAuthorizedUserEventFields, ) { this.$fullTypeName = composeSuiType( AddPortfolioVaultAuthorizedUserEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::AddPortfolioVaultAuthorizedUserEvent"; this.$typeArgs = typeArgs;
|
|
28
|
+
|
|
29
|
+
this.signer = fields.signer;; this.index = fields.index;; this.users = fields.users; }
|
|
30
|
+
|
|
31
|
+
static reified( ): AddPortfolioVaultAuthorizedUserEventReified { return { typeName: AddPortfolioVaultAuthorizedUserEvent.$typeName, fullTypeName: composeSuiType( AddPortfolioVaultAuthorizedUserEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::AddPortfolioVaultAuthorizedUserEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => AddPortfolioVaultAuthorizedUserEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => AddPortfolioVaultAuthorizedUserEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => AddPortfolioVaultAuthorizedUserEvent.fromBcs( data, ), bcs: AddPortfolioVaultAuthorizedUserEvent.bcs, fromJSONField: (field: any) => AddPortfolioVaultAuthorizedUserEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => AddPortfolioVaultAuthorizedUserEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => AddPortfolioVaultAuthorizedUserEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => AddPortfolioVaultAuthorizedUserEvent.fetch( client, id, ), new: ( fields: AddPortfolioVaultAuthorizedUserEventFields, ) => { return new AddPortfolioVaultAuthorizedUserEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
32
|
+
|
|
33
|
+
static get r() { return AddPortfolioVaultAuthorizedUserEvent.reified() }
|
|
34
|
+
|
|
35
|
+
static phantom( ): PhantomReified<ToTypeStr<AddPortfolioVaultAuthorizedUserEvent>> { return phantom(AddPortfolioVaultAuthorizedUserEvent.reified( )); } static get p() { return AddPortfolioVaultAuthorizedUserEvent.phantom() }
|
|
36
|
+
|
|
37
|
+
static get bcs() { return bcs.struct("AddPortfolioVaultAuthorizedUserEvent", {
|
|
38
|
+
|
|
39
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), index: bcs.u64(), users: bcs.vector(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
|
|
40
|
+
|
|
41
|
+
}) };
|
|
42
|
+
|
|
43
|
+
static fromFields( fields: Record<string, any> ): AddPortfolioVaultAuthorizedUserEvent { return AddPortfolioVaultAuthorizedUserEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), index: decodeFromFields("u64", fields.index), users: decodeFromFields(reified.vector("address"), fields.users) } ) }
|
|
44
|
+
|
|
45
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): AddPortfolioVaultAuthorizedUserEvent { if (!isAddPortfolioVaultAuthorizedUserEvent(item.type)) { throw new Error("not a AddPortfolioVaultAuthorizedUserEvent type");
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return AddPortfolioVaultAuthorizedUserEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), index: decodeFromFieldsWithTypes("u64", item.fields.index), users: decodeFromFieldsWithTypes(reified.vector("address"), item.fields.users) } ) }
|
|
50
|
+
|
|
51
|
+
static fromBcs( data: Uint8Array ): AddPortfolioVaultAuthorizedUserEvent { return AddPortfolioVaultAuthorizedUserEvent.fromFields( AddPortfolioVaultAuthorizedUserEvent.bcs.parse(data) ) }
|
|
52
|
+
|
|
53
|
+
toJSONField() { return {
|
|
54
|
+
|
|
55
|
+
signer: this.signer,index: this.index.toString(),users: fieldToJSON<Vector<"address">>(`vector<address>`, this.users),
|
|
56
|
+
|
|
57
|
+
} }
|
|
58
|
+
|
|
59
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
60
|
+
|
|
61
|
+
static fromJSONField( field: any ): AddPortfolioVaultAuthorizedUserEvent { return AddPortfolioVaultAuthorizedUserEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), index: decodeFromJSONField("u64", field.index), users: decodeFromJSONField(reified.vector("address"), field.users) } ) }
|
|
62
|
+
|
|
63
|
+
static fromJSON( json: Record<string, any> ): AddPortfolioVaultAuthorizedUserEvent { if (json.$typeName !== AddPortfolioVaultAuthorizedUserEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
64
|
+
|
|
65
|
+
return AddPortfolioVaultAuthorizedUserEvent.fromJSONField( json, ) }
|
|
66
|
+
|
|
67
|
+
static fromSuiParsedData( content: SuiParsedData ): AddPortfolioVaultAuthorizedUserEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isAddPortfolioVaultAuthorizedUserEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a AddPortfolioVaultAuthorizedUserEvent object`); } return AddPortfolioVaultAuthorizedUserEvent.fromFieldsWithTypes( content ); }
|
|
68
|
+
|
|
69
|
+
static async fetch( client: SuiClient, id: string ): Promise<AddPortfolioVaultAuthorizedUserEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching AddPortfolioVaultAuthorizedUserEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isAddPortfolioVaultAuthorizedUserEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a AddPortfolioVaultAuthorizedUserEvent object`); }
|
|
70
|
+
return AddPortfolioVaultAuthorizedUserEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ============================== FixedIncentiviseEvent =============================== */
|
|
75
|
+
|
|
76
|
+
export function isFixedIncentiviseEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::FixedIncentiviseEvent"; }
|
|
77
|
+
|
|
78
|
+
export interface FixedIncentiviseEventFields { signer: ToField<"address">; token: ToField<TypeName>; amount: ToField<"u64">; fixedIncentiveAmount: ToField<"u64"> }
|
|
79
|
+
|
|
80
|
+
export type FixedIncentiviseEventReified = Reified< FixedIncentiviseEvent, FixedIncentiviseEventFields >;
|
|
81
|
+
|
|
82
|
+
export class FixedIncentiviseEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::FixedIncentiviseEvent"; static readonly $numTypeParams = 0;
|
|
83
|
+
|
|
84
|
+
readonly $typeName = FixedIncentiviseEvent.$typeName;
|
|
85
|
+
|
|
86
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::FixedIncentiviseEvent";
|
|
87
|
+
|
|
88
|
+
readonly $typeArgs: [];
|
|
89
|
+
|
|
90
|
+
readonly signer: ToField<"address">; readonly token: ToField<TypeName>; readonly amount: ToField<"u64">; readonly fixedIncentiveAmount: ToField<"u64">
|
|
91
|
+
|
|
92
|
+
private constructor(typeArgs: [], fields: FixedIncentiviseEventFields, ) { this.$fullTypeName = composeSuiType( FixedIncentiviseEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::FixedIncentiviseEvent"; this.$typeArgs = typeArgs;
|
|
93
|
+
|
|
94
|
+
this.signer = fields.signer;; this.token = fields.token;; this.amount = fields.amount;; this.fixedIncentiveAmount = fields.fixedIncentiveAmount; }
|
|
95
|
+
|
|
96
|
+
static reified( ): FixedIncentiviseEventReified { return { typeName: FixedIncentiviseEvent.$typeName, fullTypeName: composeSuiType( FixedIncentiviseEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::FixedIncentiviseEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => FixedIncentiviseEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => FixedIncentiviseEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => FixedIncentiviseEvent.fromBcs( data, ), bcs: FixedIncentiviseEvent.bcs, fromJSONField: (field: any) => FixedIncentiviseEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => FixedIncentiviseEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => FixedIncentiviseEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => FixedIncentiviseEvent.fetch( client, id, ), new: ( fields: FixedIncentiviseEventFields, ) => { return new FixedIncentiviseEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
97
|
+
|
|
98
|
+
static get r() { return FixedIncentiviseEvent.reified() }
|
|
99
|
+
|
|
100
|
+
static phantom( ): PhantomReified<ToTypeStr<FixedIncentiviseEvent>> { return phantom(FixedIncentiviseEvent.reified( )); } static get p() { return FixedIncentiviseEvent.phantom() }
|
|
101
|
+
|
|
102
|
+
static get bcs() { return bcs.struct("FixedIncentiviseEvent", {
|
|
103
|
+
|
|
104
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), token: TypeName.bcs, amount: bcs.u64(), fixed_incentive_amount: bcs.u64()
|
|
105
|
+
|
|
106
|
+
}) };
|
|
107
|
+
|
|
108
|
+
static fromFields( fields: Record<string, any> ): FixedIncentiviseEvent { return FixedIncentiviseEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), token: decodeFromFields(TypeName.reified(), fields.token), amount: decodeFromFields("u64", fields.amount), fixedIncentiveAmount: decodeFromFields("u64", fields.fixed_incentive_amount) } ) }
|
|
109
|
+
|
|
110
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): FixedIncentiviseEvent { if (!isFixedIncentiviseEvent(item.type)) { throw new Error("not a FixedIncentiviseEvent type");
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return FixedIncentiviseEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), token: decodeFromFieldsWithTypes(TypeName.reified(), item.fields.token), amount: decodeFromFieldsWithTypes("u64", item.fields.amount), fixedIncentiveAmount: decodeFromFieldsWithTypes("u64", item.fields.fixed_incentive_amount) } ) }
|
|
115
|
+
|
|
116
|
+
static fromBcs( data: Uint8Array ): FixedIncentiviseEvent { return FixedIncentiviseEvent.fromFields( FixedIncentiviseEvent.bcs.parse(data) ) }
|
|
117
|
+
|
|
118
|
+
toJSONField() { return {
|
|
119
|
+
|
|
120
|
+
signer: this.signer,token: this.token.toJSONField(),amount: this.amount.toString(),fixedIncentiveAmount: this.fixedIncentiveAmount.toString(),
|
|
121
|
+
|
|
122
|
+
} }
|
|
123
|
+
|
|
124
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
125
|
+
|
|
126
|
+
static fromJSONField( field: any ): FixedIncentiviseEvent { return FixedIncentiviseEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), token: decodeFromJSONField(TypeName.reified(), field.token), amount: decodeFromJSONField("u64", field.amount), fixedIncentiveAmount: decodeFromJSONField("u64", field.fixedIncentiveAmount) } ) }
|
|
127
|
+
|
|
128
|
+
static fromJSON( json: Record<string, any> ): FixedIncentiviseEvent { if (json.$typeName !== FixedIncentiviseEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
129
|
+
|
|
130
|
+
return FixedIncentiviseEvent.fromJSONField( json, ) }
|
|
131
|
+
|
|
132
|
+
static fromSuiParsedData( content: SuiParsedData ): FixedIncentiviseEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isFixedIncentiviseEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a FixedIncentiviseEvent object`); } return FixedIncentiviseEvent.fromFieldsWithTypes( content ); }
|
|
133
|
+
|
|
134
|
+
static async fetch( client: SuiClient, id: string ): Promise<FixedIncentiviseEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching FixedIncentiviseEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isFixedIncentiviseEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a FixedIncentiviseEvent object`); }
|
|
135
|
+
return FixedIncentiviseEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* ============================== RemovePortfolioVaultAuthorizedUserEvent =============================== */
|
|
140
|
+
|
|
141
|
+
export function isRemovePortfolioVaultAuthorizedUserEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::RemovePortfolioVaultAuthorizedUserEvent"; }
|
|
142
|
+
|
|
143
|
+
export interface RemovePortfolioVaultAuthorizedUserEventFields { signer: ToField<"address">; index: ToField<"u64">; users: ToField<Vector<"address">> }
|
|
144
|
+
|
|
145
|
+
export type RemovePortfolioVaultAuthorizedUserEventReified = Reified< RemovePortfolioVaultAuthorizedUserEvent, RemovePortfolioVaultAuthorizedUserEventFields >;
|
|
146
|
+
|
|
147
|
+
export class RemovePortfolioVaultAuthorizedUserEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::RemovePortfolioVaultAuthorizedUserEvent"; static readonly $numTypeParams = 0;
|
|
148
|
+
|
|
149
|
+
readonly $typeName = RemovePortfolioVaultAuthorizedUserEvent.$typeName;
|
|
150
|
+
|
|
151
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::RemovePortfolioVaultAuthorizedUserEvent";
|
|
152
|
+
|
|
153
|
+
readonly $typeArgs: [];
|
|
154
|
+
|
|
155
|
+
readonly signer: ToField<"address">; readonly index: ToField<"u64">; readonly users: ToField<Vector<"address">>
|
|
156
|
+
|
|
157
|
+
private constructor(typeArgs: [], fields: RemovePortfolioVaultAuthorizedUserEventFields, ) { this.$fullTypeName = composeSuiType( RemovePortfolioVaultAuthorizedUserEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::RemovePortfolioVaultAuthorizedUserEvent"; this.$typeArgs = typeArgs;
|
|
158
|
+
|
|
159
|
+
this.signer = fields.signer;; this.index = fields.index;; this.users = fields.users; }
|
|
160
|
+
|
|
161
|
+
static reified( ): RemovePortfolioVaultAuthorizedUserEventReified { return { typeName: RemovePortfolioVaultAuthorizedUserEvent.$typeName, fullTypeName: composeSuiType( RemovePortfolioVaultAuthorizedUserEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::RemovePortfolioVaultAuthorizedUserEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => RemovePortfolioVaultAuthorizedUserEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => RemovePortfolioVaultAuthorizedUserEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => RemovePortfolioVaultAuthorizedUserEvent.fromBcs( data, ), bcs: RemovePortfolioVaultAuthorizedUserEvent.bcs, fromJSONField: (field: any) => RemovePortfolioVaultAuthorizedUserEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => RemovePortfolioVaultAuthorizedUserEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => RemovePortfolioVaultAuthorizedUserEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => RemovePortfolioVaultAuthorizedUserEvent.fetch( client, id, ), new: ( fields: RemovePortfolioVaultAuthorizedUserEventFields, ) => { return new RemovePortfolioVaultAuthorizedUserEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
162
|
+
|
|
163
|
+
static get r() { return RemovePortfolioVaultAuthorizedUserEvent.reified() }
|
|
164
|
+
|
|
165
|
+
static phantom( ): PhantomReified<ToTypeStr<RemovePortfolioVaultAuthorizedUserEvent>> { return phantom(RemovePortfolioVaultAuthorizedUserEvent.reified( )); } static get p() { return RemovePortfolioVaultAuthorizedUserEvent.phantom() }
|
|
166
|
+
|
|
167
|
+
static get bcs() { return bcs.struct("RemovePortfolioVaultAuthorizedUserEvent", {
|
|
168
|
+
|
|
169
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), index: bcs.u64(), users: bcs.vector(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
|
|
170
|
+
|
|
171
|
+
}) };
|
|
172
|
+
|
|
173
|
+
static fromFields( fields: Record<string, any> ): RemovePortfolioVaultAuthorizedUserEvent { return RemovePortfolioVaultAuthorizedUserEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), index: decodeFromFields("u64", fields.index), users: decodeFromFields(reified.vector("address"), fields.users) } ) }
|
|
174
|
+
|
|
175
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): RemovePortfolioVaultAuthorizedUserEvent { if (!isRemovePortfolioVaultAuthorizedUserEvent(item.type)) { throw new Error("not a RemovePortfolioVaultAuthorizedUserEvent type");
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return RemovePortfolioVaultAuthorizedUserEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), index: decodeFromFieldsWithTypes("u64", item.fields.index), users: decodeFromFieldsWithTypes(reified.vector("address"), item.fields.users) } ) }
|
|
180
|
+
|
|
181
|
+
static fromBcs( data: Uint8Array ): RemovePortfolioVaultAuthorizedUserEvent { return RemovePortfolioVaultAuthorizedUserEvent.fromFields( RemovePortfolioVaultAuthorizedUserEvent.bcs.parse(data) ) }
|
|
182
|
+
|
|
183
|
+
toJSONField() { return {
|
|
184
|
+
|
|
185
|
+
signer: this.signer,index: this.index.toString(),users: fieldToJSON<Vector<"address">>(`vector<address>`, this.users),
|
|
186
|
+
|
|
187
|
+
} }
|
|
188
|
+
|
|
189
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
190
|
+
|
|
191
|
+
static fromJSONField( field: any ): RemovePortfolioVaultAuthorizedUserEvent { return RemovePortfolioVaultAuthorizedUserEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), index: decodeFromJSONField("u64", field.index), users: decodeFromJSONField(reified.vector("address"), field.users) } ) }
|
|
192
|
+
|
|
193
|
+
static fromJSON( json: Record<string, any> ): RemovePortfolioVaultAuthorizedUserEvent { if (json.$typeName !== RemovePortfolioVaultAuthorizedUserEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
194
|
+
|
|
195
|
+
return RemovePortfolioVaultAuthorizedUserEvent.fromJSONField( json, ) }
|
|
196
|
+
|
|
197
|
+
static fromSuiParsedData( content: SuiParsedData ): RemovePortfolioVaultAuthorizedUserEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isRemovePortfolioVaultAuthorizedUserEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a RemovePortfolioVaultAuthorizedUserEvent object`); } return RemovePortfolioVaultAuthorizedUserEvent.fromFieldsWithTypes( content ); }
|
|
198
|
+
|
|
199
|
+
static async fetch( client: SuiClient, id: string ): Promise<RemovePortfolioVaultAuthorizedUserEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching RemovePortfolioVaultAuthorizedUserEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isRemovePortfolioVaultAuthorizedUserEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a RemovePortfolioVaultAuthorizedUserEvent object`); }
|
|
200
|
+
return RemovePortfolioVaultAuthorizedUserEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
201
|
+
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* ============================== UpdateActiveVaultConfigEvent =============================== */
|
|
205
|
+
|
|
206
|
+
export function isUpdateActiveVaultConfigEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateActiveVaultConfigEvent"; }
|
|
207
|
+
|
|
208
|
+
export interface UpdateActiveVaultConfigEventFields { signer: ToField<"address">; index: ToField<"u64">; previous: ToField<VaultConfig>; current: ToField<VaultConfig> }
|
|
209
|
+
|
|
210
|
+
export type UpdateActiveVaultConfigEventReified = Reified< UpdateActiveVaultConfigEvent, UpdateActiveVaultConfigEventFields >;
|
|
211
|
+
|
|
212
|
+
export class UpdateActiveVaultConfigEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateActiveVaultConfigEvent"; static readonly $numTypeParams = 0;
|
|
213
|
+
|
|
214
|
+
readonly $typeName = UpdateActiveVaultConfigEvent.$typeName;
|
|
215
|
+
|
|
216
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateActiveVaultConfigEvent";
|
|
217
|
+
|
|
218
|
+
readonly $typeArgs: [];
|
|
219
|
+
|
|
220
|
+
readonly signer: ToField<"address">; readonly index: ToField<"u64">; readonly previous: ToField<VaultConfig>; readonly current: ToField<VaultConfig>
|
|
221
|
+
|
|
222
|
+
private constructor(typeArgs: [], fields: UpdateActiveVaultConfigEventFields, ) { this.$fullTypeName = composeSuiType( UpdateActiveVaultConfigEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateActiveVaultConfigEvent"; this.$typeArgs = typeArgs;
|
|
223
|
+
|
|
224
|
+
this.signer = fields.signer;; this.index = fields.index;; this.previous = fields.previous;; this.current = fields.current; }
|
|
225
|
+
|
|
226
|
+
static reified( ): UpdateActiveVaultConfigEventReified { return { typeName: UpdateActiveVaultConfigEvent.$typeName, fullTypeName: composeSuiType( UpdateActiveVaultConfigEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateActiveVaultConfigEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => UpdateActiveVaultConfigEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => UpdateActiveVaultConfigEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => UpdateActiveVaultConfigEvent.fromBcs( data, ), bcs: UpdateActiveVaultConfigEvent.bcs, fromJSONField: (field: any) => UpdateActiveVaultConfigEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => UpdateActiveVaultConfigEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => UpdateActiveVaultConfigEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => UpdateActiveVaultConfigEvent.fetch( client, id, ), new: ( fields: UpdateActiveVaultConfigEventFields, ) => { return new UpdateActiveVaultConfigEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
227
|
+
|
|
228
|
+
static get r() { return UpdateActiveVaultConfigEvent.reified() }
|
|
229
|
+
|
|
230
|
+
static phantom( ): PhantomReified<ToTypeStr<UpdateActiveVaultConfigEvent>> { return phantom(UpdateActiveVaultConfigEvent.reified( )); } static get p() { return UpdateActiveVaultConfigEvent.phantom() }
|
|
231
|
+
|
|
232
|
+
static get bcs() { return bcs.struct("UpdateActiveVaultConfigEvent", {
|
|
233
|
+
|
|
234
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), index: bcs.u64(), previous: VaultConfig.bcs, current: VaultConfig.bcs
|
|
235
|
+
|
|
236
|
+
}) };
|
|
237
|
+
|
|
238
|
+
static fromFields( fields: Record<string, any> ): UpdateActiveVaultConfigEvent { return UpdateActiveVaultConfigEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), index: decodeFromFields("u64", fields.index), previous: decodeFromFields(VaultConfig.reified(), fields.previous), current: decodeFromFields(VaultConfig.reified(), fields.current) } ) }
|
|
239
|
+
|
|
240
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): UpdateActiveVaultConfigEvent { if (!isUpdateActiveVaultConfigEvent(item.type)) { throw new Error("not a UpdateActiveVaultConfigEvent type");
|
|
241
|
+
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return UpdateActiveVaultConfigEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), index: decodeFromFieldsWithTypes("u64", item.fields.index), previous: decodeFromFieldsWithTypes(VaultConfig.reified(), item.fields.previous), current: decodeFromFieldsWithTypes(VaultConfig.reified(), item.fields.current) } ) }
|
|
245
|
+
|
|
246
|
+
static fromBcs( data: Uint8Array ): UpdateActiveVaultConfigEvent { return UpdateActiveVaultConfigEvent.fromFields( UpdateActiveVaultConfigEvent.bcs.parse(data) ) }
|
|
247
|
+
|
|
248
|
+
toJSONField() { return {
|
|
249
|
+
|
|
250
|
+
signer: this.signer,index: this.index.toString(),previous: this.previous.toJSONField(),current: this.current.toJSONField(),
|
|
251
|
+
|
|
252
|
+
} }
|
|
253
|
+
|
|
254
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
255
|
+
|
|
256
|
+
static fromJSONField( field: any ): UpdateActiveVaultConfigEvent { return UpdateActiveVaultConfigEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), index: decodeFromJSONField("u64", field.index), previous: decodeFromJSONField(VaultConfig.reified(), field.previous), current: decodeFromJSONField(VaultConfig.reified(), field.current) } ) }
|
|
257
|
+
|
|
258
|
+
static fromJSON( json: Record<string, any> ): UpdateActiveVaultConfigEvent { if (json.$typeName !== UpdateActiveVaultConfigEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
259
|
+
|
|
260
|
+
return UpdateActiveVaultConfigEvent.fromJSONField( json, ) }
|
|
261
|
+
|
|
262
|
+
static fromSuiParsedData( content: SuiParsedData ): UpdateActiveVaultConfigEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isUpdateActiveVaultConfigEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a UpdateActiveVaultConfigEvent object`); } return UpdateActiveVaultConfigEvent.fromFieldsWithTypes( content ); }
|
|
263
|
+
|
|
264
|
+
static async fetch( client: SuiClient, id: string ): Promise<UpdateActiveVaultConfigEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching UpdateActiveVaultConfigEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isUpdateActiveVaultConfigEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a UpdateActiveVaultConfigEvent object`); }
|
|
265
|
+
return UpdateActiveVaultConfigEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
266
|
+
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* ============================== UpdateAuctionConfigEvent =============================== */
|
|
270
|
+
|
|
271
|
+
export function isUpdateAuctionConfigEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateAuctionConfigEvent"; }
|
|
272
|
+
|
|
273
|
+
export interface UpdateAuctionConfigEventFields { signer: ToField<"address">; index: ToField<"u64">; startTsMs: ToField<"u64">; endTsMs: ToField<"u64">; decaySpeed: ToField<"u64">; initialPrice: ToField<"u64">; finalPrice: ToField<"u64">; feeBp: ToField<"u64">; incentiveBp: ToField<"u64">; tokenDecimal: ToField<"u64">; sizeDecimal: ToField<"u64">; ableToRemoveBid: ToField<"bool"> }
|
|
274
|
+
|
|
275
|
+
export type UpdateAuctionConfigEventReified = Reified< UpdateAuctionConfigEvent, UpdateAuctionConfigEventFields >;
|
|
276
|
+
|
|
277
|
+
export class UpdateAuctionConfigEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateAuctionConfigEvent"; static readonly $numTypeParams = 0;
|
|
278
|
+
|
|
279
|
+
readonly $typeName = UpdateAuctionConfigEvent.$typeName;
|
|
280
|
+
|
|
281
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateAuctionConfigEvent";
|
|
282
|
+
|
|
283
|
+
readonly $typeArgs: [];
|
|
284
|
+
|
|
285
|
+
readonly signer: ToField<"address">; readonly index: ToField<"u64">; readonly startTsMs: ToField<"u64">; readonly endTsMs: ToField<"u64">; readonly decaySpeed: ToField<"u64">; readonly initialPrice: ToField<"u64">; readonly finalPrice: ToField<"u64">; readonly feeBp: ToField<"u64">; readonly incentiveBp: ToField<"u64">; readonly tokenDecimal: ToField<"u64">; readonly sizeDecimal: ToField<"u64">; readonly ableToRemoveBid: ToField<"bool">
|
|
286
|
+
|
|
287
|
+
private constructor(typeArgs: [], fields: UpdateAuctionConfigEventFields, ) { this.$fullTypeName = composeSuiType( UpdateAuctionConfigEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateAuctionConfigEvent"; this.$typeArgs = typeArgs;
|
|
288
|
+
|
|
289
|
+
this.signer = fields.signer;; this.index = fields.index;; this.startTsMs = fields.startTsMs;; this.endTsMs = fields.endTsMs;; this.decaySpeed = fields.decaySpeed;; this.initialPrice = fields.initialPrice;; this.finalPrice = fields.finalPrice;; this.feeBp = fields.feeBp;; this.incentiveBp = fields.incentiveBp;; this.tokenDecimal = fields.tokenDecimal;; this.sizeDecimal = fields.sizeDecimal;; this.ableToRemoveBid = fields.ableToRemoveBid; }
|
|
290
|
+
|
|
291
|
+
static reified( ): UpdateAuctionConfigEventReified { return { typeName: UpdateAuctionConfigEvent.$typeName, fullTypeName: composeSuiType( UpdateAuctionConfigEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateAuctionConfigEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => UpdateAuctionConfigEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => UpdateAuctionConfigEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => UpdateAuctionConfigEvent.fromBcs( data, ), bcs: UpdateAuctionConfigEvent.bcs, fromJSONField: (field: any) => UpdateAuctionConfigEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => UpdateAuctionConfigEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => UpdateAuctionConfigEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => UpdateAuctionConfigEvent.fetch( client, id, ), new: ( fields: UpdateAuctionConfigEventFields, ) => { return new UpdateAuctionConfigEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
292
|
+
|
|
293
|
+
static get r() { return UpdateAuctionConfigEvent.reified() }
|
|
294
|
+
|
|
295
|
+
static phantom( ): PhantomReified<ToTypeStr<UpdateAuctionConfigEvent>> { return phantom(UpdateAuctionConfigEvent.reified( )); } static get p() { return UpdateAuctionConfigEvent.phantom() }
|
|
296
|
+
|
|
297
|
+
static get bcs() { return bcs.struct("UpdateAuctionConfigEvent", {
|
|
298
|
+
|
|
299
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), index: bcs.u64(), start_ts_ms: bcs.u64(), end_ts_ms: bcs.u64(), decay_speed: bcs.u64(), initial_price: bcs.u64(), final_price: bcs.u64(), fee_bp: bcs.u64(), incentive_bp: bcs.u64(), token_decimal: bcs.u64(), size_decimal: bcs.u64(), able_to_remove_bid: bcs.bool()
|
|
300
|
+
|
|
301
|
+
}) };
|
|
302
|
+
|
|
303
|
+
static fromFields( fields: Record<string, any> ): UpdateAuctionConfigEvent { return UpdateAuctionConfigEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), index: decodeFromFields("u64", fields.index), startTsMs: decodeFromFields("u64", fields.start_ts_ms), endTsMs: decodeFromFields("u64", fields.end_ts_ms), decaySpeed: decodeFromFields("u64", fields.decay_speed), initialPrice: decodeFromFields("u64", fields.initial_price), finalPrice: decodeFromFields("u64", fields.final_price), feeBp: decodeFromFields("u64", fields.fee_bp), incentiveBp: decodeFromFields("u64", fields.incentive_bp), tokenDecimal: decodeFromFields("u64", fields.token_decimal), sizeDecimal: decodeFromFields("u64", fields.size_decimal), ableToRemoveBid: decodeFromFields("bool", fields.able_to_remove_bid) } ) }
|
|
304
|
+
|
|
305
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): UpdateAuctionConfigEvent { if (!isUpdateAuctionConfigEvent(item.type)) { throw new Error("not a UpdateAuctionConfigEvent type");
|
|
306
|
+
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return UpdateAuctionConfigEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), index: decodeFromFieldsWithTypes("u64", item.fields.index), startTsMs: decodeFromFieldsWithTypes("u64", item.fields.start_ts_ms), endTsMs: decodeFromFieldsWithTypes("u64", item.fields.end_ts_ms), decaySpeed: decodeFromFieldsWithTypes("u64", item.fields.decay_speed), initialPrice: decodeFromFieldsWithTypes("u64", item.fields.initial_price), finalPrice: decodeFromFieldsWithTypes("u64", item.fields.final_price), feeBp: decodeFromFieldsWithTypes("u64", item.fields.fee_bp), incentiveBp: decodeFromFieldsWithTypes("u64", item.fields.incentive_bp), tokenDecimal: decodeFromFieldsWithTypes("u64", item.fields.token_decimal), sizeDecimal: decodeFromFieldsWithTypes("u64", item.fields.size_decimal), ableToRemoveBid: decodeFromFieldsWithTypes("bool", item.fields.able_to_remove_bid) } ) }
|
|
310
|
+
|
|
311
|
+
static fromBcs( data: Uint8Array ): UpdateAuctionConfigEvent { return UpdateAuctionConfigEvent.fromFields( UpdateAuctionConfigEvent.bcs.parse(data) ) }
|
|
312
|
+
|
|
313
|
+
toJSONField() { return {
|
|
314
|
+
|
|
315
|
+
signer: this.signer,index: this.index.toString(),startTsMs: this.startTsMs.toString(),endTsMs: this.endTsMs.toString(),decaySpeed: this.decaySpeed.toString(),initialPrice: this.initialPrice.toString(),finalPrice: this.finalPrice.toString(),feeBp: this.feeBp.toString(),incentiveBp: this.incentiveBp.toString(),tokenDecimal: this.tokenDecimal.toString(),sizeDecimal: this.sizeDecimal.toString(),ableToRemoveBid: this.ableToRemoveBid,
|
|
316
|
+
|
|
317
|
+
} }
|
|
318
|
+
|
|
319
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
320
|
+
|
|
321
|
+
static fromJSONField( field: any ): UpdateAuctionConfigEvent { return UpdateAuctionConfigEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), index: decodeFromJSONField("u64", field.index), startTsMs: decodeFromJSONField("u64", field.startTsMs), endTsMs: decodeFromJSONField("u64", field.endTsMs), decaySpeed: decodeFromJSONField("u64", field.decaySpeed), initialPrice: decodeFromJSONField("u64", field.initialPrice), finalPrice: decodeFromJSONField("u64", field.finalPrice), feeBp: decodeFromJSONField("u64", field.feeBp), incentiveBp: decodeFromJSONField("u64", field.incentiveBp), tokenDecimal: decodeFromJSONField("u64", field.tokenDecimal), sizeDecimal: decodeFromJSONField("u64", field.sizeDecimal), ableToRemoveBid: decodeFromJSONField("bool", field.ableToRemoveBid) } ) }
|
|
322
|
+
|
|
323
|
+
static fromJSON( json: Record<string, any> ): UpdateAuctionConfigEvent { if (json.$typeName !== UpdateAuctionConfigEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
324
|
+
|
|
325
|
+
return UpdateAuctionConfigEvent.fromJSONField( json, ) }
|
|
326
|
+
|
|
327
|
+
static fromSuiParsedData( content: SuiParsedData ): UpdateAuctionConfigEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isUpdateAuctionConfigEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a UpdateAuctionConfigEvent object`); } return UpdateAuctionConfigEvent.fromFieldsWithTypes( content ); }
|
|
328
|
+
|
|
329
|
+
static async fetch( client: SuiClient, id: string ): Promise<UpdateAuctionConfigEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching UpdateAuctionConfigEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isUpdateAuctionConfigEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a UpdateAuctionConfigEvent object`); }
|
|
330
|
+
return UpdateAuctionConfigEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
331
|
+
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* ============================== UpdateConfigEvent =============================== */
|
|
335
|
+
|
|
336
|
+
export function isUpdateConfigEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateConfigEvent"; }
|
|
337
|
+
|
|
338
|
+
export interface UpdateConfigEventFields { signer: ToField<"address">; index: ToField<"u64">; previous: ToField<Config>; current: ToField<Config> }
|
|
339
|
+
|
|
340
|
+
export type UpdateConfigEventReified = Reified< UpdateConfigEvent, UpdateConfigEventFields >;
|
|
341
|
+
|
|
342
|
+
export class UpdateConfigEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateConfigEvent"; static readonly $numTypeParams = 0;
|
|
343
|
+
|
|
344
|
+
readonly $typeName = UpdateConfigEvent.$typeName;
|
|
345
|
+
|
|
346
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateConfigEvent";
|
|
347
|
+
|
|
348
|
+
readonly $typeArgs: [];
|
|
349
|
+
|
|
350
|
+
readonly signer: ToField<"address">; readonly index: ToField<"u64">; readonly previous: ToField<Config>; readonly current: ToField<Config>
|
|
351
|
+
|
|
352
|
+
private constructor(typeArgs: [], fields: UpdateConfigEventFields, ) { this.$fullTypeName = composeSuiType( UpdateConfigEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateConfigEvent"; this.$typeArgs = typeArgs;
|
|
353
|
+
|
|
354
|
+
this.signer = fields.signer;; this.index = fields.index;; this.previous = fields.previous;; this.current = fields.current; }
|
|
355
|
+
|
|
356
|
+
static reified( ): UpdateConfigEventReified { return { typeName: UpdateConfigEvent.$typeName, fullTypeName: composeSuiType( UpdateConfigEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateConfigEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => UpdateConfigEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => UpdateConfigEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => UpdateConfigEvent.fromBcs( data, ), bcs: UpdateConfigEvent.bcs, fromJSONField: (field: any) => UpdateConfigEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => UpdateConfigEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => UpdateConfigEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => UpdateConfigEvent.fetch( client, id, ), new: ( fields: UpdateConfigEventFields, ) => { return new UpdateConfigEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
357
|
+
|
|
358
|
+
static get r() { return UpdateConfigEvent.reified() }
|
|
359
|
+
|
|
360
|
+
static phantom( ): PhantomReified<ToTypeStr<UpdateConfigEvent>> { return phantom(UpdateConfigEvent.reified( )); } static get p() { return UpdateConfigEvent.phantom() }
|
|
361
|
+
|
|
362
|
+
static get bcs() { return bcs.struct("UpdateConfigEvent", {
|
|
363
|
+
|
|
364
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), index: bcs.u64(), previous: Config.bcs, current: Config.bcs
|
|
365
|
+
|
|
366
|
+
}) };
|
|
367
|
+
|
|
368
|
+
static fromFields( fields: Record<string, any> ): UpdateConfigEvent { return UpdateConfigEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), index: decodeFromFields("u64", fields.index), previous: decodeFromFields(Config.reified(), fields.previous), current: decodeFromFields(Config.reified(), fields.current) } ) }
|
|
369
|
+
|
|
370
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): UpdateConfigEvent { if (!isUpdateConfigEvent(item.type)) { throw new Error("not a UpdateConfigEvent type");
|
|
371
|
+
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
return UpdateConfigEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), index: decodeFromFieldsWithTypes("u64", item.fields.index), previous: decodeFromFieldsWithTypes(Config.reified(), item.fields.previous), current: decodeFromFieldsWithTypes(Config.reified(), item.fields.current) } ) }
|
|
375
|
+
|
|
376
|
+
static fromBcs( data: Uint8Array ): UpdateConfigEvent { return UpdateConfigEvent.fromFields( UpdateConfigEvent.bcs.parse(data) ) }
|
|
377
|
+
|
|
378
|
+
toJSONField() { return {
|
|
379
|
+
|
|
380
|
+
signer: this.signer,index: this.index.toString(),previous: this.previous.toJSONField(),current: this.current.toJSONField(),
|
|
381
|
+
|
|
382
|
+
} }
|
|
383
|
+
|
|
384
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
385
|
+
|
|
386
|
+
static fromJSONField( field: any ): UpdateConfigEvent { return UpdateConfigEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), index: decodeFromJSONField("u64", field.index), previous: decodeFromJSONField(Config.reified(), field.previous), current: decodeFromJSONField(Config.reified(), field.current) } ) }
|
|
387
|
+
|
|
388
|
+
static fromJSON( json: Record<string, any> ): UpdateConfigEvent { if (json.$typeName !== UpdateConfigEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
389
|
+
|
|
390
|
+
return UpdateConfigEvent.fromJSONField( json, ) }
|
|
391
|
+
|
|
392
|
+
static fromSuiParsedData( content: SuiParsedData ): UpdateConfigEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isUpdateConfigEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a UpdateConfigEvent object`); } return UpdateConfigEvent.fromFieldsWithTypes( content ); }
|
|
393
|
+
|
|
394
|
+
static async fetch( client: SuiClient, id: string ): Promise<UpdateConfigEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching UpdateConfigEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isUpdateConfigEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a UpdateConfigEvent object`); }
|
|
395
|
+
return UpdateConfigEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
396
|
+
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* ============================== UpdateStrikeEvent =============================== */
|
|
400
|
+
|
|
401
|
+
export function isUpdateStrikeEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateStrikeEvent"; }
|
|
402
|
+
|
|
403
|
+
export interface UpdateStrikeEventFields { signer: ToField<"address">; index: ToField<"u64">; oraclePrice: ToField<"u64">; oraclePriceDecimal: ToField<"u64">; vaultConfig: ToField<VaultConfig> }
|
|
404
|
+
|
|
405
|
+
export type UpdateStrikeEventReified = Reified< UpdateStrikeEvent, UpdateStrikeEventFields >;
|
|
406
|
+
|
|
407
|
+
export class UpdateStrikeEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateStrikeEvent"; static readonly $numTypeParams = 0;
|
|
408
|
+
|
|
409
|
+
readonly $typeName = UpdateStrikeEvent.$typeName;
|
|
410
|
+
|
|
411
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateStrikeEvent";
|
|
412
|
+
|
|
413
|
+
readonly $typeArgs: [];
|
|
414
|
+
|
|
415
|
+
readonly signer: ToField<"address">; readonly index: ToField<"u64">; readonly oraclePrice: ToField<"u64">; readonly oraclePriceDecimal: ToField<"u64">; readonly vaultConfig: ToField<VaultConfig>
|
|
416
|
+
|
|
417
|
+
private constructor(typeArgs: [], fields: UpdateStrikeEventFields, ) { this.$fullTypeName = composeSuiType( UpdateStrikeEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateStrikeEvent"; this.$typeArgs = typeArgs;
|
|
418
|
+
|
|
419
|
+
this.signer = fields.signer;; this.index = fields.index;; this.oraclePrice = fields.oraclePrice;; this.oraclePriceDecimal = fields.oraclePriceDecimal;; this.vaultConfig = fields.vaultConfig; }
|
|
420
|
+
|
|
421
|
+
static reified( ): UpdateStrikeEventReified { return { typeName: UpdateStrikeEvent.$typeName, fullTypeName: composeSuiType( UpdateStrikeEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateStrikeEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => UpdateStrikeEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => UpdateStrikeEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => UpdateStrikeEvent.fromBcs( data, ), bcs: UpdateStrikeEvent.bcs, fromJSONField: (field: any) => UpdateStrikeEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => UpdateStrikeEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => UpdateStrikeEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => UpdateStrikeEvent.fetch( client, id, ), new: ( fields: UpdateStrikeEventFields, ) => { return new UpdateStrikeEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
422
|
+
|
|
423
|
+
static get r() { return UpdateStrikeEvent.reified() }
|
|
424
|
+
|
|
425
|
+
static phantom( ): PhantomReified<ToTypeStr<UpdateStrikeEvent>> { return phantom(UpdateStrikeEvent.reified( )); } static get p() { return UpdateStrikeEvent.phantom() }
|
|
426
|
+
|
|
427
|
+
static get bcs() { return bcs.struct("UpdateStrikeEvent", {
|
|
428
|
+
|
|
429
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), index: bcs.u64(), oracle_price: bcs.u64(), oracle_price_decimal: bcs.u64(), vault_config: VaultConfig.bcs
|
|
430
|
+
|
|
431
|
+
}) };
|
|
432
|
+
|
|
433
|
+
static fromFields( fields: Record<string, any> ): UpdateStrikeEvent { return UpdateStrikeEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), index: decodeFromFields("u64", fields.index), oraclePrice: decodeFromFields("u64", fields.oracle_price), oraclePriceDecimal: decodeFromFields("u64", fields.oracle_price_decimal), vaultConfig: decodeFromFields(VaultConfig.reified(), fields.vault_config) } ) }
|
|
434
|
+
|
|
435
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): UpdateStrikeEvent { if (!isUpdateStrikeEvent(item.type)) { throw new Error("not a UpdateStrikeEvent type");
|
|
436
|
+
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
return UpdateStrikeEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), index: decodeFromFieldsWithTypes("u64", item.fields.index), oraclePrice: decodeFromFieldsWithTypes("u64", item.fields.oracle_price), oraclePriceDecimal: decodeFromFieldsWithTypes("u64", item.fields.oracle_price_decimal), vaultConfig: decodeFromFieldsWithTypes(VaultConfig.reified(), item.fields.vault_config) } ) }
|
|
440
|
+
|
|
441
|
+
static fromBcs( data: Uint8Array ): UpdateStrikeEvent { return UpdateStrikeEvent.fromFields( UpdateStrikeEvent.bcs.parse(data) ) }
|
|
442
|
+
|
|
443
|
+
toJSONField() { return {
|
|
444
|
+
|
|
445
|
+
signer: this.signer,index: this.index.toString(),oraclePrice: this.oraclePrice.toString(),oraclePriceDecimal: this.oraclePriceDecimal.toString(),vaultConfig: this.vaultConfig.toJSONField(),
|
|
446
|
+
|
|
447
|
+
} }
|
|
448
|
+
|
|
449
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
450
|
+
|
|
451
|
+
static fromJSONField( field: any ): UpdateStrikeEvent { return UpdateStrikeEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), index: decodeFromJSONField("u64", field.index), oraclePrice: decodeFromJSONField("u64", field.oraclePrice), oraclePriceDecimal: decodeFromJSONField("u64", field.oraclePriceDecimal), vaultConfig: decodeFromJSONField(VaultConfig.reified(), field.vaultConfig) } ) }
|
|
452
|
+
|
|
453
|
+
static fromJSON( json: Record<string, any> ): UpdateStrikeEvent { if (json.$typeName !== UpdateStrikeEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
454
|
+
|
|
455
|
+
return UpdateStrikeEvent.fromJSONField( json, ) }
|
|
456
|
+
|
|
457
|
+
static fromSuiParsedData( content: SuiParsedData ): UpdateStrikeEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isUpdateStrikeEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a UpdateStrikeEvent object`); } return UpdateStrikeEvent.fromFieldsWithTypes( content ); }
|
|
458
|
+
|
|
459
|
+
static async fetch( client: SuiClient, id: string ): Promise<UpdateStrikeEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching UpdateStrikeEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isUpdateStrikeEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a UpdateStrikeEvent object`); }
|
|
460
|
+
return UpdateStrikeEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
461
|
+
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* ============================== UpdateWarmupVaultConfigEvent =============================== */
|
|
465
|
+
|
|
466
|
+
export function isUpdateWarmupVaultConfigEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateWarmupVaultConfigEvent"; }
|
|
467
|
+
|
|
468
|
+
export interface UpdateWarmupVaultConfigEventFields { signer: ToField<"address">; index: ToField<"u64">; previous: ToField<VaultConfig>; current: ToField<VaultConfig> }
|
|
469
|
+
|
|
470
|
+
export type UpdateWarmupVaultConfigEventReified = Reified< UpdateWarmupVaultConfigEvent, UpdateWarmupVaultConfigEventFields >;
|
|
471
|
+
|
|
472
|
+
export class UpdateWarmupVaultConfigEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateWarmupVaultConfigEvent"; static readonly $numTypeParams = 0;
|
|
473
|
+
|
|
474
|
+
readonly $typeName = UpdateWarmupVaultConfigEvent.$typeName;
|
|
475
|
+
|
|
476
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateWarmupVaultConfigEvent";
|
|
477
|
+
|
|
478
|
+
readonly $typeArgs: [];
|
|
479
|
+
|
|
480
|
+
readonly signer: ToField<"address">; readonly index: ToField<"u64">; readonly previous: ToField<VaultConfig>; readonly current: ToField<VaultConfig>
|
|
481
|
+
|
|
482
|
+
private constructor(typeArgs: [], fields: UpdateWarmupVaultConfigEventFields, ) { this.$fullTypeName = composeSuiType( UpdateWarmupVaultConfigEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateWarmupVaultConfigEvent"; this.$typeArgs = typeArgs;
|
|
483
|
+
|
|
484
|
+
this.signer = fields.signer;; this.index = fields.index;; this.previous = fields.previous;; this.current = fields.current; }
|
|
485
|
+
|
|
486
|
+
static reified( ): UpdateWarmupVaultConfigEventReified { return { typeName: UpdateWarmupVaultConfigEvent.$typeName, fullTypeName: composeSuiType( UpdateWarmupVaultConfigEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::UpdateWarmupVaultConfigEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => UpdateWarmupVaultConfigEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => UpdateWarmupVaultConfigEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => UpdateWarmupVaultConfigEvent.fromBcs( data, ), bcs: UpdateWarmupVaultConfigEvent.bcs, fromJSONField: (field: any) => UpdateWarmupVaultConfigEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => UpdateWarmupVaultConfigEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => UpdateWarmupVaultConfigEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => UpdateWarmupVaultConfigEvent.fetch( client, id, ), new: ( fields: UpdateWarmupVaultConfigEventFields, ) => { return new UpdateWarmupVaultConfigEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
487
|
+
|
|
488
|
+
static get r() { return UpdateWarmupVaultConfigEvent.reified() }
|
|
489
|
+
|
|
490
|
+
static phantom( ): PhantomReified<ToTypeStr<UpdateWarmupVaultConfigEvent>> { return phantom(UpdateWarmupVaultConfigEvent.reified( )); } static get p() { return UpdateWarmupVaultConfigEvent.phantom() }
|
|
491
|
+
|
|
492
|
+
static get bcs() { return bcs.struct("UpdateWarmupVaultConfigEvent", {
|
|
493
|
+
|
|
494
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), index: bcs.u64(), previous: VaultConfig.bcs, current: VaultConfig.bcs
|
|
495
|
+
|
|
496
|
+
}) };
|
|
497
|
+
|
|
498
|
+
static fromFields( fields: Record<string, any> ): UpdateWarmupVaultConfigEvent { return UpdateWarmupVaultConfigEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), index: decodeFromFields("u64", fields.index), previous: decodeFromFields(VaultConfig.reified(), fields.previous), current: decodeFromFields(VaultConfig.reified(), fields.current) } ) }
|
|
499
|
+
|
|
500
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): UpdateWarmupVaultConfigEvent { if (!isUpdateWarmupVaultConfigEvent(item.type)) { throw new Error("not a UpdateWarmupVaultConfigEvent type");
|
|
501
|
+
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
return UpdateWarmupVaultConfigEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), index: decodeFromFieldsWithTypes("u64", item.fields.index), previous: decodeFromFieldsWithTypes(VaultConfig.reified(), item.fields.previous), current: decodeFromFieldsWithTypes(VaultConfig.reified(), item.fields.current) } ) }
|
|
505
|
+
|
|
506
|
+
static fromBcs( data: Uint8Array ): UpdateWarmupVaultConfigEvent { return UpdateWarmupVaultConfigEvent.fromFields( UpdateWarmupVaultConfigEvent.bcs.parse(data) ) }
|
|
507
|
+
|
|
508
|
+
toJSONField() { return {
|
|
509
|
+
|
|
510
|
+
signer: this.signer,index: this.index.toString(),previous: this.previous.toJSONField(),current: this.current.toJSONField(),
|
|
511
|
+
|
|
512
|
+
} }
|
|
513
|
+
|
|
514
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
515
|
+
|
|
516
|
+
static fromJSONField( field: any ): UpdateWarmupVaultConfigEvent { return UpdateWarmupVaultConfigEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), index: decodeFromJSONField("u64", field.index), previous: decodeFromJSONField(VaultConfig.reified(), field.previous), current: decodeFromJSONField(VaultConfig.reified(), field.current) } ) }
|
|
517
|
+
|
|
518
|
+
static fromJSON( json: Record<string, any> ): UpdateWarmupVaultConfigEvent { if (json.$typeName !== UpdateWarmupVaultConfigEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
519
|
+
|
|
520
|
+
return UpdateWarmupVaultConfigEvent.fromJSONField( json, ) }
|
|
521
|
+
|
|
522
|
+
static fromSuiParsedData( content: SuiParsedData ): UpdateWarmupVaultConfigEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isUpdateWarmupVaultConfigEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a UpdateWarmupVaultConfigEvent object`); } return UpdateWarmupVaultConfigEvent.fromFieldsWithTypes( content ); }
|
|
523
|
+
|
|
524
|
+
static async fetch( client: SuiClient, id: string ): Promise<UpdateWarmupVaultConfigEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching UpdateWarmupVaultConfigEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isUpdateWarmupVaultConfigEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a UpdateWarmupVaultConfigEvent object`); }
|
|
525
|
+
return UpdateWarmupVaultConfigEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
526
|
+
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/* ============================== WithdrawFixedIncentiveEvent =============================== */
|
|
530
|
+
|
|
531
|
+
export function isWithdrawFixedIncentiveEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::WithdrawFixedIncentiveEvent"; }
|
|
532
|
+
|
|
533
|
+
export interface WithdrawFixedIncentiveEventFields { signer: ToField<"address">; token: ToField<TypeName>; amount: ToField<"u64"> }
|
|
534
|
+
|
|
535
|
+
export type WithdrawFixedIncentiveEventReified = Reified< WithdrawFixedIncentiveEvent, WithdrawFixedIncentiveEventFields >;
|
|
536
|
+
|
|
537
|
+
export class WithdrawFixedIncentiveEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::WithdrawFixedIncentiveEvent"; static readonly $numTypeParams = 0;
|
|
538
|
+
|
|
539
|
+
readonly $typeName = WithdrawFixedIncentiveEvent.$typeName;
|
|
540
|
+
|
|
541
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::WithdrawFixedIncentiveEvent";
|
|
542
|
+
|
|
543
|
+
readonly $typeArgs: [];
|
|
544
|
+
|
|
545
|
+
readonly signer: ToField<"address">; readonly token: ToField<TypeName>; readonly amount: ToField<"u64">
|
|
546
|
+
|
|
547
|
+
private constructor(typeArgs: [], fields: WithdrawFixedIncentiveEventFields, ) { this.$fullTypeName = composeSuiType( WithdrawFixedIncentiveEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::WithdrawFixedIncentiveEvent"; this.$typeArgs = typeArgs;
|
|
548
|
+
|
|
549
|
+
this.signer = fields.signer;; this.token = fields.token;; this.amount = fields.amount; }
|
|
550
|
+
|
|
551
|
+
static reified( ): WithdrawFixedIncentiveEventReified { return { typeName: WithdrawFixedIncentiveEvent.$typeName, fullTypeName: composeSuiType( WithdrawFixedIncentiveEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_authorized_entry::WithdrawFixedIncentiveEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => WithdrawFixedIncentiveEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => WithdrawFixedIncentiveEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => WithdrawFixedIncentiveEvent.fromBcs( data, ), bcs: WithdrawFixedIncentiveEvent.bcs, fromJSONField: (field: any) => WithdrawFixedIncentiveEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => WithdrawFixedIncentiveEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => WithdrawFixedIncentiveEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => WithdrawFixedIncentiveEvent.fetch( client, id, ), new: ( fields: WithdrawFixedIncentiveEventFields, ) => { return new WithdrawFixedIncentiveEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
552
|
+
|
|
553
|
+
static get r() { return WithdrawFixedIncentiveEvent.reified() }
|
|
554
|
+
|
|
555
|
+
static phantom( ): PhantomReified<ToTypeStr<WithdrawFixedIncentiveEvent>> { return phantom(WithdrawFixedIncentiveEvent.reified( )); } static get p() { return WithdrawFixedIncentiveEvent.phantom() }
|
|
556
|
+
|
|
557
|
+
static get bcs() { return bcs.struct("WithdrawFixedIncentiveEvent", {
|
|
558
|
+
|
|
559
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), token: TypeName.bcs, amount: bcs.u64()
|
|
560
|
+
|
|
561
|
+
}) };
|
|
562
|
+
|
|
563
|
+
static fromFields( fields: Record<string, any> ): WithdrawFixedIncentiveEvent { return WithdrawFixedIncentiveEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), token: decodeFromFields(TypeName.reified(), fields.token), amount: decodeFromFields("u64", fields.amount) } ) }
|
|
564
|
+
|
|
565
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): WithdrawFixedIncentiveEvent { if (!isWithdrawFixedIncentiveEvent(item.type)) { throw new Error("not a WithdrawFixedIncentiveEvent type");
|
|
566
|
+
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
return WithdrawFixedIncentiveEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), token: decodeFromFieldsWithTypes(TypeName.reified(), item.fields.token), amount: decodeFromFieldsWithTypes("u64", item.fields.amount) } ) }
|
|
570
|
+
|
|
571
|
+
static fromBcs( data: Uint8Array ): WithdrawFixedIncentiveEvent { return WithdrawFixedIncentiveEvent.fromFields( WithdrawFixedIncentiveEvent.bcs.parse(data) ) }
|
|
572
|
+
|
|
573
|
+
toJSONField() { return {
|
|
574
|
+
|
|
575
|
+
signer: this.signer,token: this.token.toJSONField(),amount: this.amount.toString(),
|
|
576
|
+
|
|
577
|
+
} }
|
|
578
|
+
|
|
579
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
580
|
+
|
|
581
|
+
static fromJSONField( field: any ): WithdrawFixedIncentiveEvent { return WithdrawFixedIncentiveEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), token: decodeFromJSONField(TypeName.reified(), field.token), amount: decodeFromJSONField("u64", field.amount) } ) }
|
|
582
|
+
|
|
583
|
+
static fromJSON( json: Record<string, any> ): WithdrawFixedIncentiveEvent { if (json.$typeName !== WithdrawFixedIncentiveEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
584
|
+
|
|
585
|
+
return WithdrawFixedIncentiveEvent.fromJSONField( json, ) }
|
|
586
|
+
|
|
587
|
+
static fromSuiParsedData( content: SuiParsedData ): WithdrawFixedIncentiveEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isWithdrawFixedIncentiveEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a WithdrawFixedIncentiveEvent object`); } return WithdrawFixedIncentiveEvent.fromFieldsWithTypes( content ); }
|
|
588
|
+
|
|
589
|
+
static async fetch( client: SuiClient, id: string ): Promise<WithdrawFixedIncentiveEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching WithdrawFixedIncentiveEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isWithdrawFixedIncentiveEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a WithdrawFixedIncentiveEvent object`); }
|
|
590
|
+
return WithdrawFixedIncentiveEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
591
|
+
|
|
592
|
+
}
|