@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,573 @@
|
|
|
1
|
+
import { TransactionBlock, TransactionObjectArgument } from "@mysten/sui.js/transactions";
|
|
2
|
+
import { CLOCK } from "src/constants";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
public fun public_raise_fund<D_TOKEN, B_TOKEN>(
|
|
6
|
+
typus_ecosystem_version: &TypusEcosystemVersion,
|
|
7
|
+
typus_user_registry: &mut TypusUserRegistry,
|
|
8
|
+
typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
|
|
9
|
+
registry: &mut Registry,
|
|
10
|
+
index: u64,
|
|
11
|
+
receipts: vector<TypusDepositReceipt>,
|
|
12
|
+
raise_balance: Balance<D_TOKEN>,
|
|
13
|
+
raise_from_premium: bool,
|
|
14
|
+
raise_from_inactive: bool,
|
|
15
|
+
clock: &Clock,
|
|
16
|
+
ctx: &mut TxContext,
|
|
17
|
+
): (TypusDepositReceipt, vector<u64>) {
|
|
18
|
+
*/
|
|
19
|
+
export function getRaiseFundTx(input: {
|
|
20
|
+
tx: TransactionBlock;
|
|
21
|
+
typusEcosystemVersion: string;
|
|
22
|
+
typusUserRegistry: string;
|
|
23
|
+
typusLeaderboardRegistry: string;
|
|
24
|
+
typusFrameworkOriginPackageId: string;
|
|
25
|
+
typusFrameworkPackageId: string;
|
|
26
|
+
typusDovSinglePackageId: string;
|
|
27
|
+
typusDovSingleRegistry: string;
|
|
28
|
+
typeArguments: string[];
|
|
29
|
+
index: string;
|
|
30
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
31
|
+
raiseCoins: string[];
|
|
32
|
+
raiseAmount: string;
|
|
33
|
+
raiseFromPremium: boolean;
|
|
34
|
+
raiseFromInactive: boolean;
|
|
35
|
+
user: string;
|
|
36
|
+
}) {
|
|
37
|
+
let raiseBalance =
|
|
38
|
+
input.typeArguments[0] == "0x2::sui::SUI" ||
|
|
39
|
+
input.typeArguments[0] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI"
|
|
40
|
+
? input.tx.moveCall({
|
|
41
|
+
target: `${input.typusFrameworkPackageId}::utils::delegate_extract_balance`,
|
|
42
|
+
typeArguments: [input.typeArguments[0]],
|
|
43
|
+
arguments: [
|
|
44
|
+
input.tx.pure(input.user),
|
|
45
|
+
input.tx.makeMoveVec({
|
|
46
|
+
type: `0x2::coin::Coin<${input.typeArguments[0]}>`,
|
|
47
|
+
objects: [input.tx.splitCoins(input.tx.gas, [input.tx.pure(input.raiseAmount)])],
|
|
48
|
+
}),
|
|
49
|
+
input.tx.pure(input.raiseAmount),
|
|
50
|
+
],
|
|
51
|
+
})
|
|
52
|
+
: input.tx.moveCall({
|
|
53
|
+
target: `${input.typusFrameworkPackageId}::utils::delegate_extract_balance`,
|
|
54
|
+
typeArguments: [input.typeArguments[0]],
|
|
55
|
+
arguments: [
|
|
56
|
+
input.tx.pure(input.user),
|
|
57
|
+
input.tx.makeMoveVec({
|
|
58
|
+
type: `0x2::coin::Coin<${input.typeArguments[0]}>`,
|
|
59
|
+
objects: input.raiseCoins.map((coin) => input.tx.object(coin)),
|
|
60
|
+
}),
|
|
61
|
+
input.tx.pure(input.raiseAmount),
|
|
62
|
+
],
|
|
63
|
+
});
|
|
64
|
+
let result = input.tx.moveCall({
|
|
65
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::public_raise_fund`,
|
|
66
|
+
typeArguments: input.typeArguments,
|
|
67
|
+
arguments: [
|
|
68
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
69
|
+
input.tx.object(input.typusUserRegistry),
|
|
70
|
+
input.tx.object(input.typusLeaderboardRegistry),
|
|
71
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
72
|
+
input.tx.pure(input.index),
|
|
73
|
+
input.tx.makeMoveVec({
|
|
74
|
+
type: `${input.typusFrameworkOriginPackageId}::vault::TypusDepositReceipt`,
|
|
75
|
+
objects: input.receipts.map((receipt) => input.tx.object(receipt)),
|
|
76
|
+
}),
|
|
77
|
+
input.tx.object(raiseBalance),
|
|
78
|
+
input.tx.pure(input.raiseFromPremium),
|
|
79
|
+
input.tx.pure(input.raiseFromInactive),
|
|
80
|
+
input.tx.object(CLOCK),
|
|
81
|
+
],
|
|
82
|
+
});
|
|
83
|
+
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
84
|
+
|
|
85
|
+
return input.tx;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
public fun public_reduce_fund<D_TOKEN, B_TOKEN, I_TOKEN>(
|
|
90
|
+
typus_ecosystem_version: &TypusEcosystemVersion,
|
|
91
|
+
typus_user_registry: &mut TypusUserRegistry,
|
|
92
|
+
typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
|
|
93
|
+
registry: &mut Registry,
|
|
94
|
+
index: u64,
|
|
95
|
+
receipts: vector<TypusDepositReceipt>,
|
|
96
|
+
reduce_from_warmup: u64,
|
|
97
|
+
reduce_from_active: u64,
|
|
98
|
+
reduce_from_premium: bool,
|
|
99
|
+
reduce_from_inactive: bool,
|
|
100
|
+
reduce_from_incentive: bool,
|
|
101
|
+
clock: &Clock,
|
|
102
|
+
ctx: &mut TxContext,
|
|
103
|
+
): (Option<TypusDepositReceipt>, Balance<D_TOKEN>, Balance<B_TOKEN>, Balance<I_TOKEN>, vector<u64>) {
|
|
104
|
+
*/
|
|
105
|
+
export function getReduceFundTx(input: {
|
|
106
|
+
tx: TransactionBlock;
|
|
107
|
+
typusEcosystemVersion: string;
|
|
108
|
+
typusUserRegistry: string;
|
|
109
|
+
typusLeaderboardRegistry: string;
|
|
110
|
+
typusFrameworkOriginPackageId: string;
|
|
111
|
+
typusFrameworkPackageId: string;
|
|
112
|
+
typusDovSinglePackageId: string;
|
|
113
|
+
typusDovSingleRegistry: string;
|
|
114
|
+
typeArguments: string[];
|
|
115
|
+
index: string;
|
|
116
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
117
|
+
reduceFromWarmup: string;
|
|
118
|
+
reduceFromActive: string;
|
|
119
|
+
reduceFromPremium: boolean;
|
|
120
|
+
reduceFromInactive: boolean;
|
|
121
|
+
reduceFromIncentive: boolean;
|
|
122
|
+
user: string;
|
|
123
|
+
}) {
|
|
124
|
+
let result = input.tx.moveCall({
|
|
125
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::public_reduce_fund`,
|
|
126
|
+
typeArguments: input.typeArguments,
|
|
127
|
+
arguments: [
|
|
128
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
129
|
+
input.tx.object(input.typusUserRegistry),
|
|
130
|
+
input.tx.object(input.typusLeaderboardRegistry),
|
|
131
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
132
|
+
input.tx.pure(input.index),
|
|
133
|
+
input.tx.makeMoveVec({
|
|
134
|
+
type: `${input.typusFrameworkOriginPackageId}::vault::TypusDepositReceipt`,
|
|
135
|
+
objects: input.receipts.map((receipt) => input.tx.object(receipt)),
|
|
136
|
+
}),
|
|
137
|
+
input.tx.pure(input.reduceFromWarmup),
|
|
138
|
+
input.tx.pure(input.reduceFromActive),
|
|
139
|
+
input.tx.pure(input.reduceFromPremium),
|
|
140
|
+
input.tx.pure(input.reduceFromInactive),
|
|
141
|
+
input.tx.pure(input.reduceFromIncentive),
|
|
142
|
+
input.tx.object(CLOCK),
|
|
143
|
+
],
|
|
144
|
+
});
|
|
145
|
+
input.tx.moveCall({
|
|
146
|
+
target: `${input.typusFrameworkPackageId}::vault::transfer_deposit_receipt`,
|
|
147
|
+
arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
|
|
148
|
+
});
|
|
149
|
+
input.tx.moveCall({
|
|
150
|
+
target: `${input.typusFrameworkPackageId}::utils::transfer_balance`,
|
|
151
|
+
typeArguments: [input.typeArguments[0]],
|
|
152
|
+
arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
|
|
153
|
+
});
|
|
154
|
+
input.tx.moveCall({
|
|
155
|
+
target: `${input.typusFrameworkPackageId}::utils::transfer_balance`,
|
|
156
|
+
typeArguments: [input.typeArguments[1]],
|
|
157
|
+
arguments: [input.tx.object(result[2]), input.tx.pure(input.user)],
|
|
158
|
+
});
|
|
159
|
+
input.tx.moveCall({
|
|
160
|
+
target: `${input.typusFrameworkPackageId}::utils::transfer_balance`,
|
|
161
|
+
typeArguments: [input.typeArguments[2]],
|
|
162
|
+
arguments: [input.tx.object(result[3]), input.tx.pure(input.user)],
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
return input.tx;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
public fun public_refresh_deposit_snapshot<D_TOKEN, B_TOKEN>(
|
|
170
|
+
typus_ecosystem_version: &TypusEcosystemVersion,
|
|
171
|
+
typus_user_registry: &mut TypusUserRegistry,
|
|
172
|
+
typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
|
|
173
|
+
registry: &mut Registry,
|
|
174
|
+
index: u64,
|
|
175
|
+
receipts: vector<TypusDepositReceipt>,
|
|
176
|
+
clock: &Clock,
|
|
177
|
+
ctx: &mut TxContext,
|
|
178
|
+
): (TypusDepositReceipt, vector<u64>) {
|
|
179
|
+
*/
|
|
180
|
+
export function getRefreshDepositSnapshotTx(input: {
|
|
181
|
+
tx: TransactionBlock;
|
|
182
|
+
typusEcosystemVersion: string;
|
|
183
|
+
typusUserRegistry: string;
|
|
184
|
+
typusLeaderboardRegistry: string;
|
|
185
|
+
typusFrameworkOriginPackageId: string;
|
|
186
|
+
typusDovSinglePackageId: string;
|
|
187
|
+
typusDovSingleRegistry: string;
|
|
188
|
+
typeArguments: string[];
|
|
189
|
+
index: string;
|
|
190
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
191
|
+
user: string;
|
|
192
|
+
}) {
|
|
193
|
+
let result = input.tx.moveCall({
|
|
194
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::public_refresh_deposit_snapshot`,
|
|
195
|
+
typeArguments: input.typeArguments,
|
|
196
|
+
arguments: [
|
|
197
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
198
|
+
input.tx.object(input.typusUserRegistry),
|
|
199
|
+
input.tx.object(input.typusLeaderboardRegistry),
|
|
200
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
201
|
+
input.tx.pure(input.index),
|
|
202
|
+
input.tx.makeMoveVec({
|
|
203
|
+
type: `${input.typusFrameworkOriginPackageId}::vault::TypusDepositReceipt`,
|
|
204
|
+
objects: input.receipts.map((receipt) => input.tx.object(receipt)),
|
|
205
|
+
}),
|
|
206
|
+
input.tx.object(CLOCK),
|
|
207
|
+
],
|
|
208
|
+
});
|
|
209
|
+
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
210
|
+
|
|
211
|
+
return input.tx;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
public(friend) entry fun new_bid<D_TOKEN, B_TOKEN>(
|
|
216
|
+
registry: &mut Registry,
|
|
217
|
+
index: u64,
|
|
218
|
+
coins: vector<Coin<B_TOKEN>>,
|
|
219
|
+
size: u64,
|
|
220
|
+
clock: &Clock,
|
|
221
|
+
ctx: &mut TxContext,
|
|
222
|
+
)
|
|
223
|
+
*/
|
|
224
|
+
export function getNewBidTx(input: {
|
|
225
|
+
tx: TransactionBlock;
|
|
226
|
+
typusEcosystemVersion: string;
|
|
227
|
+
typusUserRegistry: string;
|
|
228
|
+
tgldRegistry: string;
|
|
229
|
+
typusLeaderboardRegistry: string;
|
|
230
|
+
typusFrameworkPackageId: string;
|
|
231
|
+
typusDovSinglePackageId: string;
|
|
232
|
+
typusDovSingleRegistry: string;
|
|
233
|
+
typeArguments: string[];
|
|
234
|
+
index: string;
|
|
235
|
+
coins: string[];
|
|
236
|
+
size: string;
|
|
237
|
+
premium_required: string; // fe float * b_token_decimal
|
|
238
|
+
user: string;
|
|
239
|
+
usingSponsoredGasCoin?: boolean;
|
|
240
|
+
}) {
|
|
241
|
+
if (
|
|
242
|
+
!input.usingSponsoredGasCoin &&
|
|
243
|
+
(input.typeArguments[1] == "0x2::sui::SUI" ||
|
|
244
|
+
input.typeArguments[1] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")
|
|
245
|
+
) {
|
|
246
|
+
let [coin] = input.tx.splitCoins(input.tx.gas, [input.tx.pure(input.premium_required)]);
|
|
247
|
+
let result = input.tx.moveCall({
|
|
248
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::public_bid`,
|
|
249
|
+
typeArguments: input.typeArguments,
|
|
250
|
+
arguments: [
|
|
251
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
252
|
+
input.tx.object(input.typusUserRegistry),
|
|
253
|
+
input.tx.object(input.tgldRegistry),
|
|
254
|
+
input.tx.object(input.typusLeaderboardRegistry),
|
|
255
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
256
|
+
input.tx.pure(input.index),
|
|
257
|
+
input.tx.makeMoveVec({ objects: [coin] }),
|
|
258
|
+
input.tx.pure(input.size),
|
|
259
|
+
input.tx.object(CLOCK),
|
|
260
|
+
],
|
|
261
|
+
});
|
|
262
|
+
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
263
|
+
input.tx.moveCall({
|
|
264
|
+
target: `${input.typusFrameworkPackageId}::utils::transfer_coins`,
|
|
265
|
+
typeArguments: [input.typeArguments[1]],
|
|
266
|
+
arguments: [input.tx.makeMoveVec({ objects: [input.tx.object(result[1])] }), input.tx.pure(input.user)],
|
|
267
|
+
});
|
|
268
|
+
} else {
|
|
269
|
+
let balance = input.tx.moveCall({
|
|
270
|
+
target: `${input.typusFrameworkPackageId}::utils::extract_balance`,
|
|
271
|
+
typeArguments: [input.typeArguments[1]],
|
|
272
|
+
arguments: [
|
|
273
|
+
input.tx.makeMoveVec({ objects: input.coins.map((coin) => input.tx.object(coin)) }),
|
|
274
|
+
input.tx.pure(input.premium_required),
|
|
275
|
+
],
|
|
276
|
+
});
|
|
277
|
+
let coin = input.tx.moveCall({
|
|
278
|
+
target: `0x2::coin::from_balance`,
|
|
279
|
+
typeArguments: [input.typeArguments[1]],
|
|
280
|
+
arguments: [input.tx.object(balance)],
|
|
281
|
+
});
|
|
282
|
+
let result = input.tx.moveCall({
|
|
283
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::public_bid`,
|
|
284
|
+
typeArguments: input.typeArguments,
|
|
285
|
+
arguments: [
|
|
286
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
287
|
+
input.tx.object(input.typusUserRegistry),
|
|
288
|
+
input.tx.object(input.tgldRegistry),
|
|
289
|
+
input.tx.object(input.typusLeaderboardRegistry),
|
|
290
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
291
|
+
input.tx.pure(input.index),
|
|
292
|
+
input.tx.makeMoveVec({ objects: [coin] }),
|
|
293
|
+
input.tx.pure(input.size),
|
|
294
|
+
input.tx.pure("0x6"),
|
|
295
|
+
],
|
|
296
|
+
});
|
|
297
|
+
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
298
|
+
input.tx.moveCall({
|
|
299
|
+
target: `${input.typusFrameworkPackageId}::utils::transfer_coins`,
|
|
300
|
+
typeArguments: [input.typeArguments[1]],
|
|
301
|
+
arguments: [input.tx.makeMoveVec({ objects: [input.tx.object(result[1])] }), input.tx.pure(input.user)],
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
return input.tx;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
public(friend) entry fun exercise<D_TOKEN, B_TOKEN>(
|
|
310
|
+
registry: &mut Registry,
|
|
311
|
+
index: u64,
|
|
312
|
+
receipts: vector<TypusBidReceipt>,
|
|
313
|
+
ctx: &mut TxContext,
|
|
314
|
+
)
|
|
315
|
+
*/
|
|
316
|
+
export function getExerciseTx(input: {
|
|
317
|
+
tx: TransactionBlock;
|
|
318
|
+
typusFrameworkOriginPackageId: string;
|
|
319
|
+
typusFrameworkPackageId: string;
|
|
320
|
+
typusDovSinglePackageId: string;
|
|
321
|
+
typusDovSingleRegistry: string;
|
|
322
|
+
typeArguments: string[];
|
|
323
|
+
index: string;
|
|
324
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
325
|
+
user: string;
|
|
326
|
+
}) {
|
|
327
|
+
let result = input.tx.moveCall({
|
|
328
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::exercise`,
|
|
329
|
+
typeArguments: input.typeArguments,
|
|
330
|
+
arguments: [
|
|
331
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
332
|
+
input.tx.pure(input.index),
|
|
333
|
+
input.tx.makeMoveVec({
|
|
334
|
+
type: `${input.typusFrameworkOriginPackageId}::vault::TypusBidReceipt`,
|
|
335
|
+
objects: input.receipts.map((receipt) => input.tx.object(receipt)),
|
|
336
|
+
}),
|
|
337
|
+
],
|
|
338
|
+
});
|
|
339
|
+
input.tx.moveCall({
|
|
340
|
+
target: `${input.typusFrameworkPackageId}::utils::transfer_balance`,
|
|
341
|
+
typeArguments: [input.typeArguments[0]],
|
|
342
|
+
arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
return input.tx;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
public(friend) entry fun transfer_bid_receipt<D_TOKEN, B_TOKEN>(
|
|
350
|
+
registry: &mut Registry,
|
|
351
|
+
index: u64,
|
|
352
|
+
receipts: vector<TypusBidReceipt>,
|
|
353
|
+
share: Option<u64>,
|
|
354
|
+
recipient: address,
|
|
355
|
+
ctx: &mut TxContext,
|
|
356
|
+
) {
|
|
357
|
+
*/
|
|
358
|
+
export function getTransferBidReceiptTx(input: {
|
|
359
|
+
tx: TransactionBlock;
|
|
360
|
+
typusFrameworkOriginPackageId: string;
|
|
361
|
+
typusDovSinglePackageId: string;
|
|
362
|
+
typusDovSingleRegistry: string;
|
|
363
|
+
typeArguments: string[];
|
|
364
|
+
index: string;
|
|
365
|
+
receipts: string[];
|
|
366
|
+
share?: string;
|
|
367
|
+
recipient: string;
|
|
368
|
+
}) {
|
|
369
|
+
input.tx.moveCall({
|
|
370
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::transfer_bid_receipt`,
|
|
371
|
+
typeArguments: input.typeArguments,
|
|
372
|
+
arguments: [
|
|
373
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
374
|
+
input.tx.pure(input.index),
|
|
375
|
+
input.tx.makeMoveVec({
|
|
376
|
+
type: `${input.typusFrameworkOriginPackageId}::vault::TypusBidReceipt`,
|
|
377
|
+
objects: input.receipts.map((receipt) => input.tx.object(receipt)),
|
|
378
|
+
}),
|
|
379
|
+
input.tx.pure(input.share ? [input.share] : []),
|
|
380
|
+
input.tx.pure(input.recipient),
|
|
381
|
+
],
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
return input.tx;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export function getSplitBidReceiptTx(input: {
|
|
388
|
+
tx: TransactionBlock;
|
|
389
|
+
typusFrameworkOriginPackageId: string;
|
|
390
|
+
typusDovSinglePackageId: string;
|
|
391
|
+
typusDovSingleRegistry: string;
|
|
392
|
+
index: string;
|
|
393
|
+
receipts: string[];
|
|
394
|
+
share: string;
|
|
395
|
+
recipient: string;
|
|
396
|
+
}) {
|
|
397
|
+
const result = input.tx.moveCall({
|
|
398
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::simple_split_bid_receipt`,
|
|
399
|
+
typeArguments: [],
|
|
400
|
+
arguments: [
|
|
401
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
402
|
+
input.tx.pure(input.index),
|
|
403
|
+
input.tx.makeMoveVec({
|
|
404
|
+
type: `${input.typusFrameworkOriginPackageId}::vault::TypusBidReceipt`,
|
|
405
|
+
objects: input.receipts.map((receipt) => input.tx.object(receipt)),
|
|
406
|
+
}),
|
|
407
|
+
input.tx.pure([input.share]),
|
|
408
|
+
],
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
const unwrap0 = input.tx.moveCall({
|
|
412
|
+
target: `0x1::option::destroy_some`,
|
|
413
|
+
typeArguments: [`${input.typusFrameworkOriginPackageId}::vault::TypusBidReceipt`],
|
|
414
|
+
arguments: [input.tx.object(result[0])],
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
const unwrap1 = input.tx.moveCall({
|
|
418
|
+
target: `0x1::option::destroy_some`,
|
|
419
|
+
typeArguments: [`${input.typusFrameworkOriginPackageId}::vault::TypusBidReceipt`],
|
|
420
|
+
arguments: [input.tx.object(result[1])],
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
input.tx.transferObjects([unwrap1], input.recipient);
|
|
424
|
+
|
|
425
|
+
return unwrap0;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export function getMultiTransferBidReceiptTx(input: {
|
|
429
|
+
typusFrameworkPackageId: string;
|
|
430
|
+
typusFrameworkOriginPackageId: string;
|
|
431
|
+
typusDovSinglePackageId: string;
|
|
432
|
+
typusDovSingleRegistry: string;
|
|
433
|
+
typeArguments: string[];
|
|
434
|
+
index: string;
|
|
435
|
+
receipts: string[];
|
|
436
|
+
shares: string[];
|
|
437
|
+
recipients: string[];
|
|
438
|
+
sender: string;
|
|
439
|
+
}) {
|
|
440
|
+
let tx = new TransactionBlock();
|
|
441
|
+
console.assert(input.shares.length == input.recipients.length, "shares.length != recipients.length");
|
|
442
|
+
|
|
443
|
+
var receipts = {
|
|
444
|
+
// type: `${input.typusFrameworkOriginPackageId}::vault::TypusBidReceipt`,
|
|
445
|
+
objects: input.receipts.map((receipt) => tx.object(receipt)),
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
var i = 0;
|
|
449
|
+
while (i < input.shares.length) {
|
|
450
|
+
const share = input.shares[i];
|
|
451
|
+
const recipient = input.recipients[i];
|
|
452
|
+
const result = tx.moveCall({
|
|
453
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::public_transfer_bid_receipt`,
|
|
454
|
+
typeArguments: input.typeArguments,
|
|
455
|
+
arguments: [
|
|
456
|
+
tx.object(input.typusDovSingleRegistry),
|
|
457
|
+
tx.pure(input.index),
|
|
458
|
+
tx.makeMoveVec(receipts),
|
|
459
|
+
tx.pure([share]),
|
|
460
|
+
tx.pure(recipient),
|
|
461
|
+
],
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
const unwrap = tx.moveCall({
|
|
465
|
+
target: `0x1::option::destroy_some`,
|
|
466
|
+
typeArguments: [`${input.typusFrameworkOriginPackageId}::vault::TypusBidReceipt`],
|
|
467
|
+
arguments: [tx.object(result[0])],
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
receipts = { objects: [unwrap] };
|
|
471
|
+
|
|
472
|
+
i += 1;
|
|
473
|
+
if (i == input.shares.length) {
|
|
474
|
+
tx.transferObjects([tx.object(unwrap)], input.sender);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
tx.setGasBudget(100000000);
|
|
479
|
+
return tx;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
public(friend) entry fun refund<TOKEN>(
|
|
484
|
+
registry: &mut Registry,
|
|
485
|
+
ctx: &mut TxContext,
|
|
486
|
+
)
|
|
487
|
+
*/
|
|
488
|
+
export function getRebateTx(input: {
|
|
489
|
+
tx: TransactionBlock;
|
|
490
|
+
typusFrameworkPackageId: string;
|
|
491
|
+
typusDovSinglePackageId: string;
|
|
492
|
+
typusDovSingleRegistry: string;
|
|
493
|
+
typeArgument: string;
|
|
494
|
+
user: string;
|
|
495
|
+
}) {
|
|
496
|
+
let result = input.tx.moveCall({
|
|
497
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::rebate`,
|
|
498
|
+
typeArguments: [input.typeArgument],
|
|
499
|
+
arguments: [input.tx.object(input.typusDovSingleRegistry)],
|
|
500
|
+
});
|
|
501
|
+
let balance = input.tx.moveCall({
|
|
502
|
+
target: `0x1::option::destroy_some`,
|
|
503
|
+
typeArguments: [`0x2::balance::Balance<${input.typeArgument}>`],
|
|
504
|
+
arguments: [input.tx.object(result[0])],
|
|
505
|
+
});
|
|
506
|
+
input.tx.moveCall({
|
|
507
|
+
target: `${input.typusFrameworkPackageId}::utils::transfer_balance`,
|
|
508
|
+
typeArguments: [input.typeArgument],
|
|
509
|
+
arguments: [input.tx.object(balance), input.tx.pure(input.user)],
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
return input.tx;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export function getCompoundWithRedeemTx(input: {
|
|
516
|
+
tx: TransactionBlock;
|
|
517
|
+
typusEcosystemVersion: string;
|
|
518
|
+
typusUserRegistry: string;
|
|
519
|
+
typusLeaderboardRegistry: string;
|
|
520
|
+
typusFrameworkOriginPackageId: string;
|
|
521
|
+
typusFrameworkPackageId: string;
|
|
522
|
+
typusDovSinglePackageId: string;
|
|
523
|
+
typusDovSingleRegistry: string;
|
|
524
|
+
typeArguments: string[];
|
|
525
|
+
index: string;
|
|
526
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
527
|
+
user: string;
|
|
528
|
+
}) {
|
|
529
|
+
let raiseBalance = input.tx.moveCall({
|
|
530
|
+
target: `0x2::balance::zero`,
|
|
531
|
+
typeArguments: [input.typeArguments[0]],
|
|
532
|
+
arguments: [],
|
|
533
|
+
});
|
|
534
|
+
let result = input.tx.moveCall({
|
|
535
|
+
target: `${input.typusDovSinglePackageId}::tds_user_entry::public_raise_fund`,
|
|
536
|
+
typeArguments: [input.typeArguments[0], input.typeArguments[1]],
|
|
537
|
+
arguments: [
|
|
538
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
539
|
+
input.tx.object(input.typusUserRegistry),
|
|
540
|
+
input.tx.object(input.typusLeaderboardRegistry),
|
|
541
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
542
|
+
input.tx.pure(input.index),
|
|
543
|
+
input.tx.makeMoveVec({
|
|
544
|
+
type: `${input.typusFrameworkOriginPackageId}::vault::TypusDepositReceipt`,
|
|
545
|
+
objects: input.receipts.map((receipt) => input.tx.object(receipt)),
|
|
546
|
+
}),
|
|
547
|
+
input.tx.object(raiseBalance),
|
|
548
|
+
input.tx.pure(true),
|
|
549
|
+
input.tx.pure(false),
|
|
550
|
+
input.tx.object(CLOCK),
|
|
551
|
+
],
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
return getReduceFundTx({
|
|
555
|
+
tx: input.tx,
|
|
556
|
+
typusEcosystemVersion: input.typusEcosystemVersion,
|
|
557
|
+
typusUserRegistry: input.typusUserRegistry,
|
|
558
|
+
typusLeaderboardRegistry: input.typusLeaderboardRegistry,
|
|
559
|
+
typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
|
|
560
|
+
typusFrameworkPackageId: input.typusFrameworkPackageId,
|
|
561
|
+
typusDovSinglePackageId: input.typusDovSinglePackageId,
|
|
562
|
+
typusDovSingleRegistry: input.typusDovSingleRegistry,
|
|
563
|
+
typeArguments: input.typeArguments,
|
|
564
|
+
index: input.index,
|
|
565
|
+
receipts: [result[0]],
|
|
566
|
+
reduceFromWarmup: "0",
|
|
567
|
+
reduceFromActive: "0",
|
|
568
|
+
reduceFromPremium: false,
|
|
569
|
+
reduceFromInactive: false,
|
|
570
|
+
reduceFromIncentive: true,
|
|
571
|
+
user: input.user,
|
|
572
|
+
});
|
|
573
|
+
}
|