@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,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
|
+
/** Jail or unjail self as a validator signer. */
|
|
18
11
|
export const CSignerActionRequest = /* @__PURE__ */ (() => {
|
|
19
12
|
return v.pipe(
|
|
20
13
|
v.object({
|
|
@@ -69,16 +62,38 @@ export const CSignerActionRequest = /* @__PURE__ */ (() => {
|
|
|
69
62
|
})();
|
|
70
63
|
export type CSignerActionRequest = v.InferOutput<typeof CSignerActionRequest>;
|
|
71
64
|
|
|
72
|
-
|
|
73
|
-
export
|
|
65
|
+
/** Successful response without specific data or error response. */
|
|
66
|
+
export const CSignerActionResponse = /* @__PURE__ */ (() => {
|
|
67
|
+
return v.pipe(
|
|
68
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
69
|
+
v.description("Successful response without specific data or error response."),
|
|
70
|
+
);
|
|
71
|
+
})();
|
|
72
|
+
export type CSignerActionResponse = v.InferOutput<typeof CSignerActionResponse>;
|
|
73
|
+
|
|
74
|
+
// ============================================================
|
|
75
|
+
// Execution Logic
|
|
76
|
+
// ============================================================
|
|
74
77
|
|
|
75
|
-
|
|
78
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
79
|
+
import {
|
|
80
|
+
type ExchangeRequestConfig,
|
|
81
|
+
type ExcludeErrorResponse,
|
|
82
|
+
executeL1Action,
|
|
83
|
+
type ExtractRequestAction,
|
|
84
|
+
type ExtractRequestOptions,
|
|
85
|
+
type MultiSignRequestConfig,
|
|
86
|
+
} from "./_base/mod.ts";
|
|
76
87
|
|
|
77
88
|
/** Action parameters for the {@linkcode CSignerAction} function. */
|
|
78
89
|
export type CSignerActionParameters = ExtractRequestAction<v.InferInput<typeof CSignerActionRequest>>;
|
|
90
|
+
|
|
79
91
|
/** Request options for the {@linkcode CSignerAction} function. */
|
|
80
92
|
export type CSignerActionOptions = ExtractRequestOptions<v.InferInput<typeof CSignerActionRequest>>;
|
|
81
93
|
|
|
94
|
+
/** Successful variant of {@linkcode CSignerActionResponse} without errors. */
|
|
95
|
+
export type CSignerActionSuccessResponse = ExcludeErrorResponse<CSignerActionResponse>;
|
|
96
|
+
|
|
82
97
|
/**
|
|
83
98
|
* Jail or unjail self as a validator signer.
|
|
84
99
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -89,12 +104,11 @@ export type CSignerActionOptions = ExtractRequestOptions<v.InferInput<typeof CSi
|
|
|
89
104
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
90
105
|
* @throws {TransportError} When the transport layer throws an error.
|
|
91
106
|
*
|
|
92
|
-
* @see null
|
|
93
107
|
* @example
|
|
94
108
|
* ```ts
|
|
95
109
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
96
110
|
* import { cSignerAction } from "@nktkas/hyperliquid/api/exchange";
|
|
97
|
-
* import { privateKeyToAccount } from "
|
|
111
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
98
112
|
*
|
|
99
113
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
100
114
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -116,7 +130,7 @@ export async function cSignerAction(
|
|
|
116
130
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
117
131
|
params: DeepImmutable<CSignerActionParameters>,
|
|
118
132
|
opts?: CSignerActionOptions,
|
|
119
|
-
): Promise<
|
|
133
|
+
): Promise<CSignerActionSuccessResponse> {
|
|
120
134
|
const request = parser(CSignerActionRequest)({
|
|
121
135
|
action: {
|
|
122
136
|
type: "CSignerAction",
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, 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 { Address, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
9
|
+
|
|
10
|
+
/** Action related to validator management. */
|
|
18
11
|
export const CValidatorActionRequest = /* @__PURE__ */ (() => {
|
|
19
12
|
return v.pipe(
|
|
20
13
|
v.object({
|
|
@@ -180,16 +173,38 @@ export const CValidatorActionRequest = /* @__PURE__ */ (() => {
|
|
|
180
173
|
})();
|
|
181
174
|
export type CValidatorActionRequest = v.InferOutput<typeof CValidatorActionRequest>;
|
|
182
175
|
|
|
183
|
-
|
|
184
|
-
export
|
|
176
|
+
/** Successful response without specific data or error response. */
|
|
177
|
+
export const CValidatorActionResponse = /* @__PURE__ */ (() => {
|
|
178
|
+
return v.pipe(
|
|
179
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
180
|
+
v.description("Successful response without specific data or error response."),
|
|
181
|
+
);
|
|
182
|
+
})();
|
|
183
|
+
export type CValidatorActionResponse = v.InferOutput<typeof CValidatorActionResponse>;
|
|
184
|
+
|
|
185
|
+
// ============================================================
|
|
186
|
+
// Execution Logic
|
|
187
|
+
// ============================================================
|
|
185
188
|
|
|
186
|
-
|
|
189
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
190
|
+
import {
|
|
191
|
+
type ExchangeRequestConfig,
|
|
192
|
+
type ExcludeErrorResponse,
|
|
193
|
+
executeL1Action,
|
|
194
|
+
type ExtractRequestAction,
|
|
195
|
+
type ExtractRequestOptions,
|
|
196
|
+
type MultiSignRequestConfig,
|
|
197
|
+
} from "./_base/mod.ts";
|
|
187
198
|
|
|
188
199
|
/** Action parameters for the {@linkcode CValidatorAction} function. */
|
|
189
200
|
export type CValidatorActionParameters = ExtractRequestAction<v.InferInput<typeof CValidatorActionRequest>>;
|
|
201
|
+
|
|
190
202
|
/** Request options for the {@linkcode CValidatorAction} function. */
|
|
191
203
|
export type CValidatorActionOptions = ExtractRequestOptions<v.InferInput<typeof CValidatorActionRequest>>;
|
|
192
204
|
|
|
205
|
+
/** Successful variant of {@linkcode CValidatorActionResponse} without errors. */
|
|
206
|
+
export type CValidatorActionSuccessResponse = ExcludeErrorResponse<CValidatorActionResponse>;
|
|
207
|
+
|
|
193
208
|
/**
|
|
194
209
|
* Action related to validator management.
|
|
195
210
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -200,12 +215,11 @@ export type CValidatorActionOptions = ExtractRequestOptions<v.InferInput<typeof
|
|
|
200
215
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
201
216
|
* @throws {TransportError} When the transport layer throws an error.
|
|
202
217
|
*
|
|
203
|
-
* @see null
|
|
204
218
|
* @example
|
|
205
219
|
* ```ts
|
|
206
220
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
207
221
|
* import { cValidatorAction } from "@nktkas/hyperliquid/api/exchange";
|
|
208
|
-
* import { privateKeyToAccount } from "
|
|
222
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
209
223
|
*
|
|
210
224
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
211
225
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -256,7 +270,7 @@ export async function cValidatorAction(
|
|
|
256
270
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
257
271
|
params: DeepImmutable<CValidatorActionParameters>,
|
|
258
272
|
opts?: CValidatorActionOptions,
|
|
259
|
-
): Promise<
|
|
273
|
+
): Promise<CValidatorActionSuccessResponse> {
|
|
260
274
|
const request = parser(CValidatorActionRequest)({
|
|
261
275
|
action: {
|
|
262
276
|
type: "CValidatorAction",
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { type DeepImmutable, Hex, parser, UnsignedInteger } from "../_base.ts";
|
|
3
|
-
import {
|
|
4
|
-
type ExchangeRequestConfig,
|
|
5
|
-
executeUserSignedAction,
|
|
6
|
-
type ExtractRequestAction,
|
|
7
|
-
type ExtractRequestOptions,
|
|
8
|
-
getSignatureChainId,
|
|
9
|
-
type MultiSignRequestConfig,
|
|
10
|
-
Signature,
|
|
11
|
-
} from "./_base/mod.ts";
|
|
12
2
|
|
|
13
|
-
//
|
|
3
|
+
// ============================================================
|
|
4
|
+
// API Schemas
|
|
5
|
+
// ============================================================
|
|
6
|
+
|
|
7
|
+
import { Hex, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
14
9
|
|
|
15
10
|
/**
|
|
16
11
|
* Transfer native token from staking into the user's spot account.
|
|
@@ -66,16 +61,42 @@ export const CWithdrawRequest = /* @__PURE__ */ (() => {
|
|
|
66
61
|
})();
|
|
67
62
|
export type CWithdrawRequest = v.InferOutput<typeof CWithdrawRequest>;
|
|
68
63
|
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Successful response without specific data or error response.
|
|
66
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#withdraw-from-staking
|
|
67
|
+
*/
|
|
68
|
+
export const CWithdrawResponse = /* @__PURE__ */ (() => {
|
|
69
|
+
return v.pipe(
|
|
70
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
71
|
+
v.description("Successful response without specific data or error response."),
|
|
72
|
+
);
|
|
73
|
+
})();
|
|
74
|
+
export type CWithdrawResponse = v.InferOutput<typeof CWithdrawResponse>;
|
|
75
|
+
|
|
76
|
+
// ============================================================
|
|
77
|
+
// Execution Logic
|
|
78
|
+
// ============================================================
|
|
71
79
|
|
|
72
|
-
|
|
80
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
81
|
+
import {
|
|
82
|
+
type ExchangeRequestConfig,
|
|
83
|
+
type ExcludeErrorResponse,
|
|
84
|
+
executeUserSignedAction,
|
|
85
|
+
type ExtractRequestAction,
|
|
86
|
+
type ExtractRequestOptions,
|
|
87
|
+
getSignatureChainId,
|
|
88
|
+
type MultiSignRequestConfig,
|
|
89
|
+
} from "./_base/mod.ts";
|
|
73
90
|
|
|
74
91
|
/** Action parameters for the {@linkcode cWithdraw} function. */
|
|
75
92
|
export type CWithdrawParameters = ExtractRequestAction<v.InferInput<typeof CWithdrawRequest>>;
|
|
93
|
+
|
|
76
94
|
/** Request options for the {@linkcode cWithdraw} function. */
|
|
77
95
|
export type CWithdrawOptions = ExtractRequestOptions<v.InferInput<typeof CWithdrawRequest>>;
|
|
78
96
|
|
|
97
|
+
/** Successful variant of {@linkcode CWithdrawResponse} without errors. */
|
|
98
|
+
export type CWithdrawSuccessResponse = ExcludeErrorResponse<CWithdrawResponse>;
|
|
99
|
+
|
|
79
100
|
/** EIP-712 types for the {@linkcode cWithdraw} function. */
|
|
80
101
|
export const CWithdrawTypes = {
|
|
81
102
|
"HyperliquidTransaction:CWithdraw": [
|
|
@@ -100,7 +121,7 @@ export const CWithdrawTypes = {
|
|
|
100
121
|
* ```ts
|
|
101
122
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
102
123
|
* import { cWithdraw } from "@nktkas/hyperliquid/api/exchange";
|
|
103
|
-
* import { privateKeyToAccount } from "
|
|
124
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
104
125
|
*
|
|
105
126
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
106
127
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -115,7 +136,7 @@ export async function cWithdraw(
|
|
|
115
136
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
116
137
|
params: DeepImmutable<CWithdrawParameters>,
|
|
117
138
|
opts?: CWithdrawOptions,
|
|
118
|
-
): Promise<
|
|
139
|
+
): Promise<CWithdrawSuccessResponse> {
|
|
119
140
|
const request = parser(CWithdrawRequest)({
|
|
120
141
|
action: {
|
|
121
142
|
type: "cWithdraw",
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, 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
|
+
// ============================================================
|
|
6
|
+
|
|
7
|
+
import { Address, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { Signature } from "./_base/mod.ts";
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* Cancel order(s).
|
|
@@ -71,7 +67,10 @@ export const CancelRequest = /* @__PURE__ */ (() => {
|
|
|
71
67
|
})();
|
|
72
68
|
export type CancelRequest = v.InferOutput<typeof CancelRequest>;
|
|
73
69
|
|
|
74
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Response for order cancellation.
|
|
72
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
|
|
73
|
+
*/
|
|
75
74
|
export const CancelResponse = /* @__PURE__ */ (() => {
|
|
76
75
|
return v.pipe(
|
|
77
76
|
v.object({
|
|
@@ -119,50 +118,29 @@ export const CancelResponse = /* @__PURE__ */ (() => {
|
|
|
119
118
|
})();
|
|
120
119
|
export type CancelResponse = v.InferOutput<typeof CancelResponse>;
|
|
121
120
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
v.object({
|
|
126
|
-
/** Successful status. */
|
|
127
|
-
status: v.pipe(
|
|
128
|
-
v.literal("ok"),
|
|
129
|
-
v.description("Successful status."),
|
|
130
|
-
),
|
|
131
|
-
/** Response details. */
|
|
132
|
-
response: v.pipe(
|
|
133
|
-
v.object({
|
|
134
|
-
/** Type of response. */
|
|
135
|
-
type: v.pipe(
|
|
136
|
-
v.literal("cancel"),
|
|
137
|
-
v.description("Type of response."),
|
|
138
|
-
),
|
|
139
|
-
/** Specific data. */
|
|
140
|
-
data: v.pipe(
|
|
141
|
-
v.object({
|
|
142
|
-
/** Array of success statuses. */
|
|
143
|
-
statuses: v.pipe(
|
|
144
|
-
v.array(v.literal("success")),
|
|
145
|
-
v.description("Array of success statuses."),
|
|
146
|
-
),
|
|
147
|
-
}),
|
|
148
|
-
v.description("Specific data."),
|
|
149
|
-
),
|
|
150
|
-
}),
|
|
151
|
-
v.description("Response details."),
|
|
152
|
-
),
|
|
153
|
-
}),
|
|
154
|
-
v.description("Successful variant of `CancelResponse` without errors."),
|
|
155
|
-
);
|
|
156
|
-
})();
|
|
157
|
-
export type CancelSuccessResponse = v.InferOutput<typeof CancelSuccessResponse>;
|
|
121
|
+
// ============================================================
|
|
122
|
+
// Execution Logic
|
|
123
|
+
// ============================================================
|
|
158
124
|
|
|
159
|
-
|
|
125
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
126
|
+
import {
|
|
127
|
+
type ExchangeRequestConfig,
|
|
128
|
+
type ExcludeErrorResponse,
|
|
129
|
+
executeL1Action,
|
|
130
|
+
type ExtractRequestAction,
|
|
131
|
+
type ExtractRequestOptions,
|
|
132
|
+
type MultiSignRequestConfig,
|
|
133
|
+
} from "./_base/mod.ts";
|
|
160
134
|
|
|
161
135
|
/** Action parameters for the {@linkcode cancel} function. */
|
|
162
136
|
export type CancelParameters = ExtractRequestAction<v.InferInput<typeof CancelRequest>>;
|
|
137
|
+
|
|
163
138
|
/** Request options for the {@linkcode cancel} function. */
|
|
164
139
|
export type CancelOptions = ExtractRequestOptions<v.InferInput<typeof CancelRequest>>;
|
|
165
140
|
|
|
141
|
+
/** Successful variant of {@linkcode CancelResponse} without errors. */
|
|
142
|
+
export type CancelSuccessResponse = ExcludeErrorResponse<CancelResponse>;
|
|
143
|
+
|
|
166
144
|
/**
|
|
167
145
|
* Cancel order(s).
|
|
168
146
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -178,7 +156,7 @@ export type CancelOptions = ExtractRequestOptions<v.InferInput<typeof CancelRequ
|
|
|
178
156
|
* ```ts
|
|
179
157
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
180
158
|
* import { cancel } from "@nktkas/hyperliquid/api/exchange";
|
|
181
|
-
* import { privateKeyToAccount } from "
|
|
159
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
182
160
|
*
|
|
183
161
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
184
162
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, type DeepImmutable, Hex, 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
|
+
// ============================================================
|
|
6
|
+
|
|
7
|
+
import { Address, Hex, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { Signature } from "./_base/mod.ts";
|
|
9
|
+
import { CancelResponse } from "./cancel.ts";
|
|
13
10
|
|
|
14
11
|
/**
|
|
15
12
|
* Cancel order(s) by cloid.
|
|
@@ -71,16 +68,36 @@ export const CancelByCloidRequest = /* @__PURE__ */ (() => {
|
|
|
71
68
|
})();
|
|
72
69
|
export type CancelByCloidRequest = v.InferOutput<typeof CancelByCloidRequest>;
|
|
73
70
|
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Response for order cancellation.
|
|
73
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
|
|
74
|
+
*/
|
|
75
|
+
export const CancelByCloidResponse = CancelResponse;
|
|
76
|
+
export type CancelByCloidResponse = CancelResponse;
|
|
76
77
|
|
|
77
|
-
//
|
|
78
|
+
// ============================================================
|
|
79
|
+
// Execution Logic
|
|
80
|
+
// ============================================================
|
|
81
|
+
|
|
82
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
83
|
+
import {
|
|
84
|
+
type ExchangeRequestConfig,
|
|
85
|
+
type ExcludeErrorResponse,
|
|
86
|
+
executeL1Action,
|
|
87
|
+
type ExtractRequestAction,
|
|
88
|
+
type ExtractRequestOptions,
|
|
89
|
+
type MultiSignRequestConfig,
|
|
90
|
+
} from "./_base/mod.ts";
|
|
78
91
|
|
|
79
92
|
/** Action parameters for the {@linkcode cancelByCloid} function. */
|
|
80
93
|
export type CancelByCloidParameters = ExtractRequestAction<v.InferInput<typeof CancelByCloidRequest>>;
|
|
94
|
+
|
|
81
95
|
/** Request options for the {@linkcode cancelByCloid} function. */
|
|
82
96
|
export type CancelByCloidOptions = ExtractRequestOptions<v.InferInput<typeof CancelByCloidRequest>>;
|
|
83
97
|
|
|
98
|
+
/** Successful variant of {@linkcode CancelByCloidResponse} without errors. */
|
|
99
|
+
export type CancelByCloidSuccessResponse = ExcludeErrorResponse<CancelByCloidResponse>;
|
|
100
|
+
|
|
84
101
|
/**
|
|
85
102
|
* Cancel order(s) by cloid.
|
|
86
103
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -96,7 +113,7 @@ export type CancelByCloidOptions = ExtractRequestOptions<v.InferInput<typeof Can
|
|
|
96
113
|
* ```ts
|
|
97
114
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
98
115
|
* import { cancelByCloid } from "@nktkas/hyperliquid/api/exchange";
|
|
99
|
-
* import { privateKeyToAccount } from "
|
|
116
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
100
117
|
*
|
|
101
118
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
102
119
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -115,7 +132,7 @@ export async function cancelByCloid(
|
|
|
115
132
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
116
133
|
params: DeepImmutable<CancelByCloidParameters>,
|
|
117
134
|
opts?: CancelByCloidOptions,
|
|
118
|
-
): Promise<
|
|
135
|
+
): Promise<CancelByCloidSuccessResponse> {
|
|
119
136
|
const request = parser(CancelByCloidRequest)({
|
|
120
137
|
action: {
|
|
121
138
|
type: "cancelByCloid",
|
|
@@ -1,19 +1,13 @@
|
|
|
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
|
+
// ============================================================
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
7
|
+
import { UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
9
|
+
|
|
10
|
+
/** Claim rewards from referral program. */
|
|
17
11
|
export const ClaimRewardsRequest = /* @__PURE__ */ (() => {
|
|
18
12
|
return v.pipe(
|
|
19
13
|
v.object({
|
|
@@ -49,14 +43,34 @@ export const ClaimRewardsRequest = /* @__PURE__ */ (() => {
|
|
|
49
43
|
})();
|
|
50
44
|
export type ClaimRewardsRequest = v.InferOutput<typeof ClaimRewardsRequest>;
|
|
51
45
|
|
|
52
|
-
|
|
53
|
-
export
|
|
46
|
+
/** Successful response without specific data or error response. */
|
|
47
|
+
export const ClaimRewardsResponse = /* @__PURE__ */ (() => {
|
|
48
|
+
return v.pipe(
|
|
49
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
50
|
+
v.description("Successful response without specific data or error response."),
|
|
51
|
+
);
|
|
52
|
+
})();
|
|
53
|
+
export type ClaimRewardsResponse = v.InferOutput<typeof ClaimRewardsResponse>;
|
|
54
|
+
|
|
55
|
+
// ============================================================
|
|
56
|
+
// Execution Logic
|
|
57
|
+
// ============================================================
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
import { parser } from "../_base.ts";
|
|
60
|
+
import {
|
|
61
|
+
type ExchangeRequestConfig,
|
|
62
|
+
type ExcludeErrorResponse,
|
|
63
|
+
executeL1Action,
|
|
64
|
+
type ExtractRequestOptions,
|
|
65
|
+
type MultiSignRequestConfig,
|
|
66
|
+
} from "./_base/mod.ts";
|
|
56
67
|
|
|
57
68
|
/** Request options for the {@linkcode claimRewards} function. */
|
|
58
69
|
export type ClaimRewardsOptions = ExtractRequestOptions<v.InferInput<typeof ClaimRewardsRequest>>;
|
|
59
70
|
|
|
71
|
+
/** Successful variant of {@linkcode ClaimRewardsResponse} without errors. */
|
|
72
|
+
export type ClaimRewardsSuccessResponse = ExcludeErrorResponse<ClaimRewardsResponse>;
|
|
73
|
+
|
|
60
74
|
/**
|
|
61
75
|
* Claim rewards from referral program.
|
|
62
76
|
* @param opts - Request execution options.
|
|
@@ -65,12 +79,11 @@ export type ClaimRewardsOptions = ExtractRequestOptions<v.InferInput<typeof Clai
|
|
|
65
79
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
66
80
|
* @throws {TransportError} When the transport layer throws an error.
|
|
67
81
|
*
|
|
68
|
-
* @see null
|
|
69
82
|
* @example
|
|
70
83
|
* ```ts
|
|
71
84
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
72
85
|
* import { claimRewards } from "@nktkas/hyperliquid/api/exchange";
|
|
73
|
-
* import { privateKeyToAccount } from "
|
|
86
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
74
87
|
*
|
|
75
88
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
76
89
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -81,7 +94,7 @@ export type ClaimRewardsOptions = ExtractRequestOptions<v.InferInput<typeof Clai
|
|
|
81
94
|
export async function claimRewards(
|
|
82
95
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
83
96
|
opts?: ClaimRewardsOptions,
|
|
84
|
-
): Promise<
|
|
97
|
+
): Promise<ClaimRewardsSuccessResponse> {
|
|
85
98
|
const request = parser(ClaimRewardsRequest)({
|
|
86
99
|
action: {
|
|
87
100
|
type: "claimRewards",
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, type DeepImmutable, Hex, parser, UnsignedInteger } from "../_base.ts";
|
|
3
|
-
import {
|
|
4
|
-
type ExchangeRequestConfig,
|
|
5
|
-
executeUserSignedAction,
|
|
6
|
-
type ExtractRequestAction,
|
|
7
|
-
type ExtractRequestOptions,
|
|
8
|
-
getSignatureChainId,
|
|
9
|
-
type MultiSignRequestConfig,
|
|
10
|
-
Signature,
|
|
11
|
-
} from "./_base/mod.ts";
|
|
12
2
|
|
|
13
|
-
//
|
|
3
|
+
// ============================================================
|
|
4
|
+
// API Schemas
|
|
5
|
+
// ============================================================
|
|
6
|
+
|
|
7
|
+
import { Address, Hex, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
14
9
|
|
|
15
10
|
/** Signers configuration for {@linkcode ConvertToMultiSigUserRequest}. */
|
|
16
|
-
|
|
11
|
+
const ConvertToMultiSigUserRequestSigners = /* @__PURE__ */ (() => {
|
|
17
12
|
return v.pipe(
|
|
18
13
|
v.union([
|
|
19
14
|
v.object({
|
|
@@ -37,7 +32,6 @@ export const ConvertToMultiSigUserRequestSigners = /* @__PURE__ */ (() => {
|
|
|
37
32
|
v.description("Signers configuration for `ConvertToMultiSigUserRequest`"),
|
|
38
33
|
);
|
|
39
34
|
})();
|
|
40
|
-
export type ConvertToMultiSigUserRequestSigners = v.InferOutput<typeof ConvertToMultiSigUserRequestSigners>;
|
|
41
35
|
|
|
42
36
|
/**
|
|
43
37
|
* Convert a single-signature account to a multi-signature account or vice versa.
|
|
@@ -111,16 +105,42 @@ export const ConvertToMultiSigUserRequest = /* @__PURE__ */ (() => {
|
|
|
111
105
|
})();
|
|
112
106
|
export type ConvertToMultiSigUserRequest = v.InferOutput<typeof ConvertToMultiSigUserRequest>;
|
|
113
107
|
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Successful response without specific data or error response.
|
|
110
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/multi-sig
|
|
111
|
+
*/
|
|
112
|
+
export const ConvertToMultiSigUserResponse = /* @__PURE__ */ (() => {
|
|
113
|
+
return v.pipe(
|
|
114
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
115
|
+
v.description("Successful response without specific data or error response."),
|
|
116
|
+
);
|
|
117
|
+
})();
|
|
118
|
+
export type ConvertToMultiSigUserResponse = v.InferOutput<typeof ConvertToMultiSigUserResponse>;
|
|
119
|
+
|
|
120
|
+
// ============================================================
|
|
121
|
+
// Execution Logic
|
|
122
|
+
// ============================================================
|
|
116
123
|
|
|
117
|
-
|
|
124
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
125
|
+
import {
|
|
126
|
+
type ExchangeRequestConfig,
|
|
127
|
+
type ExcludeErrorResponse,
|
|
128
|
+
executeUserSignedAction,
|
|
129
|
+
type ExtractRequestAction,
|
|
130
|
+
type ExtractRequestOptions,
|
|
131
|
+
getSignatureChainId,
|
|
132
|
+
type MultiSignRequestConfig,
|
|
133
|
+
} from "./_base/mod.ts";
|
|
118
134
|
|
|
119
135
|
/** Action parameters for the {@linkcode convertToMultiSigUser} function. */
|
|
120
136
|
export type ConvertToMultiSigUserParameters = ExtractRequestAction<v.InferInput<typeof ConvertToMultiSigUserRequest>>;
|
|
137
|
+
|
|
121
138
|
/** Request options for the {@linkcode convertToMultiSigUser} function. */
|
|
122
139
|
export type ConvertToMultiSigUserOptions = ExtractRequestOptions<v.InferInput<typeof ConvertToMultiSigUserRequest>>;
|
|
123
140
|
|
|
141
|
+
/** Successful variant of {@linkcode ConvertToMultiSigUserResponse} without errors. */
|
|
142
|
+
export type ConvertToMultiSigUserSuccessResponse = ExcludeErrorResponse<ConvertToMultiSigUserResponse>;
|
|
143
|
+
|
|
124
144
|
/** EIP-712 types for the {@linkcode convertToMultiSigUser} function. */
|
|
125
145
|
export const ConvertToMultiSigUserTypes = {
|
|
126
146
|
"HyperliquidTransaction:ConvertToMultiSigUser": [
|
|
@@ -145,7 +165,7 @@ export const ConvertToMultiSigUserTypes = {
|
|
|
145
165
|
* ```ts
|
|
146
166
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
147
167
|
* import { convertToMultiSigUser } from "@nktkas/hyperliquid/api/exchange";
|
|
148
|
-
* import { privateKeyToAccount } from "
|
|
168
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
149
169
|
*
|
|
150
170
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
151
171
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -172,7 +192,7 @@ export async function convertToMultiSigUser(
|
|
|
172
192
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
173
193
|
params: DeepImmutable<ConvertToMultiSigUserParameters>,
|
|
174
194
|
opts?: ConvertToMultiSigUserOptions,
|
|
175
|
-
): Promise<
|
|
195
|
+
): Promise<ConvertToMultiSigUserSuccessResponse> {
|
|
176
196
|
const request = parser(ConvertToMultiSigUserRequest)({
|
|
177
197
|
action: {
|
|
178
198
|
type: "convertToMultiSigUser",
|