@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,332 @@
|
|
|
1
|
+
import * as reified from "../../../../_framework/reified";
|
|
2
|
+
import {PhantomReified, Reified, StructClass, ToField, ToTypeStr, Vector, decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, fieldToJSON, phantom, ToTypeStr as ToPhantom} from "../../../../_framework/reified";
|
|
3
|
+
import {FieldsWithTypes, composeSuiType, compressSuiType} from "../../../../_framework/util";
|
|
4
|
+
import {LinkedTable} from "../../0x2/linked-table/structs";
|
|
5
|
+
import {UID} from "../../0x2/object/structs";
|
|
6
|
+
import {bcs, fromB64, fromHEX, toHEX} from "@mysten/bcs";
|
|
7
|
+
import {SuiClient, SuiParsedData} from "@mysten/sui.js/client";
|
|
8
|
+
|
|
9
|
+
/* ============================== AddAccumulatedTgldAmount =============================== */
|
|
10
|
+
|
|
11
|
+
export function isAddAccumulatedTgldAmount(type: string): boolean { type = compressSuiType(type); return type === "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::AddAccumulatedTgldAmount"; }
|
|
12
|
+
|
|
13
|
+
export interface AddAccumulatedTgldAmountFields { user: ToField<"address">; log: ToField<Vector<"u64">>; bcsPadding: ToField<Vector<Vector<"u8">>> }
|
|
14
|
+
|
|
15
|
+
export type AddAccumulatedTgldAmountReified = Reified< AddAccumulatedTgldAmount, AddAccumulatedTgldAmountFields >;
|
|
16
|
+
|
|
17
|
+
export class AddAccumulatedTgldAmount implements StructClass { static readonly $typeName = "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::AddAccumulatedTgldAmount"; static readonly $numTypeParams = 0;
|
|
18
|
+
|
|
19
|
+
readonly $typeName = AddAccumulatedTgldAmount.$typeName;
|
|
20
|
+
|
|
21
|
+
readonly $fullTypeName: "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::AddAccumulatedTgldAmount";
|
|
22
|
+
|
|
23
|
+
readonly $typeArgs: [];
|
|
24
|
+
|
|
25
|
+
readonly user: ToField<"address">; readonly log: ToField<Vector<"u64">>; readonly bcsPadding: ToField<Vector<Vector<"u8">>>
|
|
26
|
+
|
|
27
|
+
private constructor(typeArgs: [], fields: AddAccumulatedTgldAmountFields, ) { this.$fullTypeName = composeSuiType( AddAccumulatedTgldAmount.$typeName, ...typeArgs ) as "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::AddAccumulatedTgldAmount"; this.$typeArgs = typeArgs;
|
|
28
|
+
|
|
29
|
+
this.user = fields.user;; this.log = fields.log;; this.bcsPadding = fields.bcsPadding; }
|
|
30
|
+
|
|
31
|
+
static reified( ): AddAccumulatedTgldAmountReified { return { typeName: AddAccumulatedTgldAmount.$typeName, fullTypeName: composeSuiType( AddAccumulatedTgldAmount.$typeName, ...[] ) as "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::AddAccumulatedTgldAmount", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => AddAccumulatedTgldAmount.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => AddAccumulatedTgldAmount.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => AddAccumulatedTgldAmount.fromBcs( data, ), bcs: AddAccumulatedTgldAmount.bcs, fromJSONField: (field: any) => AddAccumulatedTgldAmount.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => AddAccumulatedTgldAmount.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => AddAccumulatedTgldAmount.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => AddAccumulatedTgldAmount.fetch( client, id, ), new: ( fields: AddAccumulatedTgldAmountFields, ) => { return new AddAccumulatedTgldAmount( [], fields ) }, kind: "StructClassReified", } }
|
|
32
|
+
|
|
33
|
+
static get r() { return AddAccumulatedTgldAmount.reified() }
|
|
34
|
+
|
|
35
|
+
static phantom( ): PhantomReified<ToTypeStr<AddAccumulatedTgldAmount>> { return phantom(AddAccumulatedTgldAmount.reified( )); } static get p() { return AddAccumulatedTgldAmount.phantom() }
|
|
36
|
+
|
|
37
|
+
static get bcs() { return bcs.struct("AddAccumulatedTgldAmount", {
|
|
38
|
+
|
|
39
|
+
user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), log: bcs.vector(bcs.u64()), bcs_padding: bcs.vector(bcs.vector(bcs.u8()))
|
|
40
|
+
|
|
41
|
+
}) };
|
|
42
|
+
|
|
43
|
+
static fromFields( fields: Record<string, any> ): AddAccumulatedTgldAmount { return AddAccumulatedTgldAmount.reified( ).new( { user: decodeFromFields("address", fields.user), log: decodeFromFields(reified.vector("u64"), fields.log), bcsPadding: decodeFromFields(reified.vector(reified.vector("u8")), fields.bcs_padding) } ) }
|
|
44
|
+
|
|
45
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): AddAccumulatedTgldAmount { if (!isAddAccumulatedTgldAmount(item.type)) { throw new Error("not a AddAccumulatedTgldAmount type");
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return AddAccumulatedTgldAmount.reified( ).new( { user: decodeFromFieldsWithTypes("address", item.fields.user), log: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.log), bcsPadding: decodeFromFieldsWithTypes(reified.vector(reified.vector("u8")), item.fields.bcs_padding) } ) }
|
|
50
|
+
|
|
51
|
+
static fromBcs( data: Uint8Array ): AddAccumulatedTgldAmount { return AddAccumulatedTgldAmount.fromFields( AddAccumulatedTgldAmount.bcs.parse(data) ) }
|
|
52
|
+
|
|
53
|
+
toJSONField() { return {
|
|
54
|
+
|
|
55
|
+
user: this.user,log: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.log),bcsPadding: fieldToJSON<Vector<Vector<"u8">>>(`vector<vector<u8>>`, this.bcsPadding),
|
|
56
|
+
|
|
57
|
+
} }
|
|
58
|
+
|
|
59
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
60
|
+
|
|
61
|
+
static fromJSONField( field: any ): AddAccumulatedTgldAmount { return AddAccumulatedTgldAmount.reified( ).new( { user: decodeFromJSONField("address", field.user), log: decodeFromJSONField(reified.vector("u64"), field.log), bcsPadding: decodeFromJSONField(reified.vector(reified.vector("u8")), field.bcsPadding) } ) }
|
|
62
|
+
|
|
63
|
+
static fromJSON( json: Record<string, any> ): AddAccumulatedTgldAmount { if (json.$typeName !== AddAccumulatedTgldAmount.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
64
|
+
|
|
65
|
+
return AddAccumulatedTgldAmount.fromJSONField( json, ) }
|
|
66
|
+
|
|
67
|
+
static fromSuiParsedData( content: SuiParsedData ): AddAccumulatedTgldAmount { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isAddAccumulatedTgldAmount(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a AddAccumulatedTgldAmount object`); } return AddAccumulatedTgldAmount.fromFieldsWithTypes( content ); }
|
|
68
|
+
|
|
69
|
+
static async fetch( client: SuiClient, id: string ): Promise<AddAccumulatedTgldAmount> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching AddAccumulatedTgldAmount object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isAddAccumulatedTgldAmount(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a AddAccumulatedTgldAmount object`); }
|
|
70
|
+
return AddAccumulatedTgldAmount.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ============================== AddTailsExpAmount =============================== */
|
|
75
|
+
|
|
76
|
+
export function isAddTailsExpAmount(type: string): boolean { type = compressSuiType(type); return type === "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::AddTailsExpAmount"; }
|
|
77
|
+
|
|
78
|
+
export interface AddTailsExpAmountFields { user: ToField<"address">; log: ToField<Vector<"u64">>; bcsPadding: ToField<Vector<Vector<"u8">>> }
|
|
79
|
+
|
|
80
|
+
export type AddTailsExpAmountReified = Reified< AddTailsExpAmount, AddTailsExpAmountFields >;
|
|
81
|
+
|
|
82
|
+
export class AddTailsExpAmount implements StructClass { static readonly $typeName = "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::AddTailsExpAmount"; static readonly $numTypeParams = 0;
|
|
83
|
+
|
|
84
|
+
readonly $typeName = AddTailsExpAmount.$typeName;
|
|
85
|
+
|
|
86
|
+
readonly $fullTypeName: "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::AddTailsExpAmount";
|
|
87
|
+
|
|
88
|
+
readonly $typeArgs: [];
|
|
89
|
+
|
|
90
|
+
readonly user: ToField<"address">; readonly log: ToField<Vector<"u64">>; readonly bcsPadding: ToField<Vector<Vector<"u8">>>
|
|
91
|
+
|
|
92
|
+
private constructor(typeArgs: [], fields: AddTailsExpAmountFields, ) { this.$fullTypeName = composeSuiType( AddTailsExpAmount.$typeName, ...typeArgs ) as "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::AddTailsExpAmount"; this.$typeArgs = typeArgs;
|
|
93
|
+
|
|
94
|
+
this.user = fields.user;; this.log = fields.log;; this.bcsPadding = fields.bcsPadding; }
|
|
95
|
+
|
|
96
|
+
static reified( ): AddTailsExpAmountReified { return { typeName: AddTailsExpAmount.$typeName, fullTypeName: composeSuiType( AddTailsExpAmount.$typeName, ...[] ) as "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::AddTailsExpAmount", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => AddTailsExpAmount.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => AddTailsExpAmount.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => AddTailsExpAmount.fromBcs( data, ), bcs: AddTailsExpAmount.bcs, fromJSONField: (field: any) => AddTailsExpAmount.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => AddTailsExpAmount.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => AddTailsExpAmount.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => AddTailsExpAmount.fetch( client, id, ), new: ( fields: AddTailsExpAmountFields, ) => { return new AddTailsExpAmount( [], fields ) }, kind: "StructClassReified", } }
|
|
97
|
+
|
|
98
|
+
static get r() { return AddTailsExpAmount.reified() }
|
|
99
|
+
|
|
100
|
+
static phantom( ): PhantomReified<ToTypeStr<AddTailsExpAmount>> { return phantom(AddTailsExpAmount.reified( )); } static get p() { return AddTailsExpAmount.phantom() }
|
|
101
|
+
|
|
102
|
+
static get bcs() { return bcs.struct("AddTailsExpAmount", {
|
|
103
|
+
|
|
104
|
+
user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), log: bcs.vector(bcs.u64()), bcs_padding: bcs.vector(bcs.vector(bcs.u8()))
|
|
105
|
+
|
|
106
|
+
}) };
|
|
107
|
+
|
|
108
|
+
static fromFields( fields: Record<string, any> ): AddTailsExpAmount { return AddTailsExpAmount.reified( ).new( { user: decodeFromFields("address", fields.user), log: decodeFromFields(reified.vector("u64"), fields.log), bcsPadding: decodeFromFields(reified.vector(reified.vector("u8")), fields.bcs_padding) } ) }
|
|
109
|
+
|
|
110
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): AddTailsExpAmount { if (!isAddTailsExpAmount(item.type)) { throw new Error("not a AddTailsExpAmount type");
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return AddTailsExpAmount.reified( ).new( { user: decodeFromFieldsWithTypes("address", item.fields.user), log: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.log), bcsPadding: decodeFromFieldsWithTypes(reified.vector(reified.vector("u8")), item.fields.bcs_padding) } ) }
|
|
115
|
+
|
|
116
|
+
static fromBcs( data: Uint8Array ): AddTailsExpAmount { return AddTailsExpAmount.fromFields( AddTailsExpAmount.bcs.parse(data) ) }
|
|
117
|
+
|
|
118
|
+
toJSONField() { return {
|
|
119
|
+
|
|
120
|
+
user: this.user,log: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.log),bcsPadding: fieldToJSON<Vector<Vector<"u8">>>(`vector<vector<u8>>`, this.bcsPadding),
|
|
121
|
+
|
|
122
|
+
} }
|
|
123
|
+
|
|
124
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
125
|
+
|
|
126
|
+
static fromJSONField( field: any ): AddTailsExpAmount { return AddTailsExpAmount.reified( ).new( { user: decodeFromJSONField("address", field.user), log: decodeFromJSONField(reified.vector("u64"), field.log), bcsPadding: decodeFromJSONField(reified.vector(reified.vector("u8")), field.bcsPadding) } ) }
|
|
127
|
+
|
|
128
|
+
static fromJSON( json: Record<string, any> ): AddTailsExpAmount { if (json.$typeName !== AddTailsExpAmount.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
129
|
+
|
|
130
|
+
return AddTailsExpAmount.fromJSONField( json, ) }
|
|
131
|
+
|
|
132
|
+
static fromSuiParsedData( content: SuiParsedData ): AddTailsExpAmount { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isAddTailsExpAmount(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a AddTailsExpAmount object`); } return AddTailsExpAmount.fromFieldsWithTypes( content ); }
|
|
133
|
+
|
|
134
|
+
static async fetch( client: SuiClient, id: string ): Promise<AddTailsExpAmount> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching AddTailsExpAmount object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isAddTailsExpAmount(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a AddTailsExpAmount object`); }
|
|
135
|
+
return AddTailsExpAmount.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* ============================== Metadata =============================== */
|
|
140
|
+
|
|
141
|
+
export function isMetadata(type: string): boolean { type = compressSuiType(type); return type === "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::Metadata"; }
|
|
142
|
+
|
|
143
|
+
export interface MetadataFields { content: ToField<Vector<"u64">> }
|
|
144
|
+
|
|
145
|
+
export type MetadataReified = Reified< Metadata, MetadataFields >;
|
|
146
|
+
|
|
147
|
+
export class Metadata implements StructClass { static readonly $typeName = "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::Metadata"; static readonly $numTypeParams = 0;
|
|
148
|
+
|
|
149
|
+
readonly $typeName = Metadata.$typeName;
|
|
150
|
+
|
|
151
|
+
readonly $fullTypeName: "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::Metadata";
|
|
152
|
+
|
|
153
|
+
readonly $typeArgs: [];
|
|
154
|
+
|
|
155
|
+
readonly content: ToField<Vector<"u64">>
|
|
156
|
+
|
|
157
|
+
private constructor(typeArgs: [], fields: MetadataFields, ) { this.$fullTypeName = composeSuiType( Metadata.$typeName, ...typeArgs ) as "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::Metadata"; this.$typeArgs = typeArgs;
|
|
158
|
+
|
|
159
|
+
this.content = fields.content; }
|
|
160
|
+
|
|
161
|
+
static reified( ): MetadataReified { return { typeName: Metadata.$typeName, fullTypeName: composeSuiType( Metadata.$typeName, ...[] ) as "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::Metadata", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => Metadata.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => Metadata.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => Metadata.fromBcs( data, ), bcs: Metadata.bcs, fromJSONField: (field: any) => Metadata.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => Metadata.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => Metadata.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => Metadata.fetch( client, id, ), new: ( fields: MetadataFields, ) => { return new Metadata( [], fields ) }, kind: "StructClassReified", } }
|
|
162
|
+
|
|
163
|
+
static get r() { return Metadata.reified() }
|
|
164
|
+
|
|
165
|
+
static phantom( ): PhantomReified<ToTypeStr<Metadata>> { return phantom(Metadata.reified( )); } static get p() { return Metadata.phantom() }
|
|
166
|
+
|
|
167
|
+
static get bcs() { return bcs.struct("Metadata", {
|
|
168
|
+
|
|
169
|
+
content: bcs.vector(bcs.u64())
|
|
170
|
+
|
|
171
|
+
}) };
|
|
172
|
+
|
|
173
|
+
static fromFields( fields: Record<string, any> ): Metadata { return Metadata.reified( ).new( { content: decodeFromFields(reified.vector("u64"), fields.content) } ) }
|
|
174
|
+
|
|
175
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): Metadata { if (!isMetadata(item.type)) { throw new Error("not a Metadata type");
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return Metadata.reified( ).new( { content: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.content) } ) }
|
|
180
|
+
|
|
181
|
+
static fromBcs( data: Uint8Array ): Metadata { return Metadata.fromFields( Metadata.bcs.parse(data) ) }
|
|
182
|
+
|
|
183
|
+
toJSONField() { return {
|
|
184
|
+
|
|
185
|
+
content: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.content),
|
|
186
|
+
|
|
187
|
+
} }
|
|
188
|
+
|
|
189
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
190
|
+
|
|
191
|
+
static fromJSONField( field: any ): Metadata { return Metadata.reified( ).new( { content: decodeFromJSONField(reified.vector("u64"), field.content) } ) }
|
|
192
|
+
|
|
193
|
+
static fromJSON( json: Record<string, any> ): Metadata { if (json.$typeName !== Metadata.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
194
|
+
|
|
195
|
+
return Metadata.fromJSONField( json, ) }
|
|
196
|
+
|
|
197
|
+
static fromSuiParsedData( content: SuiParsedData ): Metadata { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isMetadata(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a Metadata object`); } return Metadata.fromFieldsWithTypes( content ); }
|
|
198
|
+
|
|
199
|
+
static async fetch( client: SuiClient, id: string ): Promise<Metadata> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching Metadata object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isMetadata(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a Metadata object`); }
|
|
200
|
+
return Metadata.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
201
|
+
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* ============================== RemoveTailsExpAmount =============================== */
|
|
205
|
+
|
|
206
|
+
export function isRemoveTailsExpAmount(type: string): boolean { type = compressSuiType(type); return type === "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::RemoveTailsExpAmount"; }
|
|
207
|
+
|
|
208
|
+
export interface RemoveTailsExpAmountFields { user: ToField<"address">; log: ToField<Vector<"u64">>; bcsPadding: ToField<Vector<Vector<"u8">>> }
|
|
209
|
+
|
|
210
|
+
export type RemoveTailsExpAmountReified = Reified< RemoveTailsExpAmount, RemoveTailsExpAmountFields >;
|
|
211
|
+
|
|
212
|
+
export class RemoveTailsExpAmount implements StructClass { static readonly $typeName = "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::RemoveTailsExpAmount"; static readonly $numTypeParams = 0;
|
|
213
|
+
|
|
214
|
+
readonly $typeName = RemoveTailsExpAmount.$typeName;
|
|
215
|
+
|
|
216
|
+
readonly $fullTypeName: "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::RemoveTailsExpAmount";
|
|
217
|
+
|
|
218
|
+
readonly $typeArgs: [];
|
|
219
|
+
|
|
220
|
+
readonly user: ToField<"address">; readonly log: ToField<Vector<"u64">>; readonly bcsPadding: ToField<Vector<Vector<"u8">>>
|
|
221
|
+
|
|
222
|
+
private constructor(typeArgs: [], fields: RemoveTailsExpAmountFields, ) { this.$fullTypeName = composeSuiType( RemoveTailsExpAmount.$typeName, ...typeArgs ) as "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::RemoveTailsExpAmount"; this.$typeArgs = typeArgs;
|
|
223
|
+
|
|
224
|
+
this.user = fields.user;; this.log = fields.log;; this.bcsPadding = fields.bcsPadding; }
|
|
225
|
+
|
|
226
|
+
static reified( ): RemoveTailsExpAmountReified { return { typeName: RemoveTailsExpAmount.$typeName, fullTypeName: composeSuiType( RemoveTailsExpAmount.$typeName, ...[] ) as "0x1840fac0c84618087065346acdbac28bdec4326c416fcd2dc6d2f1b7d86fe62::user::RemoveTailsExpAmount", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => RemoveTailsExpAmount.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => RemoveTailsExpAmount.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => RemoveTailsExpAmount.fromBcs( data, ), bcs: RemoveTailsExpAmount.bcs, fromJSONField: (field: any) => RemoveTailsExpAmount.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => RemoveTailsExpAmount.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => RemoveTailsExpAmount.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => RemoveTailsExpAmount.fetch( client, id, ), new: ( fields: RemoveTailsExpAmountFields, ) => { return new RemoveTailsExpAmount( [], fields ) }, kind: "StructClassReified", } }
|
|
227
|
+
|
|
228
|
+
static get r() { return RemoveTailsExpAmount.reified() }
|
|
229
|
+
|
|
230
|
+
static phantom( ): PhantomReified<ToTypeStr<RemoveTailsExpAmount>> { return phantom(RemoveTailsExpAmount.reified( )); } static get p() { return RemoveTailsExpAmount.phantom() }
|
|
231
|
+
|
|
232
|
+
static get bcs() { return bcs.struct("RemoveTailsExpAmount", {
|
|
233
|
+
|
|
234
|
+
user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), log: bcs.vector(bcs.u64()), bcs_padding: bcs.vector(bcs.vector(bcs.u8()))
|
|
235
|
+
|
|
236
|
+
}) };
|
|
237
|
+
|
|
238
|
+
static fromFields( fields: Record<string, any> ): RemoveTailsExpAmount { return RemoveTailsExpAmount.reified( ).new( { user: decodeFromFields("address", fields.user), log: decodeFromFields(reified.vector("u64"), fields.log), bcsPadding: decodeFromFields(reified.vector(reified.vector("u8")), fields.bcs_padding) } ) }
|
|
239
|
+
|
|
240
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): RemoveTailsExpAmount { if (!isRemoveTailsExpAmount(item.type)) { throw new Error("not a RemoveTailsExpAmount type");
|
|
241
|
+
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return RemoveTailsExpAmount.reified( ).new( { user: decodeFromFieldsWithTypes("address", item.fields.user), log: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.log), bcsPadding: decodeFromFieldsWithTypes(reified.vector(reified.vector("u8")), item.fields.bcs_padding) } ) }
|
|
245
|
+
|
|
246
|
+
static fromBcs( data: Uint8Array ): RemoveTailsExpAmount { return RemoveTailsExpAmount.fromFields( RemoveTailsExpAmount.bcs.parse(data) ) }
|
|
247
|
+
|
|
248
|
+
toJSONField() { return {
|
|
249
|
+
|
|
250
|
+
user: this.user,log: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.log),bcsPadding: fieldToJSON<Vector<Vector<"u8">>>(`vector<vector<u8>>`, this.bcsPadding),
|
|
251
|
+
|
|
252
|
+
} }
|
|
253
|
+
|
|
254
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
255
|
+
|
|
256
|
+
static fromJSONField( field: any ): RemoveTailsExpAmount { return RemoveTailsExpAmount.reified( ).new( { user: decodeFromJSONField("address", field.user), log: decodeFromJSONField(reified.vector("u64"), field.log), bcsPadding: decodeFromJSONField(reified.vector(reified.vector("u8")), field.bcsPadding) } ) }
|
|
257
|
+
|
|
258
|
+
static fromJSON( json: Record<string, any> ): RemoveTailsExpAmount { if (json.$typeName !== RemoveTailsExpAmount.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
259
|
+
|
|
260
|
+
return RemoveTailsExpAmount.fromJSONField( json, ) }
|
|
261
|
+
|
|
262
|
+
static fromSuiParsedData( content: SuiParsedData ): RemoveTailsExpAmount { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isRemoveTailsExpAmount(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a RemoveTailsExpAmount object`); } return RemoveTailsExpAmount.fromFieldsWithTypes( content ); }
|
|
263
|
+
|
|
264
|
+
static async fetch( client: SuiClient, id: string ): Promise<RemoveTailsExpAmount> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching RemoveTailsExpAmount object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isRemoveTailsExpAmount(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a RemoveTailsExpAmount object`); }
|
|
265
|
+
return RemoveTailsExpAmount.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
266
|
+
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* ============================== TypusUserRegistry =============================== */
|
|
270
|
+
|
|
271
|
+
export function isTypusUserRegistry(type: string): boolean { type = compressSuiType(type); return type === "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::TypusUserRegistry"; }
|
|
272
|
+
|
|
273
|
+
export interface TypusUserRegistryFields { id: ToField<UID>; metadata: ToField<LinkedTable<"address", ToPhantom<Metadata>>> }
|
|
274
|
+
|
|
275
|
+
export type TypusUserRegistryReified = Reified< TypusUserRegistry, TypusUserRegistryFields >;
|
|
276
|
+
|
|
277
|
+
export class TypusUserRegistry implements StructClass { static readonly $typeName = "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::TypusUserRegistry"; static readonly $numTypeParams = 0;
|
|
278
|
+
|
|
279
|
+
readonly $typeName = TypusUserRegistry.$typeName;
|
|
280
|
+
|
|
281
|
+
readonly $fullTypeName: "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::TypusUserRegistry";
|
|
282
|
+
|
|
283
|
+
readonly $typeArgs: [];
|
|
284
|
+
|
|
285
|
+
readonly id: ToField<UID>; readonly metadata: ToField<LinkedTable<"address", ToPhantom<Metadata>>>
|
|
286
|
+
|
|
287
|
+
private constructor(typeArgs: [], fields: TypusUserRegistryFields, ) { this.$fullTypeName = composeSuiType( TypusUserRegistry.$typeName, ...typeArgs ) as "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::TypusUserRegistry"; this.$typeArgs = typeArgs;
|
|
288
|
+
|
|
289
|
+
this.id = fields.id;; this.metadata = fields.metadata; }
|
|
290
|
+
|
|
291
|
+
static reified( ): TypusUserRegistryReified { return { typeName: TypusUserRegistry.$typeName, fullTypeName: composeSuiType( TypusUserRegistry.$typeName, ...[] ) as "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::TypusUserRegistry", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => TypusUserRegistry.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => TypusUserRegistry.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => TypusUserRegistry.fromBcs( data, ), bcs: TypusUserRegistry.bcs, fromJSONField: (field: any) => TypusUserRegistry.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => TypusUserRegistry.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => TypusUserRegistry.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => TypusUserRegistry.fetch( client, id, ), new: ( fields: TypusUserRegistryFields, ) => { return new TypusUserRegistry( [], fields ) }, kind: "StructClassReified", } }
|
|
292
|
+
|
|
293
|
+
static get r() { return TypusUserRegistry.reified() }
|
|
294
|
+
|
|
295
|
+
static phantom( ): PhantomReified<ToTypeStr<TypusUserRegistry>> { return phantom(TypusUserRegistry.reified( )); } static get p() { return TypusUserRegistry.phantom() }
|
|
296
|
+
|
|
297
|
+
static get bcs() { return bcs.struct("TypusUserRegistry", {
|
|
298
|
+
|
|
299
|
+
id: UID.bcs, metadata: LinkedTable.bcs(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
|
|
300
|
+
|
|
301
|
+
}) };
|
|
302
|
+
|
|
303
|
+
static fromFields( fields: Record<string, any> ): TypusUserRegistry { return TypusUserRegistry.reified( ).new( { id: decodeFromFields(UID.reified(), fields.id), metadata: decodeFromFields(LinkedTable.reified("address", reified.phantom(Metadata.reified())), fields.metadata) } ) }
|
|
304
|
+
|
|
305
|
+
static fromFieldsWithTypes( item: FieldsWithTypes ): TypusUserRegistry { if (!isTypusUserRegistry(item.type)) { throw new Error("not a TypusUserRegistry type");
|
|
306
|
+
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return TypusUserRegistry.reified( ).new( { id: decodeFromFieldsWithTypes(UID.reified(), item.fields.id), metadata: decodeFromFieldsWithTypes(LinkedTable.reified("address", reified.phantom(Metadata.reified())), item.fields.metadata) } ) }
|
|
310
|
+
|
|
311
|
+
static fromBcs( data: Uint8Array ): TypusUserRegistry { return TypusUserRegistry.fromFields( TypusUserRegistry.bcs.parse(data) ) }
|
|
312
|
+
|
|
313
|
+
toJSONField() { return {
|
|
314
|
+
|
|
315
|
+
id: this.id,metadata: this.metadata.toJSONField(),
|
|
316
|
+
|
|
317
|
+
} }
|
|
318
|
+
|
|
319
|
+
toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
|
|
320
|
+
|
|
321
|
+
static fromJSONField( field: any ): TypusUserRegistry { return TypusUserRegistry.reified( ).new( { id: decodeFromJSONField(UID.reified(), field.id), metadata: decodeFromJSONField(LinkedTable.reified("address", reified.phantom(Metadata.reified())), field.metadata) } ) }
|
|
322
|
+
|
|
323
|
+
static fromJSON( json: Record<string, any> ): TypusUserRegistry { if (json.$typeName !== TypusUserRegistry.$typeName) { throw new Error("not a WithTwoGenerics json object") };
|
|
324
|
+
|
|
325
|
+
return TypusUserRegistry.fromJSONField( json, ) }
|
|
326
|
+
|
|
327
|
+
static fromSuiParsedData( content: SuiParsedData ): TypusUserRegistry { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isTypusUserRegistry(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a TypusUserRegistry object`); } return TypusUserRegistry.fromFieldsWithTypes( content ); }
|
|
328
|
+
|
|
329
|
+
static async fetch( client: SuiClient, id: string ): Promise<TypusUserRegistry> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching TypusUserRegistry object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isTypusUserRegistry(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a TypusUserRegistry object`); }
|
|
330
|
+
return TypusUserRegistry.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
|
|
331
|
+
|
|
332
|
+
}
|