@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleCancel.js","sourceRoot":"","sources":["../../../../src/api/exchange/scheduleCancel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"scheduleCancel.js","sourceRoot":"","sources":["../../../../src/api/exchange/scheduleCancel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+DAA+D;AAC/D,cAAc;AACd,+DAA+D;AAE/D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACzD,OAAO,CAAC,CAAC,IAAI,CACX,CAAC,CAAC,MAAM,CAAC;QACP,yBAAyB;QACzB,MAAM,EAAE,CAAC,CAAC,IAAI,CACZ,CAAC,CAAC,MAAM,CAAC;YACP,sBAAsB;YACtB,IAAI,EAAE,CAAC,CAAC,IAAI,CACV,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC3B,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CACjC;YACD;;;;;eAKG;YACH,IAAI,EAAE,CAAC,CAAC,IAAI,CACV,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,EAC3B,CAAC,CAAC,WAAW,CACX,qCAAqC;gBACnC,6CAA6C;gBAC7C,iFAAiF,CACpF,CACF;SACF,CAAC,EACF,CAAC,CAAC,WAAW,CAAC,oBAAoB,CAAC,CACpC;QACD,2DAA2D;QAC3D,KAAK,EAAE,CAAC,CAAC,IAAI,CACX,eAAe,EACf,CAAC,CAAC,WAAW,CAAC,sDAAsD,CAAC,CACtE;QAC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M,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC5C,MAAM,EAAE;YACN,IAAI,EAAE,gBAAgB;YACtB,GAAG,MAAM;SACV;QACD,KAAK,EAAE,CAAC,EAAE,2DAA2D;QACrE,SAAS,EAAE;YACT,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,EAAE;SACN;QACD,YAAY,EAAE,IAAI,EAAE,YAAY,IAAI,MAAM,CAAC,mBAAmB;QAC9D,YAAY,EAAE,OAAO,MAAM,CAAC,mBAAmB,KAAK,QAAQ;YAC1D,CAAC,CAAC,MAAM,CAAC,mBAAmB;YAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,mBAAmB,EAAE,EAAE;KACzC,CAAC,CAAC;IACH,OAAO,MAAM,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { type DeepImmutable } from "../_base.ts";
|
|
3
|
-
import { type ExchangeRequestConfig, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
4
2
|
/**
|
|
5
3
|
* Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts.
|
|
6
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
4
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
7
5
|
*/
|
|
8
6
|
export declare const SendAssetRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
9
7
|
/** Action to perform. */
|
|
@@ -77,12 +75,46 @@ export declare const SendAssetRequest: v.SchemaWithPipe<readonly [v.ObjectSchema
|
|
|
77
75
|
};
|
|
78
76
|
}, "Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts.">]>;
|
|
79
77
|
export type SendAssetRequest = v.InferOutput<typeof SendAssetRequest>;
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Successful response without specific data or error response.
|
|
80
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
81
|
+
*/
|
|
82
|
+
export declare const SendAssetResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
83
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
84
|
+
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
85
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
|
|
86
|
+
}, undefined>, v.DescriptionAction<{
|
|
87
|
+
type: "default";
|
|
88
|
+
}, "Response details.">]>;
|
|
89
|
+
}, undefined>, v.DescriptionAction<{
|
|
90
|
+
status: "ok";
|
|
91
|
+
response: {
|
|
92
|
+
type: "default";
|
|
93
|
+
};
|
|
94
|
+
}, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
95
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
|
|
96
|
+
readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
97
|
+
}, undefined>, v.DescriptionAction<{
|
|
98
|
+
status: "err";
|
|
99
|
+
response: string;
|
|
100
|
+
}, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
|
|
101
|
+
status: "err";
|
|
102
|
+
response: string;
|
|
103
|
+
} | {
|
|
104
|
+
status: "ok";
|
|
105
|
+
response: {
|
|
106
|
+
type: "default";
|
|
107
|
+
};
|
|
108
|
+
}, "Successful response without specific data or error response.">]>;
|
|
109
|
+
export type SendAssetResponse = v.InferOutput<typeof SendAssetResponse>;
|
|
110
|
+
import { type DeepImmutable } from "../_base.ts";
|
|
111
|
+
import { type ExchangeRequestConfig, type ExcludeErrorResponse, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
82
112
|
/** Action parameters for the {@linkcode sendAsset} function. */
|
|
83
113
|
export type SendAssetParameters = ExtractRequestAction<v.InferInput<typeof SendAssetRequest>>;
|
|
84
114
|
/** Request options for the {@linkcode sendAsset} function. */
|
|
85
115
|
export type SendAssetOptions = ExtractRequestOptions<v.InferInput<typeof SendAssetRequest>>;
|
|
116
|
+
/** Successful variant of {@linkcode SendAssetResponse} without errors. */
|
|
117
|
+
export type SendAssetSuccessResponse = ExcludeErrorResponse<SendAssetResponse>;
|
|
86
118
|
/** EIP-712 types for the {@linkcode sendAsset} function. */
|
|
87
119
|
export declare const SendAssetTypes: {
|
|
88
120
|
"HyperliquidTransaction:SendAsset": {
|
|
@@ -100,12 +132,12 @@ export declare const SendAssetTypes: {
|
|
|
100
132
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
101
133
|
* @throws {TransportError} When the transport layer throws an error.
|
|
102
134
|
*
|
|
103
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
135
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
104
136
|
* @example
|
|
105
137
|
* ```ts
|
|
106
138
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
107
139
|
* import { sendAsset } from "@nktkas/hyperliquid/api/exchange";
|
|
108
|
-
* import { privateKeyToAccount } from "
|
|
140
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
109
141
|
*
|
|
110
142
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
111
143
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -122,5 +154,5 @@ export declare const SendAssetTypes: {
|
|
|
122
154
|
* );
|
|
123
155
|
* ```
|
|
124
156
|
*/
|
|
125
|
-
export declare function sendAsset(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<SendAssetParameters>, opts?: SendAssetOptions): Promise<
|
|
157
|
+
export declare function sendAsset(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<SendAssetParameters>, opts?: SendAssetOptions): Promise<SendAssetSuccessResponse>;
|
|
126
158
|
//# sourceMappingURL=sendAsset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendAsset.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/sendAsset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"sendAsset.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/sendAsset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAGvB,yBAAyB;;QAGrB,sBAAsB;;QAKtB,iCAAiC;;QAKjC,2BAA2B;;QAK3B,2BAA2B;;QAK3B,kEAAkE;;QAKlE,uEAAuE;;QAKvE,wBAAwB;;QAKxB,mCAAmC;;QAKnC,sEAAsE;;QAKtE,2DAA2D;;;;;;;;;;;;;;IAQ/D,2DAA2D;;IAK3D,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8FAQjC,CAAC;AACL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;oEAK1B,CAAC;AACL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAMxE,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE1B,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAExB,gEAAgE;AAChE,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC;AAE9F,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC;AAE5F,0EAA0E;AAC1E,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAE/E,4DAA4D;AAC5D,eAAO,MAAM,cAAc;;;;;CAW1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,qBAAqB,GAAG,sBAAsB,EACtD,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC1C,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,wBAAwB,CAAC,CAiBnC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { Address, Hex, TokenId, UnsignedDecimal, UnsignedInteger } from "../_base.js";
|
|
6
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.js";
|
|
5
7
|
/**
|
|
6
8
|
* Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts.
|
|
7
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
9
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
8
10
|
*/
|
|
9
11
|
export const SendAssetRequest = /* @__PURE__ */ (() => {
|
|
10
12
|
return v.pipe(v.object({
|
|
@@ -37,8 +39,18 @@ export const SendAssetRequest = /* @__PURE__ */ (() => {
|
|
|
37
39
|
signature: v.pipe(Signature, v.description("Cryptographic signature.")),
|
|
38
40
|
}), v.description("Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts."));
|
|
39
41
|
})();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Successful response without specific data or error response.
|
|
44
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
45
|
+
*/
|
|
46
|
+
export const SendAssetResponse = /* @__PURE__ */ (() => {
|
|
47
|
+
return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
|
|
48
|
+
})();
|
|
49
|
+
// ============================================================
|
|
50
|
+
// Execution Logic
|
|
51
|
+
// ============================================================
|
|
52
|
+
import { parser } from "../_base.js";
|
|
53
|
+
import { executeUserSignedAction, getSignatureChainId, } from "./_base/mod.js";
|
|
42
54
|
/** EIP-712 types for the {@linkcode sendAsset} function. */
|
|
43
55
|
export const SendAssetTypes = {
|
|
44
56
|
"HyperliquidTransaction:SendAsset": [
|
|
@@ -62,12 +74,12 @@ export const SendAssetTypes = {
|
|
|
62
74
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
63
75
|
* @throws {TransportError} When the transport layer throws an error.
|
|
64
76
|
*
|
|
65
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
77
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset
|
|
66
78
|
* @example
|
|
67
79
|
* ```ts
|
|
68
80
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
69
81
|
* import { sendAsset } from "@nktkas/hyperliquid/api/exchange";
|
|
70
|
-
* import { privateKeyToAccount } from "
|
|
82
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
71
83
|
*
|
|
72
84
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
73
85
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendAsset.js","sourceRoot":"","sources":["../../../../src/api/exchange/sendAsset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"sendAsset.js","sourceRoot":"","sources":["../../../../src/api/exchange/sendAsset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+DAA+D;AAC/D,cAAc;AACd,+DAA+D;AAE/D,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACpD,OAAO,CAAC,CAAC,IAAI,CACX,CAAC,CAAC,MAAM,CAAC;QACP,yBAAyB;QACzB,MAAM,EAAE,CAAC,CAAC,IAAI,CACZ,CAAC,CAAC,MAAM,CAAC;YACP,sBAAsB;YACtB,IAAI,EAAE,CAAC,CAAC,IAAI,CACV,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EACtB,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CACjC;YACD,iCAAiC;YACjC,gBAAgB,EAAE,CAAC,CAAC,IAAI,CACtB,GAAG,EACH,CAAC,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAC5C;YACD,2BAA2B;YAC3B,gBAAgB,EAAE,CAAC,CAAC,IAAI,CACtB,CAA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AAE,IAAI,EAAE,QAAQ,EAAE;KAClC;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAsD,EACtD,MAA0C,EAC1C,IAAuB;IAEvB,MAAM,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACvC,MAAM,EAAE;YACN,IAAI,EAAE,WAAW;YACjB,gBAAgB,EAAE,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACpE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,MAAM,CAAC;YACnD,KAAK,EAAE,CAAC,EAAE,8FAA8F;YACxG,GAAG,MAAM;SACV;QACD,KAAK,EAAE,CAAC,EAAE,8FAA8F;QACxG,SAAS,EAAE;YACT,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,EAAE;SACN;KACF,CAAC,CAAC;IACH,OAAO,MAAM,uBAAuB,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
import { type ExchangeRequestConfig, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
4
|
-
/**
|
|
5
|
-
* Set the display name in the leaderboard.
|
|
6
|
-
* @see null
|
|
7
|
-
*/
|
|
2
|
+
/** Set the display name in the leaderboard. */
|
|
8
3
|
export declare const SetDisplayNameRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
9
4
|
/** Action to perform. */
|
|
10
5
|
readonly action: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -52,12 +47,43 @@ export declare const SetDisplayNameRequest: v.SchemaWithPipe<readonly [v.ObjectS
|
|
|
52
47
|
expiresAfter?: number | undefined;
|
|
53
48
|
}, "Set the display name in the leaderboard.">]>;
|
|
54
49
|
export type SetDisplayNameRequest = v.InferOutput<typeof SetDisplayNameRequest>;
|
|
55
|
-
|
|
56
|
-
export
|
|
50
|
+
/** Successful response without specific data or error response. */
|
|
51
|
+
export declare const SetDisplayNameResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
52
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
53
|
+
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
54
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
|
|
55
|
+
}, undefined>, v.DescriptionAction<{
|
|
56
|
+
type: "default";
|
|
57
|
+
}, "Response details.">]>;
|
|
58
|
+
}, undefined>, v.DescriptionAction<{
|
|
59
|
+
status: "ok";
|
|
60
|
+
response: {
|
|
61
|
+
type: "default";
|
|
62
|
+
};
|
|
63
|
+
}, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
64
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
|
|
65
|
+
readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
66
|
+
}, undefined>, v.DescriptionAction<{
|
|
67
|
+
status: "err";
|
|
68
|
+
response: string;
|
|
69
|
+
}, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
|
|
70
|
+
status: "err";
|
|
71
|
+
response: string;
|
|
72
|
+
} | {
|
|
73
|
+
status: "ok";
|
|
74
|
+
response: {
|
|
75
|
+
type: "default";
|
|
76
|
+
};
|
|
77
|
+
}, "Successful response without specific data or error response.">]>;
|
|
78
|
+
export type SetDisplayNameResponse = v.InferOutput<typeof SetDisplayNameResponse>;
|
|
79
|
+
import { type DeepImmutable } from "../_base.ts";
|
|
80
|
+
import { type ExchangeRequestConfig, type ExcludeErrorResponse, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
57
81
|
/** Action parameters for the {@linkcode setDisplayName} function. */
|
|
58
82
|
export type SetDisplayNameParameters = ExtractRequestAction<v.InferInput<typeof SetDisplayNameRequest>>;
|
|
59
83
|
/** Request options for the {@linkcode setDisplayName} function. */
|
|
60
84
|
export type SetDisplayNameOptions = ExtractRequestOptions<v.InferInput<typeof SetDisplayNameRequest>>;
|
|
85
|
+
/** Successful variant of {@linkcode SetDisplayNameResponse} without errors. */
|
|
86
|
+
export type SetDisplayNameSuccessResponse = ExcludeErrorResponse<SetDisplayNameResponse>;
|
|
61
87
|
/**
|
|
62
88
|
* Set the display name in the leaderboard.
|
|
63
89
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -68,12 +94,11 @@ export type SetDisplayNameOptions = ExtractRequestOptions<v.InferInput<typeof Se
|
|
|
68
94
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
69
95
|
* @throws {TransportError} When the transport layer throws an error.
|
|
70
96
|
*
|
|
71
|
-
* @see null
|
|
72
97
|
* @example
|
|
73
98
|
* ```ts
|
|
74
99
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
75
100
|
* import { setDisplayName } from "@nktkas/hyperliquid/api/exchange";
|
|
76
|
-
* import { privateKeyToAccount } from "
|
|
101
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
77
102
|
*
|
|
78
103
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
79
104
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -84,5 +109,5 @@ export type SetDisplayNameOptions = ExtractRequestOptions<v.InferInput<typeof Se
|
|
|
84
109
|
* );
|
|
85
110
|
* ```
|
|
86
111
|
*/
|
|
87
|
-
export declare function setDisplayName(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<SetDisplayNameParameters>, opts?: SetDisplayNameOptions): Promise<
|
|
112
|
+
export declare function setDisplayName(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<SetDisplayNameParameters>, opts?: SetDisplayNameOptions): Promise<SetDisplayNameSuccessResponse>;
|
|
88
113
|
//# sourceMappingURL=setDisplayName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDisplayName.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/setDisplayName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"setDisplayName.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/setDisplayName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB;IAG5B,yBAAyB;;QAGrB,sBAAsB;;QAKtB;;;;WAIG;;;;;;IAWP,2DAA2D;;IAK3D,+BAA+B;;;;;;;;;;;;;;IAK/B,qCAAqC;;;;;;;;;;;;;;gDAQvC,CAAC;AACL,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEhF,mEAAmE;AACnE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;oEAK/B,CAAC;AACL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMlF,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAExB,qEAAqE;AACrE,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC;AAExG,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC;AAEtG,+EAA+E;AAC/E,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,qBAAqB,GAAG,sBAAsB,EACtD,MAAM,EAAE,aAAa,CAAC,wBAAwB,CAAC,EAC/C,IAAI,CAAC,EAAE,qBAAqB,GAC3B,OAAO,CAAC,6BAA6B,CAAC,CAiBxC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { UnsignedInteger } from "../_base.js";
|
|
6
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.js";
|
|
7
|
+
/** Set the display name in the leaderboard. */
|
|
9
8
|
export const SetDisplayNameRequest = /* @__PURE__ */ (() => {
|
|
10
9
|
return v.pipe(v.object({
|
|
11
10
|
/** Action to perform. */
|
|
@@ -28,8 +27,15 @@ export const SetDisplayNameRequest = /* @__PURE__ */ (() => {
|
|
|
28
27
|
expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
|
|
29
28
|
}), v.description("Set the display name in the leaderboard."));
|
|
30
29
|
})();
|
|
31
|
-
|
|
32
|
-
export
|
|
30
|
+
/** Successful response without specific data or error response. */
|
|
31
|
+
export const SetDisplayNameResponse = /* @__PURE__ */ (() => {
|
|
32
|
+
return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
|
|
33
|
+
})();
|
|
34
|
+
// ============================================================
|
|
35
|
+
// Execution Logic
|
|
36
|
+
// ============================================================
|
|
37
|
+
import { parser } from "../_base.js";
|
|
38
|
+
import { executeL1Action, } from "./_base/mod.js";
|
|
33
39
|
/**
|
|
34
40
|
* Set the display name in the leaderboard.
|
|
35
41
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -40,12 +46,11 @@ export { SuccessResponse };
|
|
|
40
46
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
41
47
|
* @throws {TransportError} When the transport layer throws an error.
|
|
42
48
|
*
|
|
43
|
-
* @see null
|
|
44
49
|
* @example
|
|
45
50
|
* ```ts
|
|
46
51
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
47
52
|
* import { setDisplayName } from "@nktkas/hyperliquid/api/exchange";
|
|
48
|
-
* import { privateKeyToAccount } from "
|
|
53
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
49
54
|
*
|
|
50
55
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
51
56
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDisplayName.js","sourceRoot":"","sources":["../../../../src/api/exchange/setDisplayName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"setDisplayName.js","sourceRoot":"","sources":["../../../../src/api/exchange/setDisplayName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+DAA+D;AAC/D,cAAc;AACd,+DAA+D;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3E,+CAA+C;AAC/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AC,CAC9E,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAGL,+DAA+D;AAC/D,kBAAkB;AAClB,+DAA+D;AAE/D,OAAO,EAAsB,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAGL,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AAWxB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAAsD,EACtD,MAA+C,EAC/C,IAA4B;IAE5B,MAAM,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC5C,MAAM,EAAE;YACN,IAAI,EAAE,gBAAgB;YACtB,GAAG,MAAM;SACV;QACD,KAAK,EAAE,CAAC,EAAE,2DAA2D;QACrE,SAAS,EAAE;YACT,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,EAAE;SACN;QACD,YAAY,EAAE,OAAO,MAAM,CAAC,mBAAmB,KAAK,QAAQ;YAC1D,CAAC,CAAC,MAAM,CAAC,mBAAmB;YAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,mBAAmB,EAAE,EAAE;KACzC,CAAC,CAAC;IACH,OAAO,MAAM,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
import { type ExchangeRequestConfig, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
4
|
-
/**
|
|
5
|
-
* Set a referral code.
|
|
6
|
-
* @see null
|
|
7
|
-
*/
|
|
2
|
+
/** Set a referral code. */
|
|
8
3
|
export declare const SetReferrerRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
9
4
|
/** Action to perform. */
|
|
10
5
|
readonly action: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -48,12 +43,43 @@ export declare const SetReferrerRequest: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
48
43
|
expiresAfter?: number | undefined;
|
|
49
44
|
}, "Set a referral code.">]>;
|
|
50
45
|
export type SetReferrerRequest = v.InferOutput<typeof SetReferrerRequest>;
|
|
51
|
-
|
|
52
|
-
export
|
|
46
|
+
/** Successful response without specific data or error response. */
|
|
47
|
+
export declare const SetReferrerResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
48
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
49
|
+
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
50
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
|
|
51
|
+
}, undefined>, v.DescriptionAction<{
|
|
52
|
+
type: "default";
|
|
53
|
+
}, "Response details.">]>;
|
|
54
|
+
}, undefined>, v.DescriptionAction<{
|
|
55
|
+
status: "ok";
|
|
56
|
+
response: {
|
|
57
|
+
type: "default";
|
|
58
|
+
};
|
|
59
|
+
}, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
60
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
|
|
61
|
+
readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
62
|
+
}, undefined>, v.DescriptionAction<{
|
|
63
|
+
status: "err";
|
|
64
|
+
response: string;
|
|
65
|
+
}, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
|
|
66
|
+
status: "err";
|
|
67
|
+
response: string;
|
|
68
|
+
} | {
|
|
69
|
+
status: "ok";
|
|
70
|
+
response: {
|
|
71
|
+
type: "default";
|
|
72
|
+
};
|
|
73
|
+
}, "Successful response without specific data or error response.">]>;
|
|
74
|
+
export type SetReferrerResponse = v.InferOutput<typeof SetReferrerResponse>;
|
|
75
|
+
import { type DeepImmutable } from "../_base.ts";
|
|
76
|
+
import { type ExchangeRequestConfig, type ExcludeErrorResponse, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
53
77
|
/** Action parameters for the {@linkcode setReferrer} function. */
|
|
54
78
|
export type SetReferrerParameters = ExtractRequestAction<v.InferInput<typeof SetReferrerRequest>>;
|
|
55
79
|
/** Request options for the {@linkcode setReferrer} function. */
|
|
56
80
|
export type SetReferrerOptions = ExtractRequestOptions<v.InferInput<typeof SetReferrerRequest>>;
|
|
81
|
+
/** Successful variant of {@linkcode SetReferrerResponse} without errors. */
|
|
82
|
+
export type SetReferrerSuccessResponse = ExcludeErrorResponse<SetReferrerResponse>;
|
|
57
83
|
/**
|
|
58
84
|
* Set a referral code.
|
|
59
85
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -64,12 +90,11 @@ export type SetReferrerOptions = ExtractRequestOptions<v.InferInput<typeof SetRe
|
|
|
64
90
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
65
91
|
* @throws {TransportError} When the transport layer throws an error.
|
|
66
92
|
*
|
|
67
|
-
* @see null
|
|
68
93
|
* @example
|
|
69
94
|
* ```ts
|
|
70
95
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
71
96
|
* import { setReferrer } from "@nktkas/hyperliquid/api/exchange";
|
|
72
|
-
* import { privateKeyToAccount } from "
|
|
97
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
73
98
|
*
|
|
74
99
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
75
100
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -80,5 +105,5 @@ export type SetReferrerOptions = ExtractRequestOptions<v.InferInput<typeof SetRe
|
|
|
80
105
|
* );
|
|
81
106
|
* ```
|
|
82
107
|
*/
|
|
83
|
-
export declare function setReferrer(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<SetReferrerParameters>, opts?: SetReferrerOptions): Promise<
|
|
108
|
+
export declare function setReferrer(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<SetReferrerParameters>, opts?: SetReferrerOptions): Promise<SetReferrerSuccessResponse>;
|
|
84
109
|
//# sourceMappingURL=setReferrer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setReferrer.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/setReferrer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"setReferrer.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/setReferrer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B,2BAA2B;AAC3B,eAAO,MAAM,kBAAkB;IAGzB,yBAAyB;;QAGrB,sBAAsB;;QAKtB,qBAAqB;;;;;;IASzB,2DAA2D;;IAK3D,+BAA+B;;;;;;;;;;;;;;IAK/B,qCAAqC;;;;;;;;;;;;;;4BAQvC,CAAC;AACL,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE1E,mEAAmE;AACnE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;oEAK5B,CAAC;AACL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAM5E,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAExB,kEAAkE;AAClE,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;AAElG,gEAAgE;AAChE,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;AAEhG,4EAA4E;AAC5E,MAAM,MAAM,0BAA0B,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,qBAAqB,GAAG,sBAAsB,EACtD,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC,EAC5C,IAAI,CAAC,EAAE,kBAAkB,GACxB,OAAO,CAAC,0BAA0B,CAAC,CAiBrC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { UnsignedInteger } from "../_base.js";
|
|
6
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.js";
|
|
7
|
+
/** Set a referral code. */
|
|
9
8
|
export const SetReferrerRequest = /* @__PURE__ */ (() => {
|
|
10
9
|
return v.pipe(v.object({
|
|
11
10
|
/** Action to perform. */
|
|
@@ -23,8 +22,15 @@ export const SetReferrerRequest = /* @__PURE__ */ (() => {
|
|
|
23
22
|
expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
|
|
24
23
|
}), v.description("Set a referral code."));
|
|
25
24
|
})();
|
|
26
|
-
|
|
27
|
-
export
|
|
25
|
+
/** Successful response without specific data or error response. */
|
|
26
|
+
export const SetReferrerResponse = /* @__PURE__ */ (() => {
|
|
27
|
+
return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
|
|
28
|
+
})();
|
|
29
|
+
// ============================================================
|
|
30
|
+
// Execution Logic
|
|
31
|
+
// ============================================================
|
|
32
|
+
import { parser } from "../_base.js";
|
|
33
|
+
import { executeL1Action, } from "./_base/mod.js";
|
|
28
34
|
/**
|
|
29
35
|
* Set a referral code.
|
|
30
36
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -35,12 +41,11 @@ export { SuccessResponse };
|
|
|
35
41
|
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
36
42
|
* @throws {TransportError} When the transport layer throws an error.
|
|
37
43
|
*
|
|
38
|
-
* @see null
|
|
39
44
|
* @example
|
|
40
45
|
* ```ts
|
|
41
46
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
42
47
|
* import { setReferrer } from "@nktkas/hyperliquid/api/exchange";
|
|
43
|
-
* import { privateKeyToAccount } from "
|
|
48
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
44
49
|
*
|
|
45
50
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
46
51
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setReferrer.js","sourceRoot":"","sources":["../../../../src/api/exchange/setReferrer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"setReferrer.js","sourceRoot":"","sources":["../../../../src/api/exchange/setReferrer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+DAA+D;AAC/D,cAAc;AACd,+DAA+D;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3E,2BAA2B;AAC3B,MAAM,CAAC,MAAM,kBAAkB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AC9E,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAGL,+DAA+D;AAC/D,kBAAkB;AAClB,+DAA+D;AAE/D,OAAO,EAAsB,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAGL,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AAWxB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAsD,EACtD,MAA4C,EAC5C,IAAyB;IAEzB,MAAM,OAAO,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QACzC,MAAM,EAAE;YACN,IAAI,EAAE,aAAa;YACnB,GAAG,MAAM;SACV;QACD,KAAK,EAAE,CAAC,EAAE,2DAA2D;QACrE,SAAS,EAAE;YACT,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,oEAAoE;YACvE,CAAC,EAAE,EAAE;SACN;QACD,YAAY,EAAE,OAAO,MAAM,CAAC,mBAAmB,KAAK,QAAQ;YAC1D,CAAC,CAAC,MAAM,CAAC,mBAAmB;YAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,mBAAmB,EAAE,EAAE;KACzC,CAAC,CAAC;IACH,OAAO,MAAM,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { type DeepImmutable } from "../_base.ts";
|
|
3
|
-
import { type ExchangeRequestConfig, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
4
2
|
/**
|
|
5
3
|
* Deploying HIP-1 and HIP-2 assets.
|
|
6
4
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/deploying-hip-1-and-hip-2-assets
|
|
@@ -311,12 +309,46 @@ export declare const SpotDeployRequest: v.SchemaWithPipe<readonly [v.ObjectSchem
|
|
|
311
309
|
expiresAfter?: number | undefined;
|
|
312
310
|
}, string>]>;
|
|
313
311
|
export type SpotDeployRequest = v.InferOutput<typeof SpotDeployRequest>;
|
|
314
|
-
|
|
315
|
-
|
|
312
|
+
/**
|
|
313
|
+
* Successful response without specific data or error response.
|
|
314
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/deploying-hip-1-and-hip-2-assets
|
|
315
|
+
*/
|
|
316
|
+
export declare const SpotDeployResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
317
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
318
|
+
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
319
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
|
|
320
|
+
}, undefined>, v.DescriptionAction<{
|
|
321
|
+
type: "default";
|
|
322
|
+
}, "Response details.">]>;
|
|
323
|
+
}, undefined>, v.DescriptionAction<{
|
|
324
|
+
status: "ok";
|
|
325
|
+
response: {
|
|
326
|
+
type: "default";
|
|
327
|
+
};
|
|
328
|
+
}, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
329
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
|
|
330
|
+
readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
331
|
+
}, undefined>, v.DescriptionAction<{
|
|
332
|
+
status: "err";
|
|
333
|
+
response: string;
|
|
334
|
+
}, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
|
|
335
|
+
status: "err";
|
|
336
|
+
response: string;
|
|
337
|
+
} | {
|
|
338
|
+
status: "ok";
|
|
339
|
+
response: {
|
|
340
|
+
type: "default";
|
|
341
|
+
};
|
|
342
|
+
}, "Successful response without specific data or error response.">]>;
|
|
343
|
+
export type SpotDeployResponse = v.InferOutput<typeof SpotDeployResponse>;
|
|
344
|
+
import { type DeepImmutable } from "../_base.ts";
|
|
345
|
+
import { type ExchangeRequestConfig, type ExcludeErrorResponse, type ExtractRequestAction, type ExtractRequestOptions, type MultiSignRequestConfig } from "./_base/mod.ts";
|
|
316
346
|
/** Action parameters for the {@linkcode spotDeploy} function. */
|
|
317
347
|
export type SpotDeployParameters = ExtractRequestAction<v.InferInput<typeof SpotDeployRequest>>;
|
|
318
348
|
/** Request options for the {@linkcode spotDeploy} function. */
|
|
319
349
|
export type SpotDeployOptions = ExtractRequestOptions<v.InferInput<typeof SpotDeployRequest>>;
|
|
350
|
+
/** Successful variant of {@linkcode SpotDeployResponse} without errors. */
|
|
351
|
+
export type SpotDeploySuccessResponse = ExcludeErrorResponse<SpotDeployResponse>;
|
|
320
352
|
/**
|
|
321
353
|
* Deploying HIP-1 and HIP-2 assets.
|
|
322
354
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -332,7 +364,7 @@ export type SpotDeployOptions = ExtractRequestOptions<v.InferInput<typeof SpotDe
|
|
|
332
364
|
* ```ts
|
|
333
365
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
334
366
|
* import { spotDeploy } from "@nktkas/hyperliquid/api/exchange";
|
|
335
|
-
* import { privateKeyToAccount } from "
|
|
367
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
336
368
|
*
|
|
337
369
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
338
370
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
@@ -353,5 +385,5 @@ export type SpotDeployOptions = ExtractRequestOptions<v.InferInput<typeof SpotDe
|
|
|
353
385
|
* );
|
|
354
386
|
* ```
|
|
355
387
|
*/
|
|
356
|
-
export declare function spotDeploy(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<SpotDeployParameters>, opts?: SpotDeployOptions): Promise<
|
|
388
|
+
export declare function spotDeploy(config: ExchangeRequestConfig | MultiSignRequestConfig, params: DeepImmutable<SpotDeployParameters>, opts?: SpotDeployOptions): Promise<SpotDeploySuccessResponse>;
|
|
357
389
|
//# sourceMappingURL=spotDeploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotDeploy.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/spotDeploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"spotDeploy.d.ts","sourceRoot":"","sources":["../../../../src/api/exchange/spotDeploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAGxB,yBAAyB;;QAKjB,sBAAsB;;QAKtB,0BAA0B;;YAGtB,wBAAwB;;YAKxB,4BAA4B;;YAK5B,uCAAuC;;;;;;;;;;;;;;;QAa3C,sBAAsB;;QAKtB,0CAA0C;;YAGtC,mDAAmD;;YAKnD,4CAA4C;;YAK5C,0CAA0C;;YAK1C,uCAAuC;;YAKvC,0CAA0C;;;;;;;;;;;;;;;;;;;QAa9C,sBAAsB;;QAKtB,gCAAgC;;YAG5B,qDAAqD;;;;;;;;;;;QAgBzD,sBAAsB;;QAKtB,iCAAiC;;YAG7B,4BAA4B;;gBAGxB,kBAAkB;;gBAKlB,yCAAyC;;gBAKzC,mDAAmD;;;;;;;YAQvD,4CAA4C;;YAK5C,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;QAapC,sBAAsB;;QAKtB,iDAAiD;;YAG7C,wBAAwB;;YAKxB,2DAA2D;;;;;;;;;;;;;QAa/D,sBAAsB;;QAKtB,+BAA+B;;YAG3B,wBAAwB;;YAKxB,8DAA8D;;YAK9D,2EAA2E;;YAY3E,6HAA6H;;;;;;;;;;;;;;;;;QAejI,sBAAsB;;QAKtB,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,yBAAyB,CAAC,CAiBpC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { Address, Percent, UnsignedDecimal, UnsignedInteger } from "../_base.js";
|
|
6
|
+
import { ErrorResponse, Signature, SuccessResponse } from "./_base/mod.js";
|
|
5
7
|
/**
|
|
6
8
|
* Deploying HIP-1 and HIP-2 assets.
|
|
7
9
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/deploying-hip-1-and-hip-2-assets
|
|
@@ -125,8 +127,18 @@ export const SpotDeployRequest = /* @__PURE__ */ (() => {
|
|
|
125
127
|
"\n- Set Deployer Trading Fee Share" +
|
|
126
128
|
"\n- User Genesis"));
|
|
127
129
|
})();
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
/**
|
|
131
|
+
* Successful response without specific data or error response.
|
|
132
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/deploying-hip-1-and-hip-2-assets
|
|
133
|
+
*/
|
|
134
|
+
export const SpotDeployResponse = /* @__PURE__ */ (() => {
|
|
135
|
+
return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
|
|
136
|
+
})();
|
|
137
|
+
// ============================================================
|
|
138
|
+
// Execution Logic
|
|
139
|
+
// ============================================================
|
|
140
|
+
import { parser } from "../_base.js";
|
|
141
|
+
import { executeL1Action, } from "./_base/mod.js";
|
|
130
142
|
/**
|
|
131
143
|
* Deploying HIP-1 and HIP-2 assets.
|
|
132
144
|
* @param config - General configuration for Exchange API requests.
|
|
@@ -142,7 +154,7 @@ export { SuccessResponse };
|
|
|
142
154
|
* ```ts
|
|
143
155
|
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
144
156
|
* import { spotDeploy } from "@nktkas/hyperliquid/api/exchange";
|
|
145
|
-
* import { privateKeyToAccount } from "
|
|
157
|
+
* import { privateKeyToAccount } from "viem/accounts";
|
|
146
158
|
*
|
|
147
159
|
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
148
160
|
* const transport = new HttpTransport(); // or `WebSocketTransport`
|