aftermath-ts-sdk 0.0.162 → 0.0.164
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/dist/general/api/dynamicFieldsApiHelpers.d.ts +29 -6
- package/dist/general/api/dynamicFieldsApiHelpers.d.ts.map +1 -1
- package/dist/general/api/dynamicFieldsApiHelpers.js +31 -31
- package/dist/general/api/eventsApiHelpers.d.ts +23 -8
- package/dist/general/api/eventsApiHelpers.d.ts.map +1 -1
- package/dist/general/api/eventsApiHelpers.js +38 -33
- package/dist/general/api/inspectionsApiHelpers.js +9 -9
- package/dist/general/api/objectsApiHelpers.d.ts +150 -110
- package/dist/general/api/objectsApiHelpers.d.ts.map +1 -1
- package/dist/general/api/objectsApiHelpers.js +32 -27
- package/dist/general/api/rpcApiHelpers.js +9 -9
- package/dist/general/api/transactionsApiHelpers.d.ts +9 -4
- package/dist/general/api/transactionsApiHelpers.d.ts.map +1 -1
- package/dist/general/api/transactionsApiHelpers.js +28 -19
- package/dist/general/historicalData/historicalData.js +6 -6
- package/dist/general/historicalData/historicalDataApi.js +6 -6
- package/dist/general/historicalData/historicalDataApiInterface.d.ts +2 -1
- package/dist/general/historicalData/historicalDataApiInterface.d.ts.map +1 -1
- package/dist/general/prices/coingecko/coinGeckoApiHelpers.js +24 -24
- package/dist/general/prices/coingecko/coinGeckoPricesApi.js +15 -15
- package/dist/general/prices/placeholder/placeholderPricesApi.d.ts.map +1 -1
- package/dist/general/prices/placeholder/placeholderPricesApi.js +40 -33
- package/dist/general/prices/prices.js +6 -6
- package/dist/general/prices/pyth/pythPricesApi.js +12 -12
- package/dist/general/prices/pyth/pythPricesApiHelpers.js +12 -12
- package/dist/general/providers/aftermath.d.ts +4 -2
- package/dist/general/providers/aftermath.d.ts.map +1 -1
- package/dist/general/providers/aftermath.js +22 -20
- package/dist/general/providers/aftermathApi.d.ts +4 -2
- package/dist/general/providers/aftermathApi.d.ts.map +1 -1
- package/dist/general/providers/aftermathApi.js +34 -32
- package/dist/general/types/configTypes.d.ts +94 -14
- package/dist/general/types/configTypes.d.ts.map +1 -1
- package/dist/general/types/generalTypes.d.ts +12 -1
- package/dist/general/types/generalTypes.d.ts.map +1 -1
- package/dist/general/utils/caller.d.ts.map +1 -1
- package/dist/general/utils/caller.js +11 -9
- package/dist/general/utils/casting.d.ts +4 -4
- package/dist/general/utils/casting.d.ts.map +1 -1
- package/dist/general/utils/casting.js +22 -22
- package/dist/general/utils/fixed.d.ts +5 -0
- package/dist/general/utils/fixed.d.ts.map +1 -1
- package/dist/general/utils/fixed.js +4 -0
- package/dist/general/utils/helpers.js +21 -21
- package/dist/general/wallet/wallet.js +6 -6
- package/dist/general/wallet/walletApi.js +12 -12
- package/dist/packages/capys/capy.d.ts +4 -4
- package/dist/packages/capys/capy.d.ts.map +1 -1
- package/dist/packages/capys/capy.js +15 -15
- package/dist/packages/coin/api/coinApi.d.ts +18 -5
- package/dist/packages/coin/api/coinApi.d.ts.map +1 -1
- package/dist/packages/coin/api/coinApi.js +109 -15
- package/dist/packages/coin/coin.d.ts +4 -5
- package/dist/packages/coin/coin.d.ts.map +1 -1
- package/dist/packages/coin/coin.js +28 -28
- package/dist/packages/coin/coinTypes.d.ts +4 -0
- package/dist/packages/coin/coinTypes.d.ts.map +1 -1
- package/dist/packages/{referralVault/api/referralVaultApiHelpers.d.ts → external/baySwap/baySwapApi.d.ts} +49 -77
- package/dist/packages/external/baySwap/baySwapApi.d.ts.map +1 -0
- package/dist/packages/external/baySwap/baySwapApi.js +176 -0
- package/dist/packages/external/baySwap/baySwapTypes.d.ts +29 -0
- package/dist/packages/external/baySwap/baySwapTypes.d.ts.map +1 -0
- package/dist/packages/external/baySwap/baySwapTypes.js +15 -0
- package/dist/packages/external/{deepBook/deepBookApiHelper.d.ts → blueMove/blueMoveApi.d.ts} +42 -87
- package/dist/packages/external/blueMove/blueMoveApi.d.ts.map +1 -0
- package/dist/packages/external/blueMove/blueMoveApi.js +249 -0
- package/dist/packages/external/blueMove/blueMoveTypes.d.ts +87 -0
- package/dist/packages/external/blueMove/blueMoveTypes.d.ts.map +1 -0
- package/dist/packages/external/blueMove/blueMoveTypes.js +13 -0
- package/dist/packages/external/cetus/cetusApi.d.ts +240 -11
- package/dist/packages/external/cetus/cetusApi.d.ts.map +1 -1
- package/dist/packages/external/cetus/cetusApi.js +295 -28
- package/dist/packages/external/deepBook/deepBookApi.d.ts +406 -5
- package/dist/packages/external/deepBook/deepBookApi.d.ts.map +1 -1
- package/dist/packages/external/deepBook/deepBookApi.js +332 -35
- package/dist/packages/external/deepBook/deepBookTypes.d.ts +4 -6
- package/dist/packages/external/deepBook/deepBookTypes.d.ts.map +1 -1
- package/dist/packages/external/deepBook/deepBookTypes.js +2 -2
- package/dist/packages/{faucet/api/faucetApiHelpers.d.ts → external/interest/interestApi.d.ts} +45 -19
- package/dist/packages/external/interest/interestApi.d.ts.map +1 -0
- package/dist/packages/external/interest/interestApi.js +178 -0
- package/dist/packages/external/interest/interestTypes.d.ts +37 -0
- package/dist/packages/external/interest/interestTypes.d.ts.map +1 -0
- package/dist/packages/external/interest/interestTypes.js +12 -0
- package/dist/packages/external/kriya/kriyaApi.d.ts +148 -0
- package/dist/packages/external/kriya/kriyaApi.d.ts.map +1 -0
- package/dist/packages/external/kriya/kriyaApi.js +191 -0
- package/dist/packages/external/kriya/kriyaTypes.d.ts +59 -0
- package/dist/packages/external/kriya/kriyaTypes.d.ts.map +1 -0
- package/dist/packages/external/kriya/kriyaTypes.js +16 -0
- package/dist/packages/external/suiswap/suiswapApi.d.ts +145 -0
- package/dist/packages/external/suiswap/suiswapApi.d.ts.map +1 -0
- package/dist/packages/external/suiswap/suiswapApi.js +197 -0
- package/dist/packages/external/suiswap/suiswapTypes.d.ts +75 -0
- package/dist/packages/external/suiswap/suiswapTypes.d.ts.map +1 -0
- package/dist/packages/external/suiswap/suiswapTypes.js +10 -0
- package/dist/packages/external/turbos/turbosApi.d.ts +206 -8
- package/dist/packages/external/turbos/turbosApi.d.ts.map +1 -1
- package/dist/packages/external/turbos/turbosApi.js +471 -27
- package/dist/packages/farms/farmsStakedPosition.d.ts +20 -0
- package/dist/packages/farms/farmsStakedPosition.d.ts.map +1 -0
- package/dist/packages/farms/farmsStakedPosition.js +63 -0
- package/dist/packages/farms/farmsStakingPool.d.ts +9 -0
- package/dist/packages/farms/farmsStakingPool.d.ts.map +1 -0
- package/dist/packages/farms/farmsStakingPool.js +20 -0
- package/dist/packages/farms/farmsTypes.d.ts +37 -0
- package/dist/packages/farms/farmsTypes.d.ts.map +1 -0
- package/dist/packages/farms/index.d.ts +3 -0
- package/dist/packages/farms/index.d.ts.map +1 -0
- package/dist/packages/{capys → farms}/index.js +2 -3
- package/dist/packages/faucet/api/faucetApi.d.ts +117 -8
- package/dist/packages/faucet/api/faucetApi.d.ts.map +1 -1
- package/dist/packages/faucet/api/faucetApi.js +112 -27
- package/dist/packages/faucet/api/faucetApiCasting.js +3 -3
- package/dist/packages/faucet/faucet.js +15 -15
- package/dist/packages/index.d.ts +3 -1
- package/dist/packages/index.d.ts.map +1 -1
- package/dist/packages/index.js +3 -1
- package/dist/packages/nftAmm/api/nftAmmApi.d.ts +168 -16
- package/dist/packages/nftAmm/api/nftAmmApi.d.ts.map +1 -1
- package/dist/packages/nftAmm/api/nftAmmApi.js +227 -33
- package/dist/packages/nftAmm/api/nftAmmApiCasting.js +12 -12
- package/dist/packages/nftAmm/nftAmm.js +12 -12
- package/dist/packages/nftAmm/nftAmmMarket.js +15 -15
- package/dist/packages/perpetuals/api/perpetualsApi.d.ts +650 -0
- package/dist/packages/perpetuals/api/perpetualsApi.d.ts.map +1 -0
- package/dist/packages/perpetuals/api/perpetualsApi.js +387 -0
- package/dist/packages/perpetuals/api/perpetualsCasting.d.ts +22 -0
- package/dist/packages/perpetuals/api/perpetualsCasting.d.ts.map +1 -0
- package/dist/packages/perpetuals/api/perpetualsCasting.js +201 -0
- package/dist/packages/perpetuals/index.d.ts +4 -0
- package/dist/packages/perpetuals/index.d.ts.map +1 -0
- package/dist/{external/nojo → packages/perpetuals}/index.js +3 -5
- package/dist/packages/perpetuals/perpetuals.d.ts +17 -0
- package/dist/packages/perpetuals/perpetuals.d.ts.map +1 -0
- package/dist/packages/perpetuals/perpetuals.js +50 -0
- package/dist/packages/perpetuals/perpetualsAccount.d.ts +22 -0
- package/dist/packages/perpetuals/perpetualsAccount.d.ts.map +1 -0
- package/dist/packages/perpetuals/perpetualsAccount.js +65 -0
- package/dist/packages/perpetuals/perpetualsMarket.d.ts +20 -0
- package/dist/packages/perpetuals/perpetualsMarket.d.ts.map +1 -0
- package/dist/packages/perpetuals/perpetualsMarket.js +52 -0
- package/dist/packages/perpetuals/perpetualsTypes.d.ts +184 -0
- package/dist/packages/perpetuals/perpetualsTypes.d.ts.map +1 -0
- package/dist/packages/perpetuals/utils/comparators.d.ts +4 -0
- package/dist/packages/perpetuals/utils/comparators.d.ts.map +1 -0
- package/dist/packages/perpetuals/utils/comparators.js +25 -0
- package/dist/packages/perpetuals/utils/critBitTreeUtils.d.ts +7 -0
- package/dist/packages/perpetuals/utils/critBitTreeUtils.d.ts.map +1 -0
- package/dist/packages/perpetuals/utils/critBitTreeUtils.js +40 -0
- package/dist/packages/perpetuals/utils/helpers.d.ts +5 -0
- package/dist/packages/perpetuals/utils/helpers.d.ts.map +1 -0
- package/dist/packages/perpetuals/utils/helpers.js +9 -0
- package/dist/packages/perpetuals/utils/index.d.ts +4 -0
- package/dist/packages/perpetuals/utils/index.d.ts.map +1 -0
- package/dist/packages/perpetuals/utils/index.js +19 -0
- package/dist/packages/pools/api/poolsApi.d.ts +261 -35
- package/dist/packages/pools/api/poolsApi.d.ts.map +1 -1
- package/dist/packages/pools/api/poolsApi.js +621 -130
- package/dist/packages/pools/api/poolsApiCasting.d.ts.map +1 -1
- package/dist/packages/pools/api/poolsApiCasting.js +10 -7
- package/dist/packages/pools/api/poolsApiCastingTypes.d.ts +4 -1
- package/dist/packages/pools/api/poolsApiCastingTypes.d.ts.map +1 -1
- package/dist/packages/pools/pool.d.ts.map +1 -1
- package/dist/packages/pools/pool.js +22 -19
- package/dist/packages/pools/pools.js +34 -34
- package/dist/packages/pools/poolsTypes.d.ts +9 -1
- package/dist/packages/pools/poolsTypes.d.ts.map +1 -1
- package/dist/packages/pools/utils/cmmmCalculations.d.ts.map +1 -1
- package/dist/packages/pools/utils/cmmmCalculations.js +81 -77
- package/dist/packages/referralVault/api/referralVaultApi.d.ts +166 -4
- package/dist/packages/referralVault/api/referralVaultApi.d.ts.map +1 -1
- package/dist/packages/referralVault/api/referralVaultApi.js +80 -14
- package/dist/packages/referralVault/referralVault.js +9 -9
- package/dist/packages/router/api/routerApi.d.ts +14 -5
- package/dist/packages/router/api/routerApi.d.ts.map +1 -1
- package/dist/packages/router/api/routerApi.js +40 -25
- package/dist/packages/router/api/routerApiCasting.d.ts +6 -0
- package/dist/packages/router/api/routerApiCasting.d.ts.map +1 -0
- package/dist/packages/router/api/routerApiCasting.js +22 -0
- package/dist/packages/router/api/routerApiCastingTypes.d.ts +11 -0
- package/dist/packages/router/api/routerApiCastingTypes.d.ts.map +1 -0
- package/dist/packages/router/api/routerApiHelpers.js +30 -30
- package/dist/packages/router/api/routerAsyncApiHelpers.js +18 -18
- package/dist/packages/router/api/routerSynchronousApiHelpers.d.ts +88 -3
- package/dist/packages/router/api/routerSynchronousApiHelpers.d.ts.map +1 -1
- package/dist/packages/router/api/routerSynchronousApiHelpers.js +125 -28
- package/dist/packages/router/router.d.ts +2 -1
- package/dist/packages/router/router.d.ts.map +1 -1
- package/dist/packages/router/router.js +23 -15
- package/dist/packages/router/routerTypes.d.ts +19 -5
- package/dist/packages/router/routerTypes.d.ts.map +1 -1
- package/dist/packages/router/routerTypes.js +5 -1
- package/dist/packages/router/utils/async/routerAsyncApiInterface.d.ts +1 -8
- package/dist/packages/router/utils/async/routerAsyncApiInterface.d.ts.map +1 -1
- package/dist/packages/router/utils/async/routerAsyncGraph.js +15 -15
- package/dist/packages/router/utils/synchronous/interfaces/routerPoolInterface.d.ts +5 -2
- package/dist/packages/router/utils/synchronous/interfaces/routerPoolInterface.d.ts.map +1 -1
- package/dist/packages/router/utils/synchronous/interfaces/routerPoolInterface.js +30 -14
- package/dist/packages/router/utils/synchronous/routerGraph.js +36 -36
- package/dist/packages/router/utils/synchronous/routerPools/aftermathRouterPool.d.ts +5 -2
- package/dist/packages/router/utils/synchronous/routerPools/aftermathRouterPool.d.ts.map +1 -1
- package/dist/packages/router/utils/synchronous/routerPools/aftermathRouterPool.js +18 -16
- package/dist/packages/router/utils/synchronous/routerPools/baySwapRouterPool.d.ts +102 -0
- package/dist/packages/router/utils/synchronous/routerPools/baySwapRouterPool.d.ts.map +1 -0
- package/dist/packages/router/utils/synchronous/routerPools/baySwapRouterPool.js +217 -0
- package/dist/packages/router/utils/synchronous/routerPools/blueMoveRouterPool.d.ts +102 -0
- package/dist/packages/router/utils/synchronous/routerPools/blueMoveRouterPool.d.ts.map +1 -0
- package/dist/packages/router/utils/synchronous/routerPools/blueMoveRouterPool.js +221 -0
- package/dist/packages/router/utils/synchronous/routerPools/cetusRouterPool.d.ts +5 -2
- package/dist/packages/router/utils/synchronous/routerPools/cetusRouterPool.d.ts.map +1 -1
- package/dist/packages/router/utils/synchronous/routerPools/cetusRouterPool.js +11 -11
- package/dist/packages/router/utils/synchronous/routerPools/deepBookRouterPool.d.ts +5 -2
- package/dist/packages/router/utils/synchronous/routerPools/deepBookRouterPool.d.ts.map +1 -1
- package/dist/packages/router/utils/synchronous/routerPools/deepBookRouterPool.js +16 -16
- package/dist/packages/router/utils/synchronous/routerPools/interestRouterPool.d.ts +96 -0
- package/dist/packages/router/utils/synchronous/routerPools/interestRouterPool.d.ts.map +1 -0
- package/dist/packages/router/utils/synchronous/routerPools/interestRouterPool.js +174 -0
- package/dist/packages/router/utils/synchronous/routerPools/kriyaRouterPool.d.ts +102 -0
- package/dist/packages/router/utils/synchronous/routerPools/kriyaRouterPool.d.ts.map +1 -0
- package/dist/packages/router/utils/synchronous/routerPools/kriyaRouterPool.js +216 -0
- package/dist/packages/router/utils/synchronous/routerPools/{nojoRouterPool.d.ts → suiswapRouterPool.d.ts} +35 -14
- package/dist/packages/router/utils/synchronous/routerPools/suiswapRouterPool.d.ts.map +1 -0
- package/dist/packages/router/utils/synchronous/routerPools/suiswapRouterPool.js +217 -0
- package/dist/packages/router/utils/synchronous/routerPools/turbosRouterPool.d.ts +5 -2
- package/dist/packages/router/utils/synchronous/routerPools/turbosRouterPool.d.ts.map +1 -1
- package/dist/packages/router/utils/synchronous/routerPools/turbosRouterPool.js +11 -11
- package/dist/packages/staking/api/stakingApi.d.ts +173 -10
- package/dist/packages/staking/api/stakingApi.d.ts.map +1 -1
- package/dist/packages/staking/api/stakingApi.js +373 -32
- package/dist/packages/staking/api/stakingApiCasting.d.ts.map +1 -1
- package/dist/packages/staking/api/stakingApiCasting.js +6 -6
- package/dist/packages/staking/staking.js +18 -18
- package/dist/packages/sui/api/suiApi.d.ts +0 -2
- package/dist/packages/sui/api/suiApi.d.ts.map +1 -1
- package/dist/packages/sui/api/suiApi.js +9 -9
- package/dist/packages/sui/sui.js +9 -9
- package/dist/packages/suiFrens/api/suiFrensApi.d.ts +80 -0
- package/dist/packages/suiFrens/api/suiFrensApi.d.ts.map +1 -0
- package/dist/packages/suiFrens/api/suiFrensApi.js +564 -0
- package/dist/packages/suiFrens/api/suiFrensApiCasting.d.ts +13 -0
- package/dist/packages/suiFrens/api/suiFrensApiCasting.d.ts.map +1 -0
- package/dist/packages/suiFrens/api/suiFrensApiCasting.js +108 -0
- package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.d.ts +51 -0
- package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.d.ts.map +1 -0
- package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.js +2 -0
- package/dist/packages/suiFrens/index.d.ts +4 -0
- package/dist/packages/suiFrens/index.d.ts.map +1 -0
- package/dist/packages/suiFrens/index.js +19 -0
- package/dist/packages/suiFrens/stakedSuiFrenReceipt.d.ts +13 -0
- package/dist/packages/suiFrens/stakedSuiFrenReceipt.d.ts.map +1 -0
- package/dist/packages/{capys/stakedCapyReceipt.js → suiFrens/stakedSuiFrenReceipt.js} +21 -21
- package/dist/packages/suiFrens/suiFren.d.ts +10 -0
- package/dist/packages/suiFrens/suiFren.d.ts.map +1 -0
- package/dist/packages/suiFrens/suiFren.js +39 -0
- package/dist/packages/suiFrens/suiFrens.d.ts +32 -0
- package/dist/packages/suiFrens/suiFrens.d.ts.map +1 -0
- package/dist/packages/suiFrens/suiFrens.js +143 -0
- package/dist/packages/suiFrens/suiFrensTypes.d.ts +89 -0
- package/dist/packages/suiFrens/suiFrensTypes.d.ts.map +1 -0
- package/dist/packages/suiFrens/suiFrensTypes.js +2 -0
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -2
- package/package.json +12 -5
- package/dist/external/nojo/amm/index.d.ts +0 -2
- package/dist/external/nojo/amm/index.d.ts.map +0 -1
- package/dist/external/nojo/amm/index.js +0 -4
- package/dist/external/nojo/amm/init.d.ts +0 -3
- package/dist/external/nojo/amm/init.d.ts.map +0 -1
- package/dist/external/nojo/amm/init.js +0 -31
- package/dist/external/nojo/amm/pool/errors.d.ts +0 -41
- package/dist/external/nojo/amm/pool/errors.d.ts.map +0 -1
- package/dist/external/nojo/amm/pool/errors.js +0 -75
- package/dist/external/nojo/amm/pool/functions.d.ts +0 -356
- package/dist/external/nojo/amm/pool/functions.d.ts.map +0 -1
- package/dist/external/nojo/amm/pool/functions.js +0 -173
- package/dist/external/nojo/amm/pool/structs.d.ts +0 -94
- package/dist/external/nojo/amm/pool/structs.d.ts.map +0 -1
- package/dist/external/nojo/amm/pool/structs.js +0 -278
- package/dist/external/nojo/amm/util/functions.d.ts +0 -359
- package/dist/external/nojo/amm/util/functions.d.ts.map +0 -1
- package/dist/external/nojo/amm/util/functions.js +0 -198
- package/dist/external/nojo/framework/balance.d.ts +0 -19
- package/dist/external/nojo/framework/balance.d.ts.map +0 -1
- package/dist/external/nojo/framework/balance.js +0 -44
- package/dist/external/nojo/framework/bcs.d.ts +0 -3
- package/dist/external/nojo/framework/bcs.d.ts.map +0 -1
- package/dist/external/nojo/framework/bcs.js +0 -5
- package/dist/external/nojo/framework/coin.d.ts +0 -42
- package/dist/external/nojo/framework/coin.d.ts.map +0 -1
- package/dist/external/nojo/framework/coin.js +0 -144
- package/dist/external/nojo/framework/dynamic-field.d.ts +0 -25
- package/dist/external/nojo/framework/dynamic-field.d.ts.map +0 -1
- package/dist/external/nojo/framework/dynamic-field.js +0 -89
- package/dist/external/nojo/framework/init.d.ts +0 -3
- package/dist/external/nojo/framework/init.d.ts.map +0 -1
- package/dist/external/nojo/framework/init.js +0 -41
- package/dist/external/nojo/framework/loader.d.ts +0 -12
- package/dist/external/nojo/framework/loader.d.ts.map +0 -1
- package/dist/external/nojo/framework/loader.js +0 -103
- package/dist/external/nojo/framework/object.d.ts +0 -33
- package/dist/external/nojo/framework/object.d.ts.map +0 -1
- package/dist/external/nojo/framework/object.js +0 -89
- package/dist/external/nojo/framework/table.d.ts +0 -23
- package/dist/external/nojo/framework/table.d.ts.map +0 -1
- package/dist/external/nojo/framework/table.js +0 -83
- package/dist/external/nojo/framework/type-name.d.ts +0 -15
- package/dist/external/nojo/framework/type-name.d.ts.map +0 -1
- package/dist/external/nojo/framework/type-name.js +0 -34
- package/dist/external/nojo/framework/type.d.ts +0 -24
- package/dist/external/nojo/framework/type.d.ts.map +0 -1
- package/dist/external/nojo/framework/type.js +0 -120
- package/dist/external/nojo/framework/util.d.ts +0 -31
- package/dist/external/nojo/framework/util.d.ts.map +0 -1
- package/dist/external/nojo/framework/util.js +0 -49
- package/dist/external/nojo/index.d.ts +0 -6
- package/dist/external/nojo/index.d.ts.map +0 -1
- package/dist/external/nojo/init.d.ts +0 -2
- package/dist/external/nojo/init.d.ts.map +0 -1
- package/dist/external/nojo/init.js +0 -39
- package/dist/packages/capys/api/capysApi.d.ts +0 -37
- package/dist/packages/capys/api/capysApi.d.ts.map +0 -1
- package/dist/packages/capys/api/capysApi.js +0 -200
- package/dist/packages/capys/api/capysApiCasting.d.ts +0 -13
- package/dist/packages/capys/api/capysApiCasting.d.ts.map +0 -1
- package/dist/packages/capys/api/capysApiCasting.js +0 -108
- package/dist/packages/capys/api/capysApiCastingTypes.d.ts +0 -51
- package/dist/packages/capys/api/capysApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/capys/api/capysApiHelpers.d.ts +0 -48
- package/dist/packages/capys/api/capysApiHelpers.d.ts.map +0 -1
- package/dist/packages/capys/api/capysApiHelpers.js +0 -386
- package/dist/packages/capys/capys.d.ts +0 -32
- package/dist/packages/capys/capys.d.ts.map +0 -1
- package/dist/packages/capys/capys.js +0 -151
- package/dist/packages/capys/capysTypes.d.ts +0 -89
- package/dist/packages/capys/capysTypes.d.ts.map +0 -1
- package/dist/packages/capys/index.d.ts +0 -4
- package/dist/packages/capys/index.d.ts.map +0 -1
- package/dist/packages/capys/stakedCapyReceipt.d.ts +0 -14
- package/dist/packages/capys/stakedCapyReceipt.d.ts.map +0 -1
- package/dist/packages/coin/api/coinApiHelpers.d.ts +0 -23
- package/dist/packages/coin/api/coinApiHelpers.d.ts.map +0 -1
- package/dist/packages/coin/api/coinApiHelpers.js +0 -203
- package/dist/packages/external/cetus/cetusApiHelpers.d.ts +0 -247
- package/dist/packages/external/cetus/cetusApiHelpers.d.ts.map +0 -1
- package/dist/packages/external/cetus/cetusApiHelpers.js +0 -303
- package/dist/packages/external/deepBook/deepBookApiHelper.d.ts.map +0 -1
- package/dist/packages/external/deepBook/deepBookApiHelper.js +0 -193
- package/dist/packages/external/nojo/nojoAmmApi.d.ts +0 -24
- package/dist/packages/external/nojo/nojoAmmApi.d.ts.map +0 -1
- package/dist/packages/external/nojo/nojoAmmApi.js +0 -86
- package/dist/packages/external/nojo/nojoAmmApiHelpers.d.ts +0 -14
- package/dist/packages/external/nojo/nojoAmmApiHelpers.d.ts.map +0 -1
- package/dist/packages/external/nojo/nojoAmmApiHelpers.js +0 -69
- package/dist/packages/external/nojo/nojoAmmTypes.d.ts +0 -9
- package/dist/packages/external/nojo/nojoAmmTypes.d.ts.map +0 -1
- package/dist/packages/external/nojo/nojoAmmTypes.js +0 -7
- package/dist/packages/external/turbos/turbosApiHelpers.d.ts +0 -205
- package/dist/packages/external/turbos/turbosApiHelpers.d.ts.map +0 -1
- package/dist/packages/external/turbos/turbosApiHelpers.js +0 -325
- package/dist/packages/faucet/api/faucetApiHelpers.d.ts.map +0 -1
- package/dist/packages/faucet/api/faucetApiHelpers.js +0 -90
- package/dist/packages/nftAmm/api/nftAmmApiHelpers.d.ts +0 -193
- package/dist/packages/nftAmm/api/nftAmmApiHelpers.d.ts.map +0 -1
- package/dist/packages/nftAmm/api/nftAmmApiHelpers.js +0 -238
- package/dist/packages/pools/api/poolsApiHelpers.d.ts +0 -204
- package/dist/packages/pools/api/poolsApiHelpers.d.ts.map +0 -1
- package/dist/packages/pools/api/poolsApiHelpers.js +0 -523
- package/dist/packages/referralVault/api/referralVaultApiHelpers.d.ts.map +0 -1
- package/dist/packages/referralVault/api/referralVaultApiHelpers.js +0 -86
- package/dist/packages/router/utils/synchronous/routerPools/nojoRouterPool.d.ts.map +0 -1
- package/dist/packages/router/utils/synchronous/routerPools/nojoRouterPool.js +0 -99
- package/dist/packages/staking/api/stakingApiHelpers.d.ts +0 -212
- package/dist/packages/staking/api/stakingApiHelpers.d.ts.map +0 -1
- package/dist/packages/staking/api/stakingApiHelpers.js +0 -400
- package/dist/packages/sui/api/suiApiCasting.d.ts +0 -3
- package/dist/packages/sui/api/suiApiCasting.d.ts.map +0 -1
- package/dist/packages/sui/api/suiApiCasting.js +0 -6
- package/dist/packages/sui/api/suiApiCastingTypes.d.ts +0 -2
- package/dist/packages/sui/api/suiApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/sui/api/suiApiHelpers.d.ts +0 -6
- package/dist/packages/sui/api/suiApiHelpers.d.ts.map +0 -1
- package/dist/packages/sui/api/suiApiHelpers.js +0 -13
- /package/dist/packages/{capys/api/capysApiCastingTypes.js → farms/farmsTypes.js} +0 -0
- /package/dist/packages/{capys/capysTypes.js → perpetuals/perpetualsTypes.js} +0 -0
- /package/dist/packages/{sui/api/suiApiCastingTypes.js → router/api/routerApiCastingTypes.js} +0 -0
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SuiFrensApi = void 0;
|
|
13
|
+
const sui_js_1 = require("@mysten/sui.js");
|
|
14
|
+
const suiFrensApiCasting_1 = require("./suiFrensApiCasting");
|
|
15
|
+
const coin_1 = require("../../coin/coin");
|
|
16
|
+
const helpers_1 = require("../../../general/utils/helpers");
|
|
17
|
+
const suiFrens_1 = require("../suiFrens");
|
|
18
|
+
const utils_1 = require("../../../general/utils");
|
|
19
|
+
const eventsApiHelpers_1 = require("../../../general/api/eventsApiHelpers");
|
|
20
|
+
class SuiFrensApi {
|
|
21
|
+
// =========================================================================
|
|
22
|
+
// Constructor
|
|
23
|
+
// =========================================================================
|
|
24
|
+
constructor(Provider) {
|
|
25
|
+
this.Provider = Provider;
|
|
26
|
+
// =========================================================================
|
|
27
|
+
// Public Methods
|
|
28
|
+
// =========================================================================
|
|
29
|
+
// =========================================================================
|
|
30
|
+
// Inspections
|
|
31
|
+
// =========================================================================
|
|
32
|
+
this.fetchStakedSuiFrenFeesEarned = (stakedSuiFrenReceiptObjectId) => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const [suiFrenFeesEarnedIndividual, suiFrenFeesEarnedGlobal] = yield Promise.all([
|
|
34
|
+
this.fetchStakedSuiFrenFeesEarnedIndividual(stakedSuiFrenReceiptObjectId),
|
|
35
|
+
this.fetchStakedSuiFrenFeesEarnedGlobal(),
|
|
36
|
+
]);
|
|
37
|
+
return {
|
|
38
|
+
individualFees: suiFrenFeesEarnedIndividual,
|
|
39
|
+
globalFees: suiFrenFeesEarnedGlobal,
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
this.fetchIsSuiFrenPackageOnChain = () => this.Provider.Objects().fetchDoesObjectExist(this.addresses.packages.suiFren);
|
|
43
|
+
this.fetchSuiFrensStakedInSuiFrenVaultWithAttributes = (inputs) => __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
var _a;
|
|
45
|
+
const { limit, attributes } = inputs;
|
|
46
|
+
const isComplete = (suiFrens) => {
|
|
47
|
+
return (this.filterSuiFrensWithAttributes(suiFrens, attributes).length >=
|
|
48
|
+
limit);
|
|
49
|
+
};
|
|
50
|
+
const suiFrensWithCursor = yield this.Provider.DynamicFields().fetchDynamicFieldsUntil(Object.assign(Object.assign({}, inputs), { fetchFunc: this.fetchSuiFrensStakedInSuiFrenVault, isComplete }));
|
|
51
|
+
const filteredSuiFrens = this.filterSuiFrensWithAttributes(suiFrensWithCursor.dynamicFieldObjects, attributes);
|
|
52
|
+
const resizedSuiFrensWithCursor = {
|
|
53
|
+
nextCursor: ((_a = suiFrensWithCursor.nextCursor) !== null && _a !== void 0 ? _a : limit < filteredSuiFrens.length)
|
|
54
|
+
? filteredSuiFrens[limit].objectId
|
|
55
|
+
: suiFrensWithCursor.nextCursor,
|
|
56
|
+
dynamicFieldObjects: filteredSuiFrens.slice(0, limit),
|
|
57
|
+
};
|
|
58
|
+
return resizedSuiFrensWithCursor;
|
|
59
|
+
});
|
|
60
|
+
this.fetchStakedSuiFrenFeesEarnedIndividual = (stakingReceiptId) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const tx = this.suiFrenFeesEarnedIndividualDevInspectTransaction(stakingReceiptId);
|
|
62
|
+
const bytes = yield this.Provider.Inspections().fetchFirstBytesFromTxOutput(tx);
|
|
63
|
+
return utils_1.Casting.bigIntFromBytes(bytes);
|
|
64
|
+
});
|
|
65
|
+
this.fetchStakedSuiFrenFeesEarnedGlobal = () => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const tx = this.suiFrenFeesEarnedGlobalDevInspectTransaction();
|
|
67
|
+
const bytes = yield this.Provider.Inspections().fetchFirstBytesFromTxOutput(tx);
|
|
68
|
+
return utils_1.Casting.bigIntFromBytes(bytes);
|
|
69
|
+
});
|
|
70
|
+
this.suiFrenFeesEarnedIndividualDevInspectTransaction = (stakingReceiptId) => {
|
|
71
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
72
|
+
tx.moveCall({
|
|
73
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.suiFrenVault.moduleName, SuiFrensApi.constants.suiFrenVault.modules.suiFrenVault.functions
|
|
74
|
+
.feesEarnedIndividual.name),
|
|
75
|
+
typeArguments: [],
|
|
76
|
+
arguments: [
|
|
77
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
78
|
+
tx.object(stakingReceiptId),
|
|
79
|
+
],
|
|
80
|
+
});
|
|
81
|
+
return tx;
|
|
82
|
+
};
|
|
83
|
+
this.suiFrenFeesEarnedGlobalDevInspectTransaction = () => {
|
|
84
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
85
|
+
tx.moveCall({
|
|
86
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.suiFrenVault.moduleName, SuiFrensApi.constants.suiFrenVault.modules.suiFrenVault.functions
|
|
87
|
+
.feesEarnedGlobal.name),
|
|
88
|
+
typeArguments: [],
|
|
89
|
+
arguments: [tx.object(this.addresses.objects.suiFrenVault)],
|
|
90
|
+
});
|
|
91
|
+
return tx;
|
|
92
|
+
};
|
|
93
|
+
// =========================================================================
|
|
94
|
+
// Events
|
|
95
|
+
// =========================================================================
|
|
96
|
+
this.fetchSuiFrenBornEvents = (inputs) => __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
return yield this.Provider.Events().fetchCastEventsWithCursor(Object.assign(Object.assign({}, inputs), { query: {
|
|
98
|
+
MoveEventType: this.eventTypes.suiFrenBorn,
|
|
99
|
+
}, eventFromEventOnChain: suiFrensApiCasting_1.SuiFrensApiCasting.suiFrenBornEventFromOnChain }));
|
|
100
|
+
});
|
|
101
|
+
this.fetchBreedSuiFrensEvents = (inputs) => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
return yield this.Provider.Events().fetchCastEventsWithCursor(Object.assign(Object.assign({}, inputs), { query: {
|
|
103
|
+
MoveEventType: this.eventTypes.breedSuiFrens,
|
|
104
|
+
}, eventFromEventOnChain: suiFrensApiCasting_1.SuiFrensApiCasting.breedSuiFrensEventFromOnChain }));
|
|
105
|
+
});
|
|
106
|
+
this.fetchStakeSuiFrenEvents = (inputs) => __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
return yield this.Provider.Events().fetchCastEventsWithCursor(Object.assign(Object.assign({}, inputs), { query: {
|
|
108
|
+
MoveEventType: this.eventTypes.stakeSuiFren,
|
|
109
|
+
}, eventFromEventOnChain: suiFrensApiCasting_1.SuiFrensApiCasting.stakeSuiFrenEventFromOnChain }));
|
|
110
|
+
});
|
|
111
|
+
this.fetchUnstakeSuiFrenEvents = (inputs) => __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
return yield this.Provider.Events().fetchCastEventsWithCursor(Object.assign(Object.assign({}, inputs), { query: {
|
|
113
|
+
MoveEventType: this.eventTypes.unstakeSuiFren,
|
|
114
|
+
}, eventFromEventOnChain: suiFrensApiCasting_1.SuiFrensApiCasting.unstakeSuiFrenEventFromOnChain }));
|
|
115
|
+
});
|
|
116
|
+
// =========================================================================
|
|
117
|
+
// Objects
|
|
118
|
+
// =========================================================================
|
|
119
|
+
// =========================================================================
|
|
120
|
+
// SuiFren Objects
|
|
121
|
+
// =========================================================================
|
|
122
|
+
this.fetchSuiFrens = (suiFrenIds) => __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return this.Provider.Objects().fetchCastObjectBatch({
|
|
124
|
+
objectIds: suiFrenIds,
|
|
125
|
+
objectFromSuiObjectResponse: suiFrensApiCasting_1.SuiFrensApiCasting.suiFrenObjectFromSuiObjectResponse,
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
this.fetchSuiFrensOwnedByAddress = (walletAddress) => __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
return yield this.Provider.Objects().fetchCastObjectsOwnedByAddressOfType({
|
|
130
|
+
walletAddress,
|
|
131
|
+
objectType: this.objectTypes.suiFrenObjectType,
|
|
132
|
+
objectFromSuiObjectResponse: suiFrensApiCasting_1.SuiFrensApiCasting.suiFrenObjectFromSuiObjectResponse,
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
this.fetchStakedSuiFrens = (suiFrenIds) => __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
return this.Provider.Objects().fetchCastObjectBatch({
|
|
137
|
+
objectIds: suiFrenIds,
|
|
138
|
+
objectFromSuiObjectResponse: suiFrensApiCasting_1.SuiFrensApiCasting.suiFrenObjectFromSuiObjectResponse,
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
this.fetchStakedSuiFrensOwnedByAddress = (walletAddress) => __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
// i. obtain all owned StakingReceipt
|
|
143
|
+
const suiFrenIdsStakedByAddress = (yield this.fetchStakedSuiFrenReceiptOwnedByAddress(walletAddress)).map((suiFrenStakingReceipt) => suiFrenStakingReceipt.suiFrenId);
|
|
144
|
+
// ii. obtain a SuiFren object from each SuiFren ObjectId
|
|
145
|
+
const stakedSuiFrens = yield this.fetchStakedSuiFrens(suiFrenIdsStakedByAddress);
|
|
146
|
+
return stakedSuiFrens;
|
|
147
|
+
});
|
|
148
|
+
this.fetchSuiFrenVault = (suiFrenVaultId) => __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
return this.Provider.Objects().fetchCastObject({
|
|
150
|
+
objectId: suiFrenVaultId,
|
|
151
|
+
objectFromSuiObjectResponse: suiFrensApiCasting_1.SuiFrensApiCasting.suiFrenVaultObjectFromSuiObjectResponse,
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
this.fetchSuiFrensStakedInSuiFrenVault = (inputs) => __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
const suiFrenVaultId = this.addresses.objects.suiFrenVault;
|
|
156
|
+
const suiFrenType = this.objectTypes.suiFrenObjectType;
|
|
157
|
+
return yield this.Provider.DynamicFields().fetchCastDynamicFieldsOfTypeWithCursor(Object.assign(Object.assign({}, inputs), { parentObjectId: suiFrenVaultId, objectsFromObjectIds: this.fetchSuiFrens, dynamicFieldType: suiFrenType }));
|
|
158
|
+
});
|
|
159
|
+
// =========================================================================
|
|
160
|
+
// Staked SuiFren Receipt Objects
|
|
161
|
+
// =========================================================================
|
|
162
|
+
this.fetchStakedSuiFrenReceipt = (suiFrenStakingReceipt) => __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
return this.Provider.Objects().fetchCastObject({
|
|
164
|
+
objectId: suiFrenStakingReceipt,
|
|
165
|
+
objectFromSuiObjectResponse: suiFrensApiCasting_1.SuiFrensApiCasting.stakedSuiFrenReceiptObjectFromSuiObjectResponse,
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
this.fetchStakedSuiFrenReceipts = (suiFrenStakingReceipts) => __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
return this.Provider.Objects().fetchCastObjectBatch({
|
|
170
|
+
objectIds: suiFrenStakingReceipts,
|
|
171
|
+
objectFromSuiObjectResponse: suiFrensApiCasting_1.SuiFrensApiCasting.stakedSuiFrenReceiptObjectFromSuiObjectResponse,
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
this.fetchStakedSuiFrenReceiptOwnedByAddress = (walletAddress) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
return yield this.Provider.Objects().fetchCastObjectsOwnedByAddressOfType({
|
|
176
|
+
walletAddress,
|
|
177
|
+
objectType: this.objectTypes.stakedSuiFrenReceiptObjectType,
|
|
178
|
+
objectFromSuiObjectResponse: suiFrensApiCasting_1.SuiFrensApiCasting.stakedSuiFrenReceiptObjectFromSuiObjectResponse,
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
this.fetchStakedSuiFrenReceiptWithSuiFrensOwnedByAddress = (walletAddress) => __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
// i. obtain all owned StakingReceipt
|
|
183
|
+
const stakingReceipts = yield this.fetchStakedSuiFrenReceiptOwnedByAddress(walletAddress);
|
|
184
|
+
// ii. obtain all SuiFren Object Ids
|
|
185
|
+
const suiFrenIdsStakedByAddress = stakingReceipts.map((suiFrenStakingReceipt) => suiFrenStakingReceipt.suiFrenId);
|
|
186
|
+
// iii. obtain a SuiFren object from each SuiFren ObjectId
|
|
187
|
+
let indexStakedSuiFrens = {};
|
|
188
|
+
(yield this.fetchStakedSuiFrens(suiFrenIdsStakedByAddress)).forEach((stakedSuiFren) => {
|
|
189
|
+
indexStakedSuiFrens[stakedSuiFren.objectId] = stakedSuiFren;
|
|
190
|
+
});
|
|
191
|
+
// iv. construct a StakingReceiptWithSuiFren object from each StakingReceipt <> SuiFren pair
|
|
192
|
+
const suiFrenStakingReceiptsWithSuiFren = stakingReceipts.map((stakingReceipt) => {
|
|
193
|
+
return {
|
|
194
|
+
objectId: stakingReceipt.objectId,
|
|
195
|
+
suiFren: indexStakedSuiFrens[stakingReceipt.suiFrenId],
|
|
196
|
+
unlockEpoch: stakingReceipt.unlockEpoch,
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
return suiFrenStakingReceiptsWithSuiFren;
|
|
200
|
+
});
|
|
201
|
+
// =========================================================================
|
|
202
|
+
// Transactions
|
|
203
|
+
// =========================================================================
|
|
204
|
+
// =========================================================================
|
|
205
|
+
// SuiFren Staking
|
|
206
|
+
// =========================================================================
|
|
207
|
+
this.fetchStakeSuiFrenTransaction = (suiFrenId) => this.Provider.Transactions().fetchSetGasBudgetAndSerializeTx(this.suiFrenStakeSuiFrenTransaction(suiFrenId));
|
|
208
|
+
this.fetchUnstakeSuiFrenTransaction = (stakingReceiptId) => this.Provider.Transactions().fetchSetGasBudgetAndSerializeTx(this.suiFrenUnstakeSuiFrenTransaction(stakingReceiptId));
|
|
209
|
+
this.fetchWithdrawStakedSuiFrenFeesTransaction = (stakingReceiptId) => this.Provider.Transactions().fetchSetGasBudgetAndSerializeTx(this.suiFrenWithdrawFeesTransaction(stakingReceiptId));
|
|
210
|
+
this.fetchWithdrawStakedSuiFrenFeesAmountTransaction = (stakingReceiptId, amount) => this.Provider.Transactions().fetchSetGasBudgetAndSerializeTx(this.suiFrenWithdrawFeesAmountTransaction(stakingReceiptId, amount));
|
|
211
|
+
this.fetchSuiFrenTransferTransaction = (stakingReceiptId, recipient) => this.Provider.Transactions().fetchSetGasBudgetAndSerializeTx(this.suiFrenTransferTransaction(stakingReceiptId, recipient));
|
|
212
|
+
// =========================================================================
|
|
213
|
+
// Breeding Transactions
|
|
214
|
+
// =========================================================================
|
|
215
|
+
this.fetchBreedSuiFrensTransaction = (walletAddress, parentOneId, parentTwoId) => __awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
const [parentOneIsOwned, parentTwoIsOwned] = yield Promise.all([
|
|
217
|
+
this.Provider.Objects().fetchIsObjectOwnedByAddress({
|
|
218
|
+
objectId: parentOneId,
|
|
219
|
+
walletAddress,
|
|
220
|
+
}),
|
|
221
|
+
this.Provider.Objects().fetchIsObjectOwnedByAddress({
|
|
222
|
+
objectId: parentTwoId,
|
|
223
|
+
walletAddress,
|
|
224
|
+
}),
|
|
225
|
+
]);
|
|
226
|
+
const transaction = yield this.fetchSuiFrenBuildBreedTransaction(walletAddress, parentOneId, parentOneIsOwned, parentTwoId, parentTwoIsOwned);
|
|
227
|
+
return this.Provider.Transactions().fetchSetGasBudgetAndSerializeTx(transaction);
|
|
228
|
+
});
|
|
229
|
+
this.fetchSuiFrenBuildBreedTransaction = (walletAddress, parentOneId, parentOneIsOwned, parentTwoId, parentTwoIsOwned) => __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
if (parentOneIsOwned && parentTwoIsOwned) {
|
|
231
|
+
// i. both suiFrens are owned
|
|
232
|
+
return this.fetchBuildBreedAndKeepTransaction(walletAddress, parentOneId, parentTwoId);
|
|
233
|
+
}
|
|
234
|
+
else if (parentOneIsOwned && !parentTwoIsOwned) {
|
|
235
|
+
// iia. one of the SuiFrens is owned and the other is staked
|
|
236
|
+
return this.fetchBuildBreedWithStakedAndKeepTransaction(walletAddress, parentOneId, parentTwoId);
|
|
237
|
+
}
|
|
238
|
+
else if (!parentOneIsOwned && parentTwoIsOwned) {
|
|
239
|
+
// iib. one of the SuiFren's is owned and the other is staked
|
|
240
|
+
return this.fetchBuildBreedWithStakedAndKeepTransaction(walletAddress, parentTwoId, parentOneId);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
// iii. both SuiFrens are staked
|
|
244
|
+
return this.fetchBuildBreedStakedWithStakedAndKeepTransaction(walletAddress, parentTwoId, parentOneId);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
this.fetchBuildBreedWithStakedAndKeepTransaction = (walletAddress, parentOneId, parentTwoId) => __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
249
|
+
tx.setSender(walletAddress);
|
|
250
|
+
const feeCoinType = suiFrens_1.SuiFrens.constants.breedingFees.coinType;
|
|
251
|
+
const feeCoinAmount = suiFrens_1.SuiFrens.constants.breedingFees.amounts.breedWithStakedAndKeep;
|
|
252
|
+
const coinArg = yield this.Provider.Coin().fetchCoinWithAmountTx({
|
|
253
|
+
tx,
|
|
254
|
+
walletAddress,
|
|
255
|
+
coinType: feeCoinType,
|
|
256
|
+
coinAmount: feeCoinAmount,
|
|
257
|
+
});
|
|
258
|
+
const finalTx = this.addStakeBreedWithStakedAndKeepCommandToTransaction(tx, coinArg, parentOneId, parentTwoId);
|
|
259
|
+
return finalTx;
|
|
260
|
+
});
|
|
261
|
+
this.fetchBuildBreedStakedWithStakedAndKeepTransaction = (walletAddress, parentOneId, parentTwoId) => __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
263
|
+
tx.setSender(walletAddress);
|
|
264
|
+
const feeCoinType = suiFrens_1.SuiFrens.constants.breedingFees.coinType;
|
|
265
|
+
const feeCoinAmount = suiFrens_1.SuiFrens.constants.breedingFees.amounts.breedStakedWithStakedAndKeep;
|
|
266
|
+
const coinArg = yield this.Provider.Coin().fetchCoinWithAmountTx({
|
|
267
|
+
tx,
|
|
268
|
+
walletAddress,
|
|
269
|
+
coinType: feeCoinType,
|
|
270
|
+
coinAmount: feeCoinAmount,
|
|
271
|
+
});
|
|
272
|
+
const finalTx = this.addStakeBreedWithStakedAndKeepCommandToTransaction(tx, coinArg, parentOneId, parentTwoId);
|
|
273
|
+
return finalTx;
|
|
274
|
+
});
|
|
275
|
+
this.fetchBuildBreedAndKeepTransaction = (walletAddress, parentOneId, parentTwoId) => __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
277
|
+
tx.setSender(walletAddress);
|
|
278
|
+
const feeCoinType = suiFrens_1.SuiFrens.constants.breedingFees.coinType;
|
|
279
|
+
const feeCoinAmount = suiFrens_1.SuiFrens.constants.breedingFees.amounts.breedAndKeep;
|
|
280
|
+
const coinArg = yield this.Provider.Coin().fetchCoinWithAmountTx({
|
|
281
|
+
tx,
|
|
282
|
+
walletAddress,
|
|
283
|
+
coinType: feeCoinType,
|
|
284
|
+
coinAmount: feeCoinAmount,
|
|
285
|
+
});
|
|
286
|
+
const finalTx = this.addStakeBreedAndKeepCommandToTransaction(tx, coinArg, parentOneId, parentTwoId);
|
|
287
|
+
return finalTx;
|
|
288
|
+
});
|
|
289
|
+
// =========================================================================
|
|
290
|
+
// Transaction Commands
|
|
291
|
+
// =========================================================================
|
|
292
|
+
// =========================================================================
|
|
293
|
+
// Breeding Transaction
|
|
294
|
+
// =========================================================================
|
|
295
|
+
this.addStakeBreedAndKeepCommandToTransaction = (tx, coinId, parentOneId, parentTwoId) => {
|
|
296
|
+
tx.add({
|
|
297
|
+
kind: "MoveCall",
|
|
298
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.suiFrenVault.modules.interface.functions
|
|
299
|
+
.breedAndKeep.name),
|
|
300
|
+
typeArguments: [],
|
|
301
|
+
arguments: [
|
|
302
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
303
|
+
tx.object(this.addresses.objects.suiFrenRegistry),
|
|
304
|
+
typeof coinId === "string" ? tx.object(coinId) : coinId,
|
|
305
|
+
tx.object(parentOneId),
|
|
306
|
+
tx.object(parentTwoId),
|
|
307
|
+
],
|
|
308
|
+
});
|
|
309
|
+
return tx;
|
|
310
|
+
};
|
|
311
|
+
this.addStakeBreedWithStakedAndKeepCommandToTransaction = (tx, coinId, parentOneId, parentTwoId) => {
|
|
312
|
+
tx.add({
|
|
313
|
+
kind: "MoveCall",
|
|
314
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.suiFrenVault.modules.interface.functions
|
|
315
|
+
.breedWithStakedAndKeep.name),
|
|
316
|
+
typeArguments: [],
|
|
317
|
+
arguments: [
|
|
318
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
319
|
+
tx.object(this.addresses.objects.suiFrenRegistry),
|
|
320
|
+
typeof coinId === "string" ? tx.object(coinId) : coinId,
|
|
321
|
+
tx.object(parentOneId),
|
|
322
|
+
tx.object(parentTwoId),
|
|
323
|
+
],
|
|
324
|
+
});
|
|
325
|
+
return tx;
|
|
326
|
+
};
|
|
327
|
+
this.addStakeBreedStakedWithStakedAndKeepCommandToTransaction = (tx, coinId, parentOneId, parentTwoId) => {
|
|
328
|
+
tx.add({
|
|
329
|
+
kind: "MoveCall",
|
|
330
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.suiFrenVault.modules.interface.functions
|
|
331
|
+
.breedStakedWithStakedAndKeep.name),
|
|
332
|
+
typeArguments: [],
|
|
333
|
+
arguments: [
|
|
334
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
335
|
+
tx.object(this.addresses.objects.suiFrenRegistry),
|
|
336
|
+
tx.object(coinId),
|
|
337
|
+
tx.object(parentOneId),
|
|
338
|
+
tx.object(parentTwoId),
|
|
339
|
+
],
|
|
340
|
+
});
|
|
341
|
+
return tx;
|
|
342
|
+
};
|
|
343
|
+
// =========================================================================
|
|
344
|
+
// Staking Transaction Commands
|
|
345
|
+
// =========================================================================
|
|
346
|
+
this.suiFrenStakeSuiFrenTransaction = (suiFrenId) => {
|
|
347
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
348
|
+
tx.moveCall({
|
|
349
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.suiFrenVault.modules.interface.functions
|
|
350
|
+
.stakeSuiFren.name),
|
|
351
|
+
typeArguments: [],
|
|
352
|
+
arguments: [
|
|
353
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
354
|
+
tx.object(suiFrenId),
|
|
355
|
+
],
|
|
356
|
+
});
|
|
357
|
+
return tx;
|
|
358
|
+
};
|
|
359
|
+
this.suiFrenUnstakeSuiFrenTransaction = (stakingReceiptId) => {
|
|
360
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
361
|
+
tx.moveCall({
|
|
362
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.suiFrenVault.modules.interface.functions
|
|
363
|
+
.unstakeSuiFren.name),
|
|
364
|
+
typeArguments: [],
|
|
365
|
+
arguments: [
|
|
366
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
367
|
+
tx.object(stakingReceiptId),
|
|
368
|
+
],
|
|
369
|
+
});
|
|
370
|
+
return tx;
|
|
371
|
+
};
|
|
372
|
+
this.suiFrenTransferTransaction = (stakingReceiptId, recipient) => {
|
|
373
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
374
|
+
tx.moveCall({
|
|
375
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.suiFrenVault.modules.interface.functions
|
|
376
|
+
.transfer.name),
|
|
377
|
+
typeArguments: [],
|
|
378
|
+
arguments: [
|
|
379
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
380
|
+
tx.object(stakingReceiptId),
|
|
381
|
+
tx.pure(recipient),
|
|
382
|
+
],
|
|
383
|
+
});
|
|
384
|
+
return tx;
|
|
385
|
+
};
|
|
386
|
+
// =========================================================================
|
|
387
|
+
// Fee Transaction Commands
|
|
388
|
+
// =========================================================================
|
|
389
|
+
this.suiFrenWithdrawFeesTransaction = (stakingReceiptId) => {
|
|
390
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
391
|
+
tx.moveCall({
|
|
392
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.suiFrenVault.modules.interface.functions
|
|
393
|
+
.withdrawFees.name),
|
|
394
|
+
typeArguments: [],
|
|
395
|
+
arguments: [
|
|
396
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
397
|
+
tx.object(stakingReceiptId),
|
|
398
|
+
],
|
|
399
|
+
});
|
|
400
|
+
return tx;
|
|
401
|
+
};
|
|
402
|
+
this.suiFrenWithdrawFeesAmountTransaction = (stakingReceiptId, amount) => {
|
|
403
|
+
const tx = new sui_js_1.TransactionBlock();
|
|
404
|
+
tx.moveCall({
|
|
405
|
+
target: helpers_1.Helpers.transactions.createTxTarget(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.suiFrenVault.modules.interface.functions
|
|
406
|
+
.withdrawFeesAmount.name),
|
|
407
|
+
typeArguments: [],
|
|
408
|
+
arguments: [
|
|
409
|
+
tx.object(this.addresses.objects.suiFrenVault),
|
|
410
|
+
tx.object(stakingReceiptId),
|
|
411
|
+
tx.pure(amount.toString()),
|
|
412
|
+
],
|
|
413
|
+
});
|
|
414
|
+
return tx;
|
|
415
|
+
};
|
|
416
|
+
// =========================================================================
|
|
417
|
+
// Stats
|
|
418
|
+
// =========================================================================
|
|
419
|
+
// TODO: make this function not exported from sdk (only internal use)
|
|
420
|
+
// NOTE: this calculation will be incorrect if feeCoinType is different for each fee
|
|
421
|
+
this.calcSuiFrenBreedingFees = (breedSuiFrenEvents, feeCoinDecimals, feeCoinPrice) => {
|
|
422
|
+
const breedingFeesInFeeCoin = helpers_1.Helpers.sum(breedSuiFrenEvents.map((event) => coin_1.Coin.balanceWithDecimals(event.feeCoinWithBalance.balance, feeCoinDecimals)));
|
|
423
|
+
const breedingFeesUsd = feeCoinPrice * breedingFeesInFeeCoin;
|
|
424
|
+
return {
|
|
425
|
+
amount: breedingFeesInFeeCoin,
|
|
426
|
+
amountUsd: breedingFeesUsd,
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
this.fetchSuiFrenStats = () => __awaiter(this, void 0, void 0, function* () {
|
|
430
|
+
const breedSuiFrenEventsWithinTime = yield this.Provider.Events().fetchEventsWithinTime({
|
|
431
|
+
fetchEventsFunc: this.fetchBreedSuiFrensEvents,
|
|
432
|
+
timeUnit: "hour",
|
|
433
|
+
time: 24,
|
|
434
|
+
});
|
|
435
|
+
const feeCoin = breedSuiFrenEventsWithinTime.length === 0
|
|
436
|
+
? suiFrens_1.SuiFrens.constants.breedingFees.coinType
|
|
437
|
+
: breedSuiFrenEventsWithinTime[0].feeCoinWithBalance.coin;
|
|
438
|
+
const feeCoinDecimals = (yield this.Provider.Coin().fetchCoinMetadata(feeCoin)).decimals;
|
|
439
|
+
const feeCoinPrice = yield this.Provider.Prices().fetchPrice(feeCoin);
|
|
440
|
+
const breedingFeesDaily = this.calcSuiFrenBreedingFees(breedSuiFrenEventsWithinTime, feeCoinDecimals, feeCoinPrice);
|
|
441
|
+
const suiFrenVault = yield this.fetchSuiFrenVault(this.addresses.objects.suiFrenVault);
|
|
442
|
+
const { bredSuiFrens, stakedSuiFrens, breedingFeesGlobal } = yield this.fetchSuiFrenVaultStats(suiFrenVault, feeCoinDecimals, feeCoinPrice);
|
|
443
|
+
return {
|
|
444
|
+
bredSuiFrens,
|
|
445
|
+
stakedSuiFrens,
|
|
446
|
+
breedingFeeCoin: feeCoin,
|
|
447
|
+
breedingFeesGlobal,
|
|
448
|
+
breedingFeesDaily,
|
|
449
|
+
breedingVolumeDaily: breedSuiFrenEventsWithinTime.length,
|
|
450
|
+
};
|
|
451
|
+
});
|
|
452
|
+
this.fetchSuiFrenVaultStats = (suiFrenVault, feeCoinDecimals, feeCoinPrice) => __awaiter(this, void 0, void 0, function* () {
|
|
453
|
+
const globalFeesWithDecimals = coin_1.Coin.balanceWithDecimals(suiFrenVault.globalFees, feeCoinDecimals);
|
|
454
|
+
const globalFeesUsd = feeCoinPrice * globalFeesWithDecimals;
|
|
455
|
+
const breedingFeesGlobal = {
|
|
456
|
+
amount: globalFeesWithDecimals,
|
|
457
|
+
amountUsd: globalFeesUsd,
|
|
458
|
+
};
|
|
459
|
+
return {
|
|
460
|
+
bredSuiFrens: suiFrenVault.bredSuiFrens,
|
|
461
|
+
stakedSuiFrens: suiFrenVault.stakedSuiFrens,
|
|
462
|
+
breedingFeesGlobal,
|
|
463
|
+
};
|
|
464
|
+
});
|
|
465
|
+
// =========================================================================
|
|
466
|
+
// SuiFren Attribute Filtering
|
|
467
|
+
// =========================================================================
|
|
468
|
+
this.filterSuiFrensWithAttributes = (suiFrens, attributes) => suiFrens.filter((suiFren) => attributes.every((attribute) => suiFren.fields.attributes.some((suiFrenAttribute) => suiFrenAttribute.name === attribute.name &&
|
|
469
|
+
suiFrenAttribute.value === attribute.value)));
|
|
470
|
+
// =========================================================================
|
|
471
|
+
// Helpers
|
|
472
|
+
// =========================================================================
|
|
473
|
+
this.isStakedSuiFrenReceiptObjectType = (suiObjectInfo) => suiObjectInfo.type === this.objectTypes.stakedSuiFrenReceiptObjectType;
|
|
474
|
+
this.isSuiFrenObjectType = (suiObjectInfo) => suiObjectInfo.type === this.objectTypes.suiFrenObjectType;
|
|
475
|
+
// =========================================================================
|
|
476
|
+
// Private Methods
|
|
477
|
+
// =========================================================================
|
|
478
|
+
// =========================================================================
|
|
479
|
+
// Event Types
|
|
480
|
+
// =========================================================================
|
|
481
|
+
this.suiFrenBornEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.suiFren, SuiFrensApi.constants.suiFren.modules.suiFren.moduleName, SuiFrensApi.constants.eventNames.suiFrenBorn);
|
|
482
|
+
this.breedSuiFrensEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.eventNames.breedSuiFren);
|
|
483
|
+
this.stakeSuiFrenEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.eventNames.stakeSuiFren);
|
|
484
|
+
this.unstakeSuiFrenEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.suiFrenVault, SuiFrensApi.constants.suiFrenVault.modules.interface.moduleName, SuiFrensApi.constants.eventNames.unstakeSuiFren);
|
|
485
|
+
const addresses = this.Provider.addresses.suiFrens;
|
|
486
|
+
if (!addresses)
|
|
487
|
+
throw new Error("not all required addresses have been set in provider");
|
|
488
|
+
this.addresses = addresses;
|
|
489
|
+
this.objectTypes = {
|
|
490
|
+
suiFrenObjectType: `${addresses.packages.suiFren}::suiFren::SuiFren`,
|
|
491
|
+
stakedSuiFrenReceiptObjectType: `${addresses.packages.suiFrenVault}::suiFren_vault::StakingReceipt`,
|
|
492
|
+
};
|
|
493
|
+
this.eventTypes = {
|
|
494
|
+
suiFrenBorn: this.suiFrenBornEventType(),
|
|
495
|
+
breedSuiFrens: this.breedSuiFrensEventType(),
|
|
496
|
+
stakeSuiFren: this.stakeSuiFrenEventType(),
|
|
497
|
+
unstakeSuiFren: this.unstakeSuiFrenEventType(),
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
exports.SuiFrensApi = SuiFrensApi;
|
|
502
|
+
// =========================================================================
|
|
503
|
+
// Constants
|
|
504
|
+
// =========================================================================
|
|
505
|
+
SuiFrensApi.constants = {
|
|
506
|
+
suiFren: {
|
|
507
|
+
modules: {
|
|
508
|
+
suiFren: {
|
|
509
|
+
moduleName: "suiFren",
|
|
510
|
+
},
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
suiFrenVault: {
|
|
514
|
+
modules: {
|
|
515
|
+
interface: {
|
|
516
|
+
moduleName: "interface",
|
|
517
|
+
functions: {
|
|
518
|
+
stakeSuiFren: {
|
|
519
|
+
name: "stake_suiFren",
|
|
520
|
+
},
|
|
521
|
+
unstakeSuiFren: {
|
|
522
|
+
name: "unstake_suiFren",
|
|
523
|
+
},
|
|
524
|
+
withdrawFees: {
|
|
525
|
+
name: "withdraw_fees",
|
|
526
|
+
},
|
|
527
|
+
withdrawFeesAmount: {
|
|
528
|
+
name: "withdraw_fees_amount",
|
|
529
|
+
},
|
|
530
|
+
breedAndKeep: {
|
|
531
|
+
name: "breed_and_keep",
|
|
532
|
+
},
|
|
533
|
+
breedWithStakedAndKeep: {
|
|
534
|
+
name: "breed_with_staked_and_keep",
|
|
535
|
+
},
|
|
536
|
+
breedStakedWithStakedAndKeep: {
|
|
537
|
+
name: "breed_staked_with_staked_and_keep",
|
|
538
|
+
},
|
|
539
|
+
transfer: {
|
|
540
|
+
name: "transfer",
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
suiFrenVault: {
|
|
545
|
+
moduleName: "suiFren_vault",
|
|
546
|
+
functions: {
|
|
547
|
+
feesEarnedIndividual: {
|
|
548
|
+
name: "fees_earned_individual",
|
|
549
|
+
},
|
|
550
|
+
feesEarnedGlobal: {
|
|
551
|
+
name: "fees_earned_global",
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
},
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
eventNames: {
|
|
558
|
+
suiFrenBorn: "SuiFrenBorn",
|
|
559
|
+
breedSuiFren: "BreedSuiFrenEvent",
|
|
560
|
+
stakeSuiFren: "StakeSuiFrenEvent",
|
|
561
|
+
unstakeSuiFren: "UnstakeSuiFrenEvent",
|
|
562
|
+
withdrawFees: "WithdrawFeesEvent",
|
|
563
|
+
},
|
|
564
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SuiObjectResponse } from "@mysten/sui.js";
|
|
2
|
+
import { BreedSuiFrensEvent, SuiFrenBornEvent, SuiFrenObject, SuiFrenVaultObject, StakeSuiFrenEvent, StakedSuiFrenReceiptObject, UnstakeSuiFrenEvent } from "../suiFrensTypes";
|
|
3
|
+
import { BreedSuiFrenEventOnChain as BreedSuiFrensEventOnChain, SuiFrenBornEventOnChain, StakeSuiFrenEventOnChain, UnstakeSuiFrenEventOnChain } from "./suiFrensApiCastingTypes";
|
|
4
|
+
export declare class SuiFrensApiCasting {
|
|
5
|
+
static suiFrenObjectFromSuiObjectResponse: (data: SuiObjectResponse) => SuiFrenObject;
|
|
6
|
+
static stakedSuiFrenReceiptObjectFromSuiObjectResponse: (data: SuiObjectResponse) => StakedSuiFrenReceiptObject;
|
|
7
|
+
static suiFrenVaultObjectFromSuiObjectResponse: (data: SuiObjectResponse) => SuiFrenVaultObject;
|
|
8
|
+
static suiFrenBornEventFromOnChain: (eventOnChain: SuiFrenBornEventOnChain) => SuiFrenBornEvent;
|
|
9
|
+
static breedSuiFrensEventFromOnChain: (eventOnChain: BreedSuiFrensEventOnChain) => BreedSuiFrensEvent;
|
|
10
|
+
static stakeSuiFrenEventFromOnChain: (eventOnChain: StakeSuiFrenEventOnChain) => StakeSuiFrenEvent;
|
|
11
|
+
static unstakeSuiFrenEventFromOnChain: (eventOnChain: UnstakeSuiFrenEventOnChain) => UnstakeSuiFrenEvent;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=suiFrensApiCasting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suiFrensApiCasting.d.ts","sourceRoot":"","sources":["../../../../src/packages/suiFrens/api/suiFrensApiCasting.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EAGjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,wBAAwB,IAAI,yBAAyB,EACrD,uBAAuB,EAGvB,wBAAwB,EAExB,0BAA0B,EAC1B,MAAM,2BAA2B,CAAC;AAGnC,qBAAa,kBAAkB;IAK9B,OAAc,kCAAkC,SACzC,iBAAiB,KACrB,aAAa,CAgBd;IAEF,OAAc,+CAA+C,SACtD,iBAAiB,KACrB,0BAA0B,CAS3B;IAgBF,OAAc,uCAAuC,SAC9C,iBAAiB,KACrB,kBAAkB,CASnB;IAMF,OAAc,2BAA2B,6CAEtC,gBAAgB,CAWjB;IAEF,OAAc,6BAA6B,+CAExC,kBAAkB,CAenB;IAEF,OAAc,4BAA4B,8CAEvC,iBAAiB,CAWlB;IAEF,OAAc,8BAA8B,gDAEzC,mBAAmB,CASpB;CACF"}
|