@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,57 +1,52 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, type DeepImmutable, Hex, parser, UnsignedInteger } from "../_base.ts";
|
|
3
|
-
import {
|
|
4
|
-
type ExchangeRequestConfig,
|
|
5
|
-
executeMultiSigAction,
|
|
6
|
-
type ExtractRequestAction,
|
|
7
|
-
type ExtractRequestOptions,
|
|
8
|
-
getSignatureChainId,
|
|
9
|
-
Signature,
|
|
10
|
-
} from "./_base/mod.ts";
|
|
11
2
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
3
|
+
// ============================================================
|
|
4
|
+
// API Schemas
|
|
5
|
+
// ============================================================
|
|
6
|
+
|
|
7
|
+
import { Address, Hex, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { Signature } from "./_base/mod.ts";
|
|
9
|
+
import { ApproveAgentRequest, ApproveAgentResponse } from "./approveAgent.ts";
|
|
10
|
+
import { ApproveBuilderFeeRequest, ApproveBuilderFeeResponse } from "./approveBuilderFee.ts";
|
|
11
|
+
import { BatchModifyRequest, BatchModifyResponse } from "./batchModify.ts";
|
|
12
|
+
import { CancelRequest, CancelResponse } from "./cancel.ts";
|
|
13
|
+
import { CancelByCloidRequest, CancelByCloidResponse } from "./cancelByCloid.ts";
|
|
14
|
+
import { ClaimRewardsRequest, ClaimRewardsResponse } from "./claimRewards.ts";
|
|
15
|
+
import { CDepositRequest, CDepositResponse } from "./cDeposit.ts";
|
|
16
|
+
import { ConvertToMultiSigUserRequest, ConvertToMultiSigUserResponse } from "./convertToMultiSigUser.ts";
|
|
20
17
|
import { CreateSubAccountRequest, CreateSubAccountResponse } from "./createSubAccount.ts";
|
|
21
18
|
import { CreateVaultRequest, CreateVaultResponse } from "./createVault.ts";
|
|
22
|
-
import { CSignerActionRequest } from "./cSignerAction.ts";
|
|
23
|
-
import { CValidatorActionRequest } from "./cValidatorAction.ts";
|
|
24
|
-
import { CWithdrawRequest } from "./cWithdraw.ts";
|
|
25
|
-
import { EvmUserModifyRequest } from "./evmUserModify.ts";
|
|
26
|
-
import { ModifyRequest } from "./modify.ts";
|
|
27
|
-
import { NoopRequest } from "./noop.ts";
|
|
28
|
-
import { OrderRequest,
|
|
29
|
-
import { RegisterReferrerRequest } from "./registerReferrer.ts";
|
|
30
|
-
import { ReserveRequestWeightRequest } from "./reserveRequestWeight.ts";
|
|
31
|
-
import { ScheduleCancelRequest } from "./scheduleCancel.ts";
|
|
32
|
-
import { SetDisplayNameRequest } from "./setDisplayName.ts";
|
|
33
|
-
import { SetReferrerRequest } from "./setReferrer.ts";
|
|
34
|
-
import { SpotDeployRequest } from "./spotDeploy.ts";
|
|
35
|
-
import { SubAccountModifyRequest } from "./subAccountModify.ts";
|
|
36
|
-
import { TokenDelegateRequest } from "./tokenDelegate.ts";
|
|
37
|
-
import { TwapOrderRequest,
|
|
38
|
-
import { UsdClassTransferRequest } from "./usdClassTransfer.ts";
|
|
39
|
-
import { VaultDistributeRequest } from "./vaultDistribute.ts";
|
|
40
|
-
import { Withdraw3Request } from "./withdraw3.ts";
|
|
41
|
-
import { PerpDeployRequest } from "./perpDeploy.ts";
|
|
42
|
-
import { SendAssetRequest } from "./sendAsset.ts";
|
|
43
|
-
import { SpotSendRequest } from "./spotSend.ts";
|
|
44
|
-
import { SpotUserRequest } from "./spotUser.ts";
|
|
45
|
-
import { SubAccountSpotTransferRequest } from "./subAccountSpotTransfer.ts";
|
|
46
|
-
import { SubAccountTransferRequest } from "./subAccountTransfer.ts";
|
|
47
|
-
import { TwapCancelRequest,
|
|
48
|
-
import { UpdateIsolatedMarginRequest } from "./updateIsolatedMargin.ts";
|
|
49
|
-
import { UpdateLeverageRequest } from "./updateLeverage.ts";
|
|
50
|
-
import { UsdSendRequest } from "./usdSend.ts";
|
|
51
|
-
import { VaultModifyRequest } from "./vaultModify.ts";
|
|
52
|
-
import { VaultTransferRequest } from "./vaultTransfer.ts";
|
|
53
|
-
|
|
54
|
-
// -------------------- Schemas --------------------
|
|
19
|
+
import { CSignerActionRequest, CSignerActionResponse } from "./cSignerAction.ts";
|
|
20
|
+
import { CValidatorActionRequest, CValidatorActionResponse } from "./cValidatorAction.ts";
|
|
21
|
+
import { CWithdrawRequest, CWithdrawResponse } from "./cWithdraw.ts";
|
|
22
|
+
import { EvmUserModifyRequest, EvmUserModifyResponse } from "./evmUserModify.ts";
|
|
23
|
+
import { ModifyRequest, ModifyResponse } from "./modify.ts";
|
|
24
|
+
import { NoopRequest, NoopResponse } from "./noop.ts";
|
|
25
|
+
import { OrderRequest, OrderResponse } from "./order.ts";
|
|
26
|
+
import { RegisterReferrerRequest, RegisterReferrerResponse } from "./registerReferrer.ts";
|
|
27
|
+
import { ReserveRequestWeightRequest, ReserveRequestWeightResponse } from "./reserveRequestWeight.ts";
|
|
28
|
+
import { ScheduleCancelRequest, ScheduleCancelResponse } from "./scheduleCancel.ts";
|
|
29
|
+
import { SetDisplayNameRequest, SetDisplayNameResponse } from "./setDisplayName.ts";
|
|
30
|
+
import { SetReferrerRequest, SetReferrerResponse } from "./setReferrer.ts";
|
|
31
|
+
import { SpotDeployRequest, SpotDeployResponse } from "./spotDeploy.ts";
|
|
32
|
+
import { SubAccountModifyRequest, SubAccountModifyResponse } from "./subAccountModify.ts";
|
|
33
|
+
import { TokenDelegateRequest, TokenDelegateResponse } from "./tokenDelegate.ts";
|
|
34
|
+
import { TwapOrderRequest, TwapOrderResponse } from "./twapOrder.ts";
|
|
35
|
+
import { UsdClassTransferRequest, UsdClassTransferResponse } from "./usdClassTransfer.ts";
|
|
36
|
+
import { VaultDistributeRequest, VaultDistributeResponse } from "./vaultDistribute.ts";
|
|
37
|
+
import { Withdraw3Request, Withdraw3Response } from "./withdraw3.ts";
|
|
38
|
+
import { PerpDeployRequest, PerpDeployResponse } from "./perpDeploy.ts";
|
|
39
|
+
import { SendAssetRequest, SendAssetResponse } from "./sendAsset.ts";
|
|
40
|
+
import { SpotSendRequest, SpotSendResponse } from "./spotSend.ts";
|
|
41
|
+
import { SpotUserRequest, SpotUserResponse } from "./spotUser.ts";
|
|
42
|
+
import { SubAccountSpotTransferRequest, SubAccountSpotTransferResponse } from "./subAccountSpotTransfer.ts";
|
|
43
|
+
import { SubAccountTransferRequest, SubAccountTransferResponse } from "./subAccountTransfer.ts";
|
|
44
|
+
import { TwapCancelRequest, TwapCancelResponse } from "./twapCancel.ts";
|
|
45
|
+
import { UpdateIsolatedMarginRequest, UpdateIsolatedMarginResponse } from "./updateIsolatedMargin.ts";
|
|
46
|
+
import { UpdateLeverageRequest, UpdateLeverageResponse } from "./updateLeverage.ts";
|
|
47
|
+
import { UsdSendRequest, UsdSendResponse } from "./usdSend.ts";
|
|
48
|
+
import { VaultModifyRequest, VaultModifyResponse } from "./vaultModify.ts";
|
|
49
|
+
import { VaultTransferRequest, VaultTransferResponse } from "./vaultTransfer.ts";
|
|
55
50
|
|
|
56
51
|
/**
|
|
57
52
|
* A multi-signature request.
|
|
@@ -172,26 +167,85 @@ export const MultiSigRequest = /* @__PURE__ */ (() => {
|
|
|
172
167
|
})();
|
|
173
168
|
export type MultiSigRequest = v.InferOutput<typeof MultiSigRequest>;
|
|
174
169
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
170
|
+
/**
|
|
171
|
+
* A response related to an action.
|
|
172
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/multi-sig
|
|
173
|
+
*/
|
|
174
|
+
export const MultiSigResponse = /* @__PURE__ */ (() => {
|
|
175
|
+
return v.pipe(
|
|
176
|
+
v.union([
|
|
177
|
+
ApproveAgentResponse,
|
|
178
|
+
ApproveBuilderFeeResponse,
|
|
179
|
+
BatchModifyResponse,
|
|
180
|
+
CancelResponse,
|
|
181
|
+
CancelByCloidResponse,
|
|
182
|
+
CDepositResponse,
|
|
183
|
+
ClaimRewardsResponse,
|
|
184
|
+
ConvertToMultiSigUserResponse,
|
|
185
|
+
CreateSubAccountResponse,
|
|
186
|
+
CreateVaultResponse,
|
|
187
|
+
CSignerActionResponse,
|
|
188
|
+
CValidatorActionResponse,
|
|
189
|
+
CWithdrawResponse,
|
|
190
|
+
EvmUserModifyResponse,
|
|
191
|
+
ModifyResponse,
|
|
192
|
+
NoopResponse,
|
|
193
|
+
OrderResponse,
|
|
194
|
+
PerpDeployResponse,
|
|
195
|
+
RegisterReferrerResponse,
|
|
196
|
+
ReserveRequestWeightResponse,
|
|
197
|
+
ScheduleCancelResponse,
|
|
198
|
+
SendAssetResponse,
|
|
199
|
+
SetDisplayNameResponse,
|
|
200
|
+
SetReferrerResponse,
|
|
201
|
+
SpotDeployResponse,
|
|
202
|
+
SpotSendResponse,
|
|
203
|
+
SpotUserResponse,
|
|
204
|
+
SubAccountModifyResponse,
|
|
205
|
+
SubAccountSpotTransferResponse,
|
|
206
|
+
SubAccountTransferResponse,
|
|
207
|
+
TokenDelegateResponse,
|
|
208
|
+
TwapCancelResponse,
|
|
209
|
+
TwapOrderResponse,
|
|
210
|
+
UpdateIsolatedMarginResponse,
|
|
211
|
+
UpdateLeverageResponse,
|
|
212
|
+
UsdClassTransferResponse,
|
|
213
|
+
UsdSendResponse,
|
|
214
|
+
VaultDistributeResponse,
|
|
215
|
+
VaultModifyResponse,
|
|
216
|
+
VaultTransferResponse,
|
|
217
|
+
Withdraw3Response,
|
|
218
|
+
]),
|
|
219
|
+
v.description("A response related to an action."),
|
|
220
|
+
);
|
|
221
|
+
})();
|
|
222
|
+
export type MultiSigResponse = v.InferOutput<typeof MultiSigResponse>;
|
|
185
223
|
|
|
186
|
-
//
|
|
224
|
+
// ============================================================
|
|
225
|
+
// Execution Logic
|
|
226
|
+
// ============================================================
|
|
227
|
+
|
|
228
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
229
|
+
import {
|
|
230
|
+
type ExchangeRequestConfig,
|
|
231
|
+
type ExcludeErrorResponse,
|
|
232
|
+
executeMultiSigAction,
|
|
233
|
+
type ExtractRequestAction,
|
|
234
|
+
type ExtractRequestOptions,
|
|
235
|
+
getSignatureChainId,
|
|
236
|
+
} from "./_base/mod.ts";
|
|
187
237
|
|
|
188
238
|
/** Action parameters for the {@linkcode multiSig} function. */
|
|
189
239
|
export type MultiSigParameters =
|
|
190
240
|
& ExtractRequestAction<v.InferInput<typeof MultiSigRequest>>
|
|
191
241
|
& Pick<v.InferInput<typeof MultiSigRequest>, "nonce">;
|
|
242
|
+
|
|
192
243
|
/** Request options for the {@linkcode multiSig} function. */
|
|
193
244
|
export type MultiSigOptions = ExtractRequestOptions<v.InferInput<typeof MultiSigRequest>>;
|
|
194
245
|
|
|
246
|
+
/** Successful variant of {@linkcode MultiSigResponse} without errors. */
|
|
247
|
+
export type MultiSigSuccessResponse = ExcludeErrorResponse<MultiSigResponse>;
|
|
248
|
+
|
|
195
249
|
/** EIP-712 types for the {@linkcode multiSig} function. */
|
|
196
250
|
export const MultiSigTypes = {
|
|
197
251
|
"HyperliquidTransaction:SendMultiSig": [
|
|
@@ -217,7 +271,7 @@ export const MultiSigTypes = {
|
|
|
217
271
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
218
272
|
* import { multiSig, parser, ScheduleCancelRequest } from "@nktkas/hyperliquid/api/exchange";
|
|
219
273
|
* import { signL1Action } from "@nktkas/hyperliquid/signing";
|
|
220
|
-
* import { privateKeyToAccount } from "
|
|
274
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
221
275
|
*
|
|
222
276
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
223
277
|
* const multiSigUser = "0x...";
|
|
@@ -266,20 +320,11 @@ export const MultiSigTypes = {
|
|
|
266
320
|
* );
|
|
267
321
|
* ```
|
|
268
322
|
*/
|
|
269
|
-
export async function multiSig
|
|
270
|
-
T extends
|
|
271
|
-
| SuccessResponse
|
|
272
|
-
| CancelSuccessResponse
|
|
273
|
-
| CreateSubAccountResponse
|
|
274
|
-
| CreateVaultResponse
|
|
275
|
-
| OrderSuccessResponse
|
|
276
|
-
| TwapOrderSuccessResponse
|
|
277
|
-
| TwapCancelSuccessResponse,
|
|
278
|
-
>(
|
|
323
|
+
export async function multiSig(
|
|
279
324
|
config: ExchangeRequestConfig,
|
|
280
325
|
paramsAndNonce: DeepImmutable<MultiSigParameters>,
|
|
281
326
|
opts?: MultiSigOptions,
|
|
282
|
-
): Promise<
|
|
327
|
+
): Promise<MultiSigSuccessResponse> {
|
|
283
328
|
const { nonce, ...params } = paramsAndNonce;
|
|
284
329
|
|
|
285
330
|
const request = parser(MultiSigRequest)({
|
package/src/api/exchange/noop.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { parser, UnsignedInteger } from "../_base.ts";
|
|
3
|
-
import {
|
|
4
|
-
type ExchangeRequestConfig,
|
|
5
|
-
executeL1Action,
|
|
6
|
-
type ExtractRequestOptions,
|
|
7
|
-
type MultiSignRequestConfig,
|
|
8
|
-
Signature,
|
|
9
|
-
} from "./_base/mod.ts";
|
|
10
2
|
|
|
11
|
-
//
|
|
3
|
+
// ============================================================
|
|
4
|
+
// API Schemas
|
|
5
|
+
// ============================================================
|
|
6
|
+
|
|
7
|
+
import { UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* This action does not do anything (no operation), but causes the nonce to be marked as used.
|
|
@@ -49,14 +46,37 @@ export const NoopRequest = /* @__PURE__ */ (() => {
|
|
|
49
46
|
})();
|
|
50
47
|
export type NoopRequest = v.InferOutput<typeof NoopRequest>;
|
|
51
48
|
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Successful response without specific data or error response.
|
|
51
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#invalidate-pending-nonce-noop
|
|
52
|
+
*/
|
|
53
|
+
export const NoopResponse = /* @__PURE__ */ (() => {
|
|
54
|
+
return v.pipe(
|
|
55
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
56
|
+
v.description("Successful response without specific data or error response."),
|
|
57
|
+
);
|
|
58
|
+
})();
|
|
59
|
+
export type NoopResponse = v.InferOutput<typeof NoopResponse>;
|
|
60
|
+
|
|
61
|
+
// ============================================================
|
|
62
|
+
// Execution Logic
|
|
63
|
+
// ============================================================
|
|
54
64
|
|
|
55
|
-
|
|
65
|
+
import { parser } from "../_base.ts";
|
|
66
|
+
import {
|
|
67
|
+
type ExchangeRequestConfig,
|
|
68
|
+
type ExcludeErrorResponse,
|
|
69
|
+
executeL1Action,
|
|
70
|
+
type ExtractRequestOptions,
|
|
71
|
+
type MultiSignRequestConfig,
|
|
72
|
+
} from "./_base/mod.ts";
|
|
56
73
|
|
|
57
74
|
/** Request options for the {@linkcode noop} function. */
|
|
58
75
|
export type NoopOptions = ExtractRequestOptions<v.InferInput<typeof NoopRequest>>;
|
|
59
76
|
|
|
77
|
+
/** Successful variant of {@linkcode NoopResponse} without errors. */
|
|
78
|
+
export type NoopSuccessResponse = ExcludeErrorResponse<NoopResponse>;
|
|
79
|
+
|
|
60
80
|
/**
|
|
61
81
|
* This action does not do anything (no operation), but causes the nonce to be marked as used.
|
|
62
82
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -72,7 +92,7 @@ export type NoopOptions = ExtractRequestOptions<v.InferInput<typeof NoopRequest>
|
|
|
72
92
|
* ```ts
|
|
73
93
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
74
94
|
* import { noop } from "@nktkas/hyperliquid/api/exchange";
|
|
75
|
-
* import { privateKeyToAccount } from "
|
|
95
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
76
96
|
*
|
|
77
97
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
78
98
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -83,7 +103,7 @@ export type NoopOptions = ExtractRequestOptions<v.InferInput<typeof NoopRequest>
|
|
|
83
103
|
export async function noop(
|
|
84
104
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
85
105
|
opts?: NoopOptions,
|
|
86
|
-
): Promise<
|
|
106
|
+
): Promise<NoopSuccessResponse> {
|
|
87
107
|
const request = parser(NoopRequest)({
|
|
88
108
|
action: {
|
|
89
109
|
type: "noop",
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, type DeepImmutable, Hex, parser, UnsignedDecimal, UnsignedInteger } from "../_base.ts";
|
|
3
|
-
import {
|
|
4
|
-
type ExchangeRequestConfig,
|
|
5
|
-
executeL1Action,
|
|
6
|
-
type ExtractRequestAction,
|
|
7
|
-
type ExtractRequestOptions,
|
|
8
|
-
type MultiSignRequestConfig,
|
|
9
|
-
Signature,
|
|
10
|
-
} from "./_base/mod.ts";
|
|
11
2
|
|
|
12
|
-
|
|
3
|
+
// ============================================================
|
|
4
|
+
// API Schemas
|
|
5
|
+
// ============================================================
|
|
13
6
|
|
|
14
|
-
|
|
7
|
+
import { Address, Hex, UnsignedDecimal, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { Signature } from "./_base/mod.ts";
|
|
9
|
+
import { PlaceOrderParamsSchema } from "../_common_schemas.ts";
|
|
15
10
|
|
|
16
11
|
/**
|
|
17
12
|
* Place an order(s).
|
|
@@ -100,7 +95,10 @@ export const OrderRequest = /* @__PURE__ */ (() => {
|
|
|
100
95
|
})();
|
|
101
96
|
export type OrderRequest = v.InferOutput<typeof OrderRequest>;
|
|
102
97
|
|
|
103
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Response for order placement and batch modifications.
|
|
100
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
|
|
101
|
+
*/
|
|
104
102
|
export const OrderResponse = /* @__PURE__ */ (() => {
|
|
105
103
|
return v.pipe(
|
|
106
104
|
v.object({
|
|
@@ -193,99 +191,29 @@ export const OrderResponse = /* @__PURE__ */ (() => {
|
|
|
193
191
|
})();
|
|
194
192
|
export type OrderResponse = v.InferOutput<typeof OrderResponse>;
|
|
195
193
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
v.object({
|
|
200
|
-
/** Successful status. */
|
|
201
|
-
status: v.pipe(
|
|
202
|
-
v.literal("ok"),
|
|
203
|
-
v.description("Successful status."),
|
|
204
|
-
),
|
|
205
|
-
/** Response details. */
|
|
206
|
-
response: v.pipe(
|
|
207
|
-
v.object({
|
|
208
|
-
/** Type of response. */
|
|
209
|
-
type: v.pipe(
|
|
210
|
-
v.literal("order"),
|
|
211
|
-
v.description("Type of response."),
|
|
212
|
-
),
|
|
213
|
-
/** Specific data. */
|
|
214
|
-
data: v.pipe(
|
|
215
|
-
v.object({
|
|
216
|
-
/** Array of successful order statuses. */
|
|
217
|
-
statuses: v.pipe(
|
|
218
|
-
v.array(
|
|
219
|
-
v.union([
|
|
220
|
-
v.object({
|
|
221
|
-
/** Resting order status. */
|
|
222
|
-
resting: v.pipe(
|
|
223
|
-
v.object({
|
|
224
|
-
/** Order ID. */
|
|
225
|
-
oid: v.pipe(
|
|
226
|
-
UnsignedInteger,
|
|
227
|
-
v.description("Order ID."),
|
|
228
|
-
),
|
|
229
|
-
/** Client Order ID. */
|
|
230
|
-
cloid: v.pipe(
|
|
231
|
-
v.optional(v.pipe(Hex, v.length(34))),
|
|
232
|
-
v.description("Client Order ID."),
|
|
233
|
-
),
|
|
234
|
-
}),
|
|
235
|
-
v.description("Resting order status."),
|
|
236
|
-
),
|
|
237
|
-
}),
|
|
238
|
-
v.object({
|
|
239
|
-
/** Filled order status. */
|
|
240
|
-
filled: v.pipe(
|
|
241
|
-
v.object({
|
|
242
|
-
/** Total size filled. */
|
|
243
|
-
totalSz: v.pipe(
|
|
244
|
-
UnsignedDecimal,
|
|
245
|
-
v.description("Total size filled."),
|
|
246
|
-
),
|
|
247
|
-
/** Average price of fill. */
|
|
248
|
-
avgPx: v.pipe(
|
|
249
|
-
UnsignedDecimal,
|
|
250
|
-
v.description("Average price of fill."),
|
|
251
|
-
),
|
|
252
|
-
/** Order ID. */
|
|
253
|
-
oid: v.pipe(
|
|
254
|
-
UnsignedInteger,
|
|
255
|
-
v.description("Order ID."),
|
|
256
|
-
),
|
|
257
|
-
/** Client Order ID. */
|
|
258
|
-
cloid: v.pipe(
|
|
259
|
-
v.optional(v.pipe(Hex, v.length(34))),
|
|
260
|
-
v.description("Client Order ID."),
|
|
261
|
-
),
|
|
262
|
-
}),
|
|
263
|
-
v.description("Filled order status."),
|
|
264
|
-
),
|
|
265
|
-
}),
|
|
266
|
-
]),
|
|
267
|
-
),
|
|
268
|
-
v.description("Array of successful order statuses."),
|
|
269
|
-
),
|
|
270
|
-
}),
|
|
271
|
-
v.description("Specific data."),
|
|
272
|
-
),
|
|
273
|
-
}),
|
|
274
|
-
v.description("Response details."),
|
|
275
|
-
),
|
|
276
|
-
}),
|
|
277
|
-
v.description("Successful variant of `OrderResponse` without errors."),
|
|
278
|
-
);
|
|
279
|
-
})();
|
|
280
|
-
export type OrderSuccessResponse = v.InferOutput<typeof OrderSuccessResponse>;
|
|
194
|
+
// ============================================================
|
|
195
|
+
// Execution Logic
|
|
196
|
+
// ============================================================
|
|
281
197
|
|
|
282
|
-
|
|
198
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
199
|
+
import {
|
|
200
|
+
type ExchangeRequestConfig,
|
|
201
|
+
type ExcludeErrorResponse,
|
|
202
|
+
executeL1Action,
|
|
203
|
+
type ExtractRequestAction,
|
|
204
|
+
type ExtractRequestOptions,
|
|
205
|
+
type MultiSignRequestConfig,
|
|
206
|
+
} from "./_base/mod.ts";
|
|
283
207
|
|
|
284
208
|
/** Action parameters for the {@linkcode order} function. */
|
|
285
209
|
export type OrderParameters = ExtractRequestAction<v.InferInput<typeof OrderRequest>>;
|
|
210
|
+
|
|
286
211
|
/** Request options for the {@linkcode order} function. */
|
|
287
212
|
export type OrderOptions = ExtractRequestOptions<v.InferInput<typeof OrderRequest>>;
|
|
288
213
|
|
|
214
|
+
/** Successful variant of {@linkcode OrderResponse} without errors. */
|
|
215
|
+
export type OrderSuccessResponse = ExcludeErrorResponse<OrderResponse>;
|
|
216
|
+
|
|
289
217
|
/**
|
|
290
218
|
* Place an order(s).
|
|
291
219
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -301,7 +229,7 @@ export type OrderOptions = ExtractRequestOptions<v.InferInput<typeof OrderReques
|
|
|
301
229
|
* ```ts
|
|
302
230
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
303
231
|
* import { order } from "@nktkas/hyperliquid/api/exchange";
|
|
304
|
-
* import { privateKeyToAccount } from "
|
|
232
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
305
233
|
*
|
|
306
234
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
307
235
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, type DeepImmutable, parser, UnsignedDecimal, UnsignedInteger } from "../_base.ts";
|
|
3
|
-
import {
|
|
4
|
-
type ExchangeRequestConfig,
|
|
5
|
-
executeL1Action,
|
|
6
|
-
type ExtractRequestAction,
|
|
7
|
-
type ExtractRequestOptions,
|
|
8
|
-
type MultiSignRequestConfig,
|
|
9
|
-
Signature,
|
|
10
|
-
} from "./_base/mod.ts";
|
|
11
2
|
|
|
12
|
-
//
|
|
3
|
+
// ============================================================
|
|
4
|
+
// API Schemas
|
|
5
|
+
// ============================================================
|
|
6
|
+
|
|
7
|
+
import { Address, UnsignedDecimal, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* Deploying HIP-3 assets.
|
|
@@ -308,16 +304,41 @@ export const PerpDeployRequest = /* @__PURE__ */ (() => {
|
|
|
308
304
|
})();
|
|
309
305
|
export type PerpDeployRequest = v.InferOutput<typeof PerpDeployRequest>;
|
|
310
306
|
|
|
311
|
-
|
|
312
|
-
|
|
307
|
+
/**
|
|
308
|
+
* Successful response without specific data or error response.
|
|
309
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/deploying-hip-3-assets
|
|
310
|
+
*/
|
|
311
|
+
export const PerpDeployResponse = /* @__PURE__ */ (() => {
|
|
312
|
+
return v.pipe(
|
|
313
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
314
|
+
v.description("Successful response without specific data or error response."),
|
|
315
|
+
);
|
|
316
|
+
})();
|
|
317
|
+
export type PerpDeployResponse = v.InferOutput<typeof PerpDeployResponse>;
|
|
318
|
+
|
|
319
|
+
// ============================================================
|
|
320
|
+
// Execution Logic
|
|
321
|
+
// ============================================================
|
|
313
322
|
|
|
314
|
-
|
|
323
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
324
|
+
import {
|
|
325
|
+
type ExchangeRequestConfig,
|
|
326
|
+
type ExcludeErrorResponse,
|
|
327
|
+
executeL1Action,
|
|
328
|
+
type ExtractRequestAction,
|
|
329
|
+
type ExtractRequestOptions,
|
|
330
|
+
type MultiSignRequestConfig,
|
|
331
|
+
} from "./_base/mod.ts";
|
|
315
332
|
|
|
316
333
|
/** Action parameters for the {@linkcode perpDeploy} function. */
|
|
317
334
|
export type PerpDeployParameters = ExtractRequestAction<v.InferInput<typeof PerpDeployRequest>>;
|
|
335
|
+
|
|
318
336
|
/** Request options for the {@linkcode perpDeploy} function. */
|
|
319
337
|
export type PerpDeployOptions = ExtractRequestOptions<v.InferInput<typeof PerpDeployRequest>>;
|
|
320
338
|
|
|
339
|
+
/** Successful variant of {@linkcode PerpDeployResponse} without errors. */
|
|
340
|
+
export type PerpDeploySuccessResponse = ExcludeErrorResponse<PerpDeployResponse>;
|
|
341
|
+
|
|
321
342
|
/**
|
|
322
343
|
* Deploying HIP-3 assets.
|
|
323
344
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -333,7 +354,7 @@ export type PerpDeployOptions = ExtractRequestOptions<v.InferInput<typeof PerpDe
|
|
|
333
354
|
* ```ts
|
|
334
355
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
335
356
|
* import { perpDeploy } from "@nktkas/hyperliquid/api/exchange";
|
|
336
|
-
* import { privateKeyToAccount } from "
|
|
357
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
337
358
|
*
|
|
338
359
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
339
360
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -361,7 +382,7 @@ export async function perpDeploy(
|
|
|
361
382
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
362
383
|
params: DeepImmutable<PerpDeployParameters>,
|
|
363
384
|
opts?: PerpDeployOptions,
|
|
364
|
-
): Promise<
|
|
385
|
+
): Promise<PerpDeploySuccessResponse> {
|
|
365
386
|
const request = parser(PerpDeployRequest)({
|
|
366
387
|
action: {
|
|
367
388
|
type: "perpDeploy",
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { type DeepImmutable, parser, UnsignedInteger } from "../_base.ts";
|
|
3
|
-
import {
|
|
4
|
-
type ExchangeRequestConfig,
|
|
5
|
-
executeL1Action,
|
|
6
|
-
type ExtractRequestAction,
|
|
7
|
-
type ExtractRequestOptions,
|
|
8
|
-
type MultiSignRequestConfig,
|
|
9
|
-
Signature,
|
|
10
|
-
} from "./_base/mod.ts";
|
|
11
2
|
|
|
12
|
-
//
|
|
3
|
+
// ============================================================
|
|
4
|
+
// API Schemas
|
|
5
|
+
// ============================================================
|
|
13
6
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
7
|
+
import { UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
9
|
+
|
|
10
|
+
/** Create a referral code. */
|
|
18
11
|
export const RegisterReferrerRequest = /* @__PURE__ */ (() => {
|
|
19
12
|
return v.pipe(
|
|
20
13
|
v.object({
|
|
@@ -56,16 +49,38 @@ export const RegisterReferrerRequest = /* @__PURE__ */ (() => {
|
|
|
56
49
|
})();
|
|
57
50
|
export type RegisterReferrerRequest = v.InferOutput<typeof RegisterReferrerRequest>;
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
export
|
|
52
|
+
/** Successful response without specific data or error response. */
|
|
53
|
+
export const RegisterReferrerResponse = /* @__PURE__ */ (() => {
|
|
54
|
+
return v.pipe(
|
|
55
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
56
|
+
v.description("Successful response without specific data or error response."),
|
|
57
|
+
);
|
|
58
|
+
})();
|
|
59
|
+
export type RegisterReferrerResponse = v.InferOutput<typeof RegisterReferrerResponse>;
|
|
60
|
+
|
|
61
|
+
// ============================================================
|
|
62
|
+
// Execution Logic
|
|
63
|
+
// ============================================================
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
66
|
+
import {
|
|
67
|
+
type ExchangeRequestConfig,
|
|
68
|
+
type ExcludeErrorResponse,
|
|
69
|
+
executeL1Action,
|
|
70
|
+
type ExtractRequestAction,
|
|
71
|
+
type ExtractRequestOptions,
|
|
72
|
+
type MultiSignRequestConfig,
|
|
73
|
+
} from "./_base/mod.ts";
|
|
63
74
|
|
|
64
75
|
/** Action parameters for the {@linkcode registerReferrer} function. */
|
|
65
76
|
export type RegisterReferrerParameters = ExtractRequestAction<v.InferInput<typeof RegisterReferrerRequest>>;
|
|
77
|
+
|
|
66
78
|
/** Request options for the {@linkcode registerReferrer} function. */
|
|
67
79
|
export type RegisterReferrerOptions = ExtractRequestOptions<v.InferInput<typeof RegisterReferrerRequest>>;
|
|
68
80
|
|
|
81
|
+
/** Successful variant of {@linkcode RegisterReferrerResponse} without errors. */
|
|
82
|
+
export type RegisterReferrerSuccessResponse = ExcludeErrorResponse<RegisterReferrerResponse>;
|
|
83
|
+
|
|
69
84
|
/**
|
|
70
85
|
* Create a referral code.
|
|
71
86
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -76,12 +91,11 @@ export type RegisterReferrerOptions = ExtractRequestOptions<v.InferInput<typeof
|
|
|
76
91
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
77
92
|
* @throws {TransportError} When the transport layer throws an error.
|
|
78
93
|
*
|
|
79
|
-
* @see null
|
|
80
94
|
* @example
|
|
81
95
|
* ```ts
|
|
82
96
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
83
97
|
* import { registerReferrer } from "@nktkas/hyperliquid/api/exchange";
|
|
84
|
-
* import { privateKeyToAccount } from "
|
|
98
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
85
99
|
*
|
|
86
100
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
87
101
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -96,7 +110,7 @@ export async function registerReferrer(
|
|
|
96
110
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
97
111
|
params: DeepImmutable<RegisterReferrerParameters>,
|
|
98
112
|
opts?: RegisterReferrerOptions,
|
|
99
|
-
): Promise<
|
|
113
|
+
): Promise<RegisterReferrerSuccessResponse> {
|
|
100
114
|
const request = parser(RegisterReferrerRequest)({
|
|
101
115
|
action: {
|
|
102
116
|
type: "registerReferrer",
|