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
|
@@ -70,7 +70,7 @@ CmmmCalculations.calcInvariant = (pool) => {
|
|
|
70
70
|
let balance;
|
|
71
71
|
let weight;
|
|
72
72
|
for (let coin of Object.values(pool.coins)) {
|
|
73
|
-
balance = fixed_1.Fixed.
|
|
73
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
74
74
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
75
75
|
sum += weight * balance;
|
|
76
76
|
prod += weight * Math.log(balance);
|
|
@@ -104,7 +104,7 @@ CmmmCalculations.calcInvariantComponents = (pool, index) => {
|
|
|
104
104
|
let p;
|
|
105
105
|
let s;
|
|
106
106
|
for (let [coinType, coin] of Object.entries(pool.coins)) {
|
|
107
|
-
balance = fixed_1.Fixed.
|
|
107
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
108
108
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
109
109
|
p = weight * Math.log(balance);
|
|
110
110
|
s = weight * balance;
|
|
@@ -133,8 +133,8 @@ CmmmCalculations.calcSpotPriceWithFees = (pool, coinTypeIn, coinTypeOut, ignoreF
|
|
|
133
133
|
let part1 = CmmmCalculations.calcSpotPriceBody(pool);
|
|
134
134
|
let coinIn = pool.coins[coinTypeIn];
|
|
135
135
|
let coinOut = pool.coins[coinTypeOut];
|
|
136
|
-
let balanceIn = fixed_1.Fixed.
|
|
137
|
-
let balanceOut = fixed_1.Fixed.
|
|
136
|
+
let balanceIn = fixed_1.Fixed.directCast(coinIn.normalizedBalance);
|
|
137
|
+
let balanceOut = fixed_1.Fixed.directCast(coinOut.normalizedBalance);
|
|
138
138
|
let weightIn = fixed_1.Fixed.directCast(coinIn.weight);
|
|
139
139
|
let weightOut = fixed_1.Fixed.directCast(coinOut.weight);
|
|
140
140
|
let swapFeeIn = ignoreFees ? 0 : fixed_1.Fixed.directCast(coinIn.tradeFeeIn);
|
|
@@ -157,7 +157,7 @@ CmmmCalculations.calcSpotPriceBody = (pool) => {
|
|
|
157
157
|
// The spot price formula requires knowing the value of the invariant. We need the prod and sum parts
|
|
158
158
|
// also later on so no need to compute them twice by calling calcInvariant, just evaluate here.
|
|
159
159
|
for (let coin of Object.values(pool.coins)) {
|
|
160
|
-
balance = fixed_1.Fixed.
|
|
160
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
161
161
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
162
162
|
prod += weight * Math.log(balance);
|
|
163
163
|
sum += weight * balance;
|
|
@@ -179,11 +179,12 @@ CmmmCalculations.calcOutGivenIn = (pool, coinTypeIn, coinTypeOut, amountIn) => {
|
|
|
179
179
|
return BigInt(0);
|
|
180
180
|
}
|
|
181
181
|
let flatness = fixed_1.Fixed.directCast(pool.flatness);
|
|
182
|
-
let oldIn = fixed_1.Fixed.
|
|
183
|
-
let oldOut = fixed_1.Fixed.
|
|
182
|
+
let oldIn = fixed_1.Fixed.directCast(coinIn.normalizedBalance);
|
|
183
|
+
let oldOut = fixed_1.Fixed.directCast(coinOut.normalizedBalance);
|
|
184
184
|
let wIn = fixed_1.Fixed.directCast(coinIn.weight);
|
|
185
185
|
let [prod, _sum, p0, s0, h] = CmmmCalculations.calcInvariantComponents(pool, coinTypeOut);
|
|
186
|
-
let feedAmountIn = (1 - swapFeeIn) *
|
|
186
|
+
let feedAmountIn = (1 - swapFeeIn) *
|
|
187
|
+
fixed_1.Fixed.castAndNormalize(coinIn.decimalsScalar, amountIn);
|
|
187
188
|
let newIn = oldIn + feedAmountIn;
|
|
188
189
|
let prodRatio = Math.pow(newIn / oldIn, wIn);
|
|
189
190
|
let newP0 = p0 * prodRatio;
|
|
@@ -195,7 +196,7 @@ CmmmCalculations.calcOutGivenIn = (pool, coinTypeIn, coinTypeOut, amountIn) => {
|
|
|
195
196
|
newP0, // P(B) / xi^(1/n) (everything but the missing part)
|
|
196
197
|
newS0 // S(B) - xi / n (everything but the missing part)
|
|
197
198
|
);
|
|
198
|
-
let amountOut = fixed_1.Fixed.
|
|
199
|
+
let amountOut = fixed_1.Fixed.uncastAndUnnormalize(coinOut.decimalsScalar, (oldOut - tokenAmountOut) * (1 - swapFeeOut));
|
|
199
200
|
if (!CmmmCalculations.checkValid1dSwap(pool, coinTypeIn, coinTypeOut, amountIn, amountOut))
|
|
200
201
|
throw Error("invalid 1d swap");
|
|
201
202
|
return amountOut;
|
|
@@ -215,11 +216,12 @@ CmmmCalculations.calcInGivenOut = (pool, coinTypeIn, coinTypeOut, amountOut) =>
|
|
|
215
216
|
throw Error("this swap is disabled");
|
|
216
217
|
}
|
|
217
218
|
let flatness = fixed_1.Fixed.directCast(pool.flatness);
|
|
218
|
-
let oldIn = fixed_1.Fixed.
|
|
219
|
-
let oldOut = fixed_1.Fixed.
|
|
219
|
+
let oldIn = fixed_1.Fixed.directCast(coinIn.normalizedBalance);
|
|
220
|
+
let oldOut = fixed_1.Fixed.directCast(coinOut.normalizedBalance);
|
|
220
221
|
let wOut = fixed_1.Fixed.directCast(coinOut.weight);
|
|
221
222
|
let [prod, _sum, p0, s0, h] = CmmmCalculations.calcInvariantComponents(pool, coinTypeIn);
|
|
222
|
-
let feedAmountOut = fixed_1.Fixed.
|
|
223
|
+
let feedAmountOut = fixed_1.Fixed.castAndNormalize(coinIn.decimalsScalar, amountOut) /
|
|
224
|
+
(1 - swapFeeOut);
|
|
223
225
|
let newOut = oldOut - feedAmountOut;
|
|
224
226
|
let prodRatio = Math.pow(newOut / oldOut, wOut);
|
|
225
227
|
let newP0 = p0 * prodRatio;
|
|
@@ -231,7 +233,7 @@ CmmmCalculations.calcInGivenOut = (pool, coinTypeIn, coinTypeOut, amountOut) =>
|
|
|
231
233
|
newP0, // P(B) / xi^(1/n) (everything but the missing part)
|
|
232
234
|
newS0 // S(B) - xi / n (everything but the missing part)
|
|
233
235
|
);
|
|
234
|
-
let amountIn = fixed_1.Fixed.
|
|
236
|
+
let amountIn = fixed_1.Fixed.uncastAndUnnormalize(coinOut.decimalsScalar, (tokenAmountIn - oldIn) / (1 - swapFeeIn));
|
|
235
237
|
if (!CmmmCalculations.checkValid1dSwap(pool, coinTypeIn, coinTypeOut, amountIn, amountOut))
|
|
236
238
|
throw Error("invalid 1d swap");
|
|
237
239
|
return amountIn;
|
|
@@ -267,7 +269,7 @@ CmmmCalculations.calcSwapFixedIn = (pool, amountsIn, amountsOutDirection) => {
|
|
|
267
269
|
let shifter = 1;
|
|
268
270
|
// make sure no disabled coin type is expected
|
|
269
271
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
270
|
-
amountOut = fixed_1.Fixed.
|
|
272
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutDirection[coinType] || BigInt(0));
|
|
271
273
|
feeOut = fixed_1.Fixed.complement(fixed_1.Fixed.directCast(coin.tradeFeeOut));
|
|
272
274
|
if (amountOut > 0) {
|
|
273
275
|
if (feeOut == 0) {
|
|
@@ -276,8 +278,8 @@ CmmmCalculations.calcSwapFixedIn = (pool, amountsIn, amountsOutDirection) => {
|
|
|
276
278
|
else {
|
|
277
279
|
// pool is drained when b + Ain * (1 - Sin) - t * Aout / (1 - Sout) = 0, or t = (b + Ain * (1 - Sin)) * (1 - So) / Aout
|
|
278
280
|
t =
|
|
279
|
-
((fixed_1.Fixed.
|
|
280
|
-
fixed_1.Fixed.
|
|
281
|
+
((fixed_1.Fixed.directCast(coin.normalizedBalance) +
|
|
282
|
+
fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0)) *
|
|
281
283
|
fixed_1.Fixed.complement(fixed_1.Fixed.directCast(coin.tradeFeeIn))) /
|
|
282
284
|
amountOut) *
|
|
283
285
|
feeOut;
|
|
@@ -298,10 +300,10 @@ CmmmCalculations.calcSwapFixedIn = (pool, amountsIn, amountsOutDirection) => {
|
|
|
298
300
|
sum1 = 0;
|
|
299
301
|
skip = false;
|
|
300
302
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
301
|
-
balance = fixed_1.Fixed.
|
|
303
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
302
304
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
303
|
-
amountIn = fixed_1.Fixed.
|
|
304
|
-
amountOut = fixed_1.Fixed.
|
|
305
|
+
amountIn = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
306
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutDirection[coinType] || BigInt(0));
|
|
305
307
|
feeIn = fixed_1.Fixed.complement(fixed_1.Fixed.directCast(coin.tradeFeeIn));
|
|
306
308
|
feeOut = fixed_1.Fixed.complement(fixed_1.Fixed.directCast(coin.tradeFeeOut));
|
|
307
309
|
// pseudoin
|
|
@@ -377,10 +379,10 @@ CmmmCalculations.calcSwapFixedOut = (pool, amountsInDirection, amountsOut) => {
|
|
|
377
379
|
sum = 0;
|
|
378
380
|
sum1 = 0;
|
|
379
381
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
380
|
-
balance = fixed_1.Fixed.
|
|
382
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
381
383
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
382
|
-
amountIn = fixed_1.Fixed.
|
|
383
|
-
amountOut = fixed_1.Fixed.
|
|
384
|
+
amountIn = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsInDirection[coinType] || BigInt(0));
|
|
385
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOut[coinType] || BigInt(0));
|
|
384
386
|
feeIn = 1 - fixed_1.Fixed.directCast(coin.tradeFeeIn);
|
|
385
387
|
feeOut = 1 - fixed_1.Fixed.directCast(coin.tradeFeeOut);
|
|
386
388
|
// pseudoin expected
|
|
@@ -429,8 +431,8 @@ CmmmCalculations.calcDepositFixedAmounts = (pool, amountsIn) => {
|
|
|
429
431
|
let prevR = r;
|
|
430
432
|
let fees = {};
|
|
431
433
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
432
|
-
balance = fixed_1.Fixed.
|
|
433
|
-
amount = fixed_1.Fixed.
|
|
434
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
435
|
+
amount = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
434
436
|
fees[coinType] =
|
|
435
437
|
r * (balance + amount) >= balance
|
|
436
438
|
? 1 - fixed_1.Fixed.directCast(coin.tradeFeeIn)
|
|
@@ -450,9 +452,9 @@ CmmmCalculations.calcDepositFixedAmounts = (pool, amountsIn) => {
|
|
|
450
452
|
sum = 0;
|
|
451
453
|
sum1 = 0;
|
|
452
454
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
453
|
-
balance = fixed_1.Fixed.
|
|
455
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
454
456
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
455
|
-
amount = fixed_1.Fixed.
|
|
457
|
+
amount = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
456
458
|
fee = fees[coinType];
|
|
457
459
|
part1 = balance + amount;
|
|
458
460
|
part2 = fee * r * part1 + balance - fee * balance;
|
|
@@ -497,15 +499,17 @@ CmmmCalculations.calcDepositFixedAmountsInitialEstimate = (pool, amountsIn) => {
|
|
|
497
499
|
let part1;
|
|
498
500
|
// start cf_max as corresponding to r = 1
|
|
499
501
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
500
|
-
balance = fixed_1.Fixed.
|
|
501
|
-
amount = fixed_1.Fixed.
|
|
502
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
503
|
+
amount = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
502
504
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
503
505
|
// this is all in so use fees in
|
|
504
506
|
part1 = balance + (1 - fixed_1.Fixed.directCast(coin.tradeFeeIn)) * amount;
|
|
505
507
|
prod += weight * Math.log(part1);
|
|
506
508
|
sum += weight * part1;
|
|
507
509
|
// r_min portion of the loop
|
|
508
|
-
r =
|
|
510
|
+
r =
|
|
511
|
+
(fixed_1.Fixed.directCast(coin.tradeFeeOut) * balance) /
|
|
512
|
+
(balance + amount);
|
|
509
513
|
rMin = Math.max(r, rMin);
|
|
510
514
|
}
|
|
511
515
|
prod = Math.exp(prod);
|
|
@@ -513,18 +517,18 @@ CmmmCalculations.calcDepositFixedAmountsInitialEstimate = (pool, amountsIn) => {
|
|
|
513
517
|
let rMax = 1;
|
|
514
518
|
let cf;
|
|
515
519
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
516
|
-
balance = fixed_1.Fixed.
|
|
520
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
517
521
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
518
|
-
amount = fixed_1.Fixed.
|
|
522
|
+
amount = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
519
523
|
r = balance / (balance + amount);
|
|
520
524
|
if (r <= rMin)
|
|
521
525
|
continue;
|
|
522
526
|
prod = 0;
|
|
523
527
|
sum = 0;
|
|
524
528
|
for (let [coinType2, coin2] of Object.entries(coins)) {
|
|
525
|
-
balance = fixed_1.Fixed.
|
|
529
|
+
balance = fixed_1.Fixed.directCast(coin2.normalizedBalance);
|
|
526
530
|
weight = fixed_1.Fixed.directCast(coin2.weight);
|
|
527
|
-
amount = fixed_1.Fixed.
|
|
531
|
+
amount = fixed_1.Fixed.castAndNormalize(coin2.decimalsScalar, amountsIn[coinType2] || BigInt(0));
|
|
528
532
|
part1 = r * (balance + amount);
|
|
529
533
|
if (part1 >= balance) {
|
|
530
534
|
// r * (B0 + Din) >= B0 so use fees in
|
|
@@ -536,8 +540,9 @@ CmmmCalculations.calcDepositFixedAmountsInitialEstimate = (pool, amountsIn) => {
|
|
|
536
540
|
else {
|
|
537
541
|
// r * (B0 + Din) < B0 so use fees out
|
|
538
542
|
part1 =
|
|
539
|
-
balance -
|
|
540
|
-
|
|
543
|
+
balance -
|
|
544
|
+
(balance - part1) /
|
|
545
|
+
fixed_1.Fixed.complement(fixed_1.Fixed.directCast(coin.tradeFeeOut));
|
|
541
546
|
}
|
|
542
547
|
prod += weight * Math.log(part1);
|
|
543
548
|
sum += weight * part1;
|
|
@@ -596,8 +601,8 @@ CmmmCalculations.calcWithdrawFlpAmountsOut = (pool, amountsOutDirection, lpRatio
|
|
|
596
601
|
shrinker /= 2;
|
|
597
602
|
let fees = {};
|
|
598
603
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
599
|
-
balance = fixed_1.Fixed.
|
|
600
|
-
amountOut = fixed_1.Fixed.
|
|
604
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
605
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutDirection[coinType] || BigInt(0));
|
|
601
606
|
fees[coinType] =
|
|
602
607
|
balance * lpc >= r * amountOut
|
|
603
608
|
? 1 - fixed_1.Fixed.directCast(coin.tradeFeeIn)
|
|
@@ -611,9 +616,9 @@ CmmmCalculations.calcWithdrawFlpAmountsOut = (pool, amountsOutDirection, lpRatio
|
|
|
611
616
|
sum1 = 0;
|
|
612
617
|
skip = false;
|
|
613
618
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
614
|
-
balance = fixed_1.Fixed.
|
|
619
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
615
620
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
616
|
-
amountOut = fixed_1.Fixed.
|
|
621
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutDirection[coinType] || BigInt(0));
|
|
617
622
|
fee = fees[coinType];
|
|
618
623
|
part1 = balance * (lpr + lpc * fee);
|
|
619
624
|
part2 = fee * r * amountOut;
|
|
@@ -651,8 +656,8 @@ CmmmCalculations.calcWithdrawFlpAmountsOut = (pool, amountsOutDirection, lpRatio
|
|
|
651
656
|
if (utils_1.Helpers.closeEnough(r, prevR, CmmmCalculations.convergenceBound)) {
|
|
652
657
|
let returner = {};
|
|
653
658
|
for (let coinType of Object.keys(coins)) {
|
|
654
|
-
returner[coinType] = fixed_1.Fixed.
|
|
655
|
-
fixed_1.Fixed.
|
|
659
|
+
returner[coinType] = fixed_1.Fixed.directUncast(r *
|
|
660
|
+
fixed_1.Fixed.directCast(amountsOutDirection[coinType] || BigInt(0)));
|
|
656
661
|
}
|
|
657
662
|
if (!CmmmCalculations.checkValidWithdraw(pool, returner, lpRatio))
|
|
658
663
|
throw Error("invalid withdraw");
|
|
@@ -693,7 +698,7 @@ CmmmCalculations.calcWithdrawFlpAmountsOutInitialEstimate = (pool, amountsOutDir
|
|
|
693
698
|
prod = 0;
|
|
694
699
|
sum = 0;
|
|
695
700
|
for (let coin of Object.values(coins)) {
|
|
696
|
-
balance = fixed_1.Fixed.
|
|
701
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
697
702
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
698
703
|
fee = fixed_1.Fixed.directCast(coin.tradeFeeIn);
|
|
699
704
|
part1 = balance * (1 + lpr * fee - fee);
|
|
@@ -706,11 +711,11 @@ CmmmCalculations.calcWithdrawFlpAmountsOutInitialEstimate = (pool, amountsOutDir
|
|
|
706
711
|
cfMin = 0;
|
|
707
712
|
tMin = Number.POSITIVE_INFINITY;
|
|
708
713
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
709
|
-
amountOut = fixed_1.Fixed.
|
|
714
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutDirection[coinType] || BigInt(0));
|
|
710
715
|
if (amountOut == 0)
|
|
711
716
|
continue;
|
|
712
717
|
t =
|
|
713
|
-
(fixed_1.Fixed.
|
|
718
|
+
(fixed_1.Fixed.directCast(coin.normalizedBalance) *
|
|
714
719
|
fixed_1.Fixed.complement(fixed_1.Fixed.directCast(coin.tradeFeeOut) * lpRatio)) /
|
|
715
720
|
amountOut;
|
|
716
721
|
if (t < tMin)
|
|
@@ -719,18 +724,18 @@ CmmmCalculations.calcWithdrawFlpAmountsOutInitialEstimate = (pool, amountsOutDir
|
|
|
719
724
|
tDrain = tMin;
|
|
720
725
|
// remaining test points are the CF discontinuities: where B0 - t*D = R*B0
|
|
721
726
|
for (let [coinTypeT, coinT] of Object.entries(coins)) {
|
|
722
|
-
amountOut = fixed_1.Fixed.
|
|
727
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coinT.decimalsScalar, amountsOutDirection[coinTypeT] || BigInt(0));
|
|
723
728
|
if (amountOut == 0)
|
|
724
729
|
continue;
|
|
725
|
-
balance = fixed_1.Fixed.
|
|
730
|
+
balance = fixed_1.Fixed.directCast(coinT.normalizedBalance);
|
|
726
731
|
t = (balance * lpc) / amountOut;
|
|
727
732
|
prod = 0;
|
|
728
733
|
sum = 0;
|
|
729
734
|
keepT = true;
|
|
730
735
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
731
|
-
balance = fixed_1.Fixed.
|
|
736
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
732
737
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
733
|
-
amountOut = fixed_1.Fixed.
|
|
738
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutDirection[coinType] || BigInt(0));
|
|
734
739
|
part1 = t * amountOut;
|
|
735
740
|
if (part1 >= balance) {
|
|
736
741
|
// this t is too large to be a bound because B0 - t*D overdraws the pool
|
|
@@ -792,8 +797,8 @@ CmmmCalculations.calcAllCoinDeposit = (pool, amountsIn) => {
|
|
|
792
797
|
let s;
|
|
793
798
|
let sMin = Number.POSITIVE_INFINITY;
|
|
794
799
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
795
|
-
balance = fixed_1.Fixed.
|
|
796
|
-
amountIn = fixed_1.Fixed.
|
|
800
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
801
|
+
amountIn = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
797
802
|
s = amountIn / balance;
|
|
798
803
|
if (s < sMin)
|
|
799
804
|
sMin = s;
|
|
@@ -815,8 +820,8 @@ CmmmCalculations.calcAllCoinWithdraw = (pool, amountsOut) => {
|
|
|
815
820
|
let s;
|
|
816
821
|
let sMax = 0;
|
|
817
822
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
818
|
-
balance = fixed_1.Fixed.
|
|
819
|
-
amountOut = fixed_1.Fixed.
|
|
823
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
824
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOut[coinType] || BigInt(0));
|
|
820
825
|
s = amountOut / balance;
|
|
821
826
|
if (s > sMax)
|
|
822
827
|
sMax = s;
|
|
@@ -934,14 +939,12 @@ CmmmCalculations.checkValidSwap = (pool, amountsIn, amountsInScalar, amountsOut,
|
|
|
934
939
|
let postprod = 0;
|
|
935
940
|
let postsum = 0;
|
|
936
941
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
937
|
-
balance = fixed_1.Fixed.
|
|
942
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
938
943
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
939
944
|
amountIn =
|
|
940
|
-
fixed_1.Fixed.
|
|
941
|
-
amountsInScalar;
|
|
945
|
+
fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0)) * amountsInScalar;
|
|
942
946
|
amountOut =
|
|
943
|
-
fixed_1.Fixed.
|
|
944
|
-
amountsOutScalar;
|
|
947
|
+
fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOut[coinType] || BigInt(0)) * amountsOutScalar;
|
|
945
948
|
if (amountIn > 0 && amountOut > 0)
|
|
946
949
|
return false;
|
|
947
950
|
feedAmountIn = amountIn * (1 - fixed_1.Fixed.directCast(coin.tradeFeeIn));
|
|
@@ -981,6 +984,8 @@ CmmmCalculations.checkValid1dSwap = (pool, coinTypeIn, coinTypeOut, amountInB, a
|
|
|
981
984
|
if (coinTypeIn == coinTypeOut)
|
|
982
985
|
return false;
|
|
983
986
|
let coins = pool.coins;
|
|
987
|
+
let coinIn = coins[coinTypeIn];
|
|
988
|
+
let coinOut = coins[coinTypeOut];
|
|
984
989
|
let flatness = fixed_1.Fixed.directCast(pool.flatness);
|
|
985
990
|
// balance = balances[i]
|
|
986
991
|
let balance;
|
|
@@ -989,13 +994,12 @@ CmmmCalculations.checkValid1dSwap = (pool, coinTypeIn, coinTypeOut, amountInB, a
|
|
|
989
994
|
// postbalance = balance + amount in - amount out
|
|
990
995
|
let postbalance;
|
|
991
996
|
let weight;
|
|
992
|
-
let amountIn = fixed_1.Fixed.
|
|
993
|
-
let amountOut = fixed_1.Fixed.
|
|
994
|
-
let feedAmountIn = amountIn * (1 - fixed_1.Fixed.directCast(
|
|
997
|
+
let amountIn = fixed_1.Fixed.castAndNormalize(coinIn.decimalsScalar, amountInB);
|
|
998
|
+
let amountOut = fixed_1.Fixed.castAndNormalize(coinOut.decimalsScalar, amountOutB);
|
|
999
|
+
let feedAmountIn = amountIn * (1 - fixed_1.Fixed.directCast(coinIn.tradeFeeIn));
|
|
995
1000
|
let feedAmountOut = amountOut == 0
|
|
996
1001
|
? 0
|
|
997
|
-
: amountOut /
|
|
998
|
-
(1 - fixed_1.Fixed.directCast(coins[coinTypeOut].tradeFeeOut));
|
|
1002
|
+
: amountOut / (1 - fixed_1.Fixed.directCast(coinOut.tradeFeeOut));
|
|
999
1003
|
let preprod = 0;
|
|
1000
1004
|
let presum = 0;
|
|
1001
1005
|
let pseudoprod = 0;
|
|
@@ -1005,7 +1009,7 @@ CmmmCalculations.checkValid1dSwap = (pool, coinTypeIn, coinTypeOut, amountInB, a
|
|
|
1005
1009
|
let p;
|
|
1006
1010
|
let s;
|
|
1007
1011
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
1008
|
-
balance = fixed_1.Fixed.
|
|
1012
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
1009
1013
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
1010
1014
|
p = weight * Math.log(balance);
|
|
1011
1015
|
s = weight * balance;
|
|
@@ -1078,9 +1082,9 @@ CmmmCalculations.checkValidDeposit = (pool, amountsIn, lpRatioRaw) => {
|
|
|
1078
1082
|
let postprod = 0;
|
|
1079
1083
|
let postsum = 0;
|
|
1080
1084
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
1081
|
-
balance = fixed_1.Fixed.
|
|
1085
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
1082
1086
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
1083
|
-
amount = fixed_1.Fixed.
|
|
1087
|
+
amount = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
1084
1088
|
postbalance = lpRatio * (balance + amount);
|
|
1085
1089
|
if (postbalance >= balance) {
|
|
1086
1090
|
// use fee in
|
|
@@ -1144,10 +1148,10 @@ CmmmCalculations.checkValidWithdraw = (pool, amountsOutSrc, lpRatio) => {
|
|
|
1144
1148
|
let postprod = 0;
|
|
1145
1149
|
let postsum = 0;
|
|
1146
1150
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
1147
|
-
balance = fixed_1.Fixed.
|
|
1151
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
1148
1152
|
scaledBalance = lpRatio * balance;
|
|
1149
1153
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
1150
|
-
amount = fixed_1.Fixed.
|
|
1154
|
+
amount = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutSrc[coinType] || BigInt(0));
|
|
1151
1155
|
if (amount > scaledBalance + 1)
|
|
1152
1156
|
return false;
|
|
1153
1157
|
postbalance = balance - amount;
|
|
@@ -1210,9 +1214,9 @@ CmmmCalculations.getEstimateSwapFixedIn = (pool, amountsIn, amountsOutDirection)
|
|
|
1210
1214
|
let inDotGrad = 0;
|
|
1211
1215
|
let outDotGrad = 0;
|
|
1212
1216
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
1213
|
-
balance = fixed_1.Fixed.
|
|
1214
|
-
amountIn = fixed_1.Fixed.
|
|
1215
|
-
amountOut = fixed_1.Fixed.
|
|
1217
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
1218
|
+
amountIn = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
1219
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutDirection[coinType] || BigInt(0));
|
|
1216
1220
|
grad =
|
|
1217
1221
|
amountIn == 0
|
|
1218
1222
|
? (fixed_1.Fixed.directCast(coin.weight) *
|
|
@@ -1245,9 +1249,9 @@ CmmmCalculations.getEstimateSwapFixedOut = (pool, amountsInDirection, amountsOut
|
|
|
1245
1249
|
let inDotGrad = 0;
|
|
1246
1250
|
let outDotGrad = 0;
|
|
1247
1251
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
1248
|
-
balance = fixed_1.Fixed.
|
|
1249
|
-
amountIn = fixed_1.Fixed.
|
|
1250
|
-
amountOut = fixed_1.Fixed.
|
|
1252
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
1253
|
+
amountIn = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsInDirection[coinType] || BigInt(0));
|
|
1254
|
+
amountOut = fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOut[coinType] || BigInt(0));
|
|
1251
1255
|
grad =
|
|
1252
1256
|
amountIn == 0
|
|
1253
1257
|
? (fixed_1.Fixed.directCast(coin.weight) *
|
|
@@ -1287,11 +1291,11 @@ CmmmCalculations.getEstimateDepositFixedAmounts = (pool, amountsIn) => {
|
|
|
1287
1291
|
let grad;
|
|
1288
1292
|
let scaledAmount;
|
|
1289
1293
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
1290
|
-
balance = fixed_1.Fixed.
|
|
1294
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
1291
1295
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
1292
1296
|
amount =
|
|
1293
1297
|
balance +
|
|
1294
|
-
fixed_1.Fixed.
|
|
1298
|
+
fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsIn[coinType] || BigInt(0));
|
|
1295
1299
|
scaledAmount = amount * r0;
|
|
1296
1300
|
grad =
|
|
1297
1301
|
scaledAmount < balance
|
|
@@ -1335,11 +1339,11 @@ CmmmCalculations.getEstimateWithdrawFlpAmountsOut = (pool, amountsOutDirection,
|
|
|
1335
1339
|
let amount;
|
|
1336
1340
|
let grad;
|
|
1337
1341
|
for (let [coinType, coin] of Object.entries(coins)) {
|
|
1338
|
-
balance = fixed_1.Fixed.
|
|
1342
|
+
balance = fixed_1.Fixed.directCast(coin.normalizedBalance);
|
|
1339
1343
|
weight = fixed_1.Fixed.directCast(coin.weight);
|
|
1340
1344
|
amount =
|
|
1341
1345
|
balance +
|
|
1342
|
-
fixed_1.Fixed.
|
|
1346
|
+
fixed_1.Fixed.castAndNormalize(coin.decimalsScalar, amountsOutDirection[coinType] || BigInt(0));
|
|
1343
1347
|
scaledAmount = amount * r0;
|
|
1344
1348
|
grad =
|
|
1345
1349
|
scaledAmount < balance
|
|
@@ -1,11 +1,173 @@
|
|
|
1
|
-
import { SuiAddress } from "@mysten/sui.js";
|
|
1
|
+
import { SuiAddress, TransactionBlock } from "@mysten/sui.js";
|
|
2
2
|
import { AftermathApi } from "../../../general/providers/aftermathApi";
|
|
3
|
-
import { Balance, CoinType } from "../../../types";
|
|
4
|
-
import { ReferralVaultApiHelpers } from "./referralVaultApiHelpers";
|
|
3
|
+
import { Balance, CoinType, ReferralVaultAddresses } from "../../../types";
|
|
5
4
|
export declare class ReferralVaultApi {
|
|
6
5
|
private readonly Provider;
|
|
7
|
-
readonly
|
|
6
|
+
private static readonly constants;
|
|
7
|
+
readonly addresses: ReferralVaultAddresses;
|
|
8
8
|
constructor(Provider: AftermathApi);
|
|
9
|
+
updateReferrerTx: (inputs: {
|
|
10
|
+
tx: TransactionBlock;
|
|
11
|
+
referrer: SuiAddress;
|
|
12
|
+
}) => ({
|
|
13
|
+
kind: "Input";
|
|
14
|
+
index: number;
|
|
15
|
+
type?: "object" | "pure" | undefined;
|
|
16
|
+
value?: any;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "GasCoin";
|
|
19
|
+
} | {
|
|
20
|
+
kind: "Result";
|
|
21
|
+
index: number;
|
|
22
|
+
} | {
|
|
23
|
+
kind: "NestedResult";
|
|
24
|
+
index: number;
|
|
25
|
+
resultIndex: number;
|
|
26
|
+
}) & ({
|
|
27
|
+
kind: "Input";
|
|
28
|
+
index: number;
|
|
29
|
+
type?: "object" | "pure" | undefined;
|
|
30
|
+
value?: any;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "GasCoin";
|
|
33
|
+
} | {
|
|
34
|
+
kind: "Result";
|
|
35
|
+
index: number;
|
|
36
|
+
} | {
|
|
37
|
+
kind: "NestedResult";
|
|
38
|
+
index: number;
|
|
39
|
+
resultIndex: number;
|
|
40
|
+
})[];
|
|
41
|
+
withdrawRebateTx: (inputs: {
|
|
42
|
+
tx: TransactionBlock;
|
|
43
|
+
coinType: CoinType;
|
|
44
|
+
withTransfer?: boolean;
|
|
45
|
+
}) => ({
|
|
46
|
+
kind: "Input";
|
|
47
|
+
index: number;
|
|
48
|
+
type?: "object" | "pure" | undefined;
|
|
49
|
+
value?: any;
|
|
50
|
+
} | {
|
|
51
|
+
kind: "GasCoin";
|
|
52
|
+
} | {
|
|
53
|
+
kind: "Result";
|
|
54
|
+
index: number;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "NestedResult";
|
|
57
|
+
index: number;
|
|
58
|
+
resultIndex: number;
|
|
59
|
+
}) & ({
|
|
60
|
+
kind: "Input";
|
|
61
|
+
index: number;
|
|
62
|
+
type?: "object" | "pure" | undefined;
|
|
63
|
+
value?: any;
|
|
64
|
+
} | {
|
|
65
|
+
kind: "GasCoin";
|
|
66
|
+
} | {
|
|
67
|
+
kind: "Result";
|
|
68
|
+
index: number;
|
|
69
|
+
} | {
|
|
70
|
+
kind: "NestedResult";
|
|
71
|
+
index: number;
|
|
72
|
+
resultIndex: number;
|
|
73
|
+
})[];
|
|
74
|
+
balanceOfRebateTx: (inputs: {
|
|
75
|
+
tx: TransactionBlock;
|
|
76
|
+
coinType: CoinType;
|
|
77
|
+
referrer: SuiAddress;
|
|
78
|
+
}) => ({
|
|
79
|
+
kind: "Input";
|
|
80
|
+
index: number;
|
|
81
|
+
type?: "object" | "pure" | undefined;
|
|
82
|
+
value?: any;
|
|
83
|
+
} | {
|
|
84
|
+
kind: "GasCoin";
|
|
85
|
+
} | {
|
|
86
|
+
kind: "Result";
|
|
87
|
+
index: number;
|
|
88
|
+
} | {
|
|
89
|
+
kind: "NestedResult";
|
|
90
|
+
index: number;
|
|
91
|
+
resultIndex: number;
|
|
92
|
+
}) & ({
|
|
93
|
+
kind: "Input";
|
|
94
|
+
index: number;
|
|
95
|
+
type?: "object" | "pure" | undefined;
|
|
96
|
+
value?: any;
|
|
97
|
+
} | {
|
|
98
|
+
kind: "GasCoin";
|
|
99
|
+
} | {
|
|
100
|
+
kind: "Result";
|
|
101
|
+
index: number;
|
|
102
|
+
} | {
|
|
103
|
+
kind: "NestedResult";
|
|
104
|
+
index: number;
|
|
105
|
+
resultIndex: number;
|
|
106
|
+
})[];
|
|
107
|
+
referrerForTx: (inputs: {
|
|
108
|
+
tx: TransactionBlock;
|
|
109
|
+
referee: SuiAddress;
|
|
110
|
+
}) => ({
|
|
111
|
+
kind: "Input";
|
|
112
|
+
index: number;
|
|
113
|
+
type?: "object" | "pure" | undefined;
|
|
114
|
+
value?: any;
|
|
115
|
+
} | {
|
|
116
|
+
kind: "GasCoin";
|
|
117
|
+
} | {
|
|
118
|
+
kind: "Result";
|
|
119
|
+
index: number;
|
|
120
|
+
} | {
|
|
121
|
+
kind: "NestedResult";
|
|
122
|
+
index: number;
|
|
123
|
+
resultIndex: number;
|
|
124
|
+
}) & ({
|
|
125
|
+
kind: "Input";
|
|
126
|
+
index: number;
|
|
127
|
+
type?: "object" | "pure" | undefined;
|
|
128
|
+
value?: any;
|
|
129
|
+
} | {
|
|
130
|
+
kind: "GasCoin";
|
|
131
|
+
} | {
|
|
132
|
+
kind: "Result";
|
|
133
|
+
index: number;
|
|
134
|
+
} | {
|
|
135
|
+
kind: "NestedResult";
|
|
136
|
+
index: number;
|
|
137
|
+
resultIndex: number;
|
|
138
|
+
})[];
|
|
139
|
+
hasReffererTx: (inputs: {
|
|
140
|
+
tx: TransactionBlock;
|
|
141
|
+
referee: SuiAddress;
|
|
142
|
+
}) => ({
|
|
143
|
+
kind: "Input";
|
|
144
|
+
index: number;
|
|
145
|
+
type?: "object" | "pure" | undefined;
|
|
146
|
+
value?: any;
|
|
147
|
+
} | {
|
|
148
|
+
kind: "GasCoin";
|
|
149
|
+
} | {
|
|
150
|
+
kind: "Result";
|
|
151
|
+
index: number;
|
|
152
|
+
} | {
|
|
153
|
+
kind: "NestedResult";
|
|
154
|
+
index: number;
|
|
155
|
+
resultIndex: number;
|
|
156
|
+
}) & ({
|
|
157
|
+
kind: "Input";
|
|
158
|
+
index: number;
|
|
159
|
+
type?: "object" | "pure" | undefined;
|
|
160
|
+
value?: any;
|
|
161
|
+
} | {
|
|
162
|
+
kind: "GasCoin";
|
|
163
|
+
} | {
|
|
164
|
+
kind: "Result";
|
|
165
|
+
index: number;
|
|
166
|
+
} | {
|
|
167
|
+
kind: "NestedResult";
|
|
168
|
+
index: number;
|
|
169
|
+
resultIndex: number;
|
|
170
|
+
})[];
|
|
9
171
|
fetchBalanceOfRebate: (inputs: {
|
|
10
172
|
coinType: CoinType;
|
|
11
173
|
referrer: SuiAddress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referralVaultApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/referralVault/api/referralVaultApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"referralVaultApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/referralVault/api/referralVaultApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAG3E,qBAAa,gBAAgB;IAqBhB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAhBrC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAI/B;IAMF,SAAgB,SAAS,EAAE,sBAAsB,CAAC;gBAMrB,QAAQ,EAAE,YAAY;IAkB5C,gBAAgB,WAAY;QAClC,EAAE,EAAE,gBAAgB,CAAC;QACrB,QAAQ,EAAE,UAAU,CAAC;KACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAcC;IAEK,gBAAgB,WAAY;QAClC,EAAE,EAAE,gBAAgB,CAAC;QACrB,QAAQ,EAAE,QAAQ,CAAC;QACnB,YAAY,CAAC,EAAE,OAAO,CAAC;KACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAaC;IAEK,iBAAiB,WAAY;QACnC,EAAE,EAAE,gBAAgB,CAAC;QACrB,QAAQ,EAAE,QAAQ,CAAC;QACnB,QAAQ,EAAE,UAAU,CAAC;KACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAcC;IAEK,aAAa,WAAY;QAC/B,EAAE,EAAE,gBAAgB,CAAC;QACrB,OAAO,EAAE,UAAU,CAAC;KACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAcC;IAEK,aAAa,WAAY;QAC/B,EAAE,EAAE,gBAAgB,CAAC;QACrB,OAAO,EAAE,UAAU,CAAC;KACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAcC;IAMK,oBAAoB,WAAkB;QAC5C,QAAQ,EAAE,QAAQ,CAAC;QACnB,QAAQ,EAAE,UAAU,CAAC;KACrB,KAAG,QAAQ,OAAO,CAAC,CAMlB;IAEK,aAAa,WAAkB;QACrC,OAAO,EAAE,UAAU,CAAC;KACpB,KAAG,QAAQ,UAAU,GAAG,MAAM,CAAC,CAO9B;CACF"}
|