@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,694 @@
|
|
|
1
|
+
import { PUBLISHED_AT } from "..";
|
|
2
|
+
import { ObjectArg, obj, pure } from "../../_framework/util";
|
|
3
|
+
import { TransactionArgument, TransactionBlock } from "@mysten/sui.js/transactions";
|
|
4
|
+
|
|
5
|
+
export interface SwapArgs {
|
|
6
|
+
version: ObjectArg;
|
|
7
|
+
registry: ObjectArg;
|
|
8
|
+
index: bigint | TransactionArgument;
|
|
9
|
+
pythState: ObjectArg;
|
|
10
|
+
oracleFromToken: ObjectArg;
|
|
11
|
+
oracleToToken: ObjectArg;
|
|
12
|
+
fromCoin: ObjectArg;
|
|
13
|
+
minToAmount: bigint | TransactionArgument;
|
|
14
|
+
clock: ObjectArg;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function swap(txb: TransactionBlock, typeArgs: [string, string], args: SwapArgs) {
|
|
18
|
+
return txb.moveCall({
|
|
19
|
+
target: `${PUBLISHED_AT}::lp_pool::swap`,
|
|
20
|
+
typeArguments: typeArgs,
|
|
21
|
+
arguments: [
|
|
22
|
+
obj(txb, args.version),
|
|
23
|
+
obj(txb, args.registry),
|
|
24
|
+
pure(txb, args.index, `u64`),
|
|
25
|
+
obj(txb, args.pythState),
|
|
26
|
+
obj(txb, args.oracleFromToken),
|
|
27
|
+
obj(txb, args.oracleToToken),
|
|
28
|
+
obj(txb, args.fromCoin),
|
|
29
|
+
pure(txb, args.minToAmount, `u64`),
|
|
30
|
+
obj(txb, args.clock),
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function init(txb: TransactionBlock) {
|
|
36
|
+
return txb.moveCall({ target: `${PUBLISHED_AT}::lp_pool::init`, arguments: [] });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface AddLiquidityTokenArgs {
|
|
40
|
+
version: ObjectArg;
|
|
41
|
+
registry: ObjectArg;
|
|
42
|
+
index: bigint | TransactionArgument;
|
|
43
|
+
oracle: ObjectArg;
|
|
44
|
+
tokenDecimal: bigint | TransactionArgument;
|
|
45
|
+
targetWeightBp: bigint | TransactionArgument;
|
|
46
|
+
minDeposit: bigint | TransactionArgument;
|
|
47
|
+
maxCapacity: bigint | TransactionArgument;
|
|
48
|
+
basicMintFeeBp: bigint | TransactionArgument;
|
|
49
|
+
additionalMintFeeBp: bigint | TransactionArgument;
|
|
50
|
+
basicBurnFeeBp: bigint | TransactionArgument;
|
|
51
|
+
additionalBurnFeeBp: bigint | TransactionArgument;
|
|
52
|
+
swapFeeBp: bigint | TransactionArgument;
|
|
53
|
+
swapFeeProtocolShareBp: bigint | TransactionArgument;
|
|
54
|
+
basicBorrowRate0: bigint | TransactionArgument;
|
|
55
|
+
basicBorrowRate1: bigint | TransactionArgument;
|
|
56
|
+
basicBorrowRate2: bigint | TransactionArgument;
|
|
57
|
+
utilizationThresholdBp0: bigint | TransactionArgument;
|
|
58
|
+
utilizationThresholdBp1: bigint | TransactionArgument;
|
|
59
|
+
borrowIntervalTsMs: bigint | TransactionArgument;
|
|
60
|
+
maxOrderReserveRatioBp: bigint | TransactionArgument;
|
|
61
|
+
clock: ObjectArg;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function addLiquidityToken(txb: TransactionBlock, typeArg: string, args: AddLiquidityTokenArgs) {
|
|
65
|
+
return txb.moveCall({
|
|
66
|
+
target: `${PUBLISHED_AT}::lp_pool::add_liquidity_token`,
|
|
67
|
+
typeArguments: [typeArg],
|
|
68
|
+
arguments: [
|
|
69
|
+
obj(txb, args.version),
|
|
70
|
+
obj(txb, args.registry),
|
|
71
|
+
pure(txb, args.index, `u64`),
|
|
72
|
+
obj(txb, args.oracle),
|
|
73
|
+
pure(txb, args.tokenDecimal, `u64`),
|
|
74
|
+
pure(txb, args.targetWeightBp, `u64`),
|
|
75
|
+
pure(txb, args.minDeposit, `u64`),
|
|
76
|
+
pure(txb, args.maxCapacity, `u64`),
|
|
77
|
+
pure(txb, args.basicMintFeeBp, `u64`),
|
|
78
|
+
pure(txb, args.additionalMintFeeBp, `u64`),
|
|
79
|
+
pure(txb, args.basicBurnFeeBp, `u64`),
|
|
80
|
+
pure(txb, args.additionalBurnFeeBp, `u64`),
|
|
81
|
+
pure(txb, args.swapFeeBp, `u64`),
|
|
82
|
+
pure(txb, args.swapFeeProtocolShareBp, `u64`),
|
|
83
|
+
pure(txb, args.basicBorrowRate0, `u64`),
|
|
84
|
+
pure(txb, args.basicBorrowRate1, `u64`),
|
|
85
|
+
pure(txb, args.basicBorrowRate2, `u64`),
|
|
86
|
+
pure(txb, args.utilizationThresholdBp0, `u64`),
|
|
87
|
+
pure(txb, args.utilizationThresholdBp1, `u64`),
|
|
88
|
+
pure(txb, args.borrowIntervalTsMs, `u64`),
|
|
89
|
+
pure(txb, args.maxOrderReserveRatioBp, `u64`),
|
|
90
|
+
obj(txb, args.clock),
|
|
91
|
+
],
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface BurnLpArgs {
|
|
96
|
+
version: ObjectArg;
|
|
97
|
+
registry: ObjectArg;
|
|
98
|
+
index: bigint | TransactionArgument;
|
|
99
|
+
treasuryCaps: ObjectArg;
|
|
100
|
+
pythState: ObjectArg;
|
|
101
|
+
oracle: ObjectArg;
|
|
102
|
+
coin: ObjectArg;
|
|
103
|
+
clock: ObjectArg;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function burnLp(txb: TransactionBlock, typeArgs: [string, string], args: BurnLpArgs) {
|
|
107
|
+
return txb.moveCall({
|
|
108
|
+
target: `${PUBLISHED_AT}::lp_pool::burn_lp`,
|
|
109
|
+
typeArguments: typeArgs,
|
|
110
|
+
arguments: [
|
|
111
|
+
obj(txb, args.version),
|
|
112
|
+
obj(txb, args.registry),
|
|
113
|
+
pure(txb, args.index, `u64`),
|
|
114
|
+
obj(txb, args.treasuryCaps),
|
|
115
|
+
obj(txb, args.pythState),
|
|
116
|
+
obj(txb, args.oracle),
|
|
117
|
+
obj(txb, args.coin),
|
|
118
|
+
obj(txb, args.clock),
|
|
119
|
+
],
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface CalculateBurnLpArgs {
|
|
124
|
+
registry: ObjectArg;
|
|
125
|
+
index: bigint | TransactionArgument;
|
|
126
|
+
tokenType: ObjectArg;
|
|
127
|
+
price: bigint | TransactionArgument;
|
|
128
|
+
priceDecimal: bigint | TransactionArgument;
|
|
129
|
+
burnAmount: bigint | TransactionArgument;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function calculateBurnLp(txb: TransactionBlock, args: CalculateBurnLpArgs) {
|
|
133
|
+
return txb.moveCall({
|
|
134
|
+
target: `${PUBLISHED_AT}::lp_pool::calculate_burn_lp`,
|
|
135
|
+
arguments: [
|
|
136
|
+
obj(txb, args.registry),
|
|
137
|
+
pure(txb, args.index, `u64`),
|
|
138
|
+
obj(txb, args.tokenType),
|
|
139
|
+
pure(txb, args.price, `u64`),
|
|
140
|
+
pure(txb, args.priceDecimal, `u64`),
|
|
141
|
+
pure(txb, args.burnAmount, `u64`),
|
|
142
|
+
],
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface CalculateLpFeeArgs {
|
|
147
|
+
liquidityPool: ObjectArg;
|
|
148
|
+
tokenType: ObjectArg;
|
|
149
|
+
depositAmount: bigint | TransactionArgument;
|
|
150
|
+
depositAmountUsd: bigint | TransactionArgument;
|
|
151
|
+
isMint: boolean | TransactionArgument;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function calculateLpFee(txb: TransactionBlock, args: CalculateLpFeeArgs) {
|
|
155
|
+
return txb.moveCall({
|
|
156
|
+
target: `${PUBLISHED_AT}::lp_pool::calculate_lp_fee`,
|
|
157
|
+
arguments: [
|
|
158
|
+
obj(txb, args.liquidityPool),
|
|
159
|
+
obj(txb, args.tokenType),
|
|
160
|
+
pure(txb, args.depositAmount, `u64`),
|
|
161
|
+
pure(txb, args.depositAmountUsd, `u64`),
|
|
162
|
+
pure(txb, args.isMint, `bool`),
|
|
163
|
+
],
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface CalculateMintLpArgs {
|
|
168
|
+
registry: ObjectArg;
|
|
169
|
+
index: bigint | TransactionArgument;
|
|
170
|
+
tokenType: ObjectArg;
|
|
171
|
+
price: bigint | TransactionArgument;
|
|
172
|
+
priceDecimal: bigint | TransactionArgument;
|
|
173
|
+
depositAmount: bigint | TransactionArgument;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function calculateMintLp(txb: TransactionBlock, args: CalculateMintLpArgs) {
|
|
177
|
+
return txb.moveCall({
|
|
178
|
+
target: `${PUBLISHED_AT}::lp_pool::calculate_mint_lp`,
|
|
179
|
+
arguments: [
|
|
180
|
+
obj(txb, args.registry),
|
|
181
|
+
pure(txb, args.index, `u64`),
|
|
182
|
+
obj(txb, args.tokenType),
|
|
183
|
+
pure(txb, args.price, `u64`),
|
|
184
|
+
pure(txb, args.priceDecimal, `u64`),
|
|
185
|
+
pure(txb, args.depositAmount, `u64`),
|
|
186
|
+
],
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface CalculateSwapFeeArgs {
|
|
191
|
+
liquidityPool: ObjectArg;
|
|
192
|
+
tokenType: ObjectArg;
|
|
193
|
+
amount: bigint | TransactionArgument;
|
|
194
|
+
amountUsd: bigint | TransactionArgument;
|
|
195
|
+
swapIn: boolean | TransactionArgument;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export function calculateSwapFee(txb: TransactionBlock, args: CalculateSwapFeeArgs) {
|
|
199
|
+
return txb.moveCall({
|
|
200
|
+
target: `${PUBLISHED_AT}::lp_pool::calculate_swap_fee`,
|
|
201
|
+
arguments: [
|
|
202
|
+
obj(txb, args.liquidityPool),
|
|
203
|
+
obj(txb, args.tokenType),
|
|
204
|
+
pure(txb, args.amount, `u64`),
|
|
205
|
+
pure(txb, args.amountUsd, `u64`),
|
|
206
|
+
pure(txb, args.swapIn, `bool`),
|
|
207
|
+
],
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface CheckTradingOrderSizeValidArgs {
|
|
212
|
+
liquidityPool: ObjectArg;
|
|
213
|
+
liquidityToken: ObjectArg;
|
|
214
|
+
reserveAmount: bigint | TransactionArgument;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function checkTradingOrderSizeValid(txb: TransactionBlock, args: CheckTradingOrderSizeValidArgs) {
|
|
218
|
+
return txb.moveCall({
|
|
219
|
+
target: `${PUBLISHED_AT}::lp_pool::check_trading_order_size_valid`,
|
|
220
|
+
arguments: [obj(txb, args.liquidityPool), obj(txb, args.liquidityToken), pure(txb, args.reserveAmount, `u64`)],
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface CheckTvlUpdatedArgs {
|
|
225
|
+
liquidityPool: ObjectArg;
|
|
226
|
+
clock: ObjectArg;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function checkTvlUpdated(txb: TransactionBlock, args: CheckTvlUpdatedArgs) {
|
|
230
|
+
return txb.moveCall({
|
|
231
|
+
target: `${PUBLISHED_AT}::lp_pool::check_tvl_updated`,
|
|
232
|
+
arguments: [obj(txb, args.liquidityPool), obj(txb, args.clock)],
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function getBorrowRateDecimal(txb: TransactionBlock) {
|
|
237
|
+
return txb.moveCall({ target: `${PUBLISHED_AT}::lp_pool::get_borrow_rate_decimal`, arguments: [] });
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface GetCumulativeBorrowRateArgs {
|
|
241
|
+
liquidityPool: ObjectArg;
|
|
242
|
+
liquidityToken: ObjectArg;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export function getCumulativeBorrowRate(txb: TransactionBlock, args: GetCumulativeBorrowRateArgs) {
|
|
246
|
+
return txb.moveCall({
|
|
247
|
+
target: `${PUBLISHED_AT}::lp_pool::get_cumulative_borrow_rate`,
|
|
248
|
+
arguments: [obj(txb, args.liquidityPool), obj(txb, args.liquidityToken)],
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface GetLiquidityAmountArgs {
|
|
253
|
+
registry: ObjectArg;
|
|
254
|
+
index: bigint | TransactionArgument;
|
|
255
|
+
liquidityToken: ObjectArg;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function getLiquidityAmount(txb: TransactionBlock, args: GetLiquidityAmountArgs) {
|
|
259
|
+
return txb.moveCall({
|
|
260
|
+
target: `${PUBLISHED_AT}::lp_pool::get_liquidity_amount`,
|
|
261
|
+
arguments: [obj(txb, args.registry), pure(txb, args.index, `u64`), obj(txb, args.liquidityToken)],
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface GetLiquidityPoolArgs {
|
|
266
|
+
registry: ObjectArg;
|
|
267
|
+
index: bigint | TransactionArgument;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function getLiquidityPool(txb: TransactionBlock, args: GetLiquidityPoolArgs) {
|
|
271
|
+
return txb.moveCall({
|
|
272
|
+
target: `${PUBLISHED_AT}::lp_pool::get_liquidity_pool`,
|
|
273
|
+
arguments: [obj(txb, args.registry), pure(txb, args.index, `u64`)],
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface GetLiquidityTokenDecimalArgs {
|
|
278
|
+
registry: ObjectArg;
|
|
279
|
+
index: bigint | TransactionArgument;
|
|
280
|
+
liquidityToken: ObjectArg;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export function getLiquidityTokenDecimal(txb: TransactionBlock, args: GetLiquidityTokenDecimalArgs) {
|
|
284
|
+
return txb.moveCall({
|
|
285
|
+
target: `${PUBLISHED_AT}::lp_pool::get_liquidity_token_decimal`,
|
|
286
|
+
arguments: [obj(txb, args.registry), pure(txb, args.index, `u64`), obj(txb, args.liquidityToken)],
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export interface GetLpTokenTypeArgs {
|
|
291
|
+
registry: ObjectArg;
|
|
292
|
+
index: bigint | TransactionArgument;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export function getLpTokenType(txb: TransactionBlock, args: GetLpTokenTypeArgs) {
|
|
296
|
+
return txb.moveCall({
|
|
297
|
+
target: `${PUBLISHED_AT}::lp_pool::get_lp_token_type`,
|
|
298
|
+
arguments: [obj(txb, args.registry), pure(txb, args.index, `u64`)],
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface GetMutLiquidityPoolArgs {
|
|
303
|
+
registry: ObjectArg;
|
|
304
|
+
index: bigint | TransactionArgument;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export function getMutLiquidityPool(txb: TransactionBlock, args: GetMutLiquidityPoolArgs) {
|
|
308
|
+
return txb.moveCall({
|
|
309
|
+
target: `${PUBLISHED_AT}::lp_pool::get_mut_liquidity_pool`,
|
|
310
|
+
arguments: [obj(txb, args.registry), pure(txb, args.index, `u64`)],
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface GetMutTokenPoolArgs {
|
|
315
|
+
liquidityPool: ObjectArg;
|
|
316
|
+
tokenType: ObjectArg;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function getMutTokenPool(txb: TransactionBlock, args: GetMutTokenPoolArgs) {
|
|
320
|
+
return txb.moveCall({
|
|
321
|
+
target: `${PUBLISHED_AT}::lp_pool::get_mut_token_pool`,
|
|
322
|
+
arguments: [obj(txb, args.liquidityPool), obj(txb, args.tokenType)],
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export interface GetTokenPoolArgs {
|
|
327
|
+
liquidityPool: ObjectArg;
|
|
328
|
+
tokenType: ObjectArg;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export function getTokenPool(txb: TransactionBlock, args: GetTokenPoolArgs) {
|
|
332
|
+
return txb.moveCall({
|
|
333
|
+
target: `${PUBLISHED_AT}::lp_pool::get_token_pool`,
|
|
334
|
+
arguments: [obj(txb, args.liquidityPool), obj(txb, args.tokenType)],
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface GetTokenPoolStateArgs {
|
|
339
|
+
liquidityPool: ObjectArg;
|
|
340
|
+
liquidityToken: ObjectArg;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export function getTokenPoolState(txb: TransactionBlock, args: GetTokenPoolStateArgs) {
|
|
344
|
+
return txb.moveCall({
|
|
345
|
+
target: `${PUBLISHED_AT}::lp_pool::get_token_pool_state`,
|
|
346
|
+
arguments: [obj(txb, args.liquidityPool), obj(txb, args.liquidityToken)],
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export function getTvlUsd(txb: TransactionBlock, liquidityPool: ObjectArg) {
|
|
351
|
+
return txb.moveCall({ target: `${PUBLISHED_AT}::lp_pool::get_tvl_usd`, arguments: [obj(txb, liquidityPool)] });
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface MintLpArgs {
|
|
355
|
+
version: ObjectArg;
|
|
356
|
+
registry: ObjectArg;
|
|
357
|
+
treasuryCaps: ObjectArg;
|
|
358
|
+
index: bigint | TransactionArgument;
|
|
359
|
+
pythState: ObjectArg;
|
|
360
|
+
oracle: ObjectArg;
|
|
361
|
+
coin: ObjectArg;
|
|
362
|
+
clock: ObjectArg;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export function mintLp(txb: TransactionBlock, typeArgs: [string, string], args: MintLpArgs) {
|
|
366
|
+
return txb.moveCall({
|
|
367
|
+
target: `${PUBLISHED_AT}::lp_pool::mint_lp`,
|
|
368
|
+
typeArguments: typeArgs,
|
|
369
|
+
arguments: [
|
|
370
|
+
obj(txb, args.version),
|
|
371
|
+
obj(txb, args.registry),
|
|
372
|
+
obj(txb, args.treasuryCaps),
|
|
373
|
+
pure(txb, args.index, `u64`),
|
|
374
|
+
obj(txb, args.pythState),
|
|
375
|
+
obj(txb, args.oracle),
|
|
376
|
+
obj(txb, args.coin),
|
|
377
|
+
obj(txb, args.clock),
|
|
378
|
+
],
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface NewLiquidityPoolArgs {
|
|
383
|
+
version: ObjectArg;
|
|
384
|
+
registry: ObjectArg;
|
|
385
|
+
lpTokenDecimal: bigint | TransactionArgument;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export function newLiquidityPool(txb: TransactionBlock, typeArg: string, args: NewLiquidityPoolArgs) {
|
|
389
|
+
return txb.moveCall({
|
|
390
|
+
target: `${PUBLISHED_AT}::lp_pool::new_liquidity_pool`,
|
|
391
|
+
typeArguments: [typeArg],
|
|
392
|
+
arguments: [obj(txb, args.version), obj(txb, args.registry), pure(txb, args.lpTokenDecimal, `u64`)],
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface OracleMatchedArgs {
|
|
397
|
+
liquidityPool: ObjectArg;
|
|
398
|
+
tokenType: ObjectArg;
|
|
399
|
+
oracleId: string | TransactionArgument;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export function oracleMatched(txb: TransactionBlock, args: OracleMatchedArgs) {
|
|
403
|
+
return txb.moveCall({
|
|
404
|
+
target: `${PUBLISHED_AT}::lp_pool::oracle_matched`,
|
|
405
|
+
arguments: [obj(txb, args.liquidityPool), obj(txb, args.tokenType), pure(txb, args.oracleId, `address`)],
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface OrderFilledArgs {
|
|
410
|
+
liquidityPool: ObjectArg;
|
|
411
|
+
addReserve: boolean | TransactionArgument;
|
|
412
|
+
dReserve: bigint | TransactionArgument;
|
|
413
|
+
feeBalance: ObjectArg;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export function orderFilled(txb: TransactionBlock, typeArg: string, args: OrderFilledArgs) {
|
|
417
|
+
return txb.moveCall({
|
|
418
|
+
target: `${PUBLISHED_AT}::lp_pool::order_filled`,
|
|
419
|
+
typeArguments: [typeArg],
|
|
420
|
+
arguments: [
|
|
421
|
+
obj(txb, args.liquidityPool),
|
|
422
|
+
pure(txb, args.addReserve, `bool`),
|
|
423
|
+
pure(txb, args.dReserve, `u64`),
|
|
424
|
+
obj(txb, args.feeBalance),
|
|
425
|
+
],
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export interface PutCollateralArgs {
|
|
430
|
+
liquidityPool: ObjectArg;
|
|
431
|
+
collateral: ObjectArg;
|
|
432
|
+
collateralOraclePrice: bigint | TransactionArgument;
|
|
433
|
+
collateralOraclePriceDecimal: bigint | TransactionArgument;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export function putCollateral(txb: TransactionBlock, typeArg: string, args: PutCollateralArgs) {
|
|
437
|
+
return txb.moveCall({
|
|
438
|
+
target: `${PUBLISHED_AT}::lp_pool::put_collateral`,
|
|
439
|
+
typeArguments: [typeArg],
|
|
440
|
+
arguments: [
|
|
441
|
+
obj(txb, args.liquidityPool),
|
|
442
|
+
obj(txb, args.collateral),
|
|
443
|
+
pure(txb, args.collateralOraclePrice, `u64`),
|
|
444
|
+
pure(txb, args.collateralOraclePriceDecimal, `u64`),
|
|
445
|
+
],
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export interface PutReceiptCollateralArgs {
|
|
450
|
+
liquidityPool: ObjectArg;
|
|
451
|
+
bidReceipt: ObjectArg;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export function putReceiptCollateral(txb: TransactionBlock, args: PutReceiptCollateralArgs) {
|
|
455
|
+
return txb.moveCall({
|
|
456
|
+
target: `${PUBLISHED_AT}::lp_pool::put_receipt_collateral`,
|
|
457
|
+
arguments: [obj(txb, args.liquidityPool), obj(txb, args.bidReceipt)],
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export interface RequestCollateralArgs {
|
|
462
|
+
liquidityPool: ObjectArg;
|
|
463
|
+
collateralAmount: bigint | TransactionArgument;
|
|
464
|
+
collateralOraclePrice: bigint | TransactionArgument;
|
|
465
|
+
collateralOraclePriceDecimal: bigint | TransactionArgument;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export function requestCollateral(txb: TransactionBlock, typeArg: string, args: RequestCollateralArgs) {
|
|
469
|
+
return txb.moveCall({
|
|
470
|
+
target: `${PUBLISHED_AT}::lp_pool::request_collateral`,
|
|
471
|
+
typeArguments: [typeArg],
|
|
472
|
+
arguments: [
|
|
473
|
+
obj(txb, args.liquidityPool),
|
|
474
|
+
pure(txb, args.collateralAmount, `u64`),
|
|
475
|
+
pure(txb, args.collateralOraclePrice, `u64`),
|
|
476
|
+
pure(txb, args.collateralOraclePriceDecimal, `u64`),
|
|
477
|
+
],
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
export interface ResumePoolArgs {
|
|
482
|
+
version: ObjectArg;
|
|
483
|
+
registry: ObjectArg;
|
|
484
|
+
index: bigint | TransactionArgument;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export function resumePool(txb: TransactionBlock, args: ResumePoolArgs) {
|
|
488
|
+
return txb.moveCall({
|
|
489
|
+
target: `${PUBLISHED_AT}::lp_pool::resume_pool`,
|
|
490
|
+
arguments: [obj(txb, args.version), obj(txb, args.registry), pure(txb, args.index, `u64`)],
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export interface ResumeTokenPoolArgs {
|
|
495
|
+
version: ObjectArg;
|
|
496
|
+
registry: ObjectArg;
|
|
497
|
+
index: bigint | TransactionArgument;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export function resumeTokenPool(txb: TransactionBlock, typeArg: string, args: ResumeTokenPoolArgs) {
|
|
501
|
+
return txb.moveCall({
|
|
502
|
+
target: `${PUBLISHED_AT}::lp_pool::resume_token_pool`,
|
|
503
|
+
typeArguments: [typeArg],
|
|
504
|
+
arguments: [obj(txb, args.version), obj(txb, args.registry), pure(txb, args.index, `u64`)],
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export function safetyCheck(txb: TransactionBlock, liquidityPool: ObjectArg) {
|
|
509
|
+
return txb.moveCall({ target: `${PUBLISHED_AT}::lp_pool::safety_check`, arguments: [obj(txb, liquidityPool)] });
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export interface SuspendPoolArgs {
|
|
513
|
+
version: ObjectArg;
|
|
514
|
+
registry: ObjectArg;
|
|
515
|
+
index: bigint | TransactionArgument;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export function suspendPool(txb: TransactionBlock, args: SuspendPoolArgs) {
|
|
519
|
+
return txb.moveCall({
|
|
520
|
+
target: `${PUBLISHED_AT}::lp_pool::suspend_pool`,
|
|
521
|
+
arguments: [obj(txb, args.version), obj(txb, args.registry), pure(txb, args.index, `u64`)],
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface SuspendTokenPoolArgs {
|
|
526
|
+
version: ObjectArg;
|
|
527
|
+
registry: ObjectArg;
|
|
528
|
+
index: bigint | TransactionArgument;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export function suspendTokenPool(txb: TransactionBlock, typeArg: string, args: SuspendTokenPoolArgs) {
|
|
532
|
+
return txb.moveCall({
|
|
533
|
+
target: `${PUBLISHED_AT}::lp_pool::suspend_token_pool`,
|
|
534
|
+
typeArguments: [typeArg],
|
|
535
|
+
arguments: [obj(txb, args.version), obj(txb, args.registry), pure(txb, args.index, `u64`)],
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export interface UpdateBorrowInfoArgs {
|
|
540
|
+
version: ObjectArg;
|
|
541
|
+
registry: ObjectArg;
|
|
542
|
+
index: bigint | TransactionArgument;
|
|
543
|
+
clock: ObjectArg;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export function updateBorrowInfo(txb: TransactionBlock, args: UpdateBorrowInfoArgs) {
|
|
547
|
+
return txb.moveCall({
|
|
548
|
+
target: `${PUBLISHED_AT}::lp_pool::update_borrow_info`,
|
|
549
|
+
arguments: [obj(txb, args.version), obj(txb, args.registry), pure(txb, args.index, `u64`), obj(txb, args.clock)],
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export interface UpdateLiquidityValueArgs {
|
|
554
|
+
version: ObjectArg;
|
|
555
|
+
registry: ObjectArg;
|
|
556
|
+
index: bigint | TransactionArgument;
|
|
557
|
+
pythState: ObjectArg;
|
|
558
|
+
oracle: ObjectArg;
|
|
559
|
+
clock: ObjectArg;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export function updateLiquidityValue(txb: TransactionBlock, typeArg: string, args: UpdateLiquidityValueArgs) {
|
|
563
|
+
return txb.moveCall({
|
|
564
|
+
target: `${PUBLISHED_AT}::lp_pool::update_liquidity_value`,
|
|
565
|
+
typeArguments: [typeArg],
|
|
566
|
+
arguments: [
|
|
567
|
+
obj(txb, args.version),
|
|
568
|
+
obj(txb, args.registry),
|
|
569
|
+
pure(txb, args.index, `u64`),
|
|
570
|
+
obj(txb, args.pythState),
|
|
571
|
+
obj(txb, args.oracle),
|
|
572
|
+
obj(txb, args.clock),
|
|
573
|
+
],
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface UpdateMarginConfigArgs {
|
|
578
|
+
version: ObjectArg;
|
|
579
|
+
registry: ObjectArg;
|
|
580
|
+
index: bigint | TransactionArgument;
|
|
581
|
+
basicBorrowRate0: bigint | TransactionArgument | TransactionArgument | null;
|
|
582
|
+
basicBorrowRate1: bigint | TransactionArgument | TransactionArgument | null;
|
|
583
|
+
basicBorrowRate2: bigint | TransactionArgument | TransactionArgument | null;
|
|
584
|
+
utilizationThresholdBp0: bigint | TransactionArgument | TransactionArgument | null;
|
|
585
|
+
utilizationThresholdBp1: bigint | TransactionArgument | TransactionArgument | null;
|
|
586
|
+
borrowIntervalTsMs: bigint | TransactionArgument | TransactionArgument | null;
|
|
587
|
+
maxOrderReserveRatioBp: bigint | TransactionArgument | TransactionArgument | null;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export function updateMarginConfig(txb: TransactionBlock, typeArg: string, args: UpdateMarginConfigArgs) {
|
|
591
|
+
return txb.moveCall({
|
|
592
|
+
target: `${PUBLISHED_AT}::lp_pool::update_margin_config`,
|
|
593
|
+
typeArguments: [typeArg],
|
|
594
|
+
arguments: [
|
|
595
|
+
obj(txb, args.version),
|
|
596
|
+
obj(txb, args.registry),
|
|
597
|
+
pure(txb, args.index, `u64`),
|
|
598
|
+
pure(txb, args.basicBorrowRate0, `0x1::option::Option<u64>`),
|
|
599
|
+
pure(txb, args.basicBorrowRate1, `0x1::option::Option<u64>`),
|
|
600
|
+
pure(txb, args.basicBorrowRate2, `0x1::option::Option<u64>`),
|
|
601
|
+
pure(txb, args.utilizationThresholdBp0, `0x1::option::Option<u64>`),
|
|
602
|
+
pure(txb, args.utilizationThresholdBp1, `0x1::option::Option<u64>`),
|
|
603
|
+
pure(txb, args.borrowIntervalTsMs, `0x1::option::Option<u64>`),
|
|
604
|
+
pure(txb, args.maxOrderReserveRatioBp, `0x1::option::Option<u64>`),
|
|
605
|
+
],
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
export interface UpdateSpotConfigArgs {
|
|
610
|
+
version: ObjectArg;
|
|
611
|
+
registry: ObjectArg;
|
|
612
|
+
index: bigint | TransactionArgument;
|
|
613
|
+
targetWeightBp: bigint | TransactionArgument | TransactionArgument | null;
|
|
614
|
+
minDeposit: bigint | TransactionArgument | TransactionArgument | null;
|
|
615
|
+
maxCapacity: bigint | TransactionArgument | TransactionArgument | null;
|
|
616
|
+
basicMintFeeBp: bigint | TransactionArgument | TransactionArgument | null;
|
|
617
|
+
additionalMintFeeBp: bigint | TransactionArgument | TransactionArgument | null;
|
|
618
|
+
basicBurnFeeBp: bigint | TransactionArgument | TransactionArgument | null;
|
|
619
|
+
additionalBurnFeeBp: bigint | TransactionArgument | TransactionArgument | null;
|
|
620
|
+
swapFeeBp: bigint | TransactionArgument | TransactionArgument | null;
|
|
621
|
+
swapFeeProtocolShareBp: bigint | TransactionArgument | TransactionArgument | null;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export function updateSpotConfig(txb: TransactionBlock, typeArg: string, args: UpdateSpotConfigArgs) {
|
|
625
|
+
return txb.moveCall({
|
|
626
|
+
target: `${PUBLISHED_AT}::lp_pool::update_spot_config`,
|
|
627
|
+
typeArguments: [typeArg],
|
|
628
|
+
arguments: [
|
|
629
|
+
obj(txb, args.version),
|
|
630
|
+
obj(txb, args.registry),
|
|
631
|
+
pure(txb, args.index, `u64`),
|
|
632
|
+
pure(txb, args.targetWeightBp, `0x1::option::Option<u64>`),
|
|
633
|
+
pure(txb, args.minDeposit, `0x1::option::Option<u64>`),
|
|
634
|
+
pure(txb, args.maxCapacity, `0x1::option::Option<u64>`),
|
|
635
|
+
pure(txb, args.basicMintFeeBp, `0x1::option::Option<u64>`),
|
|
636
|
+
pure(txb, args.additionalMintFeeBp, `0x1::option::Option<u64>`),
|
|
637
|
+
pure(txb, args.basicBurnFeeBp, `0x1::option::Option<u64>`),
|
|
638
|
+
pure(txb, args.additionalBurnFeeBp, `0x1::option::Option<u64>`),
|
|
639
|
+
pure(txb, args.swapFeeBp, `0x1::option::Option<u64>`),
|
|
640
|
+
pure(txb, args.swapFeeProtocolShareBp, `0x1::option::Option<u64>`),
|
|
641
|
+
],
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export interface UpdateTvlArgs {
|
|
646
|
+
version: ObjectArg;
|
|
647
|
+
liquidityPool: ObjectArg;
|
|
648
|
+
tokenType: ObjectArg;
|
|
649
|
+
pythState: ObjectArg;
|
|
650
|
+
oracle: ObjectArg;
|
|
651
|
+
clock: ObjectArg;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export function updateTvl(txb: TransactionBlock, args: UpdateTvlArgs) {
|
|
655
|
+
return txb.moveCall({
|
|
656
|
+
target: `${PUBLISHED_AT}::lp_pool::update_tvl`,
|
|
657
|
+
arguments: [
|
|
658
|
+
obj(txb, args.version),
|
|
659
|
+
obj(txb, args.liquidityPool),
|
|
660
|
+
obj(txb, args.tokenType),
|
|
661
|
+
obj(txb, args.pythState),
|
|
662
|
+
obj(txb, args.oracle),
|
|
663
|
+
obj(txb, args.clock),
|
|
664
|
+
],
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export interface ViewSwapResultArgs {
|
|
669
|
+
version: ObjectArg;
|
|
670
|
+
registry: ObjectArg;
|
|
671
|
+
index: bigint | TransactionArgument;
|
|
672
|
+
pythState: ObjectArg;
|
|
673
|
+
oracleFromToken: ObjectArg;
|
|
674
|
+
oracleToToken: ObjectArg;
|
|
675
|
+
fromAmount: bigint | TransactionArgument;
|
|
676
|
+
clock: ObjectArg;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export function viewSwapResult(txb: TransactionBlock, typeArgs: [string, string], args: ViewSwapResultArgs) {
|
|
680
|
+
return txb.moveCall({
|
|
681
|
+
target: `${PUBLISHED_AT}::lp_pool::view_swap_result`,
|
|
682
|
+
typeArguments: typeArgs,
|
|
683
|
+
arguments: [
|
|
684
|
+
obj(txb, args.version),
|
|
685
|
+
obj(txb, args.registry),
|
|
686
|
+
pure(txb, args.index, `u64`),
|
|
687
|
+
obj(txb, args.pythState),
|
|
688
|
+
obj(txb, args.oracleFromToken),
|
|
689
|
+
obj(txb, args.oracleToToken),
|
|
690
|
+
pure(txb, args.fromAmount, `u64`),
|
|
691
|
+
obj(txb, args.clock),
|
|
692
|
+
],
|
|
693
|
+
});
|
|
694
|
+
}
|