@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,15 +1,11 @@
|
|
|
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
|
+
// ============================================================
|
|
6
|
+
|
|
7
|
+
import { UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* Reserve additional rate-limited actions for a fee.
|
|
@@ -55,16 +51,41 @@ export const ReserveRequestWeightRequest = /* @__PURE__ */ (() => {
|
|
|
55
51
|
})();
|
|
56
52
|
export type ReserveRequestWeightRequest = v.InferOutput<typeof ReserveRequestWeightRequest>;
|
|
57
53
|
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Successful response without specific data or error response.
|
|
56
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#reserve-additional-actions
|
|
57
|
+
*/
|
|
58
|
+
export const ReserveRequestWeightResponse = /* @__PURE__ */ (() => {
|
|
59
|
+
return v.pipe(
|
|
60
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
61
|
+
v.description("Successful response without specific data or error response."),
|
|
62
|
+
);
|
|
63
|
+
})();
|
|
64
|
+
export type ReserveRequestWeightResponse = v.InferOutput<typeof ReserveRequestWeightResponse>;
|
|
65
|
+
|
|
66
|
+
// ============================================================
|
|
67
|
+
// Execution Logic
|
|
68
|
+
// ============================================================
|
|
60
69
|
|
|
61
|
-
|
|
70
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
71
|
+
import {
|
|
72
|
+
type ExchangeRequestConfig,
|
|
73
|
+
type ExcludeErrorResponse,
|
|
74
|
+
executeL1Action,
|
|
75
|
+
type ExtractRequestAction,
|
|
76
|
+
type ExtractRequestOptions,
|
|
77
|
+
type MultiSignRequestConfig,
|
|
78
|
+
} from "./_base/mod.ts";
|
|
62
79
|
|
|
63
80
|
/** Action parameters for the {@linkcode reserveRequestWeight} function. */
|
|
64
81
|
export type ReserveRequestWeightParameters = ExtractRequestAction<v.InferInput<typeof ReserveRequestWeightRequest>>;
|
|
82
|
+
|
|
65
83
|
/** Request options for the {@linkcode reserveRequestWeight} function. */
|
|
66
84
|
export type ReserveRequestWeightOptions = ExtractRequestOptions<v.InferInput<typeof ReserveRequestWeightRequest>>;
|
|
67
85
|
|
|
86
|
+
/** Successful variant of {@linkcode ReserveRequestWeightResponse} without errors. */
|
|
87
|
+
export type ReserveRequestWeightSuccessResponse = ExcludeErrorResponse<ReserveRequestWeightResponse>;
|
|
88
|
+
|
|
68
89
|
/**
|
|
69
90
|
* Reserve additional rate-limited actions for a fee.
|
|
70
91
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -80,7 +101,7 @@ export type ReserveRequestWeightOptions = ExtractRequestOptions<v.InferInput<typ
|
|
|
80
101
|
* ```ts
|
|
81
102
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
82
103
|
* import { reserveRequestWeight } from "@nktkas/hyperliquid/api/exchange";
|
|
83
|
-
* import { privateKeyToAccount } from "
|
|
104
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
84
105
|
*
|
|
85
106
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
86
107
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -95,7 +116,7 @@ export async function reserveRequestWeight(
|
|
|
95
116
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
96
117
|
params: DeepImmutable<ReserveRequestWeightParameters>,
|
|
97
118
|
opts?: ReserveRequestWeightOptions,
|
|
98
|
-
): Promise<
|
|
119
|
+
): Promise<ReserveRequestWeightSuccessResponse> {
|
|
99
120
|
const request = parser(ReserveRequestWeightRequest)({
|
|
100
121
|
action: {
|
|
101
122
|
type: "reserveRequestWeight",
|
|
@@ -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 { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* Schedule a cancel-all operation at a future time.
|
|
@@ -69,16 +65,41 @@ export const ScheduleCancelRequest = /* @__PURE__ */ (() => {
|
|
|
69
65
|
})();
|
|
70
66
|
export type ScheduleCancelRequest = v.InferOutput<typeof ScheduleCancelRequest>;
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Successful response without specific data or error response.
|
|
70
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#schedule-cancel-dead-mans-switch
|
|
71
|
+
*/
|
|
72
|
+
export const ScheduleCancelResponse = /* @__PURE__ */ (() => {
|
|
73
|
+
return v.pipe(
|
|
74
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
75
|
+
v.description("Successful response without specific data or error response."),
|
|
76
|
+
);
|
|
77
|
+
})();
|
|
78
|
+
export type ScheduleCancelResponse = v.InferOutput<typeof ScheduleCancelResponse>;
|
|
79
|
+
|
|
80
|
+
// ============================================================
|
|
81
|
+
// Execution Logic
|
|
82
|
+
// ============================================================
|
|
74
83
|
|
|
75
|
-
|
|
84
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
85
|
+
import {
|
|
86
|
+
type ExchangeRequestConfig,
|
|
87
|
+
type ExcludeErrorResponse,
|
|
88
|
+
executeL1Action,
|
|
89
|
+
type ExtractRequestAction,
|
|
90
|
+
type ExtractRequestOptions,
|
|
91
|
+
type MultiSignRequestConfig,
|
|
92
|
+
} from "./_base/mod.ts";
|
|
76
93
|
|
|
77
94
|
/** Action parameters for the {@linkcode scheduleCancel} function. */
|
|
78
95
|
export type ScheduleCancelParameters = ExtractRequestAction<v.InferInput<typeof ScheduleCancelRequest>>;
|
|
96
|
+
|
|
79
97
|
/** Request options for the {@linkcode scheduleCancel} function. */
|
|
80
98
|
export type ScheduleCancelOptions = ExtractRequestOptions<v.InferInput<typeof ScheduleCancelRequest>>;
|
|
81
99
|
|
|
100
|
+
/** Successful variant of {@linkcode ScheduleCancelResponse} without errors. */
|
|
101
|
+
export type ScheduleCancelSuccessResponse = ExcludeErrorResponse<ScheduleCancelResponse>;
|
|
102
|
+
|
|
82
103
|
/**
|
|
83
104
|
* Schedule a cancel-all operation at a future time.
|
|
84
105
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -94,7 +115,7 @@ export type ScheduleCancelOptions = ExtractRequestOptions<v.InferInput<typeof Sc
|
|
|
94
115
|
* ```ts
|
|
95
116
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
96
117
|
* import { scheduleCancel } from "@nktkas/hyperliquid/api/exchange";
|
|
97
|
-
* import { privateKeyToAccount } from "
|
|
118
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
98
119
|
*
|
|
99
120
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
100
121
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -109,18 +130,18 @@ export async function scheduleCancel(
|
|
|
109
130
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
110
131
|
params?: DeepImmutable<ScheduleCancelParameters>,
|
|
111
132
|
opts?: ScheduleCancelOptions,
|
|
112
|
-
): Promise<
|
|
133
|
+
): Promise<ScheduleCancelSuccessResponse>;
|
|
113
134
|
export async function scheduleCancel(
|
|
114
135
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
115
136
|
opts?: ScheduleCancelOptions,
|
|
116
|
-
): Promise<
|
|
137
|
+
): Promise<ScheduleCancelSuccessResponse>;
|
|
117
138
|
export async function scheduleCancel(
|
|
118
139
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
119
140
|
paramsOrOpts?:
|
|
120
141
|
| DeepImmutable<ScheduleCancelParameters>
|
|
121
142
|
| ScheduleCancelOptions,
|
|
122
143
|
maybeOpts?: ScheduleCancelOptions,
|
|
123
|
-
): Promise<
|
|
144
|
+
): Promise<ScheduleCancelSuccessResponse> {
|
|
124
145
|
const isFirstArgParams = paramsOrOpts && "time" in paramsOrOpts;
|
|
125
146
|
const params = isFirstArgParams ? paramsOrOpts : {};
|
|
126
147
|
const opts = isFirstArgParams ? maybeOpts : paramsOrOpts as ScheduleCancelOptions;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, type DeepImmutable, Hex, parser, TokenId, UnsignedDecimal, 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, TokenId, UnsignedDecimal, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
14
9
|
|
|
15
10
|
/**
|
|
16
11
|
* Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts.
|
|
17
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
12
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
18
13
|
*/
|
|
19
14
|
export const SendAssetRequest = /* @__PURE__ */ (() => {
|
|
20
15
|
return v.pipe(
|
|
@@ -91,16 +86,42 @@ export const SendAssetRequest = /* @__PURE__ */ (() => {
|
|
|
91
86
|
})();
|
|
92
87
|
export type SendAssetRequest = v.InferOutput<typeof SendAssetRequest>;
|
|
93
88
|
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Successful response without specific data or error response.
|
|
91
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
92
|
+
*/
|
|
93
|
+
export const SendAssetResponse = /* @__PURE__ */ (() => {
|
|
94
|
+
return v.pipe(
|
|
95
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
96
|
+
v.description("Successful response without specific data or error response."),
|
|
97
|
+
);
|
|
98
|
+
})();
|
|
99
|
+
export type SendAssetResponse = v.InferOutput<typeof SendAssetResponse>;
|
|
100
|
+
|
|
101
|
+
// ============================================================
|
|
102
|
+
// Execution Logic
|
|
103
|
+
// ============================================================
|
|
96
104
|
|
|
97
|
-
|
|
105
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
106
|
+
import {
|
|
107
|
+
type ExchangeRequestConfig,
|
|
108
|
+
type ExcludeErrorResponse,
|
|
109
|
+
executeUserSignedAction,
|
|
110
|
+
type ExtractRequestAction,
|
|
111
|
+
type ExtractRequestOptions,
|
|
112
|
+
getSignatureChainId,
|
|
113
|
+
type MultiSignRequestConfig,
|
|
114
|
+
} from "./_base/mod.ts";
|
|
98
115
|
|
|
99
116
|
/** Action parameters for the {@linkcode sendAsset} function. */
|
|
100
117
|
export type SendAssetParameters = ExtractRequestAction<v.InferInput<typeof SendAssetRequest>>;
|
|
118
|
+
|
|
101
119
|
/** Request options for the {@linkcode sendAsset} function. */
|
|
102
120
|
export type SendAssetOptions = ExtractRequestOptions<v.InferInput<typeof SendAssetRequest>>;
|
|
103
121
|
|
|
122
|
+
/** Successful variant of {@linkcode SendAssetResponse} without errors. */
|
|
123
|
+
export type SendAssetSuccessResponse = ExcludeErrorResponse<SendAssetResponse>;
|
|
124
|
+
|
|
104
125
|
/** EIP-712 types for the {@linkcode sendAsset} function. */
|
|
105
126
|
export const SendAssetTypes = {
|
|
106
127
|
"HyperliquidTransaction:SendAsset": [
|
|
@@ -125,12 +146,12 @@ export const SendAssetTypes = {
|
|
|
125
146
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
126
147
|
* @throws {TransportError} When the transport layer throws an error.
|
|
127
148
|
*
|
|
128
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
149
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
129
150
|
* @example
|
|
130
151
|
* ```ts
|
|
131
152
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
132
153
|
* import { sendAsset } from "@nktkas/hyperliquid/api/exchange";
|
|
133
|
-
* import { privateKeyToAccount } from "
|
|
154
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
134
155
|
*
|
|
135
156
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
136
157
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -151,7 +172,7 @@ export async function sendAsset(
|
|
|
151
172
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
152
173
|
params: DeepImmutable<SendAssetParameters>,
|
|
153
174
|
opts?: SendAssetOptions,
|
|
154
|
-
): Promise<
|
|
175
|
+
): Promise<SendAssetSuccessResponse> {
|
|
155
176
|
const request = parser(SendAssetRequest)({
|
|
156
177
|
action: {
|
|
157
178
|
type: "sendAsset",
|
|
@@ -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
|
+
/** Set the display name in the leaderboard. */
|
|
18
11
|
export const SetDisplayNameRequest = /* @__PURE__ */ (() => {
|
|
19
12
|
return v.pipe(
|
|
20
13
|
v.object({
|
|
@@ -62,16 +55,38 @@ export const SetDisplayNameRequest = /* @__PURE__ */ (() => {
|
|
|
62
55
|
})();
|
|
63
56
|
export type SetDisplayNameRequest = v.InferOutput<typeof SetDisplayNameRequest>;
|
|
64
57
|
|
|
65
|
-
|
|
66
|
-
export
|
|
58
|
+
/** Successful response without specific data or error response. */
|
|
59
|
+
export const SetDisplayNameResponse = /* @__PURE__ */ (() => {
|
|
60
|
+
return v.pipe(
|
|
61
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
62
|
+
v.description("Successful response without specific data or error response."),
|
|
63
|
+
);
|
|
64
|
+
})();
|
|
65
|
+
export type SetDisplayNameResponse = v.InferOutput<typeof SetDisplayNameResponse>;
|
|
66
|
+
|
|
67
|
+
// ============================================================
|
|
68
|
+
// Execution Logic
|
|
69
|
+
// ============================================================
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
72
|
+
import {
|
|
73
|
+
type ExchangeRequestConfig,
|
|
74
|
+
type ExcludeErrorResponse,
|
|
75
|
+
executeL1Action,
|
|
76
|
+
type ExtractRequestAction,
|
|
77
|
+
type ExtractRequestOptions,
|
|
78
|
+
type MultiSignRequestConfig,
|
|
79
|
+
} from "./_base/mod.ts";
|
|
69
80
|
|
|
70
81
|
/** Action parameters for the {@linkcode setDisplayName} function. */
|
|
71
82
|
export type SetDisplayNameParameters = ExtractRequestAction<v.InferInput<typeof SetDisplayNameRequest>>;
|
|
83
|
+
|
|
72
84
|
/** Request options for the {@linkcode setDisplayName} function. */
|
|
73
85
|
export type SetDisplayNameOptions = ExtractRequestOptions<v.InferInput<typeof SetDisplayNameRequest>>;
|
|
74
86
|
|
|
87
|
+
/** Successful variant of {@linkcode SetDisplayNameResponse} without errors. */
|
|
88
|
+
export type SetDisplayNameSuccessResponse = ExcludeErrorResponse<SetDisplayNameResponse>;
|
|
89
|
+
|
|
75
90
|
/**
|
|
76
91
|
* Set the display name in the leaderboard.
|
|
77
92
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -82,12 +97,11 @@ export type SetDisplayNameOptions = ExtractRequestOptions<v.InferInput<typeof Se
|
|
|
82
97
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
83
98
|
* @throws {TransportError} When the transport layer throws an error.
|
|
84
99
|
*
|
|
85
|
-
* @see null
|
|
86
100
|
* @example
|
|
87
101
|
* ```ts
|
|
88
102
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
89
103
|
* import { setDisplayName } from "@nktkas/hyperliquid/api/exchange";
|
|
90
|
-
* import { privateKeyToAccount } from "
|
|
104
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
91
105
|
*
|
|
92
106
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
93
107
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -102,7 +116,7 @@ export async function setDisplayName(
|
|
|
102
116
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
103
117
|
params: DeepImmutable<SetDisplayNameParameters>,
|
|
104
118
|
opts?: SetDisplayNameOptions,
|
|
105
|
-
): Promise<
|
|
119
|
+
): Promise<SetDisplayNameSuccessResponse> {
|
|
106
120
|
const request = parser(SetDisplayNameRequest)({
|
|
107
121
|
action: {
|
|
108
122
|
type: "setDisplayName",
|
|
@@ -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
|
+
/** Set a referral code. */
|
|
18
11
|
export const SetReferrerRequest = /* @__PURE__ */ (() => {
|
|
19
12
|
return v.pipe(
|
|
20
13
|
v.object({
|
|
@@ -56,16 +49,38 @@ export const SetReferrerRequest = /* @__PURE__ */ (() => {
|
|
|
56
49
|
})();
|
|
57
50
|
export type SetReferrerRequest = v.InferOutput<typeof SetReferrerRequest>;
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
export
|
|
52
|
+
/** Successful response without specific data or error response. */
|
|
53
|
+
export const SetReferrerResponse = /* @__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 SetReferrerResponse = v.InferOutput<typeof SetReferrerResponse>;
|
|
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 setReferrer} function. */
|
|
65
76
|
export type SetReferrerParameters = ExtractRequestAction<v.InferInput<typeof SetReferrerRequest>>;
|
|
77
|
+
|
|
66
78
|
/** Request options for the {@linkcode setReferrer} function. */
|
|
67
79
|
export type SetReferrerOptions = ExtractRequestOptions<v.InferInput<typeof SetReferrerRequest>>;
|
|
68
80
|
|
|
81
|
+
/** Successful variant of {@linkcode SetReferrerResponse} without errors. */
|
|
82
|
+
export type SetReferrerSuccessResponse = ExcludeErrorResponse<SetReferrerResponse>;
|
|
83
|
+
|
|
69
84
|
/**
|
|
70
85
|
* Set a referral code.
|
|
71
86
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -76,12 +91,11 @@ export type SetReferrerOptions = ExtractRequestOptions<v.InferInput<typeof SetRe
|
|
|
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 { setReferrer } 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 setReferrer(
|
|
|
96
110
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
97
111
|
params: DeepImmutable<SetReferrerParameters>,
|
|
98
112
|
opts?: SetReferrerOptions,
|
|
99
|
-
): Promise<
|
|
113
|
+
): Promise<SetReferrerSuccessResponse> {
|
|
100
114
|
const request = parser(SetReferrerRequest)({
|
|
101
115
|
action: {
|
|
102
116
|
type: "setReferrer",
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, type DeepImmutable, parser, Percent, 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, Percent, UnsignedDecimal, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* Deploying HIP-1 and HIP-2 assets.
|
|
@@ -288,16 +284,41 @@ export const SpotDeployRequest = /* @__PURE__ */ (() => {
|
|
|
288
284
|
})();
|
|
289
285
|
export type SpotDeployRequest = v.InferOutput<typeof SpotDeployRequest>;
|
|
290
286
|
|
|
291
|
-
|
|
292
|
-
|
|
287
|
+
/**
|
|
288
|
+
* Successful response without specific data or error response.
|
|
289
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/deploying-hip-1-and-hip-2-assets
|
|
290
|
+
*/
|
|
291
|
+
export const SpotDeployResponse = /* @__PURE__ */ (() => {
|
|
292
|
+
return v.pipe(
|
|
293
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
294
|
+
v.description("Successful response without specific data or error response."),
|
|
295
|
+
);
|
|
296
|
+
})();
|
|
297
|
+
export type SpotDeployResponse = v.InferOutput<typeof SpotDeployResponse>;
|
|
298
|
+
|
|
299
|
+
// ============================================================
|
|
300
|
+
// Execution Logic
|
|
301
|
+
// ============================================================
|
|
293
302
|
|
|
294
|
-
|
|
303
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
304
|
+
import {
|
|
305
|
+
type ExchangeRequestConfig,
|
|
306
|
+
type ExcludeErrorResponse,
|
|
307
|
+
executeL1Action,
|
|
308
|
+
type ExtractRequestAction,
|
|
309
|
+
type ExtractRequestOptions,
|
|
310
|
+
type MultiSignRequestConfig,
|
|
311
|
+
} from "./_base/mod.ts";
|
|
295
312
|
|
|
296
313
|
/** Action parameters for the {@linkcode spotDeploy} function. */
|
|
297
314
|
export type SpotDeployParameters = ExtractRequestAction<v.InferInput<typeof SpotDeployRequest>>;
|
|
315
|
+
|
|
298
316
|
/** Request options for the {@linkcode spotDeploy} function. */
|
|
299
317
|
export type SpotDeployOptions = ExtractRequestOptions<v.InferInput<typeof SpotDeployRequest>>;
|
|
300
318
|
|
|
319
|
+
/** Successful variant of {@linkcode SpotDeployResponse} without errors. */
|
|
320
|
+
export type SpotDeploySuccessResponse = ExcludeErrorResponse<SpotDeployResponse>;
|
|
321
|
+
|
|
301
322
|
/**
|
|
302
323
|
* Deploying HIP-1 and HIP-2 assets.
|
|
303
324
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -313,7 +334,7 @@ export type SpotDeployOptions = ExtractRequestOptions<v.InferInput<typeof SpotDe
|
|
|
313
334
|
* ```ts
|
|
314
335
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
315
336
|
* import { spotDeploy } from "@nktkas/hyperliquid/api/exchange";
|
|
316
|
-
* import { privateKeyToAccount } from "
|
|
337
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
317
338
|
*
|
|
318
339
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
319
340
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -338,7 +359,7 @@ export async function spotDeploy(
|
|
|
338
359
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
339
360
|
params: DeepImmutable<SpotDeployParameters>,
|
|
340
361
|
opts?: SpotDeployOptions,
|
|
341
|
-
): Promise<
|
|
362
|
+
): Promise<SpotDeploySuccessResponse> {
|
|
342
363
|
const request = parser(SpotDeployRequest)({
|
|
343
364
|
action: {
|
|
344
365
|
type: "spotDeploy",
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { Address, type DeepImmutable, Hex, parser, TokenId, UnsignedDecimal, 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, TokenId, UnsignedDecimal, UnsignedInteger } from "../_base.ts";
|
|
8
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.ts";
|
|
14
9
|
|
|
15
10
|
/**
|
|
16
11
|
* Send spot assets to another address.
|
|
@@ -76,16 +71,42 @@ export const SpotSendRequest = /* @__PURE__ */ (() => {
|
|
|
76
71
|
})();
|
|
77
72
|
export type SpotSendRequest = v.InferOutput<typeof SpotSendRequest>;
|
|
78
73
|
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Successful response without specific data or error response.
|
|
76
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#core-spot-transfer
|
|
77
|
+
*/
|
|
78
|
+
export const SpotSendResponse = /* @__PURE__ */ (() => {
|
|
79
|
+
return v.pipe(
|
|
80
|
+
v.union([SuccessResponse, ErrorResponse]),
|
|
81
|
+
v.description("Successful response without specific data or error response."),
|
|
82
|
+
);
|
|
83
|
+
})();
|
|
84
|
+
export type SpotSendResponse = v.InferOutput<typeof SpotSendResponse>;
|
|
85
|
+
|
|
86
|
+
// ============================================================
|
|
87
|
+
// Execution Logic
|
|
88
|
+
// ============================================================
|
|
81
89
|
|
|
82
|
-
|
|
90
|
+
import { type DeepImmutable, parser } from "../_base.ts";
|
|
91
|
+
import {
|
|
92
|
+
type ExchangeRequestConfig,
|
|
93
|
+
type ExcludeErrorResponse,
|
|
94
|
+
executeUserSignedAction,
|
|
95
|
+
type ExtractRequestAction,
|
|
96
|
+
type ExtractRequestOptions,
|
|
97
|
+
getSignatureChainId,
|
|
98
|
+
type MultiSignRequestConfig,
|
|
99
|
+
} from "./_base/mod.ts";
|
|
83
100
|
|
|
84
101
|
/** Action parameters for the {@linkcode spotSend} function. */
|
|
85
102
|
export type SpotSendParameters = ExtractRequestAction<v.InferInput<typeof SpotSendRequest>>;
|
|
103
|
+
|
|
86
104
|
/** Request options for the {@linkcode spotSend} function. */
|
|
87
105
|
export type SpotSendOptions = ExtractRequestOptions<v.InferInput<typeof SpotSendRequest>>;
|
|
88
106
|
|
|
107
|
+
/** Successful variant of {@linkcode SpotSendResponse} without errors. */
|
|
108
|
+
export type SpotSendSuccessResponse = ExcludeErrorResponse<SpotSendResponse>;
|
|
109
|
+
|
|
89
110
|
/** EIP-712 types for the {@linkcode spotSend} function. */
|
|
90
111
|
export const SpotSendTypes = {
|
|
91
112
|
"HyperliquidTransaction:SpotSend": [
|
|
@@ -112,7 +133,7 @@ export const SpotSendTypes = {
|
|
|
112
133
|
* ```ts
|
|
113
134
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
114
135
|
* import { spotSend } from "@nktkas/hyperliquid/api/exchange";
|
|
115
|
-
* import { privateKeyToAccount } from "
|
|
136
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
116
137
|
*
|
|
117
138
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
118
139
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -131,7 +152,7 @@ export async function spotSend(
|
|
|
131
152
|
config: ExchangeRequestConfig | MultiSignRequestConfig,
|
|
132
153
|
params: DeepImmutable<SpotSendParameters>,
|
|
133
154
|
opts?: SpotSendOptions,
|
|
134
|
-
): Promise<
|
|
155
|
+
): Promise<SpotSendSuccessResponse> {
|
|
135
156
|
const request = parser(SpotSendRequest)({
|
|
136
157
|
action: {
|
|
137
158
|
type: "spotSend",
|