aftermath-ts-sdk 1.3.28 → 2.0.0
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/index.d.ts +16828 -5
- package/dist/index.js +22695 -19
- package/dist/index.js.map +1 -0
- package/package.json +69 -60
- package/dist/general/apiHelpers/dynamicFieldsApiHelpers.d.ts +0 -41
- package/dist/general/apiHelpers/dynamicFieldsApiHelpers.d.ts.map +0 -1
- package/dist/general/apiHelpers/dynamicFieldsApiHelpers.js +0 -110
- package/dist/general/apiHelpers/eventsApiHelpers.d.ts +0 -43
- package/dist/general/apiHelpers/eventsApiHelpers.d.ts.map +0 -1
- package/dist/general/apiHelpers/eventsApiHelpers.js +0 -170
- package/dist/general/apiHelpers/inspectionsApiHelpers.d.ts +0 -28
- package/dist/general/apiHelpers/inspectionsApiHelpers.d.ts.map +0 -1
- package/dist/general/apiHelpers/inspectionsApiHelpers.js +0 -58
- package/dist/general/apiHelpers/objectsApiHelpers.d.ts +0 -77
- package/dist/general/apiHelpers/objectsApiHelpers.d.ts.map +0 -1
- package/dist/general/apiHelpers/objectsApiHelpers.js +0 -197
- package/dist/general/apiHelpers/transactionsApiHelpers.d.ts +0 -50
- package/dist/general/apiHelpers/transactionsApiHelpers.d.ts.map +0 -1
- package/dist/general/apiHelpers/transactionsApiHelpers.js +0 -256
- package/dist/general/dynamicGas/dynamicGas.d.ts +0 -48
- package/dist/general/dynamicGas/dynamicGas.d.ts.map +0 -1
- package/dist/general/dynamicGas/dynamicGas.js +0 -69
- package/dist/general/dynamicGas/dynamicGasTypes.d.ts +0 -37
- package/dist/general/dynamicGas/dynamicGasTypes.d.ts.map +0 -1
- package/dist/general/dynamicGas/dynamicGasTypes.js +0 -2
- package/dist/general/nfts/nftsApi.d.ts +0 -35
- package/dist/general/nfts/nftsApi.d.ts.map +0 -1
- package/dist/general/nfts/nftsApi.js +0 -124
- package/dist/general/nfts/nftsApiCasting.d.ts +0 -11
- package/dist/general/nfts/nftsApiCasting.d.ts.map +0 -1
- package/dist/general/nfts/nftsApiCasting.js +0 -115
- package/dist/general/nfts/nftsTypes.d.ts +0 -31
- package/dist/general/nfts/nftsTypes.d.ts.map +0 -1
- package/dist/general/nfts/nftsTypes.js +0 -2
- package/dist/general/priceFeeds/priceFeeds.d.ts +0 -3
- package/dist/general/priceFeeds/priceFeeds.d.ts.map +0 -1
- package/dist/general/priceFeeds/priceFeeds.js +0 -26
- package/dist/general/priceFeeds/priceFeedsApi.d.ts +0 -3
- package/dist/general/priceFeeds/priceFeedsApi.d.ts.map +0 -1
- package/dist/general/priceFeeds/priceFeedsApi.js +0 -33
- package/dist/general/priceFeeds/priceFeedsTypes.d.ts +0 -3
- package/dist/general/priceFeeds/priceFeedsTypes.d.ts.map +0 -1
- package/dist/general/priceFeeds/priceFeedsTypes.js +0 -7
- package/dist/general/prices/coinGeckoTypes.d.ts +0 -16
- package/dist/general/prices/coinGeckoTypes.d.ts.map +0 -1
- package/dist/general/prices/coinGeckoTypes.js +0 -2
- package/dist/general/prices/prices.d.ts +0 -92
- package/dist/general/prices/prices.d.ts.map +0 -1
- package/dist/general/prices/prices.js +0 -124
- package/dist/general/providers/aftermath.d.ts +0 -200
- package/dist/general/providers/aftermath.d.ts.map +0 -1
- package/dist/general/providers/aftermath.js +0 -258
- package/dist/general/providers/aftermathApi.d.ts +0 -197
- package/dist/general/providers/aftermathApi.d.ts.map +0 -1
- package/dist/general/providers/aftermathApi.js +0 -255
- package/dist/general/providers/index.d.ts +0 -3
- package/dist/general/providers/index.d.ts.map +0 -1
- package/dist/general/providers/index.js +0 -18
- package/dist/general/types/castingTypes.d.ts +0 -51
- package/dist/general/types/castingTypes.d.ts.map +0 -1
- package/dist/general/types/castingTypes.js +0 -8
- package/dist/general/types/configTypes.d.ts +0 -187
- package/dist/general/types/configTypes.d.ts.map +0 -1
- package/dist/general/types/configTypes.js +0 -2
- package/dist/general/types/generalTypes.d.ts +0 -349
- package/dist/general/types/generalTypes.d.ts.map +0 -1
- package/dist/general/types/generalTypes.js +0 -2
- package/dist/general/types/index.d.ts +0 -7
- package/dist/general/types/index.d.ts.map +0 -1
- package/dist/general/types/index.js +0 -22
- package/dist/general/types/moveErrorsInterface.d.ts +0 -6
- package/dist/general/types/moveErrorsInterface.d.ts.map +0 -1
- package/dist/general/types/moveErrorsInterface.js +0 -2
- package/dist/general/types/suiTypes.d.ts +0 -2
- package/dist/general/types/suiTypes.d.ts.map +0 -1
- package/dist/general/types/suiTypes.js +0 -5
- package/dist/general/utils/caller.d.ts +0 -58
- package/dist/general/utils/caller.d.ts.map +0 -1
- package/dist/general/utils/caller.js +0 -231
- package/dist/general/utils/casting.d.ts +0 -212
- package/dist/general/utils/casting.d.ts.map +0 -1
- package/dist/general/utils/casting.js +0 -273
- package/dist/general/utils/fixedUtils.d.ts +0 -109
- package/dist/general/utils/fixedUtils.d.ts.map +0 -1
- package/dist/general/utils/fixedUtils.js +0 -100
- package/dist/general/utils/helpers.d.ts +0 -408
- package/dist/general/utils/helpers.d.ts.map +0 -1
- package/dist/general/utils/helpers.js +0 -725
- package/dist/general/utils/iFixedUtils.d.ts +0 -78
- package/dist/general/utils/iFixedUtils.d.ts.map +0 -1
- package/dist/general/utils/iFixedUtils.js +0 -109
- package/dist/general/utils/index.d.ts +0 -3
- package/dist/general/utils/index.d.ts.map +0 -1
- package/dist/general/utils/index.js +0 -18
- package/dist/general/wallet/wallet.d.ts +0 -89
- package/dist/general/wallet/wallet.d.ts.map +0 -1
- package/dist/general/wallet/wallet.js +0 -120
- package/dist/general/wallet/walletApi.d.ts +0 -20
- package/dist/general/wallet/walletApi.d.ts.map +0 -1
- package/dist/general/wallet/walletApi.js +0 -66
- package/dist/index.d.ts.map +0 -1
- package/dist/packages/auth/auth.d.ts +0 -135
- package/dist/packages/auth/auth.d.ts.map +0 -1
- package/dist/packages/auth/auth.js +0 -289
- package/dist/packages/auth/authTypes.d.ts +0 -102
- package/dist/packages/auth/authTypes.d.ts.map +0 -1
- package/dist/packages/auth/authTypes.js +0 -2
- package/dist/packages/auth/index.d.ts +0 -2
- package/dist/packages/auth/index.d.ts.map +0 -1
- package/dist/packages/auth/index.js +0 -17
- package/dist/packages/coin/api/coinApi.d.ts +0 -33
- package/dist/packages/coin/api/coinApi.d.ts.map +0 -1
- package/dist/packages/coin/api/coinApi.js +0 -167
- package/dist/packages/coin/coin.d.ts +0 -320
- package/dist/packages/coin/coin.d.ts.map +0 -1
- package/dist/packages/coin/coin.js +0 -467
- package/dist/packages/coin/coinTypes.d.ts +0 -139
- package/dist/packages/coin/coinTypes.d.ts.map +0 -1
- package/dist/packages/coin/coinTypes.js +0 -2
- package/dist/packages/coin/index.d.ts +0 -2
- package/dist/packages/coin/index.d.ts.map +0 -1
- package/dist/packages/coin/index.js +0 -17
- package/dist/packages/dca/api/dcaApi.d.ts +0 -26
- package/dist/packages/dca/api/dcaApi.d.ts.map +0 -1
- package/dist/packages/dca/api/dcaApi.js +0 -60
- package/dist/packages/dca/dca.d.ts +0 -174
- package/dist/packages/dca/dca.d.ts.map +0 -1
- package/dist/packages/dca/dca.js +0 -230
- package/dist/packages/dca/dcaTypes.d.ts +0 -319
- package/dist/packages/dca/dcaTypes.d.ts.map +0 -1
- package/dist/packages/dca/dcaTypes.js +0 -2
- package/dist/packages/dca/index.d.ts +0 -2
- package/dist/packages/dca/index.d.ts.map +0 -1
- package/dist/packages/dca/index.js +0 -17
- package/dist/packages/farms/api/farmsApi.d.ts +0 -996
- package/dist/packages/farms/api/farmsApi.d.ts.map +0 -1
- package/dist/packages/farms/api/farmsApi.js +0 -1826
- package/dist/packages/farms/api/farmsApiCasting.d.ts +0 -39
- package/dist/packages/farms/api/farmsApiCasting.d.ts.map +0 -1
- package/dist/packages/farms/api/farmsApiCasting.js +0 -427
- package/dist/packages/farms/api/farmsApiCastingTypes.d.ts +0 -235
- package/dist/packages/farms/api/farmsApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/farms/api/farmsApiCastingTypes.js +0 -2
- package/dist/packages/farms/farms.d.ts +0 -221
- package/dist/packages/farms/farms.d.ts.map +0 -1
- package/dist/packages/farms/farms.js +0 -302
- package/dist/packages/farms/farmsStakedPosition.d.ts +0 -229
- package/dist/packages/farms/farmsStakedPosition.d.ts.map +0 -1
- package/dist/packages/farms/farmsStakedPosition.js +0 -473
- package/dist/packages/farms/farmsStakingPool.d.ts +0 -285
- package/dist/packages/farms/farmsStakingPool.d.ts.map +0 -1
- package/dist/packages/farms/farmsStakingPool.js +0 -488
- package/dist/packages/farms/farmsTypes.d.ts +0 -571
- package/dist/packages/farms/farmsTypes.d.ts.map +0 -1
- package/dist/packages/farms/farmsTypes.js +0 -49
- package/dist/packages/farms/index.d.ts +0 -4
- package/dist/packages/farms/index.d.ts.map +0 -1
- package/dist/packages/farms/index.js +0 -19
- package/dist/packages/faucet/api/faucetApi.d.ts +0 -37
- package/dist/packages/faucet/api/faucetApi.d.ts.map +0 -1
- package/dist/packages/faucet/api/faucetApi.js +0 -145
- package/dist/packages/faucet/api/faucetApiCasting.d.ts +0 -7
- package/dist/packages/faucet/api/faucetApiCasting.d.ts.map +0 -1
- package/dist/packages/faucet/api/faucetApiCasting.js +0 -33
- package/dist/packages/faucet/api/faucetApiCastingTypes.d.ts +0 -10
- package/dist/packages/faucet/api/faucetApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/faucet/api/faucetApiCastingTypes.js +0 -2
- package/dist/packages/faucet/faucet.d.ts +0 -16
- package/dist/packages/faucet/faucet.d.ts.map +0 -1
- package/dist/packages/faucet/faucet.js +0 -64
- package/dist/packages/faucet/faucetTypes.d.ts +0 -20
- package/dist/packages/faucet/faucetTypes.d.ts.map +0 -1
- package/dist/packages/faucet/faucetTypes.js +0 -2
- package/dist/packages/faucet/index.d.ts +0 -2
- package/dist/packages/faucet/index.d.ts.map +0 -1
- package/dist/packages/faucet/index.js +0 -17
- package/dist/packages/index.d.ts +0 -14
- package/dist/packages/index.d.ts.map +0 -1
- package/dist/packages/index.js +0 -29
- package/dist/packages/leveragedStaking/api/leveragedStakingApi.d.ts +0 -202
- package/dist/packages/leveragedStaking/api/leveragedStakingApi.d.ts.map +0 -1
- package/dist/packages/leveragedStaking/api/leveragedStakingApi.js +0 -1104
- package/dist/packages/leveragedStaking/api/leveragedStakingApiCasting.d.ts +0 -12
- package/dist/packages/leveragedStaking/api/leveragedStakingApiCasting.d.ts.map +0 -1
- package/dist/packages/leveragedStaking/api/leveragedStakingApiCasting.js +0 -69
- package/dist/packages/leveragedStaking/api/leveragedStakingApiCastingTypes.d.ts +0 -39
- package/dist/packages/leveragedStaking/api/leveragedStakingApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/leveragedStaking/api/leveragedStakingApiCastingTypes.js +0 -2
- package/dist/packages/leveragedStaking/index.d.ts +0 -2
- package/dist/packages/leveragedStaking/index.d.ts.map +0 -1
- package/dist/packages/leveragedStaking/index.js +0 -17
- package/dist/packages/leveragedStaking/leveragedStaking.d.ts +0 -68
- package/dist/packages/leveragedStaking/leveragedStaking.d.ts.map +0 -1
- package/dist/packages/leveragedStaking/leveragedStaking.js +0 -154
- package/dist/packages/leveragedStaking/leveragedStakingTypes.d.ts +0 -48
- package/dist/packages/leveragedStaking/leveragedStakingTypes.d.ts.map +0 -1
- package/dist/packages/leveragedStaking/leveragedStakingTypes.js +0 -16
- package/dist/packages/limitOrders/api/limitOrdersApi.d.ts +0 -12
- package/dist/packages/limitOrders/api/limitOrdersApi.d.ts.map +0 -1
- package/dist/packages/limitOrders/api/limitOrdersApi.js +0 -25
- package/dist/packages/limitOrders/index.d.ts +0 -2
- package/dist/packages/limitOrders/index.d.ts.map +0 -1
- package/dist/packages/limitOrders/index.js +0 -17
- package/dist/packages/limitOrders/limitOrders.d.ts +0 -143
- package/dist/packages/limitOrders/limitOrders.d.ts.map +0 -1
- package/dist/packages/limitOrders/limitOrders.js +0 -190
- package/dist/packages/limitOrders/limitOrdersTypes.d.ts +0 -211
- package/dist/packages/limitOrders/limitOrdersTypes.d.ts.map +0 -1
- package/dist/packages/limitOrders/limitOrdersTypes.js +0 -2
- package/dist/packages/multisig/api/multisigApi.d.ts +0 -10
- package/dist/packages/multisig/api/multisigApi.d.ts.map +0 -1
- package/dist/packages/multisig/api/multisigApi.js +0 -39
- package/dist/packages/multisig/index.d.ts +0 -2
- package/dist/packages/multisig/index.d.ts.map +0 -1
- package/dist/packages/multisig/index.js +0 -17
- package/dist/packages/multisig/multisig.d.ts +0 -46
- package/dist/packages/multisig/multisig.d.ts.map +0 -1
- package/dist/packages/multisig/multisig.js +0 -65
- package/dist/packages/multisig/multisigTypes.d.ts +0 -26
- package/dist/packages/multisig/multisigTypes.d.ts.map +0 -1
- package/dist/packages/multisig/multisigTypes.js +0 -2
- package/dist/packages/nftAmm/api/nftAmmApi.d.ts +0 -93
- package/dist/packages/nftAmm/api/nftAmmApi.d.ts.map +0 -1
- package/dist/packages/nftAmm/api/nftAmmApi.js +0 -250
- package/dist/packages/nftAmm/api/nftAmmApiCasting.d.ts +0 -6
- package/dist/packages/nftAmm/api/nftAmmApiCasting.d.ts.map +0 -1
- package/dist/packages/nftAmm/api/nftAmmApiCasting.js +0 -43
- package/dist/packages/nftAmm/api/nftAmmApiCastingTypes.d.ts +0 -10
- package/dist/packages/nftAmm/api/nftAmmApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/nftAmm/api/nftAmmApiCastingTypes.js +0 -2
- package/dist/packages/nftAmm/index.d.ts +0 -2
- package/dist/packages/nftAmm/index.d.ts.map +0 -1
- package/dist/packages/nftAmm/index.js +0 -17
- package/dist/packages/nftAmm/nftAmm.d.ts +0 -18
- package/dist/packages/nftAmm/nftAmm.d.ts.map +0 -1
- package/dist/packages/nftAmm/nftAmm.js +0 -73
- package/dist/packages/nftAmm/nftAmmMarket.d.ts +0 -54
- package/dist/packages/nftAmm/nftAmmMarket.d.ts.map +0 -1
- package/dist/packages/nftAmm/nftAmmMarket.js +0 -154
- package/dist/packages/nftAmm/nftAmmTypes.d.ts +0 -51
- package/dist/packages/nftAmm/nftAmmTypes.d.ts.map +0 -1
- package/dist/packages/nftAmm/nftAmmTypes.js +0 -2
- package/dist/packages/perpetuals/api/perpetualsApi.d.ts +0 -44
- package/dist/packages/perpetuals/api/perpetualsApi.d.ts.map +0 -1
- package/dist/packages/perpetuals/api/perpetualsApi.js +0 -1420
- package/dist/packages/perpetuals/api/perpetualsApiCasting.d.ts +0 -27
- package/dist/packages/perpetuals/api/perpetualsApiCasting.d.ts.map +0 -1
- package/dist/packages/perpetuals/api/perpetualsApiCasting.js +0 -463
- package/dist/packages/perpetuals/index.d.ts +0 -5
- package/dist/packages/perpetuals/index.d.ts.map +0 -1
- package/dist/packages/perpetuals/index.js +0 -20
- package/dist/packages/perpetuals/perpetuals.d.ts +0 -860
- package/dist/packages/perpetuals/perpetuals.d.ts.map +0 -1
- package/dist/packages/perpetuals/perpetuals.js +0 -1102
- package/dist/packages/perpetuals/perpetualsAccount.d.ts +0 -780
- package/dist/packages/perpetuals/perpetualsAccount.d.ts.map +0 -1
- package/dist/packages/perpetuals/perpetualsAccount.js +0 -1406
- package/dist/packages/perpetuals/perpetualsCastingTypes.d.ts +0 -170
- package/dist/packages/perpetuals/perpetualsCastingTypes.d.ts.map +0 -1
- package/dist/packages/perpetuals/perpetualsCastingTypes.js +0 -2
- package/dist/packages/perpetuals/perpetualsMarket.d.ts +0 -360
- package/dist/packages/perpetuals/perpetualsMarket.d.ts.map +0 -1
- package/dist/packages/perpetuals/perpetualsMarket.js +0 -475
- package/dist/packages/perpetuals/perpetualsTypes.d.ts +0 -2968
- package/dist/packages/perpetuals/perpetualsTypes.d.ts.map +0 -1
- package/dist/packages/perpetuals/perpetualsTypes.js +0 -165
- package/dist/packages/perpetuals/perpetualsVault.d.ts +0 -438
- package/dist/packages/perpetuals/perpetualsVault.d.ts.map +0 -1
- package/dist/packages/perpetuals/perpetualsVault.js +0 -601
- package/dist/packages/perpetuals/utils/index.d.ts +0 -2
- package/dist/packages/perpetuals/utils/index.d.ts.map +0 -1
- package/dist/packages/perpetuals/utils/index.js +0 -17
- package/dist/packages/perpetuals/utils/perpetualsOrderUtils.d.ts +0 -12
- package/dist/packages/perpetuals/utils/perpetualsOrderUtils.d.ts.map +0 -1
- package/dist/packages/perpetuals/utils/perpetualsOrderUtils.js +0 -60
- package/dist/packages/pools/api/poolsApi.d.ts +0 -342
- package/dist/packages/pools/api/poolsApi.d.ts.map +0 -1
- package/dist/packages/pools/api/poolsApi.js +0 -857
- package/dist/packages/pools/api/poolsApiCasting.d.ts +0 -13
- package/dist/packages/pools/api/poolsApiCasting.d.ts.map +0 -1
- package/dist/packages/pools/api/poolsApiCasting.js +0 -91
- package/dist/packages/pools/api/poolsApiCastingTypes.d.ts +0 -64
- package/dist/packages/pools/api/poolsApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/pools/api/poolsApiCastingTypes.js +0 -2
- package/dist/packages/pools/index.d.ts +0 -3
- package/dist/packages/pools/index.d.ts.map +0 -1
- package/dist/packages/pools/index.js +0 -18
- package/dist/packages/pools/pool.d.ts +0 -459
- package/dist/packages/pools/pool.d.ts.map +0 -1
- package/dist/packages/pools/pool.js +0 -647
- package/dist/packages/pools/pools.d.ts +0 -405
- package/dist/packages/pools/pools.d.ts.map +0 -1
- package/dist/packages/pools/pools.js +0 -533
- package/dist/packages/pools/poolsTypes.d.ts +0 -469
- package/dist/packages/pools/poolsTypes.d.ts.map +0 -1
- package/dist/packages/pools/poolsTypes.js +0 -2
- package/dist/packages/pools/utils/cmmmCalculations.d.ts +0 -42
- package/dist/packages/pools/utils/cmmmCalculations.d.ts.map +0 -1
- package/dist/packages/pools/utils/cmmmCalculations.js +0 -1380
- package/dist/packages/referralVault/api/referralVaultApi.d.ts +0 -39
- package/dist/packages/referralVault/api/referralVaultApi.d.ts.map +0 -1
- package/dist/packages/referralVault/api/referralVaultApi.js +0 -125
- package/dist/packages/referralVault/index.d.ts +0 -2
- package/dist/packages/referralVault/index.d.ts.map +0 -1
- package/dist/packages/referralVault/index.js +0 -17
- package/dist/packages/referralVault/referralVault.d.ts +0 -47
- package/dist/packages/referralVault/referralVault.d.ts.map +0 -1
- package/dist/packages/referralVault/referralVault.js +0 -71
- package/dist/packages/referralVault/referralVaultTypes.d.ts +0 -2
- package/dist/packages/referralVault/referralVaultTypes.d.ts.map +0 -1
- package/dist/packages/referralVault/referralVaultTypes.js +0 -2
- package/dist/packages/referrals/index.d.ts +0 -2
- package/dist/packages/referrals/index.d.ts.map +0 -1
- package/dist/packages/referrals/index.js +0 -17
- package/dist/packages/referrals/referrals.d.ts +0 -27
- package/dist/packages/referrals/referrals.d.ts.map +0 -1
- package/dist/packages/referrals/referrals.js +0 -95
- package/dist/packages/referrals/referralsTypes.d.ts +0 -166
- package/dist/packages/referrals/referralsTypes.d.ts.map +0 -1
- package/dist/packages/referrals/referralsTypes.js +0 -2
- package/dist/packages/rewards/index.d.ts +0 -2
- package/dist/packages/rewards/index.d.ts.map +0 -1
- package/dist/packages/rewards/index.js +0 -17
- package/dist/packages/rewards/rewards.d.ts +0 -21
- package/dist/packages/rewards/rewards.d.ts.map +0 -1
- package/dist/packages/rewards/rewards.js +0 -65
- package/dist/packages/rewards/rewardsTypes.d.ts +0 -169
- package/dist/packages/rewards/rewardsTypes.d.ts.map +0 -1
- package/dist/packages/rewards/rewardsTypes.js +0 -2
- package/dist/packages/router/api/routerApi.d.ts +0 -35
- package/dist/packages/router/api/routerApi.d.ts.map +0 -1
- package/dist/packages/router/api/routerApi.js +0 -88
- package/dist/packages/router/api/routerApiCasting.d.ts +0 -6
- package/dist/packages/router/api/routerApiCasting.d.ts.map +0 -1
- package/dist/packages/router/api/routerApiCasting.js +0 -22
- package/dist/packages/router/api/routerApiCastingTypes.d.ts +0 -12
- package/dist/packages/router/api/routerApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/router/api/routerApiCastingTypes.js +0 -2
- package/dist/packages/router/index.d.ts +0 -2
- package/dist/packages/router/index.d.ts.map +0 -1
- package/dist/packages/router/index.js +0 -17
- package/dist/packages/router/router.d.ts +0 -224
- package/dist/packages/router/router.d.ts.map +0 -1
- package/dist/packages/router/router.js +0 -283
- package/dist/packages/router/routerTypes.d.ts +0 -300
- package/dist/packages/router/routerTypes.d.ts.map +0 -1
- package/dist/packages/router/routerTypes.js +0 -2
- package/dist/packages/staking/api/stakingApi.d.ts +0 -129
- package/dist/packages/staking/api/stakingApi.d.ts.map +0 -1
- package/dist/packages/staking/api/stakingApi.js +0 -487
- package/dist/packages/staking/api/stakingApiCasting.d.ts +0 -11
- package/dist/packages/staking/api/stakingApiCasting.d.ts.map +0 -1
- package/dist/packages/staking/api/stakingApiCasting.js +0 -87
- package/dist/packages/staking/api/stakingApiCastingTypes.d.ts +0 -97
- package/dist/packages/staking/api/stakingApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/staking/api/stakingApiCastingTypes.js +0 -2
- package/dist/packages/staking/index.d.ts +0 -2
- package/dist/packages/staking/index.d.ts.map +0 -1
- package/dist/packages/staking/index.js +0 -17
- package/dist/packages/staking/staking.d.ts +0 -385
- package/dist/packages/staking/staking.d.ts.map +0 -1
- package/dist/packages/staking/staking.js +0 -501
- package/dist/packages/staking/stakingTypes.d.ts +0 -575
- package/dist/packages/staking/stakingTypes.d.ts.map +0 -1
- package/dist/packages/staking/stakingTypes.js +0 -45
- package/dist/packages/sui/api/suiApi.d.ts +0 -21
- package/dist/packages/sui/api/suiApi.d.ts.map +0 -1
- package/dist/packages/sui/api/suiApi.js +0 -46
- package/dist/packages/sui/index.d.ts +0 -2
- package/dist/packages/sui/index.d.ts.map +0 -1
- package/dist/packages/sui/index.js +0 -17
- package/dist/packages/sui/sui.d.ts +0 -53
- package/dist/packages/sui/sui.d.ts.map +0 -1
- package/dist/packages/sui/sui.js +0 -77
- package/dist/packages/suiFrens/api/suiFrensApi.d.ts +0 -204
- package/dist/packages/suiFrens/api/suiFrensApi.d.ts.map +0 -1
- package/dist/packages/suiFrens/api/suiFrensApi.js +0 -756
- package/dist/packages/suiFrens/api/suiFrensApiCasting.d.ts +0 -21
- package/dist/packages/suiFrens/api/suiFrensApiCasting.d.ts.map +0 -1
- package/dist/packages/suiFrens/api/suiFrensApiCasting.js +0 -181
- package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.d.ts +0 -77
- package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.d.ts.map +0 -1
- package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.js +0 -2
- package/dist/packages/suiFrens/index.d.ts +0 -4
- package/dist/packages/suiFrens/index.d.ts.map +0 -1
- package/dist/packages/suiFrens/index.js +0 -19
- package/dist/packages/suiFrens/stakedSuiFren.d.ts +0 -31
- package/dist/packages/suiFrens/stakedSuiFren.d.ts.map +0 -1
- package/dist/packages/suiFrens/stakedSuiFren.js +0 -90
- package/dist/packages/suiFrens/suiFren.d.ts +0 -32
- package/dist/packages/suiFrens/suiFren.d.ts.map +0 -1
- package/dist/packages/suiFrens/suiFren.js +0 -150
- package/dist/packages/suiFrens/suiFrens.d.ts +0 -56
- package/dist/packages/suiFrens/suiFrens.d.ts.map +0 -1
- package/dist/packages/suiFrens/suiFrens.js +0 -218
- package/dist/packages/suiFrens/suiFrensTypes.d.ts +0 -148
- package/dist/packages/suiFrens/suiFrensTypes.d.ts.map +0 -1
- package/dist/packages/suiFrens/suiFrensTypes.js +0 -8
- package/dist/packages/userData/index.d.ts +0 -2
- package/dist/packages/userData/index.d.ts.map +0 -1
- package/dist/packages/userData/index.js +0 -17
- package/dist/packages/userData/userData.d.ts +0 -89
- package/dist/packages/userData/userData.d.ts.map +0 -1
- package/dist/packages/userData/userData.js +0 -119
- package/dist/packages/userData/userDataTypes.d.ts +0 -29
- package/dist/packages/userData/userDataTypes.d.ts.map +0 -1
- package/dist/packages/userData/userDataTypes.js +0 -2
- package/dist/types.d.ts +0 -15
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -31
|
@@ -1,575 +0,0 @@
|
|
|
1
|
-
import { CoinType } from "../..";
|
|
2
|
-
import { ApiEventsBody, Balance, Event, Object as SuiObject, Percentage, Timestamp, ObjectId, SuiAddress, TransactionDigest, ExternalFee } from "../../general/types/generalTypes";
|
|
3
|
-
/**
|
|
4
|
-
* Represents a validator's configuration object, including its Sui address,
|
|
5
|
-
* operation cap ID, and fee percentage.
|
|
6
|
-
*/
|
|
7
|
-
export interface ValidatorConfigObject extends SuiObject {
|
|
8
|
-
/**
|
|
9
|
-
* The Sui address of the validator.
|
|
10
|
-
*/
|
|
11
|
-
suiAddress: SuiAddress;
|
|
12
|
-
/**
|
|
13
|
-
* The on-chain object ID referencing this validator's operation cap.
|
|
14
|
-
*/
|
|
15
|
-
operationCapId: ObjectId;
|
|
16
|
-
/**
|
|
17
|
-
* The current fee percentage for this validator (0.01 = 1%).
|
|
18
|
-
*/
|
|
19
|
-
fee: Percentage;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Represents a validator's operation cap object, which authorizes changes to
|
|
23
|
-
* validator settings like fees.
|
|
24
|
-
*/
|
|
25
|
-
export interface ValidatorOperationCapObject extends SuiObject {
|
|
26
|
-
/**
|
|
27
|
-
* The validator address authorized by this operation cap.
|
|
28
|
-
*/
|
|
29
|
-
authorizerValidatorAddress: SuiAddress;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Represents the on-chain state of the stakedSui vault, which tracks liquidity
|
|
33
|
-
* for atomic unstakes, total SUI amounts, rewards, and fees.
|
|
34
|
-
*/
|
|
35
|
-
export interface StakedSuiVaultStateObject extends SuiObject {
|
|
36
|
-
/**
|
|
37
|
-
* The target size for atomic unstake SUI reserves.
|
|
38
|
-
*/
|
|
39
|
-
atomicUnstakeSuiReservesTargetValue: Balance;
|
|
40
|
-
/**
|
|
41
|
-
* The current size of the SUI reserves for atomic unstakes.
|
|
42
|
-
*/
|
|
43
|
-
atomicUnstakeSuiReserves: Balance;
|
|
44
|
-
/**
|
|
45
|
-
* The minimum fee for atomic unstakes, expressed as a BigInt-based percentage
|
|
46
|
-
* (e.g., 50000000n = 5% if using 1e9-based decimals).
|
|
47
|
-
*/
|
|
48
|
-
minAtomicUnstakeFee: bigint;
|
|
49
|
-
/**
|
|
50
|
-
* The maximum fee for atomic unstakes.
|
|
51
|
-
*/
|
|
52
|
-
maxAtomicUnstakeFee: bigint;
|
|
53
|
-
/**
|
|
54
|
-
* The total amount of SUI rewards accumulated in the vault.
|
|
55
|
-
*/
|
|
56
|
-
totalRewardsAmount: Balance;
|
|
57
|
-
/**
|
|
58
|
-
* The total amount of SUI staked in the vault.
|
|
59
|
-
*/
|
|
60
|
-
totalSuiAmount: Balance;
|
|
61
|
-
/**
|
|
62
|
-
* The current epoch number, as a BigInt.
|
|
63
|
-
*/
|
|
64
|
-
activeEpoch: bigint;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Represents a dynamic field holding a stake balance. Useful for tracking
|
|
68
|
-
* on-chain data related to a specific stake or delegator.
|
|
69
|
-
*/
|
|
70
|
-
export interface StakeBalanceDynamicField {
|
|
71
|
-
/**
|
|
72
|
-
* The on-chain object ID of this stake balance record.
|
|
73
|
-
*/
|
|
74
|
-
objectId: ObjectId;
|
|
75
|
-
/**
|
|
76
|
-
* The amount of SUI (or afSUI) represented by this field, expressed as a bigint.
|
|
77
|
-
*/
|
|
78
|
-
value: Balance;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Enumerates the possible states of a delegated stake on the Sui network.
|
|
82
|
-
*
|
|
83
|
-
* - **Active**: The stake is actively earning rewards.
|
|
84
|
-
* - **Pending**: The stake has been requested but not yet activated.
|
|
85
|
-
* - **Unstaked**: The stake has been removed or the SUI is no longer earning rewards.
|
|
86
|
-
*/
|
|
87
|
-
export type SuiDelegatedStakeState = "Active" | "Pending" | "Unstaked";
|
|
88
|
-
/**
|
|
89
|
-
* Represents a delegated stake object in the Sui network. Unlike local
|
|
90
|
-
* Aftermath-specific stake positions, this is a more general Sui system stake
|
|
91
|
-
* that can earn protocol-level rewards.
|
|
92
|
-
*/
|
|
93
|
-
export interface SuiDelegatedStake {
|
|
94
|
-
/**
|
|
95
|
-
* The current state of the delegated stake (e.g., Active, Pending, Unstaked).
|
|
96
|
-
*/
|
|
97
|
-
status: SuiDelegatedStakeState;
|
|
98
|
-
/**
|
|
99
|
-
* The on-chain ID representing this stake position.
|
|
100
|
-
*/
|
|
101
|
-
stakedSuiId: ObjectId;
|
|
102
|
-
/**
|
|
103
|
-
* The epoch in which this stake request was made.
|
|
104
|
-
*/
|
|
105
|
-
stakeRequestEpoch: bigint;
|
|
106
|
-
/**
|
|
107
|
-
* The epoch in which this stake became (or will become) active.
|
|
108
|
-
*/
|
|
109
|
-
stakeActiveEpoch: bigint;
|
|
110
|
-
/**
|
|
111
|
-
* The principal amount of SUI delegated.
|
|
112
|
-
*/
|
|
113
|
-
principal: Balance;
|
|
114
|
-
/**
|
|
115
|
-
* The estimated rewards accumulated for this stake, if available.
|
|
116
|
-
*/
|
|
117
|
-
estimatedReward?: Balance | undefined;
|
|
118
|
-
/**
|
|
119
|
-
* The validator to which this stake is delegated.
|
|
120
|
-
*/
|
|
121
|
-
validatorAddress: SuiAddress;
|
|
122
|
-
/**
|
|
123
|
-
* The staking pool on-chain object that manages this stake.
|
|
124
|
-
*/
|
|
125
|
-
stakingPool: SuiAddress;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* A type guard utility function to check if a position is a native Sui delegated stake
|
|
129
|
-
* (`SuiDelegatedStake`) rather than an Aftermath-specific `StakingPosition`.
|
|
130
|
-
*
|
|
131
|
-
* @param stake - An object that could be either a `StakingPosition` or a `SuiDelegatedStake`.
|
|
132
|
-
* @returns True if the object matches the shape of `SuiDelegatedStake`; otherwise, false.
|
|
133
|
-
*/
|
|
134
|
-
export declare const isSuiDelegatedStake: (stake: StakingPosition | SuiDelegatedStake) => stake is SuiDelegatedStake;
|
|
135
|
-
/**
|
|
136
|
-
* Represents a single entry in the historical APY data, including a Unix
|
|
137
|
-
* timestamp and an APY value.
|
|
138
|
-
*/
|
|
139
|
-
export interface StakingApyDataPoint {
|
|
140
|
-
/**
|
|
141
|
-
* The Unix timestamp (in milliseconds or seconds) of the data point.
|
|
142
|
-
*/
|
|
143
|
-
timestamp: Timestamp;
|
|
144
|
-
/**
|
|
145
|
-
* The APY value recorded at that time (e.g., 0.045 = 4.5%).
|
|
146
|
-
*/
|
|
147
|
-
apy: number;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Enumerates the timeframes available for retrieving historical APY data,
|
|
151
|
-
* such as `"1W"`, `"1M"`, `"1Y"`, etc.
|
|
152
|
-
*/
|
|
153
|
-
export type StakingApyTimeframeKey = "1W" | "1M" | "3M" | "6M" | "1Y" | "ALL";
|
|
154
|
-
/**
|
|
155
|
-
* Represents an event when SUI has been staked, either newly or restaked.
|
|
156
|
-
*/
|
|
157
|
-
export interface StakedEvent extends Event {
|
|
158
|
-
/**
|
|
159
|
-
* The on-chain object ID referencing the newly created staked SUI object.
|
|
160
|
-
*/
|
|
161
|
-
stakedSuiId: ObjectId;
|
|
162
|
-
/**
|
|
163
|
-
* The original SUI coin ID used for staking.
|
|
164
|
-
*/
|
|
165
|
-
suiId: ObjectId;
|
|
166
|
-
/**
|
|
167
|
-
* The address of the user who performed the staking.
|
|
168
|
-
*/
|
|
169
|
-
staker: SuiAddress;
|
|
170
|
-
/**
|
|
171
|
-
* The validator address to which the user staked.
|
|
172
|
-
*/
|
|
173
|
-
validatorAddress: SuiAddress;
|
|
174
|
-
/**
|
|
175
|
-
* The epoch in which staking took place.
|
|
176
|
-
*/
|
|
177
|
-
epoch: bigint;
|
|
178
|
-
/**
|
|
179
|
-
* The amount of SUI staked.
|
|
180
|
-
*/
|
|
181
|
-
suiStakeAmount: Balance;
|
|
182
|
-
/**
|
|
183
|
-
* The validator fee percentage for this stake (0.01 = 1%).
|
|
184
|
-
*/
|
|
185
|
-
validatorFee: number;
|
|
186
|
-
/**
|
|
187
|
-
* Indicates whether this stake is a restake of an already staked position.
|
|
188
|
-
*/
|
|
189
|
-
isRestaked: boolean;
|
|
190
|
-
/**
|
|
191
|
-
* The on-chain ID of the afSUI object received in exchange for staking.
|
|
192
|
-
*/
|
|
193
|
-
afSuiId: ObjectId;
|
|
194
|
-
/**
|
|
195
|
-
* The amount of afSUI received.
|
|
196
|
-
*/
|
|
197
|
-
afSuiAmount: Balance;
|
|
198
|
-
/**
|
|
199
|
-
* (Optional) Referrer address for the stake.
|
|
200
|
-
*/
|
|
201
|
-
referrer?: SuiAddress;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Represents an event when a user initiates an unstake request, converting
|
|
205
|
-
* afSUI back into SUI.
|
|
206
|
-
*/
|
|
207
|
-
export interface UnstakeRequestedEvent extends Event {
|
|
208
|
-
/**
|
|
209
|
-
* The afSUI ID being provided to unstake.
|
|
210
|
-
*/
|
|
211
|
-
afSuiId: ObjectId;
|
|
212
|
-
/**
|
|
213
|
-
* The amount of afSUI provided by the user.
|
|
214
|
-
*/
|
|
215
|
-
providedAfSuiAmount: Balance;
|
|
216
|
-
/**
|
|
217
|
-
* The address requesting the unstake.
|
|
218
|
-
*/
|
|
219
|
-
requester: SuiAddress;
|
|
220
|
-
/**
|
|
221
|
-
* The epoch in which the unstake was requested.
|
|
222
|
-
*/
|
|
223
|
-
epoch: bigint;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Represents an event after an unstake has fully processed and SUI has
|
|
227
|
-
* been returned to the user.
|
|
228
|
-
*/
|
|
229
|
-
export interface UnstakedEvent extends Event {
|
|
230
|
-
/**
|
|
231
|
-
* The afSUI ID that was burned or converted during the unstake.
|
|
232
|
-
*/
|
|
233
|
-
afSuiId: ObjectId;
|
|
234
|
-
/**
|
|
235
|
-
* The amount of afSUI provided.
|
|
236
|
-
*/
|
|
237
|
-
providedAfSuiAmount: Balance;
|
|
238
|
-
/**
|
|
239
|
-
* The resulting SUI coin ID received by the user.
|
|
240
|
-
*/
|
|
241
|
-
suiId: ObjectId;
|
|
242
|
-
/**
|
|
243
|
-
* The amount of SUI returned.
|
|
244
|
-
*/
|
|
245
|
-
returnedSuiAmount: Balance;
|
|
246
|
-
/**
|
|
247
|
-
* The address that initiated the unstake.
|
|
248
|
-
*/
|
|
249
|
-
requester: SuiAddress;
|
|
250
|
-
/**
|
|
251
|
-
* The epoch in which the unstake finalized.
|
|
252
|
-
*/
|
|
253
|
-
epoch: bigint;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Represents a union type covering all possible unstake events, either
|
|
257
|
-
* requested or finalized.
|
|
258
|
-
*/
|
|
259
|
-
export type UnstakeEvent = UnstakeRequestedEvent | UnstakedEvent;
|
|
260
|
-
/**
|
|
261
|
-
* Type guard to check if an event is a `StakedEvent`.
|
|
262
|
-
*/
|
|
263
|
-
export declare const isStakeEvent: (event: StakeEvent | UnstakeEvent) => event is StakeEvent;
|
|
264
|
-
/**
|
|
265
|
-
* Type guard to check if an event is an `UnstakeEvent`.
|
|
266
|
-
*/
|
|
267
|
-
export declare const isUnstakeEvent: (event: StakeEvent | UnstakeEvent) => event is UnstakeEvent;
|
|
268
|
-
/**
|
|
269
|
-
* Represents an event that indicates the epoch has changed, generally used
|
|
270
|
-
* for distributing rewards and updating positions.
|
|
271
|
-
*/
|
|
272
|
-
export interface EpochWasChangedEvent extends Event {
|
|
273
|
-
/**
|
|
274
|
-
* The new active epoch as a BigInt.
|
|
275
|
-
*/
|
|
276
|
-
activeEpoch: bigint;
|
|
277
|
-
/**
|
|
278
|
-
* The total amount of afSUI in circulation.
|
|
279
|
-
*/
|
|
280
|
-
totalAfSuiSupply: Balance;
|
|
281
|
-
/**
|
|
282
|
-
* The total amount of SUI rewards accrued in the system.
|
|
283
|
-
*/
|
|
284
|
-
totalSuiRewardsAmount: Balance;
|
|
285
|
-
/**
|
|
286
|
-
* The total amount of SUI staked in the system.
|
|
287
|
-
*/
|
|
288
|
-
totalSuiAmount: Balance;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Union type for stake events, which can represent any variant of staking.
|
|
292
|
-
*/
|
|
293
|
-
export type StakeEvent = StakedEvent;
|
|
294
|
-
/**
|
|
295
|
-
* Represents a user's staking position, which could be either a `StakePosition`
|
|
296
|
-
* or an `UnstakePosition`.
|
|
297
|
-
*/
|
|
298
|
-
export type StakingPosition = StakePosition | UnstakePosition;
|
|
299
|
-
/**
|
|
300
|
-
* Indicates a stake position, typically representing active or restaked SUI,
|
|
301
|
-
* along with its associated `afSuiAmount`.
|
|
302
|
-
*/
|
|
303
|
-
export interface StakePosition {
|
|
304
|
-
/**
|
|
305
|
-
* The staked SUI object ID referencing this position.
|
|
306
|
-
*/
|
|
307
|
-
stakedSuiId: ObjectId;
|
|
308
|
-
/**
|
|
309
|
-
* The original SUI coin ID.
|
|
310
|
-
*/
|
|
311
|
-
suiId: ObjectId;
|
|
312
|
-
/**
|
|
313
|
-
* The address of the staker.
|
|
314
|
-
*/
|
|
315
|
-
staker: SuiAddress;
|
|
316
|
-
/**
|
|
317
|
-
* The address of the validator to which SUI was staked.
|
|
318
|
-
*/
|
|
319
|
-
validatorAddress: SuiAddress;
|
|
320
|
-
/**
|
|
321
|
-
* The epoch in which the stake was established.
|
|
322
|
-
*/
|
|
323
|
-
epoch: bigint;
|
|
324
|
-
/**
|
|
325
|
-
* The amount of SUI staked.
|
|
326
|
-
*/
|
|
327
|
-
suiStakeAmount: Balance;
|
|
328
|
-
/**
|
|
329
|
-
* The validator fee percentage (0.01 = 1%).
|
|
330
|
-
*/
|
|
331
|
-
validatorFee: number;
|
|
332
|
-
/**
|
|
333
|
-
* Indicates if this stake is a restake operation.
|
|
334
|
-
*/
|
|
335
|
-
isRestaked: boolean;
|
|
336
|
-
/**
|
|
337
|
-
* The afSUI object ID generated from staking.
|
|
338
|
-
*/
|
|
339
|
-
afSuiId: ObjectId;
|
|
340
|
-
/**
|
|
341
|
-
* The amount of afSUI issued to the user.
|
|
342
|
-
*/
|
|
343
|
-
afSuiAmount: Balance;
|
|
344
|
-
/**
|
|
345
|
-
* The timestamp when the stake was recorded.
|
|
346
|
-
*/
|
|
347
|
-
timestamp: Timestamp | undefined;
|
|
348
|
-
/**
|
|
349
|
-
* The transaction digest where the stake operation occurred.
|
|
350
|
-
*/
|
|
351
|
-
txnDigest: TransactionDigest;
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Indicates a position related to an unstake operation, either requested or
|
|
355
|
-
* finalized, with optional references to the returned SUI coin and amount.
|
|
356
|
-
*/
|
|
357
|
-
export interface UnstakePosition {
|
|
358
|
-
/**
|
|
359
|
-
* The state of the unstake operation: `REQUEST` (in progress) or
|
|
360
|
-
* `SUI_MINTED` (finalized).
|
|
361
|
-
*/
|
|
362
|
-
state: UnstakePositionState;
|
|
363
|
-
/**
|
|
364
|
-
* The afSUI object ID being burned or converted.
|
|
365
|
-
*/
|
|
366
|
-
afSuiId: ObjectId;
|
|
367
|
-
/**
|
|
368
|
-
* The amount of afSUI used to initiate the unstake.
|
|
369
|
-
*/
|
|
370
|
-
providedAfSuiAmount: Balance;
|
|
371
|
-
/**
|
|
372
|
-
* The address of the requester.
|
|
373
|
-
*/
|
|
374
|
-
requester: SuiAddress;
|
|
375
|
-
/**
|
|
376
|
-
* The epoch in which the unstake was requested or finalized.
|
|
377
|
-
*/
|
|
378
|
-
epoch: bigint;
|
|
379
|
-
/**
|
|
380
|
-
* The SUI object ID returned to the user, if unstake has finalized.
|
|
381
|
-
*/
|
|
382
|
-
suiId?: ObjectId;
|
|
383
|
-
/**
|
|
384
|
-
* The amount of SUI returned to the user, if unstake has finalized.
|
|
385
|
-
*/
|
|
386
|
-
returnedSuiAmount?: Balance;
|
|
387
|
-
/**
|
|
388
|
-
* The timestamp when the unstake request was recorded or completed.
|
|
389
|
-
*/
|
|
390
|
-
timestamp: Timestamp | undefined;
|
|
391
|
-
/**
|
|
392
|
-
* The transaction digest where the unstake operation occurred.
|
|
393
|
-
*/
|
|
394
|
-
txnDigest: TransactionDigest;
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Enumerates the possible states of an unstake operation.
|
|
398
|
-
*/
|
|
399
|
-
export type UnstakePositionState = "REQUEST" | "SUI_MINTED";
|
|
400
|
-
/**
|
|
401
|
-
* Type guard that checks whether a given `StakingPosition` is a stake position.
|
|
402
|
-
*/
|
|
403
|
-
export declare const isStakePosition: (position: StakingPosition) => position is StakePosition;
|
|
404
|
-
/**
|
|
405
|
-
* Type guard that checks whether a given `StakingPosition` is an unstake position.
|
|
406
|
-
*/
|
|
407
|
-
export declare const isUnstakePosition: (position: StakingPosition) => position is UnstakePosition;
|
|
408
|
-
/**
|
|
409
|
-
* Body payload for staking SUI.
|
|
410
|
-
*/
|
|
411
|
-
export interface ApiStakeBody {
|
|
412
|
-
/**
|
|
413
|
-
* The address performing the stake.
|
|
414
|
-
*/
|
|
415
|
-
walletAddress: SuiAddress;
|
|
416
|
-
/**
|
|
417
|
-
* The amount of SUI to be staked.
|
|
418
|
-
*/
|
|
419
|
-
suiStakeAmount: Balance;
|
|
420
|
-
/**
|
|
421
|
-
* The validator address to stake with.
|
|
422
|
-
*/
|
|
423
|
-
validatorAddress: SuiAddress;
|
|
424
|
-
/**
|
|
425
|
-
* Optional address indicating a referrer.
|
|
426
|
-
*/
|
|
427
|
-
referrer?: SuiAddress;
|
|
428
|
-
/**
|
|
429
|
-
* Optional external fee object. Must not exceed `maxExternalFeePercentage`.
|
|
430
|
-
*/
|
|
431
|
-
externalFee?: ExternalFee;
|
|
432
|
-
/**
|
|
433
|
-
* Indicates whether the transaction should be sponsored.
|
|
434
|
-
*/
|
|
435
|
-
isSponsoredTx?: boolean;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Body payload for unstaking SUI (afSUI -> SUI).
|
|
439
|
-
*/
|
|
440
|
-
export interface ApiUnstakeBody {
|
|
441
|
-
/**
|
|
442
|
-
* The address performing the unstake.
|
|
443
|
-
*/
|
|
444
|
-
walletAddress: SuiAddress;
|
|
445
|
-
/**
|
|
446
|
-
* The amount of afSUI to be unstaked.
|
|
447
|
-
*/
|
|
448
|
-
afSuiUnstakeAmount: Balance;
|
|
449
|
-
/**
|
|
450
|
-
* If true, the unstake is done atomically if possible, using liquidity reserves.
|
|
451
|
-
*/
|
|
452
|
-
isAtomic: boolean;
|
|
453
|
-
/**
|
|
454
|
-
* Optional address indicating a referrer.
|
|
455
|
-
*/
|
|
456
|
-
referrer?: SuiAddress;
|
|
457
|
-
/**
|
|
458
|
-
* Optional external fee object. Must not exceed `maxExternalFeePercentage`.
|
|
459
|
-
*/
|
|
460
|
-
externalFee?: ExternalFee;
|
|
461
|
-
/**
|
|
462
|
-
* Indicates whether the transaction should be sponsored.
|
|
463
|
-
*/
|
|
464
|
-
isSponsoredTx?: boolean;
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* Body payload for staking stakedSUI objects (re-staking).
|
|
468
|
-
*/
|
|
469
|
-
export interface ApiStakeStakedSuiBody {
|
|
470
|
-
/**
|
|
471
|
-
* The address performing the re-stake.
|
|
472
|
-
*/
|
|
473
|
-
walletAddress: SuiAddress;
|
|
474
|
-
/**
|
|
475
|
-
* An array of stakedSui object IDs to re-stake.
|
|
476
|
-
*/
|
|
477
|
-
stakedSuiIds: ObjectId[];
|
|
478
|
-
/**
|
|
479
|
-
* The validator address to stake with.
|
|
480
|
-
*/
|
|
481
|
-
validatorAddress: SuiAddress;
|
|
482
|
-
/**
|
|
483
|
-
* Optional address indicating a referrer.
|
|
484
|
-
*/
|
|
485
|
-
referrer?: SuiAddress;
|
|
486
|
-
/**
|
|
487
|
-
* Indicates whether the transaction should be sponsored.
|
|
488
|
-
*/
|
|
489
|
-
isSponsoredTx?: boolean;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* Body payload for updating a validator's fee settings.
|
|
493
|
-
*/
|
|
494
|
-
export interface ApiUpdateValidatorFeeBody {
|
|
495
|
-
/**
|
|
496
|
-
* The address submitting the update transaction.
|
|
497
|
-
*/
|
|
498
|
-
walletAddress: SuiAddress;
|
|
499
|
-
/**
|
|
500
|
-
* The operation cap object ID that authorizes changes to this validator.
|
|
501
|
-
*/
|
|
502
|
-
validatorOperationCapId: ObjectId;
|
|
503
|
-
/**
|
|
504
|
-
* The new fee percentage to be set (0.01 = 1%).
|
|
505
|
-
*/
|
|
506
|
-
newFeePercentage: Percentage;
|
|
507
|
-
/**
|
|
508
|
-
* Indicates whether the transaction should be sponsored.
|
|
509
|
-
*/
|
|
510
|
-
isSponsoredTx?: boolean;
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Body payload for retrieving staking positions, including pagination.
|
|
514
|
-
*/
|
|
515
|
-
export interface ApiStakingPositionsBody {
|
|
516
|
-
/**
|
|
517
|
-
* The address whose staking positions are being queried.
|
|
518
|
-
*/
|
|
519
|
-
walletAddress: SuiAddress;
|
|
520
|
-
/**
|
|
521
|
-
* Optional cursor for pagination.
|
|
522
|
-
*/
|
|
523
|
-
cursor?: number;
|
|
524
|
-
/**
|
|
525
|
-
* Optional limit on the number of positions returned.
|
|
526
|
-
*/
|
|
527
|
-
limit?: number;
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* Body payload for retrieving delegated stakes, given a wallet address.
|
|
531
|
-
*/
|
|
532
|
-
export interface ApiDelegatedStakesBody {
|
|
533
|
-
/**
|
|
534
|
-
* The address whose delegated stakes are being queried.
|
|
535
|
-
*/
|
|
536
|
-
walletAddress: SuiAddress;
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Body payload for retrieving validator operation caps, given a wallet address.
|
|
540
|
-
*/
|
|
541
|
-
export interface ApiValidatorOperationCapsBody {
|
|
542
|
-
/**
|
|
543
|
-
* The address whose validator operation caps are being queried.
|
|
544
|
-
*/
|
|
545
|
-
walletAddress: SuiAddress;
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* Body payload for retrieving staking-related events, including pagination.
|
|
549
|
-
*/
|
|
550
|
-
export type ApiStakingEventsBody = ApiEventsBody & {
|
|
551
|
-
/**
|
|
552
|
-
* The address whose events are being queried.
|
|
553
|
-
*/
|
|
554
|
-
walletAddress: SuiAddress;
|
|
555
|
-
};
|
|
556
|
-
/**
|
|
557
|
-
* Extends the `StakedSuiVaultStateObject` with additional fields relevant
|
|
558
|
-
* to the router pool. This includes the coin type for afSUI, the configured
|
|
559
|
-
* validator address, and the current exchange rate.
|
|
560
|
-
*/
|
|
561
|
-
export type AfSuiRouterPoolObject = StakedSuiVaultStateObject & {
|
|
562
|
-
/**
|
|
563
|
-
* The coin type string for afSUI (e.g., "0x<package>::afSUI::AFSUI").
|
|
564
|
-
*/
|
|
565
|
-
afSuiCoinType: CoinType;
|
|
566
|
-
/**
|
|
567
|
-
* The official Aftermath validator address.
|
|
568
|
-
*/
|
|
569
|
-
aftermathValidatorAddress: SuiAddress;
|
|
570
|
-
/**
|
|
571
|
-
* The current exchange rate from afSUI to SUI.
|
|
572
|
-
*/
|
|
573
|
-
afSuiToSuiExchangeRate: number;
|
|
574
|
-
};
|
|
575
|
-
//# sourceMappingURL=stakingTypes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stakingTypes.d.ts","sourceRoot":"","sources":["../../../src/packages/staking/stakingTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,MAAM,IAAI,SAAS,EACnB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,MAAM,kCAAkC,CAAC;AAE1C;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACvD;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,cAAc,EAAE,QAAQ,CAAC;IACzB;;OAEG;IACH,GAAG,EAAE,UAAU,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WA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BAAyB,EAAE,UAAU,CAAC;IACtC;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isUnstakePosition = exports.isStakePosition = exports.isUnstakeEvent = exports.isStakeEvent = exports.isSuiDelegatedStake = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* A type guard utility function to check if a position is a native Sui delegated stake
|
|
6
|
-
* (`SuiDelegatedStake`) rather than an Aftermath-specific `StakingPosition`.
|
|
7
|
-
*
|
|
8
|
-
* @param stake - An object that could be either a `StakingPosition` or a `SuiDelegatedStake`.
|
|
9
|
-
* @returns True if the object matches the shape of `SuiDelegatedStake`; otherwise, false.
|
|
10
|
-
*/
|
|
11
|
-
const isSuiDelegatedStake = (stake) => {
|
|
12
|
-
return ("stakeRequestEpoch" in stake &&
|
|
13
|
-
"stakeActiveEpoch" in stake &&
|
|
14
|
-
"principal" in stake &&
|
|
15
|
-
"stakingPool" in stake);
|
|
16
|
-
};
|
|
17
|
-
exports.isSuiDelegatedStake = isSuiDelegatedStake;
|
|
18
|
-
/**
|
|
19
|
-
* Type guard to check if an event is a `StakedEvent`.
|
|
20
|
-
*/
|
|
21
|
-
const isStakeEvent = (event) => {
|
|
22
|
-
return "staker" in event;
|
|
23
|
-
};
|
|
24
|
-
exports.isStakeEvent = isStakeEvent;
|
|
25
|
-
/**
|
|
26
|
-
* Type guard to check if an event is an `UnstakeEvent`.
|
|
27
|
-
*/
|
|
28
|
-
const isUnstakeEvent = (event) => {
|
|
29
|
-
return !(0, exports.isStakeEvent)(event);
|
|
30
|
-
};
|
|
31
|
-
exports.isUnstakeEvent = isUnstakeEvent;
|
|
32
|
-
/**
|
|
33
|
-
* Type guard that checks whether a given `StakingPosition` is a stake position.
|
|
34
|
-
*/
|
|
35
|
-
const isStakePosition = (position) => {
|
|
36
|
-
return "stakedSuiId" in position;
|
|
37
|
-
};
|
|
38
|
-
exports.isStakePosition = isStakePosition;
|
|
39
|
-
/**
|
|
40
|
-
* Type guard that checks whether a given `StakingPosition` is an unstake position.
|
|
41
|
-
*/
|
|
42
|
-
const isUnstakePosition = (position) => {
|
|
43
|
-
return !(0, exports.isStakePosition)(position);
|
|
44
|
-
};
|
|
45
|
-
exports.isUnstakePosition = isUnstakePosition;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SuiSystemStateSummary } from "@mysten/sui/client";
|
|
2
|
-
import { AftermathApi } from "../../../general/providers/aftermathApi";
|
|
3
|
-
export declare class SuiApi {
|
|
4
|
-
private readonly Provider;
|
|
5
|
-
constructor(Provider: AftermathApi);
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Use `getSystemState()` method instead.
|
|
8
|
-
* This method will be removed in a future release.
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* const afSdk = new Aftermath("MAINNET");
|
|
12
|
-
* await afSdk.init(); // initialize provider
|
|
13
|
-
*
|
|
14
|
-
* const sui = afSdk.Sui();
|
|
15
|
-
*
|
|
16
|
-
* const systemState = await sui.getSystemState();
|
|
17
|
-
* console.log(systemState.epoch, systemState.validators);
|
|
18
|
-
*/
|
|
19
|
-
fetchSystemState: () => Promise<SuiSystemStateSummary>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=suiApi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"suiApi.d.ts","sourceRoot":"","sources":["../../../../src/packages/sui/api/suiApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAGvE,qBAAa,MAAM;IASN,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAMnD;;;;;;;;;;;;OAYG;IACI,gBAAgB,QAAa,OAAO,CAAC,qBAAqB,CAAC,CAiBhE;CACF"}
|
|
@@ -1,46 +0,0 @@
|
|
|
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.SuiApi = void 0;
|
|
13
|
-
const utils_1 = require("../../../general/utils");
|
|
14
|
-
class SuiApi {
|
|
15
|
-
// =========================================================================
|
|
16
|
-
// Class Members
|
|
17
|
-
// =========================================================================
|
|
18
|
-
// =========================================================================
|
|
19
|
-
// Constructor
|
|
20
|
-
// =========================================================================
|
|
21
|
-
constructor(Provider) {
|
|
22
|
-
this.Provider = Provider;
|
|
23
|
-
// =========================================================================
|
|
24
|
-
// Inspections
|
|
25
|
-
// =========================================================================
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated Use `getSystemState()` method instead.
|
|
28
|
-
* This method will be removed in a future release.
|
|
29
|
-
* @example
|
|
30
|
-
* ```typescript
|
|
31
|
-
* const afSdk = new Aftermath("MAINNET");
|
|
32
|
-
* await afSdk.init(); // initialize provider
|
|
33
|
-
*
|
|
34
|
-
* const sui = afSdk.Sui();
|
|
35
|
-
*
|
|
36
|
-
* const systemState = await sui.getSystemState();
|
|
37
|
-
* console.log(systemState.epoch, systemState.validators);
|
|
38
|
-
*/
|
|
39
|
-
this.fetchSystemState = () => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const systemState = yield this.Provider.provider.getLatestSuiSystemState();
|
|
41
|
-
const activeValidators = systemState.activeValidators.map((validator) => (Object.assign(Object.assign({}, validator), { suiAddress: utils_1.Helpers.addLeadingZeroesToType(validator.suiAddress) })));
|
|
42
|
-
return Object.assign(Object.assign({}, systemState), { activeValidators });
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.SuiApi = SuiApi;
|