@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,461 @@
|
|
|
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 {bcs, fromB64, fromHEX, toHEX} from "@mysten/bcs";
|
|
6
|
+
import {SuiClient, SuiParsedData} from "@mysten/sui.js/client";
|
|
7
|
+
|
|
8
|
+
/* ============================== SendFeeEvent =============================== */
|
|
9
|
+
|
|
10
|
+
export function isSendFeeEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::SendFeeEvent"; }
|
|
11
|
+
|
|
12
|
+
export interface SendFeeEventFields { signer: ToField<"address">; token: ToField<TypeName>; amount: ToField<"u64">; recipient: ToField<"address"> }
|
|
13
|
+
|
|
14
|
+
export type SendFeeEventReified = Reified< SendFeeEvent, SendFeeEventFields >;
|
|
15
|
+
|
|
16
|
+
export class SendFeeEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::SendFeeEvent"; static readonly $numTypeParams = 0;
|
|
17
|
+
|
|
18
|
+
readonly $typeName = SendFeeEvent.$typeName;
|
|
19
|
+
|
|
20
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::SendFeeEvent";
|
|
21
|
+
|
|
22
|
+
readonly $typeArgs: [];
|
|
23
|
+
|
|
24
|
+
readonly signer: ToField<"address">; readonly token: ToField<TypeName>; readonly amount: ToField<"u64">; readonly recipient: ToField<"address">
|
|
25
|
+
|
|
26
|
+
private constructor(typeArgs: [], fields: SendFeeEventFields, ) { this.$fullTypeName = composeSuiType( SendFeeEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::SendFeeEvent"; this.$typeArgs = typeArgs;
|
|
27
|
+
|
|
28
|
+
this.signer = fields.signer;; this.token = fields.token;; this.amount = fields.amount;; this.recipient = fields.recipient; }
|
|
29
|
+
|
|
30
|
+
static reified( ): SendFeeEventReified { return { typeName: SendFeeEvent.$typeName, fullTypeName: composeSuiType( SendFeeEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::SendFeeEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => SendFeeEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => SendFeeEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => SendFeeEvent.fromBcs( data, ), bcs: SendFeeEvent.bcs, fromJSONField: (field: any) => SendFeeEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => SendFeeEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => SendFeeEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => SendFeeEvent.fetch( client, id, ), new: ( fields: SendFeeEventFields, ) => { return new SendFeeEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
31
|
+
|
|
32
|
+
static get r() { return SendFeeEvent.reified() }
|
|
33
|
+
|
|
34
|
+
static phantom( ): PhantomReified<ToTypeStr<SendFeeEvent>> { return phantom(SendFeeEvent.reified( )); } static get p() { return SendFeeEvent.phantom() }
|
|
35
|
+
|
|
36
|
+
static get bcs() { return bcs.struct("SendFeeEvent", {
|
|
37
|
+
|
|
38
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), token: TypeName.bcs, amount: bcs.u64(), recipient: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), })
|
|
39
|
+
|
|
40
|
+
}) };
|
|
41
|
+
|
|
42
|
+
static fromFields( fields: Record<string, any> ): SendFeeEvent { return SendFeeEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), token: decodeFromFields(TypeName.reified(), fields.token), amount: decodeFromFields("u64", fields.amount), recipient: decodeFromFields("address", fields.recipient) } ) }
|
|
43
|
+
|
|
44
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): SendFeeEvent { if (!isSendFeeEvent(item.type)) { throw new Error("not a SendFeeEvent type");
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return SendFeeEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), token: decodeFromFieldsWithTypes(TypeName.reified(), item.fields.token), amount: decodeFromFieldsWithTypes("u64", item.fields.amount), recipient: decodeFromFieldsWithTypes("address", item.fields.recipient) } ) }
|
|
49
|
+
|
|
50
|
+
static fromBcs( data: Uint8Array ): SendFeeEvent { return SendFeeEvent.fromFields( SendFeeEvent.bcs.parse(data) ) }
|
|
51
|
+
|
|
52
|
+
toJSONField() { return {
|
|
53
|
+
|
|
54
|
+
signer: this.signer,token: this.token.toJSONField(),amount: this.amount.toString(),recipient: this.recipient,
|
|
55
|
+
|
|
56
|
+
} }
|
|
57
|
+
|
|
58
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
59
|
+
|
|
60
|
+
static fromJSONField( field: any ): SendFeeEvent { return SendFeeEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), token: decodeFromJSONField(TypeName.reified(), field.token), amount: decodeFromJSONField("u64", field.amount), recipient: decodeFromJSONField("address", field.recipient) } ) }
|
|
61
|
+
|
|
62
|
+
static fromJSON( json: Record<string, any> ): SendFeeEvent { if (json.$typeName !== SendFeeEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
63
|
+
|
|
64
|
+
return SendFeeEvent.fromJSONField( json, ) }
|
|
65
|
+
|
|
66
|
+
static fromSuiParsedData( content: SuiParsedData ): SendFeeEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isSendFeeEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a SendFeeEvent object`); } return SendFeeEvent.fromFieldsWithTypes( content ); }
|
|
67
|
+
|
|
68
|
+
static async fetch( client: SuiClient, id: string ): Promise<SendFeeEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching SendFeeEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isSendFeeEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a SendFeeEvent object`); }
|
|
69
|
+
return SendFeeEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ============================== AddFeePoolAuthorizedUserEvent =============================== */
|
|
74
|
+
|
|
75
|
+
export function isAddFeePoolAuthorizedUserEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddFeePoolAuthorizedUserEvent"; }
|
|
76
|
+
|
|
77
|
+
export interface AddFeePoolAuthorizedUserEventFields { signer: ToField<"address">; users: ToField<Vector<"address">> }
|
|
78
|
+
|
|
79
|
+
export type AddFeePoolAuthorizedUserEventReified = Reified< AddFeePoolAuthorizedUserEvent, AddFeePoolAuthorizedUserEventFields >;
|
|
80
|
+
|
|
81
|
+
export class AddFeePoolAuthorizedUserEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddFeePoolAuthorizedUserEvent"; static readonly $numTypeParams = 0;
|
|
82
|
+
|
|
83
|
+
readonly $typeName = AddFeePoolAuthorizedUserEvent.$typeName;
|
|
84
|
+
|
|
85
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddFeePoolAuthorizedUserEvent";
|
|
86
|
+
|
|
87
|
+
readonly $typeArgs: [];
|
|
88
|
+
|
|
89
|
+
readonly signer: ToField<"address">; readonly users: ToField<Vector<"address">>
|
|
90
|
+
|
|
91
|
+
private constructor(typeArgs: [], fields: AddFeePoolAuthorizedUserEventFields, ) { this.$fullTypeName = composeSuiType( AddFeePoolAuthorizedUserEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddFeePoolAuthorizedUserEvent"; this.$typeArgs = typeArgs;
|
|
92
|
+
|
|
93
|
+
this.signer = fields.signer;; this.users = fields.users; }
|
|
94
|
+
|
|
95
|
+
static reified( ): AddFeePoolAuthorizedUserEventReified { return { typeName: AddFeePoolAuthorizedUserEvent.$typeName, fullTypeName: composeSuiType( AddFeePoolAuthorizedUserEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddFeePoolAuthorizedUserEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => AddFeePoolAuthorizedUserEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => AddFeePoolAuthorizedUserEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => AddFeePoolAuthorizedUserEvent.fromBcs( data, ), bcs: AddFeePoolAuthorizedUserEvent.bcs, fromJSONField: (field: any) => AddFeePoolAuthorizedUserEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => AddFeePoolAuthorizedUserEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => AddFeePoolAuthorizedUserEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => AddFeePoolAuthorizedUserEvent.fetch( client, id, ), new: ( fields: AddFeePoolAuthorizedUserEventFields, ) => { return new AddFeePoolAuthorizedUserEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
96
|
+
|
|
97
|
+
static get r() { return AddFeePoolAuthorizedUserEvent.reified() }
|
|
98
|
+
|
|
99
|
+
static phantom( ): PhantomReified<ToTypeStr<AddFeePoolAuthorizedUserEvent>> { return phantom(AddFeePoolAuthorizedUserEvent.reified( )); } static get p() { return AddFeePoolAuthorizedUserEvent.phantom() }
|
|
100
|
+
|
|
101
|
+
static get bcs() { return bcs.struct("AddFeePoolAuthorizedUserEvent", {
|
|
102
|
+
|
|
103
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), users: bcs.vector(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
|
|
104
|
+
|
|
105
|
+
}) };
|
|
106
|
+
|
|
107
|
+
static fromFields( fields: Record<string, any> ): AddFeePoolAuthorizedUserEvent { return AddFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), users: decodeFromFields(reified.vector("address"), fields.users) } ) }
|
|
108
|
+
|
|
109
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): AddFeePoolAuthorizedUserEvent { if (!isAddFeePoolAuthorizedUserEvent(item.type)) { throw new Error("not a AddFeePoolAuthorizedUserEvent type");
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return AddFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), users: decodeFromFieldsWithTypes(reified.vector("address"), item.fields.users) } ) }
|
|
114
|
+
|
|
115
|
+
static fromBcs( data: Uint8Array ): AddFeePoolAuthorizedUserEvent { return AddFeePoolAuthorizedUserEvent.fromFields( AddFeePoolAuthorizedUserEvent.bcs.parse(data) ) }
|
|
116
|
+
|
|
117
|
+
toJSONField() { return {
|
|
118
|
+
|
|
119
|
+
signer: this.signer,users: fieldToJSON<Vector<"address">>(`vector<address>`, this.users),
|
|
120
|
+
|
|
121
|
+
} }
|
|
122
|
+
|
|
123
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
124
|
+
|
|
125
|
+
static fromJSONField( field: any ): AddFeePoolAuthorizedUserEvent { return AddFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), users: decodeFromJSONField(reified.vector("address"), field.users) } ) }
|
|
126
|
+
|
|
127
|
+
static fromJSON( json: Record<string, any> ): AddFeePoolAuthorizedUserEvent { if (json.$typeName !== AddFeePoolAuthorizedUserEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
128
|
+
|
|
129
|
+
return AddFeePoolAuthorizedUserEvent.fromJSONField( json, ) }
|
|
130
|
+
|
|
131
|
+
static fromSuiParsedData( content: SuiParsedData ): AddFeePoolAuthorizedUserEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isAddFeePoolAuthorizedUserEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a AddFeePoolAuthorizedUserEvent object`); } return AddFeePoolAuthorizedUserEvent.fromFieldsWithTypes( content ); }
|
|
132
|
+
|
|
133
|
+
static async fetch( client: SuiClient, id: string ): Promise<AddFeePoolAuthorizedUserEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching AddFeePoolAuthorizedUserEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isAddFeePoolAuthorizedUserEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a AddFeePoolAuthorizedUserEvent object`); }
|
|
134
|
+
return AddFeePoolAuthorizedUserEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* ============================== AddSharedFeePoolAuthorizedUserEvent =============================== */
|
|
139
|
+
|
|
140
|
+
export function isAddSharedFeePoolAuthorizedUserEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddSharedFeePoolAuthorizedUserEvent"; }
|
|
141
|
+
|
|
142
|
+
export interface AddSharedFeePoolAuthorizedUserEventFields { signer: ToField<"address">; users: ToField<Vector<"address">> }
|
|
143
|
+
|
|
144
|
+
export type AddSharedFeePoolAuthorizedUserEventReified = Reified< AddSharedFeePoolAuthorizedUserEvent, AddSharedFeePoolAuthorizedUserEventFields >;
|
|
145
|
+
|
|
146
|
+
export class AddSharedFeePoolAuthorizedUserEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddSharedFeePoolAuthorizedUserEvent"; static readonly $numTypeParams = 0;
|
|
147
|
+
|
|
148
|
+
readonly $typeName = AddSharedFeePoolAuthorizedUserEvent.$typeName;
|
|
149
|
+
|
|
150
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddSharedFeePoolAuthorizedUserEvent";
|
|
151
|
+
|
|
152
|
+
readonly $typeArgs: [];
|
|
153
|
+
|
|
154
|
+
readonly signer: ToField<"address">; readonly users: ToField<Vector<"address">>
|
|
155
|
+
|
|
156
|
+
private constructor(typeArgs: [], fields: AddSharedFeePoolAuthorizedUserEventFields, ) { this.$fullTypeName = composeSuiType( AddSharedFeePoolAuthorizedUserEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddSharedFeePoolAuthorizedUserEvent"; this.$typeArgs = typeArgs;
|
|
157
|
+
|
|
158
|
+
this.signer = fields.signer;; this.users = fields.users; }
|
|
159
|
+
|
|
160
|
+
static reified( ): AddSharedFeePoolAuthorizedUserEventReified { return { typeName: AddSharedFeePoolAuthorizedUserEvent.$typeName, fullTypeName: composeSuiType( AddSharedFeePoolAuthorizedUserEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::AddSharedFeePoolAuthorizedUserEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => AddSharedFeePoolAuthorizedUserEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => AddSharedFeePoolAuthorizedUserEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => AddSharedFeePoolAuthorizedUserEvent.fromBcs( data, ), bcs: AddSharedFeePoolAuthorizedUserEvent.bcs, fromJSONField: (field: any) => AddSharedFeePoolAuthorizedUserEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => AddSharedFeePoolAuthorizedUserEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => AddSharedFeePoolAuthorizedUserEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => AddSharedFeePoolAuthorizedUserEvent.fetch( client, id, ), new: ( fields: AddSharedFeePoolAuthorizedUserEventFields, ) => { return new AddSharedFeePoolAuthorizedUserEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
161
|
+
|
|
162
|
+
static get r() { return AddSharedFeePoolAuthorizedUserEvent.reified() }
|
|
163
|
+
|
|
164
|
+
static phantom( ): PhantomReified<ToTypeStr<AddSharedFeePoolAuthorizedUserEvent>> { return phantom(AddSharedFeePoolAuthorizedUserEvent.reified( )); } static get p() { return AddSharedFeePoolAuthorizedUserEvent.phantom() }
|
|
165
|
+
|
|
166
|
+
static get bcs() { return bcs.struct("AddSharedFeePoolAuthorizedUserEvent", {
|
|
167
|
+
|
|
168
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), users: bcs.vector(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
|
|
169
|
+
|
|
170
|
+
}) };
|
|
171
|
+
|
|
172
|
+
static fromFields( fields: Record<string, any> ): AddSharedFeePoolAuthorizedUserEvent { return AddSharedFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), users: decodeFromFields(reified.vector("address"), fields.users) } ) }
|
|
173
|
+
|
|
174
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): AddSharedFeePoolAuthorizedUserEvent { if (!isAddSharedFeePoolAuthorizedUserEvent(item.type)) { throw new Error("not a AddSharedFeePoolAuthorizedUserEvent type");
|
|
175
|
+
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return AddSharedFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), users: decodeFromFieldsWithTypes(reified.vector("address"), item.fields.users) } ) }
|
|
179
|
+
|
|
180
|
+
static fromBcs( data: Uint8Array ): AddSharedFeePoolAuthorizedUserEvent { return AddSharedFeePoolAuthorizedUserEvent.fromFields( AddSharedFeePoolAuthorizedUserEvent.bcs.parse(data) ) }
|
|
181
|
+
|
|
182
|
+
toJSONField() { return {
|
|
183
|
+
|
|
184
|
+
signer: this.signer,users: fieldToJSON<Vector<"address">>(`vector<address>`, this.users),
|
|
185
|
+
|
|
186
|
+
} }
|
|
187
|
+
|
|
188
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
189
|
+
|
|
190
|
+
static fromJSONField( field: any ): AddSharedFeePoolAuthorizedUserEvent { return AddSharedFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), users: decodeFromJSONField(reified.vector("address"), field.users) } ) }
|
|
191
|
+
|
|
192
|
+
static fromJSON( json: Record<string, any> ): AddSharedFeePoolAuthorizedUserEvent { if (json.$typeName !== AddSharedFeePoolAuthorizedUserEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
193
|
+
|
|
194
|
+
return AddSharedFeePoolAuthorizedUserEvent.fromJSONField( json, ) }
|
|
195
|
+
|
|
196
|
+
static fromSuiParsedData( content: SuiParsedData ): AddSharedFeePoolAuthorizedUserEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isAddSharedFeePoolAuthorizedUserEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a AddSharedFeePoolAuthorizedUserEvent object`); } return AddSharedFeePoolAuthorizedUserEvent.fromFieldsWithTypes( content ); }
|
|
197
|
+
|
|
198
|
+
static async fetch( client: SuiClient, id: string ): Promise<AddSharedFeePoolAuthorizedUserEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching AddSharedFeePoolAuthorizedUserEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isAddSharedFeePoolAuthorizedUserEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a AddSharedFeePoolAuthorizedUserEvent object`); }
|
|
199
|
+
return AddSharedFeePoolAuthorizedUserEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
200
|
+
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* ============================== RemoveFeePoolAuthorizedUserEvent =============================== */
|
|
204
|
+
|
|
205
|
+
export function isRemoveFeePoolAuthorizedUserEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveFeePoolAuthorizedUserEvent"; }
|
|
206
|
+
|
|
207
|
+
export interface RemoveFeePoolAuthorizedUserEventFields { signer: ToField<"address">; users: ToField<Vector<"address">> }
|
|
208
|
+
|
|
209
|
+
export type RemoveFeePoolAuthorizedUserEventReified = Reified< RemoveFeePoolAuthorizedUserEvent, RemoveFeePoolAuthorizedUserEventFields >;
|
|
210
|
+
|
|
211
|
+
export class RemoveFeePoolAuthorizedUserEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveFeePoolAuthorizedUserEvent"; static readonly $numTypeParams = 0;
|
|
212
|
+
|
|
213
|
+
readonly $typeName = RemoveFeePoolAuthorizedUserEvent.$typeName;
|
|
214
|
+
|
|
215
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveFeePoolAuthorizedUserEvent";
|
|
216
|
+
|
|
217
|
+
readonly $typeArgs: [];
|
|
218
|
+
|
|
219
|
+
readonly signer: ToField<"address">; readonly users: ToField<Vector<"address">>
|
|
220
|
+
|
|
221
|
+
private constructor(typeArgs: [], fields: RemoveFeePoolAuthorizedUserEventFields, ) { this.$fullTypeName = composeSuiType( RemoveFeePoolAuthorizedUserEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveFeePoolAuthorizedUserEvent"; this.$typeArgs = typeArgs;
|
|
222
|
+
|
|
223
|
+
this.signer = fields.signer;; this.users = fields.users; }
|
|
224
|
+
|
|
225
|
+
static reified( ): RemoveFeePoolAuthorizedUserEventReified { return { typeName: RemoveFeePoolAuthorizedUserEvent.$typeName, fullTypeName: composeSuiType( RemoveFeePoolAuthorizedUserEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveFeePoolAuthorizedUserEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => RemoveFeePoolAuthorizedUserEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => RemoveFeePoolAuthorizedUserEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => RemoveFeePoolAuthorizedUserEvent.fromBcs( data, ), bcs: RemoveFeePoolAuthorizedUserEvent.bcs, fromJSONField: (field: any) => RemoveFeePoolAuthorizedUserEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => RemoveFeePoolAuthorizedUserEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => RemoveFeePoolAuthorizedUserEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => RemoveFeePoolAuthorizedUserEvent.fetch( client, id, ), new: ( fields: RemoveFeePoolAuthorizedUserEventFields, ) => { return new RemoveFeePoolAuthorizedUserEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
226
|
+
|
|
227
|
+
static get r() { return RemoveFeePoolAuthorizedUserEvent.reified() }
|
|
228
|
+
|
|
229
|
+
static phantom( ): PhantomReified<ToTypeStr<RemoveFeePoolAuthorizedUserEvent>> { return phantom(RemoveFeePoolAuthorizedUserEvent.reified( )); } static get p() { return RemoveFeePoolAuthorizedUserEvent.phantom() }
|
|
230
|
+
|
|
231
|
+
static get bcs() { return bcs.struct("RemoveFeePoolAuthorizedUserEvent", {
|
|
232
|
+
|
|
233
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), users: bcs.vector(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
|
|
234
|
+
|
|
235
|
+
}) };
|
|
236
|
+
|
|
237
|
+
static fromFields( fields: Record<string, any> ): RemoveFeePoolAuthorizedUserEvent { return RemoveFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), users: decodeFromFields(reified.vector("address"), fields.users) } ) }
|
|
238
|
+
|
|
239
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): RemoveFeePoolAuthorizedUserEvent { if (!isRemoveFeePoolAuthorizedUserEvent(item.type)) { throw new Error("not a RemoveFeePoolAuthorizedUserEvent type");
|
|
240
|
+
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return RemoveFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), users: decodeFromFieldsWithTypes(reified.vector("address"), item.fields.users) } ) }
|
|
244
|
+
|
|
245
|
+
static fromBcs( data: Uint8Array ): RemoveFeePoolAuthorizedUserEvent { return RemoveFeePoolAuthorizedUserEvent.fromFields( RemoveFeePoolAuthorizedUserEvent.bcs.parse(data) ) }
|
|
246
|
+
|
|
247
|
+
toJSONField() { return {
|
|
248
|
+
|
|
249
|
+
signer: this.signer,users: fieldToJSON<Vector<"address">>(`vector<address>`, this.users),
|
|
250
|
+
|
|
251
|
+
} }
|
|
252
|
+
|
|
253
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
254
|
+
|
|
255
|
+
static fromJSONField( field: any ): RemoveFeePoolAuthorizedUserEvent { return RemoveFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), users: decodeFromJSONField(reified.vector("address"), field.users) } ) }
|
|
256
|
+
|
|
257
|
+
static fromJSON( json: Record<string, any> ): RemoveFeePoolAuthorizedUserEvent { if (json.$typeName !== RemoveFeePoolAuthorizedUserEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
258
|
+
|
|
259
|
+
return RemoveFeePoolAuthorizedUserEvent.fromJSONField( json, ) }
|
|
260
|
+
|
|
261
|
+
static fromSuiParsedData( content: SuiParsedData ): RemoveFeePoolAuthorizedUserEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isRemoveFeePoolAuthorizedUserEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a RemoveFeePoolAuthorizedUserEvent object`); } return RemoveFeePoolAuthorizedUserEvent.fromFieldsWithTypes( content ); }
|
|
262
|
+
|
|
263
|
+
static async fetch( client: SuiClient, id: string ): Promise<RemoveFeePoolAuthorizedUserEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching RemoveFeePoolAuthorizedUserEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isRemoveFeePoolAuthorizedUserEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a RemoveFeePoolAuthorizedUserEvent object`); }
|
|
264
|
+
return RemoveFeePoolAuthorizedUserEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
265
|
+
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* ============================== RemoveSharedFeePoolAuthorizedUserEvent =============================== */
|
|
269
|
+
|
|
270
|
+
export function isRemoveSharedFeePoolAuthorizedUserEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveSharedFeePoolAuthorizedUserEvent"; }
|
|
271
|
+
|
|
272
|
+
export interface RemoveSharedFeePoolAuthorizedUserEventFields { signer: ToField<"address">; users: ToField<Vector<"address">> }
|
|
273
|
+
|
|
274
|
+
export type RemoveSharedFeePoolAuthorizedUserEventReified = Reified< RemoveSharedFeePoolAuthorizedUserEvent, RemoveSharedFeePoolAuthorizedUserEventFields >;
|
|
275
|
+
|
|
276
|
+
export class RemoveSharedFeePoolAuthorizedUserEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveSharedFeePoolAuthorizedUserEvent"; static readonly $numTypeParams = 0;
|
|
277
|
+
|
|
278
|
+
readonly $typeName = RemoveSharedFeePoolAuthorizedUserEvent.$typeName;
|
|
279
|
+
|
|
280
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveSharedFeePoolAuthorizedUserEvent";
|
|
281
|
+
|
|
282
|
+
readonly $typeArgs: [];
|
|
283
|
+
|
|
284
|
+
readonly signer: ToField<"address">; readonly users: ToField<Vector<"address">>
|
|
285
|
+
|
|
286
|
+
private constructor(typeArgs: [], fields: RemoveSharedFeePoolAuthorizedUserEventFields, ) { this.$fullTypeName = composeSuiType( RemoveSharedFeePoolAuthorizedUserEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveSharedFeePoolAuthorizedUserEvent"; this.$typeArgs = typeArgs;
|
|
287
|
+
|
|
288
|
+
this.signer = fields.signer;; this.users = fields.users; }
|
|
289
|
+
|
|
290
|
+
static reified( ): RemoveSharedFeePoolAuthorizedUserEventReified { return { typeName: RemoveSharedFeePoolAuthorizedUserEvent.$typeName, fullTypeName: composeSuiType( RemoveSharedFeePoolAuthorizedUserEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::RemoveSharedFeePoolAuthorizedUserEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => RemoveSharedFeePoolAuthorizedUserEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => RemoveSharedFeePoolAuthorizedUserEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => RemoveSharedFeePoolAuthorizedUserEvent.fromBcs( data, ), bcs: RemoveSharedFeePoolAuthorizedUserEvent.bcs, fromJSONField: (field: any) => RemoveSharedFeePoolAuthorizedUserEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => RemoveSharedFeePoolAuthorizedUserEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => RemoveSharedFeePoolAuthorizedUserEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => RemoveSharedFeePoolAuthorizedUserEvent.fetch( client, id, ), new: ( fields: RemoveSharedFeePoolAuthorizedUserEventFields, ) => { return new RemoveSharedFeePoolAuthorizedUserEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
291
|
+
|
|
292
|
+
static get r() { return RemoveSharedFeePoolAuthorizedUserEvent.reified() }
|
|
293
|
+
|
|
294
|
+
static phantom( ): PhantomReified<ToTypeStr<RemoveSharedFeePoolAuthorizedUserEvent>> { return phantom(RemoveSharedFeePoolAuthorizedUserEvent.reified( )); } static get p() { return RemoveSharedFeePoolAuthorizedUserEvent.phantom() }
|
|
295
|
+
|
|
296
|
+
static get bcs() { return bcs.struct("RemoveSharedFeePoolAuthorizedUserEvent", {
|
|
297
|
+
|
|
298
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), users: bcs.vector(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
|
|
299
|
+
|
|
300
|
+
}) };
|
|
301
|
+
|
|
302
|
+
static fromFields( fields: Record<string, any> ): RemoveSharedFeePoolAuthorizedUserEvent { return RemoveSharedFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), users: decodeFromFields(reified.vector("address"), fields.users) } ) }
|
|
303
|
+
|
|
304
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): RemoveSharedFeePoolAuthorizedUserEvent { if (!isRemoveSharedFeePoolAuthorizedUserEvent(item.type)) { throw new Error("not a RemoveSharedFeePoolAuthorizedUserEvent type");
|
|
305
|
+
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
return RemoveSharedFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), users: decodeFromFieldsWithTypes(reified.vector("address"), item.fields.users) } ) }
|
|
309
|
+
|
|
310
|
+
static fromBcs( data: Uint8Array ): RemoveSharedFeePoolAuthorizedUserEvent { return RemoveSharedFeePoolAuthorizedUserEvent.fromFields( RemoveSharedFeePoolAuthorizedUserEvent.bcs.parse(data) ) }
|
|
311
|
+
|
|
312
|
+
toJSONField() { return {
|
|
313
|
+
|
|
314
|
+
signer: this.signer,users: fieldToJSON<Vector<"address">>(`vector<address>`, this.users),
|
|
315
|
+
|
|
316
|
+
} }
|
|
317
|
+
|
|
318
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
319
|
+
|
|
320
|
+
static fromJSONField( field: any ): RemoveSharedFeePoolAuthorizedUserEvent { return RemoveSharedFeePoolAuthorizedUserEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), users: decodeFromJSONField(reified.vector("address"), field.users) } ) }
|
|
321
|
+
|
|
322
|
+
static fromJSON( json: Record<string, any> ): RemoveSharedFeePoolAuthorizedUserEvent { if (json.$typeName !== RemoveSharedFeePoolAuthorizedUserEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
323
|
+
|
|
324
|
+
return RemoveSharedFeePoolAuthorizedUserEvent.fromJSONField( json, ) }
|
|
325
|
+
|
|
326
|
+
static fromSuiParsedData( content: SuiParsedData ): RemoveSharedFeePoolAuthorizedUserEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isRemoveSharedFeePoolAuthorizedUserEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a RemoveSharedFeePoolAuthorizedUserEvent object`); } return RemoveSharedFeePoolAuthorizedUserEvent.fromFieldsWithTypes( content ); }
|
|
327
|
+
|
|
328
|
+
static async fetch( client: SuiClient, id: string ): Promise<RemoveSharedFeePoolAuthorizedUserEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching RemoveSharedFeePoolAuthorizedUserEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isRemoveSharedFeePoolAuthorizedUserEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a RemoveSharedFeePoolAuthorizedUserEvent object`); }
|
|
329
|
+
return RemoveSharedFeePoolAuthorizedUserEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
330
|
+
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* ============================== TakeFeeEvent =============================== */
|
|
334
|
+
|
|
335
|
+
export function isTakeFeeEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeFeeEvent"; }
|
|
336
|
+
|
|
337
|
+
export interface TakeFeeEventFields { signer: ToField<"address">; token: ToField<TypeName>; amount: ToField<"u64"> }
|
|
338
|
+
|
|
339
|
+
export type TakeFeeEventReified = Reified< TakeFeeEvent, TakeFeeEventFields >;
|
|
340
|
+
|
|
341
|
+
export class TakeFeeEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeFeeEvent"; static readonly $numTypeParams = 0;
|
|
342
|
+
|
|
343
|
+
readonly $typeName = TakeFeeEvent.$typeName;
|
|
344
|
+
|
|
345
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeFeeEvent";
|
|
346
|
+
|
|
347
|
+
readonly $typeArgs: [];
|
|
348
|
+
|
|
349
|
+
readonly signer: ToField<"address">; readonly token: ToField<TypeName>; readonly amount: ToField<"u64">
|
|
350
|
+
|
|
351
|
+
private constructor(typeArgs: [], fields: TakeFeeEventFields, ) { this.$fullTypeName = composeSuiType( TakeFeeEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeFeeEvent"; this.$typeArgs = typeArgs;
|
|
352
|
+
|
|
353
|
+
this.signer = fields.signer;; this.token = fields.token;; this.amount = fields.amount; }
|
|
354
|
+
|
|
355
|
+
static reified( ): TakeFeeEventReified { return { typeName: TakeFeeEvent.$typeName, fullTypeName: composeSuiType( TakeFeeEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeFeeEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => TakeFeeEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => TakeFeeEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => TakeFeeEvent.fromBcs( data, ), bcs: TakeFeeEvent.bcs, fromJSONField: (field: any) => TakeFeeEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => TakeFeeEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => TakeFeeEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => TakeFeeEvent.fetch( client, id, ), new: ( fields: TakeFeeEventFields, ) => { return new TakeFeeEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
356
|
+
|
|
357
|
+
static get r() { return TakeFeeEvent.reified() }
|
|
358
|
+
|
|
359
|
+
static phantom( ): PhantomReified<ToTypeStr<TakeFeeEvent>> { return phantom(TakeFeeEvent.reified( )); } static get p() { return TakeFeeEvent.phantom() }
|
|
360
|
+
|
|
361
|
+
static get bcs() { return bcs.struct("TakeFeeEvent", {
|
|
362
|
+
|
|
363
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), token: TypeName.bcs, amount: bcs.u64()
|
|
364
|
+
|
|
365
|
+
}) };
|
|
366
|
+
|
|
367
|
+
static fromFields( fields: Record<string, any> ): TakeFeeEvent { return TakeFeeEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), token: decodeFromFields(TypeName.reified(), fields.token), amount: decodeFromFields("u64", fields.amount) } ) }
|
|
368
|
+
|
|
369
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): TakeFeeEvent { if (!isTakeFeeEvent(item.type)) { throw new Error("not a TakeFeeEvent type");
|
|
370
|
+
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return TakeFeeEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), token: decodeFromFieldsWithTypes(TypeName.reified(), item.fields.token), amount: decodeFromFieldsWithTypes("u64", item.fields.amount) } ) }
|
|
374
|
+
|
|
375
|
+
static fromBcs( data: Uint8Array ): TakeFeeEvent { return TakeFeeEvent.fromFields( TakeFeeEvent.bcs.parse(data) ) }
|
|
376
|
+
|
|
377
|
+
toJSONField() { return {
|
|
378
|
+
|
|
379
|
+
signer: this.signer,token: this.token.toJSONField(),amount: this.amount.toString(),
|
|
380
|
+
|
|
381
|
+
} }
|
|
382
|
+
|
|
383
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
384
|
+
|
|
385
|
+
static fromJSONField( field: any ): TakeFeeEvent { return TakeFeeEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), token: decodeFromJSONField(TypeName.reified(), field.token), amount: decodeFromJSONField("u64", field.amount) } ) }
|
|
386
|
+
|
|
387
|
+
static fromJSON( json: Record<string, any> ): TakeFeeEvent { if (json.$typeName !== TakeFeeEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
388
|
+
|
|
389
|
+
return TakeFeeEvent.fromJSONField( json, ) }
|
|
390
|
+
|
|
391
|
+
static fromSuiParsedData( content: SuiParsedData ): TakeFeeEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isTakeFeeEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a TakeFeeEvent object`); } return TakeFeeEvent.fromFieldsWithTypes( content ); }
|
|
392
|
+
|
|
393
|
+
static async fetch( client: SuiClient, id: string ): Promise<TakeFeeEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching TakeFeeEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isTakeFeeEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a TakeFeeEvent object`); }
|
|
394
|
+
return TakeFeeEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
395
|
+
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* ============================== TakeSharedFeeEvent =============================== */
|
|
399
|
+
|
|
400
|
+
export function isTakeSharedFeeEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeSharedFeeEvent"; }
|
|
401
|
+
|
|
402
|
+
export interface TakeSharedFeeEventFields { signer: ToField<"address">; key: ToField<Vector<"u8">>; token: ToField<TypeName>; amount: ToField<"u64"> }
|
|
403
|
+
|
|
404
|
+
export type TakeSharedFeeEventReified = Reified< TakeSharedFeeEvent, TakeSharedFeeEventFields >;
|
|
405
|
+
|
|
406
|
+
export class TakeSharedFeeEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeSharedFeeEvent"; static readonly $numTypeParams = 0;
|
|
407
|
+
|
|
408
|
+
readonly $typeName = TakeSharedFeeEvent.$typeName;
|
|
409
|
+
|
|
410
|
+
readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeSharedFeeEvent";
|
|
411
|
+
|
|
412
|
+
readonly $typeArgs: [];
|
|
413
|
+
|
|
414
|
+
readonly signer: ToField<"address">; readonly key: ToField<Vector<"u8">>; readonly token: ToField<TypeName>; readonly amount: ToField<"u64">
|
|
415
|
+
|
|
416
|
+
private constructor(typeArgs: [], fields: TakeSharedFeeEventFields, ) { this.$fullTypeName = composeSuiType( TakeSharedFeeEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeSharedFeeEvent"; this.$typeArgs = typeArgs;
|
|
417
|
+
|
|
418
|
+
this.signer = fields.signer;; this.key = fields.key;; this.token = fields.token;; this.amount = fields.amount; }
|
|
419
|
+
|
|
420
|
+
static reified( ): TakeSharedFeeEventReified { return { typeName: TakeSharedFeeEvent.$typeName, fullTypeName: composeSuiType( TakeSharedFeeEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::tds_fee_pool_entry::TakeSharedFeeEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => TakeSharedFeeEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => TakeSharedFeeEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => TakeSharedFeeEvent.fromBcs( data, ), bcs: TakeSharedFeeEvent.bcs, fromJSONField: (field: any) => TakeSharedFeeEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => TakeSharedFeeEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => TakeSharedFeeEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => TakeSharedFeeEvent.fetch( client, id, ), new: ( fields: TakeSharedFeeEventFields, ) => { return new TakeSharedFeeEvent( [], fields ) }, kind: "StructClassReified", } }
|
|
421
|
+
|
|
422
|
+
static get r() { return TakeSharedFeeEvent.reified() }
|
|
423
|
+
|
|
424
|
+
static phantom( ): PhantomReified<ToTypeStr<TakeSharedFeeEvent>> { return phantom(TakeSharedFeeEvent.reified( )); } static get p() { return TakeSharedFeeEvent.phantom() }
|
|
425
|
+
|
|
426
|
+
static get bcs() { return bcs.struct("TakeSharedFeeEvent", {
|
|
427
|
+
|
|
428
|
+
signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), key: bcs.vector(bcs.u8()), token: TypeName.bcs, amount: bcs.u64()
|
|
429
|
+
|
|
430
|
+
}) };
|
|
431
|
+
|
|
432
|
+
static fromFields( fields: Record<string, any> ): TakeSharedFeeEvent { return TakeSharedFeeEvent.reified( ).new( { signer: decodeFromFields("address", fields.signer), key: decodeFromFields(reified.vector("u8"), fields.key), token: decodeFromFields(TypeName.reified(), fields.token), amount: decodeFromFields("u64", fields.amount) } ) }
|
|
433
|
+
|
|
434
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): TakeSharedFeeEvent { if (!isTakeSharedFeeEvent(item.type)) { throw new Error("not a TakeSharedFeeEvent type");
|
|
435
|
+
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
return TakeSharedFeeEvent.reified( ).new( { signer: decodeFromFieldsWithTypes("address", item.fields.signer), key: decodeFromFieldsWithTypes(reified.vector("u8"), item.fields.key), token: decodeFromFieldsWithTypes(TypeName.reified(), item.fields.token), amount: decodeFromFieldsWithTypes("u64", item.fields.amount) } ) }
|
|
439
|
+
|
|
440
|
+
static fromBcs( data: Uint8Array ): TakeSharedFeeEvent { return TakeSharedFeeEvent.fromFields( TakeSharedFeeEvent.bcs.parse(data) ) }
|
|
441
|
+
|
|
442
|
+
toJSONField() { return {
|
|
443
|
+
|
|
444
|
+
signer: this.signer,key: fieldToJSON<Vector<"u8">>(`vector<u8>`, this.key),token: this.token.toJSONField(),amount: this.amount.toString(),
|
|
445
|
+
|
|
446
|
+
} }
|
|
447
|
+
|
|
448
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
449
|
+
|
|
450
|
+
static fromJSONField( field: any ): TakeSharedFeeEvent { return TakeSharedFeeEvent.reified( ).new( { signer: decodeFromJSONField("address", field.signer), key: decodeFromJSONField(reified.vector("u8"), field.key), token: decodeFromJSONField(TypeName.reified(), field.token), amount: decodeFromJSONField("u64", field.amount) } ) }
|
|
451
|
+
|
|
452
|
+
static fromJSON( json: Record<string, any> ): TakeSharedFeeEvent { if (json.$typeName !== TakeSharedFeeEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
453
|
+
|
|
454
|
+
return TakeSharedFeeEvent.fromJSONField( json, ) }
|
|
455
|
+
|
|
456
|
+
static fromSuiParsedData( content: SuiParsedData ): TakeSharedFeeEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isTakeSharedFeeEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a TakeSharedFeeEvent object`); } return TakeSharedFeeEvent.fromFieldsWithTypes( content ); }
|
|
457
|
+
|
|
458
|
+
static async fetch( client: SuiClient, id: string ): Promise<TakeSharedFeeEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching TakeSharedFeeEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isTakeSharedFeeEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a TakeSharedFeeEvent object`); }
|
|
459
|
+
return TakeSharedFeeEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
460
|
+
|
|
461
|
+
}
|