@nktkas/hyperliquid 0.26.0 → 0.27.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/README.md +84 -57
- package/bin/cli.ts +1 -0
- package/dist/bin/cli.js +1 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/src/api/_base.d.ts.map +1 -1
- package/dist/src/api/_base.js +3 -1
- package/dist/src/api/_base.js.map +1 -1
- package/dist/src/api/exchange/_base/_execute.d.ts +10 -0
- package/dist/src/api/exchange/_base/_execute.d.ts.map +1 -1
- package/dist/src/api/exchange/_base/_execute.js +20 -5
- package/dist/src/api/exchange/_base/_execute.js.map +1 -1
- package/dist/src/api/exchange/_base/_nonce.d.ts +4 -10
- package/dist/src/api/exchange/_base/_nonce.d.ts.map +1 -1
- package/dist/src/api/exchange/_base/_nonce.js +10 -1
- package/dist/src/api/exchange/_base/_nonce.js.map +1 -1
- package/dist/src/api/exchange/_base/_types.d.ts +44 -0
- package/dist/src/api/exchange/_base/_types.d.ts.map +1 -1
- package/dist/src/api/exchange/_base/mod.d.ts +0 -1
- package/dist/src/api/exchange/_base/mod.d.ts.map +1 -1
- package/dist/src/api/exchange/_base/mod.js +0 -1
- package/dist/src/api/exchange/_base/mod.js.map +1 -1
- package/dist/src/api/exchange/agentEnableDexAbstraction.d.ts +39 -7
- package/dist/src/api/exchange/agentEnableDexAbstraction.d.ts.map +1 -1
- package/dist/src/api/exchange/agentEnableDexAbstraction.js +20 -8
- package/dist/src/api/exchange/agentEnableDexAbstraction.js.map +1 -1
- package/dist/src/api/exchange/approveAgent.d.ts +38 -6
- package/dist/src/api/exchange/approveAgent.d.ts.map +1 -1
- package/dist/src/api/exchange/approveAgent.js +18 -6
- package/dist/src/api/exchange/approveAgent.js.map +1 -1
- package/dist/src/api/exchange/approveBuilderFee.d.ts +38 -6
- package/dist/src/api/exchange/approveBuilderFee.d.ts.map +1 -1
- package/dist/src/api/exchange/approveBuilderFee.js +18 -6
- package/dist/src/api/exchange/approveBuilderFee.js.map +1 -1
- package/dist/src/api/exchange/batchModify.d.ts +114 -6
- package/dist/src/api/exchange/batchModify.d.ts.map +1 -1
- package/dist/src/api/exchange/batchModify.js +17 -6
- package/dist/src/api/exchange/batchModify.js.map +1 -1
- package/dist/src/api/exchange/cDeposit.d.ts +38 -6
- package/dist/src/api/exchange/cDeposit.d.ts.map +1 -1
- package/dist/src/api/exchange/cDeposit.js +18 -6
- package/dist/src/api/exchange/cDeposit.js.map +1 -1
- package/dist/src/api/exchange/cSignerAction.d.ts +36 -11
- package/dist/src/api/exchange/cSignerAction.d.ts.map +1 -1
- package/dist/src/api/exchange/cSignerAction.js +16 -11
- package/dist/src/api/exchange/cSignerAction.js.map +1 -1
- package/dist/src/api/exchange/cValidatorAction.d.ts +36 -11
- package/dist/src/api/exchange/cValidatorAction.d.ts.map +1 -1
- package/dist/src/api/exchange/cValidatorAction.js +16 -11
- package/dist/src/api/exchange/cValidatorAction.js.map +1 -1
- package/dist/src/api/exchange/cWithdraw.d.ts +38 -6
- package/dist/src/api/exchange/cWithdraw.d.ts.map +1 -1
- package/dist/src/api/exchange/cWithdraw.js +18 -6
- package/dist/src/api/exchange/cWithdraw.js.map +1 -1
- package/dist/src/api/exchange/cancel.d.ts +9 -35
- package/dist/src/api/exchange/cancel.d.ts.map +1 -1
- package/dist/src/api/exchange/cancel.js +15 -22
- package/dist/src/api/exchange/cancel.js.map +1 -1
- package/dist/src/api/exchange/cancelByCloid.d.ts +46 -6
- package/dist/src/api/exchange/cancelByCloid.d.ts.map +1 -1
- package/dist/src/api/exchange/cancelByCloid.js +17 -6
- package/dist/src/api/exchange/cancelByCloid.js.map +1 -1
- package/dist/src/api/exchange/claimRewards.d.ts +35 -10
- package/dist/src/api/exchange/claimRewards.d.ts.map +1 -1
- package/dist/src/api/exchange/claimRewards.js +16 -11
- package/dist/src/api/exchange/claimRewards.js.map +1 -1
- package/dist/src/api/exchange/convertToMultiSigUser.d.ts +38 -17
- package/dist/src/api/exchange/convertToMultiSigUser.d.ts.map +1 -1
- package/dist/src/api/exchange/convertToMultiSigUser.js +19 -7
- package/dist/src/api/exchange/convertToMultiSigUser.js.map +1 -1
- package/dist/src/api/exchange/createSubAccount.d.ts +23 -10
- package/dist/src/api/exchange/createSubAccount.d.ts.map +1 -1
- package/dist/src/api/exchange/createSubAccount.js +26 -20
- package/dist/src/api/exchange/createSubAccount.js.map +1 -1
- package/dist/src/api/exchange/createVault.d.ts +23 -10
- package/dist/src/api/exchange/createVault.d.ts.map +1 -1
- package/dist/src/api/exchange/createVault.js +26 -20
- package/dist/src/api/exchange/createVault.js.map +1 -1
- package/dist/src/api/exchange/evmUserModify.d.ts +38 -6
- package/dist/src/api/exchange/evmUserModify.d.ts.map +1 -1
- package/dist/src/api/exchange/evmUserModify.js +18 -6
- package/dist/src/api/exchange/evmUserModify.js.map +1 -1
- package/dist/src/api/exchange/linkStakingUser.d.ts +38 -6
- package/dist/src/api/exchange/linkStakingUser.d.ts.map +1 -1
- package/dist/src/api/exchange/linkStakingUser.js +18 -6
- package/dist/src/api/exchange/linkStakingUser.js.map +1 -1
- package/dist/src/api/exchange/modify.d.ts +38 -6
- package/dist/src/api/exchange/modify.d.ts.map +1 -1
- package/dist/src/api/exchange/modify.js +18 -6
- package/dist/src/api/exchange/modify.js.map +1 -1
- package/dist/src/api/exchange/multiSig.d.ts +1362 -12
- package/dist/src/api/exchange/multiSig.d.ts.map +1 -1
- package/dist/src/api/exchange/multiSig.js +99 -45
- package/dist/src/api/exchange/multiSig.js.map +1 -1
- package/dist/src/api/exchange/noop.d.ts +37 -5
- package/dist/src/api/exchange/noop.d.ts.map +1 -1
- package/dist/src/api/exchange/noop.js +18 -6
- package/dist/src/api/exchange/noop.js.map +1 -1
- package/dist/src/api/exchange/order.d.ts +9 -111
- package/dist/src/api/exchange/order.d.ts.map +1 -1
- package/dist/src/api/exchange/order.js +15 -45
- package/dist/src/api/exchange/order.js.map +1 -1
- package/dist/src/api/exchange/perpDeploy.d.ts +38 -6
- package/dist/src/api/exchange/perpDeploy.d.ts.map +1 -1
- package/dist/src/api/exchange/perpDeploy.js +18 -6
- package/dist/src/api/exchange/perpDeploy.js.map +1 -1
- package/dist/src/api/exchange/registerReferrer.d.ts +36 -11
- package/dist/src/api/exchange/registerReferrer.d.ts.map +1 -1
- package/dist/src/api/exchange/registerReferrer.js +16 -11
- package/dist/src/api/exchange/registerReferrer.js.map +1 -1
- package/dist/src/api/exchange/reserveRequestWeight.d.ts +38 -6
- package/dist/src/api/exchange/reserveRequestWeight.d.ts.map +1 -1
- package/dist/src/api/exchange/reserveRequestWeight.js +18 -6
- package/dist/src/api/exchange/reserveRequestWeight.js.map +1 -1
- package/dist/src/api/exchange/scheduleCancel.d.ts +39 -7
- package/dist/src/api/exchange/scheduleCancel.d.ts.map +1 -1
- package/dist/src/api/exchange/scheduleCancel.js +17 -5
- package/dist/src/api/exchange/scheduleCancel.js.map +1 -1
- package/dist/src/api/exchange/sendAsset.d.ts +40 -8
- package/dist/src/api/exchange/sendAsset.d.ts.map +1 -1
- package/dist/src/api/exchange/sendAsset.js +20 -8
- package/dist/src/api/exchange/sendAsset.js.map +1 -1
- package/dist/src/api/exchange/setDisplayName.d.ts +36 -11
- package/dist/src/api/exchange/setDisplayName.d.ts.map +1 -1
- package/dist/src/api/exchange/setDisplayName.js +16 -11
- package/dist/src/api/exchange/setDisplayName.js.map +1 -1
- package/dist/src/api/exchange/setReferrer.d.ts +36 -11
- package/dist/src/api/exchange/setReferrer.d.ts.map +1 -1
- package/dist/src/api/exchange/setReferrer.js +16 -11
- package/dist/src/api/exchange/setReferrer.js.map +1 -1
- package/dist/src/api/exchange/spotDeploy.d.ts +38 -6
- package/dist/src/api/exchange/spotDeploy.d.ts.map +1 -1
- package/dist/src/api/exchange/spotDeploy.js +18 -6
- package/dist/src/api/exchange/spotDeploy.js.map +1 -1
- package/dist/src/api/exchange/spotSend.d.ts +38 -6
- package/dist/src/api/exchange/spotSend.d.ts.map +1 -1
- package/dist/src/api/exchange/spotSend.js +18 -6
- package/dist/src/api/exchange/spotSend.js.map +1 -1
- package/dist/src/api/exchange/spotUser.d.ts +36 -11
- package/dist/src/api/exchange/spotUser.d.ts.map +1 -1
- package/dist/src/api/exchange/spotUser.js +16 -11
- package/dist/src/api/exchange/spotUser.js.map +1 -1
- package/dist/src/api/exchange/subAccountModify.d.ts +36 -11
- package/dist/src/api/exchange/subAccountModify.d.ts.map +1 -1
- package/dist/src/api/exchange/subAccountModify.js +16 -11
- package/dist/src/api/exchange/subAccountModify.js.map +1 -1
- package/dist/src/api/exchange/subAccountSpotTransfer.d.ts +36 -11
- package/dist/src/api/exchange/subAccountSpotTransfer.d.ts.map +1 -1
- package/dist/src/api/exchange/subAccountSpotTransfer.js +16 -11
- package/dist/src/api/exchange/subAccountSpotTransfer.js.map +1 -1
- package/dist/src/api/exchange/subAccountTransfer.d.ts +36 -11
- package/dist/src/api/exchange/subAccountTransfer.d.ts.map +1 -1
- package/dist/src/api/exchange/subAccountTransfer.js +16 -11
- package/dist/src/api/exchange/subAccountTransfer.js.map +1 -1
- package/dist/src/api/exchange/tokenDelegate.d.ts +38 -6
- package/dist/src/api/exchange/tokenDelegate.d.ts.map +1 -1
- package/dist/src/api/exchange/tokenDelegate.js +18 -6
- package/dist/src/api/exchange/tokenDelegate.js.map +1 -1
- package/dist/src/api/exchange/twapCancel.d.ts +9 -35
- package/dist/src/api/exchange/twapCancel.d.ts.map +1 -1
- package/dist/src/api/exchange/twapCancel.js +15 -22
- package/dist/src/api/exchange/twapCancel.js.map +1 -1
- package/dist/src/api/exchange/twapOrder.d.ts +9 -59
- package/dist/src/api/exchange/twapOrder.d.ts.map +1 -1
- package/dist/src/api/exchange/twapOrder.js +15 -28
- package/dist/src/api/exchange/twapOrder.js.map +1 -1
- package/dist/src/api/exchange/updateIsolatedMargin.d.ts +38 -6
- package/dist/src/api/exchange/updateIsolatedMargin.d.ts.map +1 -1
- package/dist/src/api/exchange/updateIsolatedMargin.js +18 -6
- package/dist/src/api/exchange/updateIsolatedMargin.js.map +1 -1
- package/dist/src/api/exchange/updateLeverage.d.ts +38 -6
- package/dist/src/api/exchange/updateLeverage.d.ts.map +1 -1
- package/dist/src/api/exchange/updateLeverage.js +18 -6
- package/dist/src/api/exchange/updateLeverage.js.map +1 -1
- package/dist/src/api/exchange/usdClassTransfer.d.ts +38 -6
- package/dist/src/api/exchange/usdClassTransfer.d.ts.map +1 -1
- package/dist/src/api/exchange/usdClassTransfer.js +18 -6
- package/dist/src/api/exchange/usdClassTransfer.js.map +1 -1
- package/dist/src/api/exchange/usdSend.d.ts +38 -6
- package/dist/src/api/exchange/usdSend.d.ts.map +1 -1
- package/dist/src/api/exchange/usdSend.js +18 -6
- package/dist/src/api/exchange/usdSend.js.map +1 -1
- package/dist/src/api/exchange/userDexAbstraction.d.ts +44 -12
- package/dist/src/api/exchange/userDexAbstraction.d.ts.map +1 -1
- package/dist/src/api/exchange/userDexAbstraction.js +22 -10
- package/dist/src/api/exchange/userDexAbstraction.js.map +1 -1
- package/dist/src/api/exchange/validatorL1Stream.d.ts +116 -0
- package/dist/src/api/exchange/validatorL1Stream.d.ts.map +1 -0
- package/dist/src/api/exchange/validatorL1Stream.js +84 -0
- package/dist/src/api/exchange/validatorL1Stream.js.map +1 -0
- package/dist/src/api/exchange/vaultDistribute.d.ts +36 -11
- package/dist/src/api/exchange/vaultDistribute.d.ts.map +1 -1
- package/dist/src/api/exchange/vaultDistribute.js +16 -11
- package/dist/src/api/exchange/vaultDistribute.js.map +1 -1
- package/dist/src/api/exchange/vaultModify.d.ts +36 -11
- package/dist/src/api/exchange/vaultModify.d.ts.map +1 -1
- package/dist/src/api/exchange/vaultModify.js +16 -11
- package/dist/src/api/exchange/vaultModify.js.map +1 -1
- package/dist/src/api/exchange/vaultTransfer.d.ts +38 -6
- package/dist/src/api/exchange/vaultTransfer.d.ts.map +1 -1
- package/dist/src/api/exchange/vaultTransfer.js +18 -6
- package/dist/src/api/exchange/vaultTransfer.js.map +1 -1
- package/dist/src/api/exchange/withdraw3.d.ts +38 -6
- package/dist/src/api/exchange/withdraw3.d.ts.map +1 -1
- package/dist/src/api/exchange/withdraw3.js +18 -6
- package/dist/src/api/exchange/withdraw3.js.map +1 -1
- package/dist/src/api/exchange/~client.d.ts +121 -451
- package/dist/src/api/exchange/~client.d.ts.map +1 -1
- package/dist/src/api/exchange/~client.js +33 -21
- package/dist/src/api/exchange/~client.js.map +1 -1
- package/dist/src/api/exchange/~mod.d.ts +2 -1
- package/dist/src/api/exchange/~mod.d.ts.map +1 -1
- package/dist/src/api/exchange/~mod.js +2 -1
- package/dist/src/api/exchange/~mod.js.map +1 -1
- package/dist/src/api/info/activeAssetData.d.ts +2 -2
- package/dist/src/api/info/activeAssetData.d.ts.map +1 -1
- package/dist/src/api/info/activeAssetData.js +8 -2
- package/dist/src/api/info/activeAssetData.js.map +1 -1
- package/dist/src/api/info/alignedQuoteTokenInfo.d.ts +2 -2
- package/dist/src/api/info/alignedQuoteTokenInfo.d.ts.map +1 -1
- package/dist/src/api/info/alignedQuoteTokenInfo.js +8 -2
- package/dist/src/api/info/alignedQuoteTokenInfo.js.map +1 -1
- package/dist/src/api/info/allMids.d.ts +2 -2
- package/dist/src/api/info/allMids.d.ts.map +1 -1
- package/dist/src/api/info/allMids.js +8 -2
- package/dist/src/api/info/allMids.js.map +1 -1
- package/dist/src/api/info/allPerpMetas.d.ts +1 -1
- package/dist/src/api/info/allPerpMetas.d.ts.map +1 -1
- package/dist/src/api/info/allPerpMetas.js +7 -2
- package/dist/src/api/info/allPerpMetas.js.map +1 -1
- package/dist/src/api/info/blockDetails.d.ts +3 -3
- package/dist/src/api/info/blockDetails.d.ts.map +1 -1
- package/dist/src/api/info/blockDetails.js +8 -2
- package/dist/src/api/info/blockDetails.js.map +1 -1
- package/dist/src/api/info/candleSnapshot.d.ts +2 -2
- package/dist/src/api/info/candleSnapshot.d.ts.map +1 -1
- package/dist/src/api/info/candleSnapshot.js +8 -2
- package/dist/src/api/info/candleSnapshot.js.map +1 -1
- package/dist/src/api/info/clearinghouseState.d.ts +2 -2
- package/dist/src/api/info/clearinghouseState.d.ts.map +1 -1
- package/dist/src/api/info/clearinghouseState.js +8 -2
- package/dist/src/api/info/clearinghouseState.js.map +1 -1
- package/dist/src/api/info/delegations.d.ts +2 -2
- package/dist/src/api/info/delegations.d.ts.map +1 -1
- package/dist/src/api/info/delegations.js +8 -2
- package/dist/src/api/info/delegations.js.map +1 -1
- package/dist/src/api/info/delegatorHistory.d.ts +2 -2
- package/dist/src/api/info/delegatorHistory.d.ts.map +1 -1
- package/dist/src/api/info/delegatorHistory.js +8 -2
- package/dist/src/api/info/delegatorHistory.js.map +1 -1
- package/dist/src/api/info/delegatorRewards.d.ts +2 -2
- package/dist/src/api/info/delegatorRewards.d.ts.map +1 -1
- package/dist/src/api/info/delegatorRewards.js +8 -2
- package/dist/src/api/info/delegatorRewards.js.map +1 -1
- package/dist/src/api/info/delegatorSummary.d.ts +2 -2
- package/dist/src/api/info/delegatorSummary.d.ts.map +1 -1
- package/dist/src/api/info/delegatorSummary.js +8 -2
- package/dist/src/api/info/delegatorSummary.js.map +1 -1
- package/dist/src/api/info/exchangeStatus.d.ts +1 -1
- package/dist/src/api/info/exchangeStatus.d.ts.map +1 -1
- package/dist/src/api/info/exchangeStatus.js +8 -3
- package/dist/src/api/info/exchangeStatus.js.map +1 -1
- package/dist/src/api/info/extraAgents.d.ts +2 -2
- package/dist/src/api/info/extraAgents.d.ts.map +1 -1
- package/dist/src/api/info/extraAgents.js +8 -2
- package/dist/src/api/info/extraAgents.js.map +1 -1
- package/dist/src/api/info/frontendOpenOrders.d.ts +2 -2
- package/dist/src/api/info/frontendOpenOrders.d.ts.map +1 -1
- package/dist/src/api/info/frontendOpenOrders.js +8 -2
- package/dist/src/api/info/frontendOpenOrders.js.map +1 -1
- package/dist/src/api/info/fundingHistory.d.ts +2 -2
- package/dist/src/api/info/fundingHistory.d.ts.map +1 -1
- package/dist/src/api/info/fundingHistory.js +8 -2
- package/dist/src/api/info/fundingHistory.js.map +1 -1
- package/dist/src/api/info/gossipRootIps.d.ts +1 -1
- package/dist/src/api/info/gossipRootIps.d.ts.map +1 -1
- package/dist/src/api/info/gossipRootIps.js +7 -3
- package/dist/src/api/info/gossipRootIps.js.map +1 -1
- package/dist/src/api/info/historicalOrders.d.ts +2 -2
- package/dist/src/api/info/historicalOrders.d.ts.map +1 -1
- package/dist/src/api/info/historicalOrders.js +8 -2
- package/dist/src/api/info/historicalOrders.js.map +1 -1
- package/dist/src/api/info/isVip.d.ts +2 -2
- package/dist/src/api/info/isVip.d.ts.map +1 -1
- package/dist/src/api/info/isVip.js +8 -2
- package/dist/src/api/info/isVip.js.map +1 -1
- package/dist/src/api/info/l2Book.d.ts +2 -2
- package/dist/src/api/info/l2Book.d.ts.map +1 -1
- package/dist/src/api/info/l2Book.js +8 -2
- package/dist/src/api/info/l2Book.js.map +1 -1
- package/dist/src/api/info/leadingVaults.d.ts +2 -2
- package/dist/src/api/info/leadingVaults.d.ts.map +1 -1
- package/dist/src/api/info/leadingVaults.js +8 -2
- package/dist/src/api/info/leadingVaults.js.map +1 -1
- package/dist/src/api/info/legalCheck.d.ts +2 -2
- package/dist/src/api/info/legalCheck.d.ts.map +1 -1
- package/dist/src/api/info/legalCheck.js +8 -2
- package/dist/src/api/info/legalCheck.js.map +1 -1
- package/dist/src/api/info/liquidatable.d.ts +1 -1
- package/dist/src/api/info/liquidatable.d.ts.map +1 -1
- package/dist/src/api/info/liquidatable.js +7 -3
- package/dist/src/api/info/liquidatable.js.map +1 -1
- package/dist/src/api/info/marginTable.d.ts +2 -2
- package/dist/src/api/info/marginTable.d.ts.map +1 -1
- package/dist/src/api/info/marginTable.js +8 -2
- package/dist/src/api/info/marginTable.js.map +1 -1
- package/dist/src/api/info/maxBuilderFee.d.ts +2 -2
- package/dist/src/api/info/maxBuilderFee.d.ts.map +1 -1
- package/dist/src/api/info/maxBuilderFee.js +8 -2
- package/dist/src/api/info/maxBuilderFee.js.map +1 -1
- package/dist/src/api/info/maxMarketOrderNtls.d.ts +1 -1
- package/dist/src/api/info/maxMarketOrderNtls.d.ts.map +1 -1
- package/dist/src/api/info/maxMarketOrderNtls.js +8 -2
- package/dist/src/api/info/maxMarketOrderNtls.js.map +1 -1
- package/dist/src/api/info/meta.d.ts +2 -2
- package/dist/src/api/info/meta.d.ts.map +1 -1
- package/dist/src/api/info/meta.js +8 -2
- package/dist/src/api/info/meta.js.map +1 -1
- package/dist/src/api/info/metaAndAssetCtxs.d.ts +2 -2
- package/dist/src/api/info/metaAndAssetCtxs.d.ts.map +1 -1
- package/dist/src/api/info/metaAndAssetCtxs.js +8 -2
- package/dist/src/api/info/metaAndAssetCtxs.js.map +1 -1
- package/dist/src/api/info/openOrders.d.ts +2 -2
- package/dist/src/api/info/openOrders.d.ts.map +1 -1
- package/dist/src/api/info/openOrders.js +8 -2
- package/dist/src/api/info/openOrders.js.map +1 -1
- package/dist/src/api/info/orderStatus.d.ts +2 -2
- package/dist/src/api/info/orderStatus.d.ts.map +1 -1
- package/dist/src/api/info/orderStatus.js +8 -2
- package/dist/src/api/info/orderStatus.js.map +1 -1
- package/dist/src/api/info/perpDeployAuctionStatus.d.ts +1 -1
- package/dist/src/api/info/perpDeployAuctionStatus.d.ts.map +1 -1
- package/dist/src/api/info/perpDeployAuctionStatus.js +8 -3
- package/dist/src/api/info/perpDeployAuctionStatus.js.map +1 -1
- package/dist/src/api/info/perpDexLimits.d.ts +2 -2
- package/dist/src/api/info/perpDexLimits.d.ts.map +1 -1
- package/dist/src/api/info/perpDexLimits.js +8 -2
- package/dist/src/api/info/perpDexLimits.js.map +1 -1
- package/dist/src/api/info/perpDexs.d.ts +1 -1
- package/dist/src/api/info/perpDexs.d.ts.map +1 -1
- package/dist/src/api/info/perpDexs.js +8 -3
- package/dist/src/api/info/perpDexs.js.map +1 -1
- package/dist/src/api/info/perpsAtOpenInterestCap.d.ts +2 -2
- package/dist/src/api/info/perpsAtOpenInterestCap.d.ts.map +1 -1
- package/dist/src/api/info/perpsAtOpenInterestCap.js +7 -2
- package/dist/src/api/info/perpsAtOpenInterestCap.js.map +1 -1
- package/dist/src/api/info/portfolio.d.ts +2 -2
- package/dist/src/api/info/portfolio.d.ts.map +1 -1
- package/dist/src/api/info/portfolio.js +8 -2
- package/dist/src/api/info/portfolio.js.map +1 -1
- package/dist/src/api/info/preTransferCheck.d.ts +2 -2
- package/dist/src/api/info/preTransferCheck.d.ts.map +1 -1
- package/dist/src/api/info/preTransferCheck.js +8 -2
- package/dist/src/api/info/preTransferCheck.js.map +1 -1
- package/dist/src/api/info/predictedFundings.d.ts +1 -1
- package/dist/src/api/info/predictedFundings.d.ts.map +1 -1
- package/dist/src/api/info/predictedFundings.js +8 -3
- package/dist/src/api/info/predictedFundings.js.map +1 -1
- package/dist/src/api/info/recentTrades.d.ts +2 -2
- package/dist/src/api/info/recentTrades.d.ts.map +1 -1
- package/dist/src/api/info/recentTrades.js +8 -2
- package/dist/src/api/info/recentTrades.js.map +1 -1
- package/dist/src/api/info/referral.d.ts +2 -2
- package/dist/src/api/info/referral.d.ts.map +1 -1
- package/dist/src/api/info/referral.js +8 -2
- package/dist/src/api/info/referral.js.map +1 -1
- package/dist/src/api/info/spotClearinghouseState.d.ts +2 -2
- package/dist/src/api/info/spotClearinghouseState.d.ts.map +1 -1
- package/dist/src/api/info/spotClearinghouseState.js +8 -2
- package/dist/src/api/info/spotClearinghouseState.js.map +1 -1
- package/dist/src/api/info/spotDeployState.d.ts +2 -2
- package/dist/src/api/info/spotDeployState.d.ts.map +1 -1
- package/dist/src/api/info/spotDeployState.js +8 -2
- package/dist/src/api/info/spotDeployState.js.map +1 -1
- package/dist/src/api/info/spotMeta.d.ts +1 -1
- package/dist/src/api/info/spotMeta.d.ts.map +1 -1
- package/dist/src/api/info/spotMeta.js +8 -3
- package/dist/src/api/info/spotMeta.js.map +1 -1
- package/dist/src/api/info/spotMetaAndAssetCtxs.d.ts +1 -1
- package/dist/src/api/info/spotMetaAndAssetCtxs.d.ts.map +1 -1
- package/dist/src/api/info/spotMetaAndAssetCtxs.js +8 -3
- package/dist/src/api/info/spotMetaAndAssetCtxs.js.map +1 -1
- package/dist/src/api/info/spotPairDeployAuctionStatus.d.ts +1 -1
- package/dist/src/api/info/spotPairDeployAuctionStatus.d.ts.map +1 -1
- package/dist/src/api/info/spotPairDeployAuctionStatus.js +8 -3
- package/dist/src/api/info/spotPairDeployAuctionStatus.js.map +1 -1
- package/dist/src/api/info/subAccounts.d.ts +2 -2
- package/dist/src/api/info/subAccounts.d.ts.map +1 -1
- package/dist/src/api/info/subAccounts.js +8 -2
- package/dist/src/api/info/subAccounts.js.map +1 -1
- package/dist/src/api/info/subAccounts2.d.ts +2 -2
- package/dist/src/api/info/subAccounts2.d.ts.map +1 -1
- package/dist/src/api/info/subAccounts2.js +8 -2
- package/dist/src/api/info/subAccounts2.js.map +1 -1
- package/dist/src/api/info/tokenDetails.d.ts +2 -2
- package/dist/src/api/info/tokenDetails.d.ts.map +1 -1
- package/dist/src/api/info/tokenDetails.js +8 -2
- package/dist/src/api/info/tokenDetails.js.map +1 -1
- package/dist/src/api/info/twapHistory.d.ts +2 -2
- package/dist/src/api/info/twapHistory.d.ts.map +1 -1
- package/dist/src/api/info/twapHistory.js +8 -2
- package/dist/src/api/info/twapHistory.js.map +1 -1
- package/dist/src/api/info/txDetails.d.ts +3 -3
- package/dist/src/api/info/txDetails.d.ts.map +1 -1
- package/dist/src/api/info/txDetails.js +8 -2
- package/dist/src/api/info/txDetails.js.map +1 -1
- package/dist/src/api/info/userDetails.d.ts +3 -3
- package/dist/src/api/info/userDetails.d.ts.map +1 -1
- package/dist/src/api/info/userDetails.js +8 -2
- package/dist/src/api/info/userDetails.js.map +1 -1
- package/dist/src/api/info/userDexAbstraction.d.ts +8 -8
- package/dist/src/api/info/userDexAbstraction.d.ts.map +1 -1
- package/dist/src/api/info/userDexAbstraction.js +11 -5
- package/dist/src/api/info/userDexAbstraction.js.map +1 -1
- package/dist/src/api/info/userFees.d.ts +2 -2
- package/dist/src/api/info/userFees.d.ts.map +1 -1
- package/dist/src/api/info/userFees.js +8 -2
- package/dist/src/api/info/userFees.js.map +1 -1
- package/dist/src/api/info/userFills.d.ts +2 -2
- package/dist/src/api/info/userFills.d.ts.map +1 -1
- package/dist/src/api/info/userFills.js +8 -2
- package/dist/src/api/info/userFills.js.map +1 -1
- package/dist/src/api/info/userFillsByTime.d.ts +2 -2
- package/dist/src/api/info/userFillsByTime.d.ts.map +1 -1
- package/dist/src/api/info/userFillsByTime.js +8 -2
- package/dist/src/api/info/userFillsByTime.js.map +1 -1
- package/dist/src/api/info/userFunding.d.ts +2 -2
- package/dist/src/api/info/userFunding.d.ts.map +1 -1
- package/dist/src/api/info/userFunding.js +8 -2
- package/dist/src/api/info/userFunding.js.map +1 -1
- package/dist/src/api/info/userNonFundingLedgerUpdates.d.ts +2 -2
- package/dist/src/api/info/userNonFundingLedgerUpdates.d.ts.map +1 -1
- package/dist/src/api/info/userNonFundingLedgerUpdates.js +8 -2
- package/dist/src/api/info/userNonFundingLedgerUpdates.js.map +1 -1
- package/dist/src/api/info/userRateLimit.d.ts +2 -2
- package/dist/src/api/info/userRateLimit.d.ts.map +1 -1
- package/dist/src/api/info/userRateLimit.js +8 -2
- package/dist/src/api/info/userRateLimit.js.map +1 -1
- package/dist/src/api/info/userRole.d.ts +2 -2
- package/dist/src/api/info/userRole.d.ts.map +1 -1
- package/dist/src/api/info/userRole.js +8 -2
- package/dist/src/api/info/userRole.js.map +1 -1
- package/dist/src/api/info/userToMultiSigSigners.d.ts +2 -2
- package/dist/src/api/info/userToMultiSigSigners.d.ts.map +1 -1
- package/dist/src/api/info/userToMultiSigSigners.js +8 -2
- package/dist/src/api/info/userToMultiSigSigners.js.map +1 -1
- package/dist/src/api/info/userTwapSliceFills.d.ts +2 -2
- package/dist/src/api/info/userTwapSliceFills.d.ts.map +1 -1
- package/dist/src/api/info/userTwapSliceFills.js +8 -2
- package/dist/src/api/info/userTwapSliceFills.js.map +1 -1
- package/dist/src/api/info/userTwapSliceFillsByTime.d.ts +2 -2
- package/dist/src/api/info/userTwapSliceFillsByTime.d.ts.map +1 -1
- package/dist/src/api/info/userTwapSliceFillsByTime.js +8 -2
- package/dist/src/api/info/userTwapSliceFillsByTime.js.map +1 -1
- package/dist/src/api/info/userVaultEquities.d.ts +2 -2
- package/dist/src/api/info/userVaultEquities.d.ts.map +1 -1
- package/dist/src/api/info/userVaultEquities.js +8 -2
- package/dist/src/api/info/userVaultEquities.js.map +1 -1
- package/dist/src/api/info/validatorL1Votes.d.ts +1 -1
- package/dist/src/api/info/validatorL1Votes.d.ts.map +1 -1
- package/dist/src/api/info/validatorL1Votes.js +8 -3
- package/dist/src/api/info/validatorL1Votes.js.map +1 -1
- package/dist/src/api/info/validatorSummaries.d.ts +1 -1
- package/dist/src/api/info/validatorSummaries.d.ts.map +1 -1
- package/dist/src/api/info/validatorSummaries.js +8 -3
- package/dist/src/api/info/validatorSummaries.js.map +1 -1
- package/dist/src/api/info/vaultDetails.d.ts +2 -2
- package/dist/src/api/info/vaultDetails.d.ts.map +1 -1
- package/dist/src/api/info/vaultDetails.js +8 -2
- package/dist/src/api/info/vaultDetails.js.map +1 -1
- package/dist/src/api/info/vaultSummaries.d.ts +1 -1
- package/dist/src/api/info/vaultSummaries.d.ts.map +1 -1
- package/dist/src/api/info/vaultSummaries.js +8 -3
- package/dist/src/api/info/vaultSummaries.js.map +1 -1
- package/dist/src/api/info/webData2.d.ts +2 -2
- package/dist/src/api/info/webData2.d.ts.map +1 -1
- package/dist/src/api/info/webData2.js +8 -2
- package/dist/src/api/info/webData2.js.map +1 -1
- package/dist/src/api/info/~client.d.ts +134 -1344
- package/dist/src/api/info/~client.d.ts.map +1 -1
- package/dist/src/api/info/~client.js.map +1 -1
- package/dist/src/api/subscription/activeAssetCtx.d.ts +3 -3
- package/dist/src/api/subscription/activeAssetCtx.d.ts.map +1 -1
- package/dist/src/api/subscription/activeAssetCtx.js +8 -2
- package/dist/src/api/subscription/activeAssetCtx.js.map +1 -1
- package/dist/src/api/subscription/activeAssetData.d.ts +3 -3
- package/dist/src/api/subscription/activeAssetData.d.ts.map +1 -1
- package/dist/src/api/subscription/activeAssetData.js +8 -2
- package/dist/src/api/subscription/activeAssetData.js.map +1 -1
- package/dist/src/api/subscription/activeSpotAssetCtx.d.ts +3 -3
- package/dist/src/api/subscription/activeSpotAssetCtx.d.ts.map +1 -1
- package/dist/src/api/subscription/activeSpotAssetCtx.js +8 -2
- package/dist/src/api/subscription/activeSpotAssetCtx.js.map +1 -1
- package/dist/src/api/subscription/allMids.d.ts +3 -3
- package/dist/src/api/subscription/allMids.d.ts.map +1 -1
- package/dist/src/api/subscription/allMids.js +8 -2
- package/dist/src/api/subscription/allMids.js.map +1 -1
- package/dist/src/api/subscription/assetCtxs.d.ts +3 -3
- package/dist/src/api/subscription/assetCtxs.d.ts.map +1 -1
- package/dist/src/api/subscription/assetCtxs.js +8 -2
- package/dist/src/api/subscription/assetCtxs.js.map +1 -1
- package/dist/src/api/subscription/bbo.d.ts +3 -3
- package/dist/src/api/subscription/bbo.d.ts.map +1 -1
- package/dist/src/api/subscription/bbo.js +8 -2
- package/dist/src/api/subscription/bbo.js.map +1 -1
- package/dist/src/api/subscription/candle.d.ts +3 -3
- package/dist/src/api/subscription/candle.d.ts.map +1 -1
- package/dist/src/api/subscription/candle.js +7 -2
- package/dist/src/api/subscription/candle.js.map +1 -1
- package/dist/src/api/subscription/clearinghouseState.d.ts +3 -3
- package/dist/src/api/subscription/clearinghouseState.d.ts.map +1 -1
- package/dist/src/api/subscription/clearinghouseState.js +8 -2
- package/dist/src/api/subscription/clearinghouseState.js.map +1 -1
- package/dist/src/api/subscription/explorerBlock.d.ts +2 -2
- package/dist/src/api/subscription/explorerBlock.d.ts.map +1 -1
- package/dist/src/api/subscription/explorerBlock.js +8 -2
- package/dist/src/api/subscription/explorerBlock.js.map +1 -1
- package/dist/src/api/subscription/explorerTxs.d.ts +2 -2
- package/dist/src/api/subscription/explorerTxs.d.ts.map +1 -1
- package/dist/src/api/subscription/explorerTxs.js +8 -2
- package/dist/src/api/subscription/explorerTxs.js.map +1 -1
- package/dist/src/api/subscription/l2Book.d.ts +3 -3
- package/dist/src/api/subscription/l2Book.d.ts.map +1 -1
- package/dist/src/api/subscription/l2Book.js +8 -2
- package/dist/src/api/subscription/l2Book.js.map +1 -1
- package/dist/src/api/subscription/notification.d.ts +3 -3
- package/dist/src/api/subscription/notification.d.ts.map +1 -1
- package/dist/src/api/subscription/notification.js +8 -2
- package/dist/src/api/subscription/notification.js.map +1 -1
- package/dist/src/api/subscription/openOrders.d.ts +3 -3
- package/dist/src/api/subscription/openOrders.d.ts.map +1 -1
- package/dist/src/api/subscription/openOrders.js +8 -2
- package/dist/src/api/subscription/openOrders.js.map +1 -1
- package/dist/src/api/subscription/orderUpdates.d.ts +3 -3
- package/dist/src/api/subscription/orderUpdates.d.ts.map +1 -1
- package/dist/src/api/subscription/orderUpdates.js +8 -2
- package/dist/src/api/subscription/orderUpdates.js.map +1 -1
- package/dist/src/api/subscription/spotAssetCtxs.d.ts +67 -0
- package/dist/src/api/subscription/spotAssetCtxs.d.ts.map +1 -0
- package/dist/src/api/subscription/spotAssetCtxs.js +67 -0
- package/dist/src/api/subscription/spotAssetCtxs.js.map +1 -0
- package/dist/src/api/subscription/spotState.d.ts +3 -3
- package/dist/src/api/subscription/spotState.d.ts.map +1 -1
- package/dist/src/api/subscription/spotState.js +8 -2
- package/dist/src/api/subscription/spotState.js.map +1 -1
- package/dist/src/api/subscription/trades.d.ts +3 -3
- package/dist/src/api/subscription/trades.d.ts.map +1 -1
- package/dist/src/api/subscription/trades.js +7 -2
- package/dist/src/api/subscription/trades.js.map +1 -1
- package/dist/src/api/subscription/userEvents.d.ts +3 -3
- package/dist/src/api/subscription/userEvents.d.ts.map +1 -1
- package/dist/src/api/subscription/userEvents.js +8 -2
- package/dist/src/api/subscription/userEvents.js.map +1 -1
- package/dist/src/api/subscription/userFills.d.ts +3 -3
- package/dist/src/api/subscription/userFills.d.ts.map +1 -1
- package/dist/src/api/subscription/userFills.js +8 -2
- package/dist/src/api/subscription/userFills.js.map +1 -1
- package/dist/src/api/subscription/userFundings.d.ts +3 -3
- package/dist/src/api/subscription/userFundings.d.ts.map +1 -1
- package/dist/src/api/subscription/userFundings.js +8 -2
- package/dist/src/api/subscription/userFundings.js.map +1 -1
- package/dist/src/api/subscription/userHistoricalOrders.d.ts +3 -3
- package/dist/src/api/subscription/userHistoricalOrders.d.ts.map +1 -1
- package/dist/src/api/subscription/userHistoricalOrders.js +8 -2
- package/dist/src/api/subscription/userHistoricalOrders.js.map +1 -1
- package/dist/src/api/subscription/userNonFundingLedgerUpdates.d.ts +3 -3
- package/dist/src/api/subscription/userNonFundingLedgerUpdates.d.ts.map +1 -1
- package/dist/src/api/subscription/userNonFundingLedgerUpdates.js +8 -2
- package/dist/src/api/subscription/userNonFundingLedgerUpdates.js.map +1 -1
- package/dist/src/api/subscription/userTwapHistory.d.ts +3 -3
- package/dist/src/api/subscription/userTwapHistory.d.ts.map +1 -1
- package/dist/src/api/subscription/userTwapHistory.js +8 -2
- package/dist/src/api/subscription/userTwapHistory.js.map +1 -1
- package/dist/src/api/subscription/userTwapSliceFills.d.ts +3 -3
- package/dist/src/api/subscription/userTwapSliceFills.d.ts.map +1 -1
- package/dist/src/api/subscription/userTwapSliceFills.js +8 -2
- package/dist/src/api/subscription/userTwapSliceFills.js.map +1 -1
- package/dist/src/api/subscription/webData2.d.ts +3 -3
- package/dist/src/api/subscription/webData2.d.ts.map +1 -1
- package/dist/src/api/subscription/webData2.js +8 -2
- package/dist/src/api/subscription/webData2.js.map +1 -1
- package/dist/src/api/subscription/webData3.d.ts +3 -3
- package/dist/src/api/subscription/webData3.d.ts.map +1 -1
- package/dist/src/api/subscription/webData3.js +8 -2
- package/dist/src/api/subscription/webData3.js.map +1 -1
- package/dist/src/api/subscription/~client.d.ts +46 -25
- package/dist/src/api/subscription/~client.d.ts.map +1 -1
- package/dist/src/api/subscription/~client.js +22 -0
- package/dist/src/api/subscription/~client.js.map +1 -1
- package/dist/src/api/subscription/~mod.d.ts +1 -0
- package/dist/src/api/subscription/~mod.d.ts.map +1 -1
- package/dist/src/api/subscription/~mod.js +1 -0
- package/dist/src/api/subscription/~mod.js.map +1 -1
- package/dist/src/signing/mod.d.ts +6 -6
- package/dist/src/signing/mod.js +6 -6
- package/package.json +1 -1
- package/src/api/_base.ts +6 -2
- package/src/api/exchange/_base/_execute.ts +36 -5
- package/src/api/exchange/_base/_nonce.ts +12 -1
- package/src/api/exchange/_base/_types.ts +26 -0
- package/src/api/exchange/_base/mod.ts +0 -1
- package/src/api/exchange/agentEnableDexAbstraction.ts +36 -16
- package/src/api/exchange/approveAgent.ts +37 -16
- package/src/api/exchange/approveBuilderFee.ts +37 -16
- package/src/api/exchange/batchModify.ts +32 -16
- package/src/api/exchange/cDeposit.ts +37 -16
- package/src/api/exchange/cSignerAction.ts +34 -20
- package/src/api/exchange/cValidatorAction.ts +34 -20
- package/src/api/exchange/cWithdraw.ts +37 -16
- package/src/api/exchange/cancel.ts +27 -49
- package/src/api/exchange/cancelByCloid.ts +32 -15
- package/src/api/exchange/claimRewards.ts +32 -19
- package/src/api/exchange/convertToMultiSigUser.ts +38 -18
- package/src/api/exchange/createSubAccount.ts +50 -36
- package/src/api/exchange/createVault.ts +50 -36
- package/src/api/exchange/evmUserModify.ts +36 -15
- package/src/api/exchange/linkStakingUser.ts +37 -16
- package/src/api/exchange/modify.ts +36 -16
- package/src/api/exchange/multiSig.ts +118 -73
- package/src/api/exchange/noop.ts +34 -14
- package/src/api/exchange/order.ts +27 -99
- package/src/api/exchange/perpDeploy.ts +36 -15
- package/src/api/exchange/registerReferrer.ts +34 -20
- package/src/api/exchange/reserveRequestWeight.ts +36 -15
- package/src/api/exchange/scheduleCancel.ts +38 -17
- package/src/api/exchange/sendAsset.ts +39 -18
- package/src/api/exchange/setDisplayName.ts +34 -20
- package/src/api/exchange/setReferrer.ts +34 -20
- package/src/api/exchange/spotDeploy.ts +36 -15
- package/src/api/exchange/spotSend.ts +37 -16
- package/src/api/exchange/spotUser.ts +34 -20
- package/src/api/exchange/subAccountModify.ts +34 -20
- package/src/api/exchange/subAccountSpotTransfer.ts +34 -20
- package/src/api/exchange/subAccountTransfer.ts +34 -20
- package/src/api/exchange/tokenDelegate.ts +37 -16
- package/src/api/exchange/twapCancel.ts +27 -49
- package/src/api/exchange/twapOrder.ts +27 -61
- package/src/api/exchange/updateIsolatedMargin.ts +36 -15
- package/src/api/exchange/updateLeverage.ts +36 -15
- package/src/api/exchange/usdClassTransfer.ts +37 -16
- package/src/api/exchange/usdSend.ts +37 -16
- package/src/api/exchange/userDexAbstraction.ts +48 -27
- package/src/api/exchange/validatorL1Stream.ts +136 -0
- package/src/api/exchange/vaultDistribute.ts +34 -20
- package/src/api/exchange/vaultModify.ts +34 -20
- package/src/api/exchange/vaultTransfer.ts +36 -15
- package/src/api/exchange/withdraw3.ts +37 -16
- package/src/api/exchange/~client.ts +225 -121
- package/src/api/exchange/~mod.ts +2 -1
- package/src/api/info/activeAssetData.ts +11 -4
- package/src/api/info/alignedQuoteTokenInfo.ts +11 -4
- package/src/api/info/allMids.ts +11 -4
- package/src/api/info/allPerpMetas.ts +10 -5
- package/src/api/info/blockDetails.ts +12 -5
- package/src/api/info/candleSnapshot.ts +11 -5
- package/src/api/info/clearinghouseState.ts +11 -4
- package/src/api/info/delegations.ts +11 -4
- package/src/api/info/delegatorHistory.ts +11 -4
- package/src/api/info/delegatorRewards.ts +11 -4
- package/src/api/info/delegatorSummary.ts +11 -4
- package/src/api/info/exchangeStatus.ts +11 -4
- package/src/api/info/extraAgents.ts +11 -4
- package/src/api/info/frontendOpenOrders.ts +11 -5
- package/src/api/info/fundingHistory.ts +11 -4
- package/src/api/info/gossipRootIps.ts +9 -4
- package/src/api/info/historicalOrders.ts +11 -5
- package/src/api/info/isVip.ts +11 -4
- package/src/api/info/l2Book.ts +11 -5
- package/src/api/info/leadingVaults.ts +11 -4
- package/src/api/info/legalCheck.ts +11 -4
- package/src/api/info/liquidatable.ts +9 -4
- package/src/api/info/marginTable.ts +11 -4
- package/src/api/info/maxBuilderFee.ts +11 -4
- package/src/api/info/maxMarketOrderNtls.ts +11 -4
- package/src/api/info/meta.ts +11 -5
- package/src/api/info/metaAndAssetCtxs.ts +11 -5
- package/src/api/info/openOrders.ts +11 -5
- package/src/api/info/orderStatus.ts +11 -5
- package/src/api/info/perpDeployAuctionStatus.ts +11 -4
- package/src/api/info/perpDexLimits.ts +11 -4
- package/src/api/info/perpDexs.ts +11 -4
- package/src/api/info/perpsAtOpenInterestCap.ts +9 -4
- package/src/api/info/portfolio.ts +11 -4
- package/src/api/info/preTransferCheck.ts +11 -4
- package/src/api/info/predictedFundings.ts +11 -4
- package/src/api/info/recentTrades.ts +11 -4
- package/src/api/info/referral.ts +11 -4
- package/src/api/info/spotClearinghouseState.ts +11 -5
- package/src/api/info/spotDeployState.ts +11 -4
- package/src/api/info/spotMeta.ts +11 -4
- package/src/api/info/spotMetaAndAssetCtxs.ts +11 -5
- package/src/api/info/spotPairDeployAuctionStatus.ts +11 -4
- package/src/api/info/subAccounts.ts +11 -5
- package/src/api/info/subAccounts2.ts +11 -5
- package/src/api/info/tokenDetails.ts +11 -4
- package/src/api/info/twapHistory.ts +11 -5
- package/src/api/info/txDetails.ts +12 -5
- package/src/api/info/userDetails.ts +12 -6
- package/src/api/info/userDexAbstraction.ts +19 -12
- package/src/api/info/userFees.ts +11 -4
- package/src/api/info/userFills.ts +11 -5
- package/src/api/info/userFillsByTime.ts +11 -5
- package/src/api/info/userFunding.ts +11 -4
- package/src/api/info/userNonFundingLedgerUpdates.ts +11 -4
- package/src/api/info/userRateLimit.ts +11 -4
- package/src/api/info/userRole.ts +11 -4
- package/src/api/info/userToMultiSigSigners.ts +11 -4
- package/src/api/info/userTwapSliceFills.ts +11 -5
- package/src/api/info/userTwapSliceFillsByTime.ts +11 -5
- package/src/api/info/userVaultEquities.ts +11 -4
- package/src/api/info/validatorL1Votes.ts +11 -4
- package/src/api/info/validatorSummaries.ts +11 -4
- package/src/api/info/vaultDetails.ts +11 -5
- package/src/api/info/vaultSummaries.ts +11 -4
- package/src/api/info/webData2.ts +11 -5
- package/src/api/info/~client.ts +263 -141
- package/src/api/subscription/activeAssetCtx.ts +12 -5
- package/src/api/subscription/activeAssetData.ts +12 -6
- package/src/api/subscription/activeSpotAssetCtx.ts +12 -5
- package/src/api/subscription/allMids.ts +12 -5
- package/src/api/subscription/assetCtxs.ts +12 -5
- package/src/api/subscription/bbo.ts +12 -6
- package/src/api/subscription/candle.ts +11 -6
- package/src/api/subscription/clearinghouseState.ts +12 -6
- package/src/api/subscription/explorerBlock.ts +12 -5
- package/src/api/subscription/explorerTxs.ts +12 -5
- package/src/api/subscription/l2Book.ts +12 -6
- package/src/api/subscription/notification.ts +12 -5
- package/src/api/subscription/openOrders.ts +12 -6
- package/src/api/subscription/orderUpdates.ts +12 -6
- package/src/api/subscription/spotAssetCtxs.ts +118 -0
- package/src/api/subscription/spotState.ts +12 -6
- package/src/api/subscription/trades.ts +11 -6
- package/src/api/subscription/userEvents.ts +12 -6
- package/src/api/subscription/userFills.ts +12 -6
- package/src/api/subscription/userFundings.ts +12 -5
- package/src/api/subscription/userHistoricalOrders.ts +12 -6
- package/src/api/subscription/userNonFundingLedgerUpdates.ts +12 -6
- package/src/api/subscription/userTwapHistory.ts +12 -6
- package/src/api/subscription/userTwapSliceFills.ts +12 -6
- package/src/api/subscription/webData2.ts +12 -6
- package/src/api/subscription/webData3.ts +12 -6
- package/src/api/subscription/~client.ts +104 -25
- package/src/api/subscription/~mod.ts +1 -0
- package/src/signing/mod.ts +6 -6
- package/dist/src/api/exchange/_base/_helpers.d.ts +0 -11
- package/dist/src/api/exchange/_base/_helpers.d.ts.map +0 -1
- package/dist/src/api/exchange/_base/_helpers.js +0 -18
- package/dist/src/api/exchange/_base/_helpers.js.map +0 -1
- package/src/api/exchange/_base/_helpers.ts +0 -26
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { type DeepImmutable } from "../_base.ts";
|
|
3
|
-
import { type ExchangeRequestConfig, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
4
2
|
/**
|
|
5
3
|
* Place a TWAP order.
|
|
6
4
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-a-twap-order
|
|
@@ -85,7 +83,10 @@ export declare const TwapOrderRequest: v.SchemaWithPipe<readonly [v.ObjectSchema
|
|
|
85
83
|
expiresAfter?: number | undefined;
|
|
86
84
|
}, "Place a TWAP order.">]>;
|
|
87
85
|
export type TwapOrderRequest = v.InferOutput<typeof TwapOrderRequest>;
|
|
88
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* Response for creating a TWAP order.
|
|
88
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-a-twap-order
|
|
89
|
+
*/
|
|
89
90
|
export declare const TwapOrderResponse: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
90
91
|
/** Successful status. */
|
|
91
92
|
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
@@ -151,65 +152,14 @@ export declare const TwapOrderResponse: v.SchemaWithPipe<readonly [v.ObjectSchem
|
|
|
151
152
|
};
|
|
152
153
|
}, "Response for creating a TWAP order.">]>;
|
|
153
154
|
export type TwapOrderResponse = v.InferOutput<typeof TwapOrderResponse>;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
/** Successful status. */
|
|
157
|
-
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
158
|
-
/** Response details. */
|
|
159
|
-
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
160
|
-
/** Type of response. */
|
|
161
|
-
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"twapOrder", undefined>, v.DescriptionAction<"twapOrder", "Type of response.">]>;
|
|
162
|
-
/** Specific data. */
|
|
163
|
-
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
164
|
-
/** Status of the operation. */
|
|
165
|
-
readonly status: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
166
|
-
/** Running order status. */
|
|
167
|
-
readonly running: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
168
|
-
/** TWAP ID. */
|
|
169
|
-
readonly twapId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "TWAP ID.">]>;
|
|
170
|
-
}, undefined>, v.DescriptionAction<{
|
|
171
|
-
twapId: number;
|
|
172
|
-
}, "Running order status.">]>;
|
|
173
|
-
}, undefined>, v.DescriptionAction<{
|
|
174
|
-
running: {
|
|
175
|
-
twapId: number;
|
|
176
|
-
};
|
|
177
|
-
}, "Status of the operation.">]>;
|
|
178
|
-
}, undefined>, v.DescriptionAction<{
|
|
179
|
-
status: {
|
|
180
|
-
running: {
|
|
181
|
-
twapId: number;
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
}, "Specific data.">]>;
|
|
185
|
-
}, undefined>, v.DescriptionAction<{
|
|
186
|
-
type: "twapOrder";
|
|
187
|
-
data: {
|
|
188
|
-
status: {
|
|
189
|
-
running: {
|
|
190
|
-
twapId: number;
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
}, "Response details.">]>;
|
|
195
|
-
}, undefined>, v.DescriptionAction<{
|
|
196
|
-
status: "ok";
|
|
197
|
-
response: {
|
|
198
|
-
type: "twapOrder";
|
|
199
|
-
data: {
|
|
200
|
-
status: {
|
|
201
|
-
running: {
|
|
202
|
-
twapId: number;
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
}, "Successful variant of `TwapOrderResponse` without errors.">]>;
|
|
208
|
-
export type TwapOrderSuccessResponse = v.InferOutput<typeof TwapOrderSuccessResponse>;
|
|
155
|
+
import { type DeepImmutable } from "../_base.ts";
|
|
156
|
+
import { type ExchangeRequestConfig, type ExcludeErrorResponse, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
209
157
|
/** Action parameters for the {@linkcode twapOrder} function. */
|
|
210
158
|
export type TwapOrderParameters = ExtractRequestAction<v.InferInput<typeof TwapOrderRequest>>;
|
|
211
159
|
/** Request options for the {@linkcode twapOrder} function. */
|
|
212
160
|
export type TwapOrderOptions = ExtractRequestOptions<v.InferInput<typeof TwapOrderRequest>>;
|
|
161
|
+
/** Successful variant of {@linkcode TwapOrderResponse} without errors. */
|
|
162
|
+
export type TwapOrderSuccessResponse = ExcludeErrorResponse<TwapOrderResponse>;
|
|
213
163
|
/**
|
|
214
164
|
* Place a TWAP order.
|
|
215
165
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -225,7 +175,7 @@ export type TwapOrderOptions = ExtractRequestOptions<v.InferInput<typeof TwapOrd
|
|
|
225
175
|
* ```ts
|
|
226
176
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
227
177
|
* import { twapOrder } from "@nktkas/hyperliquid/api/exchange";
|
|
228
|
-
* import { privateKeyToAccount } from "
|
|
178
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
229
179
|
*
|
|
230
180
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
231
181
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twapOrder.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/twapOrder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"twapOrder.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/twapOrder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAGvB,yBAAyB;;QAGrB,sBAAsB;;QAKtB,uBAAuB;;YAGnB,gBAAgB;;YAKhB,0DAA0D;;YAK1D,qCAAqC;;YAKrC,sBAAsB;;YAKtB,gCAAgC;;YAKhC,kCAAkC;;;;;;;;;;;;;;;;;;;;;IAW1C,2DAA2D;;IAK3D,+BAA+B;;;;;;;;;;;;;;IAK/B,yCAAyC;;IAKzC,qCAAqC;;;;;;;;;;;;;;;;;;;;;;2BAQvC,CAAC;AACL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAGxB,yBAAyB;;IAKzB,wBAAwB;;QAGpB,wBAAwB;;QAKxB,qBAAqB;;YAGjB,gDAAgD;;gBAI1C,4BAA4B;;oBAGxB,eAAe;;;;;;gBAUnB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAkBrC,CAAC;AACL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAMxE,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAExB,gEAAgE;AAChE,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC;AAE9F,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC;AAE5F,0EAA0E;AAC1E,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,qBAAqB,GAAG,sBAAsB,EACtD,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC1C,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,wBAAwB,CAAC,CAkBnC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { Address, UnsignedDecimal, UnsignedInteger } from "../_base.js";
|
|
6
|
+
import { Signature } from "./_base/mod.js";
|
|
5
7
|
/**
|
|
6
8
|
* Place a TWAP order.
|
|
7
9
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-a-twap-order
|
|
@@ -38,7 +40,10 @@ export const TwapOrderRequest = /* @__PURE__ */ (() => {
|
|
|
38
40
|
expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
|
|
39
41
|
}), v.description("Place a TWAP order."));
|
|
40
42
|
})();
|
|
41
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Response for creating a TWAP order.
|
|
45
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-a-twap-order
|
|
46
|
+
*/
|
|
42
47
|
export const TwapOrderResponse = /* @__PURE__ */ (() => {
|
|
43
48
|
return v.pipe(v.object({
|
|
44
49
|
/** Successful status. */
|
|
@@ -67,29 +72,11 @@ export const TwapOrderResponse = /* @__PURE__ */ (() => {
|
|
|
67
72
|
}), v.description("Response details.")),
|
|
68
73
|
}), v.description("Response for creating a TWAP order."));
|
|
69
74
|
})();
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/** Response details. */
|
|
76
|
-
response: v.pipe(v.object({
|
|
77
|
-
/** Type of response. */
|
|
78
|
-
type: v.pipe(v.literal("twapOrder"), v.description("Type of response.")),
|
|
79
|
-
/** Specific data. */
|
|
80
|
-
data: v.pipe(v.object({
|
|
81
|
-
/** Status of the operation. */
|
|
82
|
-
status: v.pipe(v.object({
|
|
83
|
-
/** Running order status. */
|
|
84
|
-
running: v.pipe(v.object({
|
|
85
|
-
/** TWAP ID. */
|
|
86
|
-
twapId: v.pipe(UnsignedInteger, v.description("TWAP ID.")),
|
|
87
|
-
}), v.description("Running order status.")),
|
|
88
|
-
}), v.description("Status of the operation.")),
|
|
89
|
-
}), v.description("Specific data.")),
|
|
90
|
-
}), v.description("Response details.")),
|
|
91
|
-
}), v.description("Successful variant of `TwapOrderResponse` without errors."));
|
|
92
|
-
})();
|
|
75
|
+
// ============================================================
|
|
76
|
+
// Execution Logic
|
|
77
|
+
// ============================================================
|
|
78
|
+
import { parser } from "../_base.js";
|
|
79
|
+
import { executeL1Action, } from "./_base/mod.js";
|
|
93
80
|
/**
|
|
94
81
|
* Place a TWAP order.
|
|
95
82
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -105,7 +92,7 @@ export const TwapOrderSuccessResponse = /* @__PURE__ */ (() => {
|
|
|
105
92
|
* ```ts
|
|
106
93
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
107
94
|
* import { twapOrder } from "@nktkas/hyperliquid/api/exchange";
|
|
108
|
-
* import { privateKeyToAccount } from "
|
|
95
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
109
96
|
*
|
|
110
97
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
111
98
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twapOrder.js","sourceRoot":"","sources":["../../../../src/api/exchange/twapOrder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"twapOrder.js","sourceRoot":"","sources":["../../../../src/api/exchange/twapOrder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+DAA+D;AAC/D,cAAc;AACd,+DAA+D;AAE/D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACpD,OAAO,CAAC,CAAC,IAAI,CACX,CAAC,CAAC,MAAM,CAAC;QACP,yBAAyB;QACzB,MAAM,EAAE,CAAC,CAAC,IAAI,CACZ,CAAC,CAAC,MAAM,CAAC;YACP,sBAAsB;YACtB,IAAI,EAAE,CAAC,CAAC,IAAI,CACV,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EACtB,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CACjC;YACD,uBAAuB;YACvB,IAAI,EAAE,CAAC,CAAC,IAAI,CACV,CAAC,CAAC,MAAM,CAAC;gBACP,gBAAgB;gBAChB,CAAC,EAAE,CAAC,CAAC,IAAI,CACP,eAAe,EACf,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAC3B;gBACD,0DAA0D;gBAC1D,CAAC,EAAE,CAAC,CAAC,IAAI,CACP,CAAC,CAAC,OAAO,EAAE,EACX,CAAC,CAAC,WAAW,CAA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,gBAAgB,CAAC,CAChC;SACF,CAAC,EACF,CAAC,CAAC,WAAW,CAAC,mBAAmB,CAAC,CACnC;KACF,CAAC,EACF,CAAC,CAAC,WAAW,CAAC,qCAAqC,CAAC,CACrD,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAGL,+DAA+D;AAC/D,kBAAkB;AAClB,+DAA+D;AAE/D,OAAO,EAAsB,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAGL,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AAWxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAsD,EACtD,MAA0C,EAC1C,IAAuB;IAEvB,MAAM,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACvC,MAAM,EAAE;YACN,IAAI,EAAE,WAAW;YACjB,GAAG,MAAM;SACV;QACD,KAAK,EAAE,CAAC,EAAE,2DAA2D;QACrE,SAAS,EAAE;YACT,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,EAAE;SACN;QACD,YAAY,EAAE,IAAI,EAAE,YAAY,IAAI,MAAM,CAAC,mBAAmB;QAC9D,YAAY,EAAE,OAAO,MAAM,CAAC,mBAAmB,KAAK,QAAQ;YAC1D,CAAC,CAAC,MAAM,CAAC,mBAAmB;YAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,mBAAmB,EAAE,EAAE;KACzC,CAAC,CAAC;IACH,OAAO,MAAM,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { type DeepImmutable } from "../_base.ts";
|
|
3
|
-
import { type ExchangeRequestConfig, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
4
2
|
/**
|
|
5
3
|
* Add or remove margin from isolated position.
|
|
6
4
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
|
|
@@ -59,12 +57,46 @@ export declare const UpdateIsolatedMarginRequest: v.SchemaWithPipe<readonly [v.O
|
|
|
59
57
|
expiresAfter?: number | undefined;
|
|
60
58
|
}, "Add or remove margin from isolated position.">]>;
|
|
61
59
|
export type UpdateIsolatedMarginRequest = v.InferOutput<typeof UpdateIsolatedMarginRequest>;
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Successful response without specific data or error response.
|
|
62
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
|
|
63
|
+
*/
|
|
64
|
+
export declare const UpdateIsolatedMarginResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
65
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
66
|
+
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
67
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
|
|
68
|
+
}, undefined>, v.DescriptionAction<{
|
|
69
|
+
type: "default";
|
|
70
|
+
}, "Response details.">]>;
|
|
71
|
+
}, undefined>, v.DescriptionAction<{
|
|
72
|
+
status: "ok";
|
|
73
|
+
response: {
|
|
74
|
+
type: "default";
|
|
75
|
+
};
|
|
76
|
+
}, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
77
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
|
|
78
|
+
readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
79
|
+
}, undefined>, v.DescriptionAction<{
|
|
80
|
+
status: "err";
|
|
81
|
+
response: string;
|
|
82
|
+
}, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
|
|
83
|
+
status: "err";
|
|
84
|
+
response: string;
|
|
85
|
+
} | {
|
|
86
|
+
status: "ok";
|
|
87
|
+
response: {
|
|
88
|
+
type: "default";
|
|
89
|
+
};
|
|
90
|
+
}, "Successful response without specific data or error response.">]>;
|
|
91
|
+
export type UpdateIsolatedMarginResponse = v.InferOutput<typeof UpdateIsolatedMarginResponse>;
|
|
92
|
+
import { type DeepImmutable } from "../_base.ts";
|
|
93
|
+
import { type ExchangeRequestConfig, type ExcludeErrorResponse, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
64
94
|
/** Action parameters for the {@linkcode updateIsolatedMargin} function. */
|
|
65
95
|
export type UpdateIsolatedMarginParameters = ExtractRequestAction<v.InferInput<typeof UpdateIsolatedMarginRequest>>;
|
|
66
96
|
/** Request options for the {@linkcode updateIsolatedMargin} function. */
|
|
67
97
|
export type UpdateIsolatedMarginOptions = ExtractRequestOptions<v.InferInput<typeof UpdateIsolatedMarginRequest>>;
|
|
98
|
+
/** Successful variant of {@linkcode UpdateIsolatedMarginResponse} without errors. */
|
|
99
|
+
export type UpdateIsolatedMarginSuccessResponse = ExcludeErrorResponse<UpdateIsolatedMarginResponse>;
|
|
68
100
|
/**
|
|
69
101
|
* Add or remove margin from isolated position.
|
|
70
102
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -80,7 +112,7 @@ export type UpdateIsolatedMarginOptions = ExtractRequestOptions<v.InferInput<typ
|
|
|
80
112
|
* ```ts
|
|
81
113
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
82
114
|
* import { updateIsolatedMargin } from "@nktkas/hyperliquid/api/exchange";
|
|
83
|
-
* import { privateKeyToAccount } from "
|
|
115
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
84
116
|
*
|
|
85
117
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
86
118
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -91,5 +123,5 @@ export type UpdateIsolatedMarginOptions = ExtractRequestOptions<v.InferInput<typ
|
|
|
91
123
|
* );
|
|
92
124
|
* ```
|
|
93
125
|
*/
|
|
94
|
-
export declare function updateIsolatedMargin(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<UpdateIsolatedMarginParameters>, opts?: UpdateIsolatedMarginOptions): Promise<
|
|
126
|
+
export declare function updateIsolatedMargin(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<UpdateIsolatedMarginParameters>, opts?: UpdateIsolatedMarginOptions): Promise<UpdateIsolatedMarginSuccessResponse>;
|
|
95
127
|
//# sourceMappingURL=updateIsolatedMargin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateIsolatedMargin.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/updateIsolatedMargin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"updateIsolatedMargin.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/updateIsolatedMargin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B;;;GAGG;AACH,eAAO,MAAM,2BAA2B;IAGlC,yBAAyB;;QAGrB,sBAAsB;;QAKtB,gBAAgB;;QAKhB,0DAA0D;;QAK1D,sCAAsC;;;;;;;;IAQ1C,2DAA2D;;IAK3D,+BAA+B;;;;;;;;;;;;;;IAK/B,yCAAyC;;IAKzC,qCAAqC;;;;;;;;;;;;;;;;;oDAQvC,CAAC;AACL,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;oEAKrC,CAAC;AACL,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAM9F,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAExB,2EAA2E;AAC3E,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC;AAEpH,yEAAyE;AACzE,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC;AAElH,qFAAqF;AACrF,MAAM,MAAM,mCAAmC,GAAG,oBAAoB,CAAC,4BAA4B,CAAC,CAAC;AAErG;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,qBAAqB,GAAG,sBAAsB,EACtD,MAAM,EAAE,aAAa,CAAC,8BAA8B,CAAC,EACrD,IAAI,CAAC,EAAE,2BAA2B,GACjC,OAAO,CAAC,mCAAmC,CAAC,CAkB9C"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { Address, Integer, UnsignedInteger } from "../_base.js";
|
|
6
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.js";
|
|
5
7
|
/**
|
|
6
8
|
* Add or remove margin from isolated position.
|
|
7
9
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
|
|
@@ -29,8 +31,18 @@ export const UpdateIsolatedMarginRequest = /* @__PURE__ */ (() => {
|
|
|
29
31
|
expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
|
|
30
32
|
}), v.description("Add or remove margin from isolated position."));
|
|
31
33
|
})();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Successful response without specific data or error response.
|
|
36
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
|
|
37
|
+
*/
|
|
38
|
+
export const UpdateIsolatedMarginResponse = /* @__PURE__ */ (() => {
|
|
39
|
+
return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
|
|
40
|
+
})();
|
|
41
|
+
// ============================================================
|
|
42
|
+
// Execution Logic
|
|
43
|
+
// ============================================================
|
|
44
|
+
import { parser } from "../_base.js";
|
|
45
|
+
import { executeL1Action, } from "./_base/mod.js";
|
|
34
46
|
/**
|
|
35
47
|
* Add or remove margin from isolated position.
|
|
36
48
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -46,7 +58,7 @@ export { SuccessResponse };
|
|
|
46
58
|
* ```ts
|
|
47
59
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
48
60
|
* import { updateIsolatedMargin } from "@nktkas/hyperliquid/api/exchange";
|
|
49
|
-
* import { privateKeyToAccount } from "
|
|
61
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
50
62
|
*
|
|
51
63
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
52
64
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateIsolatedMargin.js","sourceRoot":"","sources":["../../../../src/api/exchange/updateIsolatedMargin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"updateIs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,EAAE;SACN;QACD,YAAY,EAAE,IAAI,EAAE,YAAY,IAAI,MAAM,CAAC,mBAAmB;QAC9D,YAAY,EAAE,OAAO,MAAM,CAAC,mBAAmB,KAAK,QAAQ;YAC1D,CAAC,CAAC,MAAM,CAAC,mBAAmB;YAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,mBAAmB,EAAE,EAAE;KACzC,CAAC,CAAC;IACH,OAAO,MAAM,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { type DeepImmutable } from "../_base.ts";
|
|
3
|
-
import { type ExchangeRequestConfig, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
4
2
|
/**
|
|
5
3
|
* Update cross or isolated leverage on a coin.
|
|
6
4
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-leverage
|
|
@@ -59,12 +57,46 @@ export declare const UpdateLeverageRequest: v.SchemaWithPipe<readonly [v.ObjectS
|
|
|
59
57
|
expiresAfter?: number | undefined;
|
|
60
58
|
}, "Update cross or isolated leverage on a coin.">]>;
|
|
61
59
|
export type UpdateLeverageRequest = v.InferOutput<typeof UpdateLeverageRequest>;
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Successful response without specific data or error response.
|
|
62
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-leverage
|
|
63
|
+
*/
|
|
64
|
+
export declare const UpdateLeverageResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
65
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
66
|
+
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
67
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
|
|
68
|
+
}, undefined>, v.DescriptionAction<{
|
|
69
|
+
type: "default";
|
|
70
|
+
}, "Response details.">]>;
|
|
71
|
+
}, undefined>, v.DescriptionAction<{
|
|
72
|
+
status: "ok";
|
|
73
|
+
response: {
|
|
74
|
+
type: "default";
|
|
75
|
+
};
|
|
76
|
+
}, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
77
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
|
|
78
|
+
readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
79
|
+
}, undefined>, v.DescriptionAction<{
|
|
80
|
+
status: "err";
|
|
81
|
+
response: string;
|
|
82
|
+
}, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
|
|
83
|
+
status: "err";
|
|
84
|
+
response: string;
|
|
85
|
+
} | {
|
|
86
|
+
status: "ok";
|
|
87
|
+
response: {
|
|
88
|
+
type: "default";
|
|
89
|
+
};
|
|
90
|
+
}, "Successful response without specific data or error response.">]>;
|
|
91
|
+
export type UpdateLeverageResponse = v.InferOutput<typeof UpdateLeverageResponse>;
|
|
92
|
+
import { type DeepImmutable } from "../_base.ts";
|
|
93
|
+
import { type ExchangeRequestConfig, type ExcludeErrorResponse, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
64
94
|
/** Action parameters for the {@linkcode updateLeverage} function. */
|
|
65
95
|
export type UpdateLeverageParameters = ExtractRequestAction<v.InferInput<typeof UpdateLeverageRequest>>;
|
|
66
96
|
/** Request options for the {@linkcode updateLeverage} function. */
|
|
67
97
|
export type UpdateLeverageOptions = ExtractRequestOptions<v.InferInput<typeof UpdateLeverageRequest>>;
|
|
98
|
+
/** Successful variant of {@linkcode UpdateLeverageResponse} without errors. */
|
|
99
|
+
export type UpdateLeverageSuccessResponse = ExcludeErrorResponse<UpdateLeverageResponse>;
|
|
68
100
|
/**
|
|
69
101
|
* Update cross or isolated leverage on a coin.
|
|
70
102
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -80,7 +112,7 @@ export type UpdateLeverageOptions = ExtractRequestOptions<v.InferInput<typeof Up
|
|
|
80
112
|
* ```ts
|
|
81
113
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
82
114
|
* import { updateLeverage } from "@nktkas/hyperliquid/api/exchange";
|
|
83
|
-
* import { privateKeyToAccount } from "
|
|
115
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
84
116
|
*
|
|
85
117
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
86
118
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -91,5 +123,5 @@ export type UpdateLeverageOptions = ExtractRequestOptions<v.InferInput<typeof Up
|
|
|
91
123
|
* );
|
|
92
124
|
* ```
|
|
93
125
|
*/
|
|
94
|
-
export declare function updateLeverage(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<UpdateLeverageParameters>, opts?: UpdateLeverageOptions): Promise<
|
|
126
|
+
export declare function updateLeverage(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<UpdateLeverageParameters>, opts?: UpdateLeverageOptions): Promise<UpdateLeverageSuccessResponse>;
|
|
95
127
|
//# sourceMappingURL=updateLeverage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateLeverage.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/updateLeverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"updateLeverage.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/updateLeverage.ts"],"names":[],"mappings":"AAAA,OAAO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C3B,OAAO,CAAC,6BAA6B,CAAC,CAkBxC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { Address, UnsignedInteger } from "../_base.js";
|
|
6
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.js";
|
|
5
7
|
/**
|
|
6
8
|
* Update cross or isolated leverage on a coin.
|
|
7
9
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-leverage
|
|
@@ -29,8 +31,18 @@ export const UpdateLeverageRequest = /* @__PURE__ */ (() => {
|
|
|
29
31
|
expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
|
|
30
32
|
}), v.description("Update cross or isolated leverage on a coin."));
|
|
31
33
|
})();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Successful response without specific data or error response.
|
|
36
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-leverage
|
|
37
|
+
*/
|
|
38
|
+
export const UpdateLeverageResponse = /* @__PURE__ */ (() => {
|
|
39
|
+
return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
|
|
40
|
+
})();
|
|
41
|
+
// ============================================================
|
|
42
|
+
// Execution Logic
|
|
43
|
+
// ============================================================
|
|
44
|
+
import { parser } from "../_base.js";
|
|
45
|
+
import { executeL1Action, } from "./_base/mod.js";
|
|
34
46
|
/**
|
|
35
47
|
* Update cross or isolated leverage on a coin.
|
|
36
48
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -46,7 +58,7 @@ export { SuccessResponse };
|
|
|
46
58
|
* ```ts
|
|
47
59
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
48
60
|
* import { updateLeverage } from "@nktkas/hyperliquid/api/exchange";
|
|
49
|
-
* import { privateKeyToAccount } from "
|
|
61
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
50
62
|
*
|
|
51
63
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
52
64
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateLeverage.js","sourceRoot":"","sources":["../../../../src/api/exchange/updateLeverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"updateLeverage.js","sourceRoot":"","sources":["../../../../src/api/exchange/updateLeverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+DAA+D;AAC/D,cAAc;AACd,+DAA+D;AAE/D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACzD,OAAO,CAAC,CAAC,IAAI,CACX,CAAC,CAAC,MAAM,CAAC;QACP,yBAAyB;QACzB,MAAM,EAAE,CAAC,CAAC,IAAI,CACZ,CAAC,CAAC,MAAM,CAAC;YACP,sBAAsB;YACtB,IAAI,EAAE,CAAC,CAAC,IAAI,CACV,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC3B,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CACjC;YACD,gBAAgB;YAChB,KAAK,EAAE,CAAC,CAAC,IAAI,CACX,eAAe,EACf,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAC3B;YACD,gEAAgE;YAChE,OAAO,EAAE,CAAC,CAAC,IAAI,CACb,CAAC,CAAC,OAAO,EAAE,EACX,CAAC,CAAC,WA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M,aAAa,CAAC;AACzD,OAAO,EAGL,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AAWxB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAAsD,EACtD,MAA+C,EAC/C,IAA4B;IAE5B,MAAM,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC5C,MAAM,EAAE;YACN,IAAI,EAAE,gBAAgB;YACtB,GAAG,MAAM;SACV;QACD,KAAK,EAAE,CAAC,EAAE,2DAA2D;QACrE,SAAS,EAAE;YACT,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,EAAE;SACN;QACD,YAAY,EAAE,IAAI,EAAE,YAAY,IAAI,MAAM,CAAC,mBAAmB;QAC9D,YAAY,EAAE,OAAO,MAAM,CAAC,mBAAmB,KAAK,QAAQ;YAC1D,CAAC,CAAC,MAAM,CAAC,mBAAmB;YAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,mBAAmB,EAAE,EAAE;KACzC,CAAC,CAAC;IACH,OAAO,MAAM,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { type DeepImmutable } from "../_base.ts";
|
|
3
|
-
import { type ExchangeRequestConfig, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
4
2
|
/**
|
|
5
3
|
* Transfer funds between Spot account and Perp account.
|
|
6
4
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#transfer-from-spot-account-to-perp-account-and-vice-versa
|
|
@@ -61,12 +59,46 @@ export declare const UsdClassTransferRequest: v.SchemaWithPipe<readonly [v.Objec
|
|
|
61
59
|
};
|
|
62
60
|
}, "Transfer funds between Spot account and Perp account.">]>;
|
|
63
61
|
export type UsdClassTransferRequest = v.InferOutput<typeof UsdClassTransferRequest>;
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Successful response without specific data or error response.
|
|
64
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#transfer-from-spot-account-to-perp-account-and-vice-versa
|
|
65
|
+
*/
|
|
66
|
+
export declare const UsdClassTransferResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
67
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
68
|
+
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
69
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
|
|
70
|
+
}, undefined>, v.DescriptionAction<{
|
|
71
|
+
type: "default";
|
|
72
|
+
}, "Response details.">]>;
|
|
73
|
+
}, undefined>, v.DescriptionAction<{
|
|
74
|
+
status: "ok";
|
|
75
|
+
response: {
|
|
76
|
+
type: "default";
|
|
77
|
+
};
|
|
78
|
+
}, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
79
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
|
|
80
|
+
readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
81
|
+
}, undefined>, v.DescriptionAction<{
|
|
82
|
+
status: "err";
|
|
83
|
+
response: string;
|
|
84
|
+
}, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
|
|
85
|
+
status: "err";
|
|
86
|
+
response: string;
|
|
87
|
+
} | {
|
|
88
|
+
status: "ok";
|
|
89
|
+
response: {
|
|
90
|
+
type: "default";
|
|
91
|
+
};
|
|
92
|
+
}, "Successful response without specific data or error response.">]>;
|
|
93
|
+
export type UsdClassTransferResponse = v.InferOutput<typeof UsdClassTransferResponse>;
|
|
94
|
+
import { type DeepImmutable } from "../_base.ts";
|
|
95
|
+
import { type ExchangeRequestConfig, type ExcludeErrorResponse, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
66
96
|
/** Action parameters for the {@linkcode usdClassTransfer} function. */
|
|
67
97
|
export type UsdClassTransferParameters = ExtractRequestAction<v.InferInput<typeof UsdClassTransferRequest>>;
|
|
68
98
|
/** Request options for the {@linkcode usdClassTransfer} function. */
|
|
69
99
|
export type UsdClassTransferOptions = ExtractRequestOptions<v.InferInput<typeof UsdClassTransferRequest>>;
|
|
100
|
+
/** Successful variant of {@linkcode UsdClassTransferResponse} without errors. */
|
|
101
|
+
export type UsdClassTransferSuccessResponse = ExcludeErrorResponse<UsdClassTransferResponse>;
|
|
70
102
|
/** EIP-712 types for the {@linkcode usdClassTransfer} function. */
|
|
71
103
|
export declare const UsdClassTransferTypes: {
|
|
72
104
|
"HyperliquidTransaction:UsdClassTransfer": {
|
|
@@ -89,7 +121,7 @@ export declare const UsdClassTransferTypes: {
|
|
|
89
121
|
* ```ts
|
|
90
122
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
91
123
|
* import { usdClassTransfer } from "@nktkas/hyperliquid/api/exchange";
|
|
92
|
-
* import { privateKeyToAccount } from "
|
|
124
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
93
125
|
*
|
|
94
126
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
95
127
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -100,5 +132,5 @@ export declare const UsdClassTransferTypes: {
|
|
|
100
132
|
* );
|
|
101
133
|
* ```
|
|
102
134
|
*/
|
|
103
|
-
export declare function usdClassTransfer(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<UsdClassTransferParameters>, opts?: UsdClassTransferOptions): Promise<
|
|
135
|
+
export declare function usdClassTransfer(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<UsdClassTransferParameters>, opts?: UsdClassTransferOptions): Promise<UsdClassTransferSuccessResponse>;
|
|
104
136
|
//# sourceMappingURL=usdClassTransfer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usdClassTransfer.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/usdClassTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"usdClassTransfer.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/usdClassTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B;;;GAGG;AACH,eAAO,MAAM,uBAAuB;IAG9B,yBAAyB;;QAGrB,sBAAsB;;QAKtB,iCAAiC;;QAKjC,2BAA2B;;QAK3B,mCAAmC;;QAKnC,yDAAyD;;QAKzD,2DAA2D;;;;;;;;;;IAQ/D,2DAA2D;;IAK3D,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6DAQjC,CAAC;AACL,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEpF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;oEAKjC,CAAC;AACL,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAMtF,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE1B,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAExB,uEAAuE;AACvE,MAAM,MAAM,0BAA0B,GAAG,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC;AAE5G,qEAAqE;AACrE,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC;AAE1G,iFAAiF;AACjF,MAAM,MAAM,+BAA+B,GAAG,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;AAE7F,mEAAmE;AACnE,eAAO,MAAM,qBAAqB;;;;;CAOjC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,qBAAqB,GAAG,sBAAsB,EACtD,MAAM,EAAE,aAAa,CAAC,0BAA0B,CAAC,EACjD,IAAI,CAAC,EAAE,uBAAuB,GAC7B,OAAO,CAAC,+BAA+B,CAAC,CAiB1C"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { Hex, UnsignedDecimal, UnsignedInteger } from "../_base.js";
|
|
6
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.js";
|
|
5
7
|
/**
|
|
6
8
|
* Transfer funds between Spot account and Perp account.
|
|
7
9
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#transfer-from-spot-account-to-perp-account-and-vice-versa
|
|
@@ -29,8 +31,18 @@ export const UsdClassTransferRequest = /* @__PURE__ */ (() => {
|
|
|
29
31
|
signature: v.pipe(Signature, v.description("Cryptographic signature.")),
|
|
30
32
|
}), v.description("Transfer funds between Spot account and Perp account."));
|
|
31
33
|
})();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Successful response without specific data or error response.
|
|
36
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#transfer-from-spot-account-to-perp-account-and-vice-versa
|
|
37
|
+
*/
|
|
38
|
+
export const UsdClassTransferResponse = /* @__PURE__ */ (() => {
|
|
39
|
+
return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
|
|
40
|
+
})();
|
|
41
|
+
// ============================================================
|
|
42
|
+
// Execution Logic
|
|
43
|
+
// ============================================================
|
|
44
|
+
import { parser } from "../_base.js";
|
|
45
|
+
import { executeUserSignedAction, getSignatureChainId, } from "./_base/mod.js";
|
|
34
46
|
/** EIP-712 types for the {@linkcode usdClassTransfer} function. */
|
|
35
47
|
export const UsdClassTransferTypes = {
|
|
36
48
|
"HyperliquidTransaction:UsdClassTransfer": [
|
|
@@ -55,7 +67,7 @@ export const UsdClassTransferTypes = {
|
|
|
55
67
|
* ```ts
|
|
56
68
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
57
69
|
* import { usdClassTransfer } from "@nktkas/hyperliquid/api/exchange";
|
|
58
|
-
* import { privateKeyToAccount } from "
|
|
70
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
59
71
|
*
|
|
60
72
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
61
73
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|