@nktkas/hyperliquid 0.30.0 → 0.30.2
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/esm/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.d.ts +93 -0
- package/esm/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.js +137 -0
- package/esm/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.js.map +1 -0
- package/esm/src/api/_schemas.d.ts +4 -4
- package/esm/src/api/_schemas.d.ts.map +1 -1
- package/esm/src/api/_schemas.js +8 -4
- package/esm/src/api/_schemas.js.map +1 -1
- package/esm/src/api/exchange/_methods/_base/_nonce.d.ts +3 -2
- package/esm/src/api/exchange/_methods/_base/_nonce.d.ts.map +1 -1
- package/esm/src/api/exchange/_methods/_base/_nonce.js +3 -2
- package/esm/src/api/exchange/_methods/_base/_nonce.js.map +1 -1
- package/esm/src/api/exchange/_methods/_base/_semaphore.d.ts +7 -6
- package/esm/src/api/exchange/_methods/_base/_semaphore.d.ts.map +1 -1
- package/esm/src/api/exchange/_methods/_base/_semaphore.js +34 -47
- package/esm/src/api/exchange/_methods/_base/_semaphore.js.map +1 -1
- package/esm/src/api/exchange/_methods/_base/execute.js +3 -3
- package/esm/src/api/exchange/_methods/_base/execute.js.map +1 -1
- package/esm/src/api/exchange/_methods/agentEnableDexAbstraction.d.ts +2 -2
- package/esm/src/api/exchange/_methods/approveAgent.d.ts +4 -4
- package/esm/src/api/exchange/_methods/approveBuilderFee.d.ts +4 -4
- package/esm/src/api/exchange/_methods/batchModify.d.ts +27 -27
- package/esm/src/api/exchange/_methods/cDeposit.d.ts +7 -7
- package/esm/src/api/exchange/_methods/cSignerAction.d.ts +2 -2
- package/esm/src/api/exchange/_methods/cValidatorAction.d.ts +11 -11
- package/esm/src/api/exchange/_methods/cWithdraw.d.ts +7 -7
- package/esm/src/api/exchange/_methods/cancel.d.ts +8 -8
- package/esm/src/api/exchange/_methods/cancelByCloid.d.ts +5 -5
- package/esm/src/api/exchange/_methods/claimRewards.d.ts +2 -2
- package/esm/src/api/exchange/_methods/convertToMultiSigUser.d.ts +10 -10
- package/esm/src/api/exchange/_methods/createSubAccount.d.ts +2 -2
- package/esm/src/api/exchange/_methods/createVault.d.ts +8 -8
- package/esm/src/api/exchange/_methods/evmUserModify.d.ts +2 -2
- package/esm/src/api/exchange/_methods/linkStakingUser.d.ts +4 -4
- package/esm/src/api/exchange/_methods/modify.d.ts +17 -17
- package/esm/src/api/exchange/_methods/noop.d.ts +2 -2
- package/esm/src/api/exchange/_methods/order.d.ts +31 -31
- package/esm/src/api/exchange/_methods/order.d.ts.map +1 -1
- package/esm/src/api/exchange/_methods/order.js +4 -2
- package/esm/src/api/exchange/_methods/order.js.map +1 -1
- package/esm/src/api/exchange/_methods/perpDeploy.d.ts +53 -53
- package/esm/src/api/exchange/_methods/registerReferrer.d.ts +2 -2
- package/esm/src/api/exchange/_methods/reserveRequestWeight.d.ts +5 -5
- package/esm/src/api/exchange/_methods/scheduleCancel.d.ts +5 -5
- package/esm/src/api/exchange/_methods/sendAsset.d.ts +7 -7
- package/esm/src/api/exchange/_methods/setDisplayName.d.ts +2 -2
- package/esm/src/api/exchange/_methods/setReferrer.d.ts +2 -2
- package/esm/src/api/exchange/_methods/spotDeploy.d.ts +53 -53
- package/esm/src/api/exchange/_methods/spotSend.d.ts +7 -7
- package/esm/src/api/exchange/_methods/spotUser.d.ts +2 -2
- package/esm/src/api/exchange/_methods/subAccountModify.d.ts +2 -2
- package/esm/src/api/exchange/_methods/subAccountSpotTransfer.d.ts +5 -5
- package/esm/src/api/exchange/_methods/subAccountTransfer.d.ts +5 -5
- package/esm/src/api/exchange/_methods/tokenDelegate.d.ts +7 -7
- package/esm/src/api/exchange/_methods/twapCancel.d.ts +8 -8
- package/esm/src/api/exchange/_methods/twapOrder.d.ts +12 -12
- package/esm/src/api/exchange/_methods/updateIsolatedMargin.d.ts +8 -8
- package/esm/src/api/exchange/_methods/updateLeverage.d.ts +8 -8
- package/esm/src/api/exchange/_methods/usdClassTransfer.d.ts +7 -7
- package/esm/src/api/exchange/_methods/usdSend.d.ts +7 -7
- package/esm/src/api/exchange/_methods/userDexAbstraction.d.ts +4 -4
- package/esm/src/api/exchange/_methods/validatorL1Stream.d.ts +5 -5
- package/esm/src/api/exchange/_methods/vaultDistribute.d.ts +5 -5
- package/esm/src/api/exchange/_methods/vaultModify.d.ts +2 -2
- package/esm/src/api/exchange/_methods/vaultTransfer.d.ts +5 -5
- package/esm/src/api/exchange/_methods/withdraw3.d.ts +7 -7
- package/esm/src/api/info/_methods/_base/commonSchemas.d.ts +43 -43
- package/esm/src/api/info/_methods/activeAssetData.d.ts +6 -6
- package/esm/src/api/info/_methods/alignedQuoteTokenInfo.d.ts +5 -5
- package/esm/src/api/info/_methods/allMids.d.ts +1 -1
- package/esm/src/api/info/_methods/allPerpMetas.d.ts +7 -7
- package/esm/src/api/info/_methods/blockDetails.d.ts +6 -6
- package/esm/src/api/info/_methods/candleSnapshot.d.ts +10 -10
- package/esm/src/api/info/_methods/clearinghouseState.d.ts +25 -25
- package/esm/src/api/info/_methods/delegations.d.ts +2 -2
- package/esm/src/api/info/_methods/delegatorHistory.d.ts +4 -4
- package/esm/src/api/info/_methods/delegatorRewards.d.ts +2 -2
- package/esm/src/api/info/_methods/delegatorSummary.d.ts +4 -4
- package/esm/src/api/info/_methods/exchangeStatus.d.ts +1 -1
- package/esm/src/api/info/_methods/extraAgents.d.ts +1 -1
- package/esm/src/api/info/_methods/frontendOpenOrders.d.ts +6 -6
- package/esm/src/api/info/_methods/fundingHistory.d.ts +5 -5
- package/esm/src/api/info/_methods/historicalOrders.d.ts +7 -7
- package/esm/src/api/info/_methods/l2Book.d.ts +7 -7
- package/esm/src/api/info/_methods/marginTable.d.ts +3 -3
- package/esm/src/api/info/_methods/maxMarketOrderNtls.d.ts +1 -1
- package/esm/src/api/info/_methods/maxMarketOrderNtls.d.ts.map +1 -1
- package/esm/src/api/info/_methods/meta.d.ts +7 -7
- package/esm/src/api/info/_methods/metaAndAssetCtxs.d.ts +16 -16
- package/esm/src/api/info/_methods/openOrders.d.ts +5 -5
- package/esm/src/api/info/_methods/orderStatus.d.ts +8 -8
- package/esm/src/api/info/_methods/perpDeployAuctionStatus.d.ts +5 -5
- package/esm/src/api/info/_methods/perpDexLimits.d.ts +4 -4
- package/esm/src/api/info/_methods/perpDexStatus.d.ts +1 -1
- package/esm/src/api/info/_methods/perpDexs.d.ts +1 -1
- package/esm/src/api/info/_methods/portfolio.d.ts +24 -24
- package/esm/src/api/info/_methods/preTransferCheck.d.ts +1 -1
- package/esm/src/api/info/_methods/predictedFundings.d.ts +3 -3
- package/esm/src/api/info/_methods/recentTrades.d.ts +4 -4
- package/esm/src/api/info/_methods/referral.d.ts +23 -23
- package/esm/src/api/info/_methods/spotClearinghouseState.d.ts +6 -6
- package/esm/src/api/info/_methods/spotDeployState.d.ts +15 -15
- package/esm/src/api/info/_methods/spotMeta.d.ts +7 -7
- package/esm/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts +14 -14
- package/esm/src/api/info/_methods/spotPairDeployAuctionStatus.d.ts +5 -5
- package/esm/src/api/info/_methods/subAccounts.d.ts +31 -31
- package/esm/src/api/info/_methods/subAccounts2.d.ts +31 -31
- package/esm/src/api/info/_methods/tokenDetails.d.ts +12 -12
- package/esm/src/api/info/_methods/twapHistory.d.ts +7 -7
- package/esm/src/api/info/_methods/txDetails.d.ts +2 -2
- package/esm/src/api/info/_methods/userDetails.d.ts +2 -2
- package/esm/src/api/info/_methods/userFees.d.ts +25 -25
- package/esm/src/api/info/_methods/userFills.d.ts +10 -10
- package/esm/src/api/info/_methods/userFillsByTime.d.ts +12 -12
- package/esm/src/api/info/_methods/userFunding.d.ts +9 -9
- package/esm/src/api/info/_methods/userFunding.js +2 -2
- package/esm/src/api/info/_methods/userFunding.js.map +1 -1
- package/esm/src/api/info/_methods/userNonFundingLedgerUpdates.d.ts +36 -36
- package/esm/src/api/info/_methods/userRateLimit.d.ts +4 -4
- package/esm/src/api/info/_methods/userToMultiSigSigners.d.ts +1 -1
- package/esm/src/api/info/_methods/userTwapSliceFills.d.ts +10 -10
- package/esm/src/api/info/_methods/userTwapSliceFillsByTime.d.ts +12 -12
- package/esm/src/api/info/_methods/userVaultEquities.d.ts +2 -2
- package/esm/src/api/info/_methods/validatorL1Votes.d.ts +1 -1
- package/esm/src/api/info/_methods/validatorSummaries.d.ts +9 -9
- package/esm/src/api/info/_methods/vaultDetails.d.ts +36 -36
- package/esm/src/api/info/_methods/vaultSummaries.d.ts +2 -2
- package/esm/src/api/info/_methods/webData2.d.ts +70 -70
- package/esm/src/api/subscription/_methods/activeAssetCtx.d.ts +9 -9
- package/esm/src/api/subscription/_methods/activeAssetData.d.ts +6 -6
- package/esm/src/api/subscription/_methods/activeSpotAssetCtx.d.ts +7 -7
- package/esm/src/api/subscription/_methods/allDexsAssetCtxs.d.ts +9 -9
- package/esm/src/api/subscription/_methods/allDexsClearinghouseState.d.ts +25 -25
- package/esm/src/api/subscription/_methods/allMids.d.ts +1 -1
- package/esm/src/api/subscription/_methods/assetCtxs.d.ts +11 -9
- package/esm/src/api/subscription/_methods/assetCtxs.d.ts.map +1 -1
- package/esm/src/api/subscription/_methods/assetCtxs.js.map +1 -1
- package/esm/src/api/subscription/_methods/bbo.d.ts +7 -7
- package/esm/src/api/subscription/_methods/candle.d.ts +8 -8
- package/esm/src/api/subscription/_methods/clearinghouseState.d.ts +27 -25
- package/esm/src/api/subscription/_methods/clearinghouseState.d.ts.map +1 -1
- package/esm/src/api/subscription/_methods/clearinghouseState.js +2 -0
- package/esm/src/api/subscription/_methods/clearinghouseState.js.map +1 -1
- package/esm/src/api/subscription/_methods/explorerBlock.d.ts +5 -3
- package/esm/src/api/subscription/_methods/explorerBlock.d.ts.map +1 -1
- package/esm/src/api/subscription/_methods/explorerBlock.js +2 -0
- package/esm/src/api/subscription/_methods/explorerBlock.js.map +1 -1
- package/esm/src/api/subscription/_methods/explorerTxs.d.ts +4 -2
- package/esm/src/api/subscription/_methods/explorerTxs.d.ts.map +1 -1
- package/esm/src/api/subscription/_methods/explorerTxs.js +2 -0
- package/esm/src/api/subscription/_methods/explorerTxs.js.map +1 -1
- package/esm/src/api/subscription/_methods/l2Book.d.ts +9 -9
- package/esm/src/api/subscription/_methods/openOrders.d.ts +6 -6
- package/esm/src/api/subscription/_methods/orderUpdates.d.ts +6 -6
- package/esm/src/api/subscription/_methods/spotAssetCtxs.d.ts +7 -7
- package/esm/src/api/subscription/_methods/spotState.d.ts +6 -6
- package/esm/src/api/subscription/_methods/trades.d.ts +4 -4
- package/esm/src/api/subscription/_methods/twapStates.d.ts +11 -6
- package/esm/src/api/subscription/_methods/twapStates.d.ts.map +1 -1
- package/esm/src/api/subscription/_methods/twapStates.js +6 -1
- package/esm/src/api/subscription/_methods/twapStates.js.map +1 -1
- package/esm/src/api/subscription/_methods/userEvents.d.ts +35 -35
- package/esm/src/api/subscription/_methods/userFills.d.ts +10 -10
- package/esm/src/api/subscription/_methods/userFundings.d.ts +5 -5
- package/esm/src/api/subscription/_methods/userHistoricalOrders.d.ts +7 -7
- package/esm/src/api/subscription/_methods/userNonFundingLedgerUpdates.d.ts +34 -34
- package/esm/src/api/subscription/_methods/userTwapHistory.d.ts +7 -7
- package/esm/src/api/subscription/_methods/userTwapSliceFills.d.ts +10 -10
- package/esm/src/api/subscription/_methods/webData2.d.ts +70 -70
- package/esm/src/api/subscription/_methods/webData3.d.ts +4 -4
- package/esm/src/signing/mod.js +1 -1
- package/esm/src/signing/mod.js.map +1 -1
- package/package.json +2 -2
- package/script/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.d.ts +93 -0
- package/script/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.js +141 -0
- package/script/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.js.map +1 -0
- package/script/src/api/_schemas.d.ts +4 -4
- package/script/src/api/_schemas.d.ts.map +1 -1
- package/script/src/api/_schemas.js +8 -4
- package/script/src/api/_schemas.js.map +1 -1
- package/script/src/api/exchange/_methods/_base/_nonce.d.ts +3 -2
- package/script/src/api/exchange/_methods/_base/_nonce.d.ts.map +1 -1
- package/script/src/api/exchange/_methods/_base/_nonce.js +4 -3
- package/script/src/api/exchange/_methods/_base/_nonce.js.map +1 -1
- package/script/src/api/exchange/_methods/_base/_semaphore.d.ts +7 -6
- package/script/src/api/exchange/_methods/_base/_semaphore.d.ts.map +1 -1
- package/script/src/api/exchange/_methods/_base/_semaphore.js +35 -50
- package/script/src/api/exchange/_methods/_base/_semaphore.js.map +1 -1
- package/script/src/api/exchange/_methods/_base/execute.js +2 -2
- package/script/src/api/exchange/_methods/_base/execute.js.map +1 -1
- package/script/src/api/exchange/_methods/agentEnableDexAbstraction.d.ts +2 -2
- package/script/src/api/exchange/_methods/approveAgent.d.ts +4 -4
- package/script/src/api/exchange/_methods/approveBuilderFee.d.ts +4 -4
- package/script/src/api/exchange/_methods/batchModify.d.ts +27 -27
- package/script/src/api/exchange/_methods/cDeposit.d.ts +7 -7
- package/script/src/api/exchange/_methods/cSignerAction.d.ts +2 -2
- package/script/src/api/exchange/_methods/cValidatorAction.d.ts +11 -11
- package/script/src/api/exchange/_methods/cWithdraw.d.ts +7 -7
- package/script/src/api/exchange/_methods/cancel.d.ts +8 -8
- package/script/src/api/exchange/_methods/cancelByCloid.d.ts +5 -5
- package/script/src/api/exchange/_methods/claimRewards.d.ts +2 -2
- package/script/src/api/exchange/_methods/convertToMultiSigUser.d.ts +10 -10
- package/script/src/api/exchange/_methods/createSubAccount.d.ts +2 -2
- package/script/src/api/exchange/_methods/createVault.d.ts +8 -8
- package/script/src/api/exchange/_methods/evmUserModify.d.ts +2 -2
- package/script/src/api/exchange/_methods/linkStakingUser.d.ts +4 -4
- package/script/src/api/exchange/_methods/modify.d.ts +17 -17
- package/script/src/api/exchange/_methods/noop.d.ts +2 -2
- package/script/src/api/exchange/_methods/order.d.ts +31 -31
- package/script/src/api/exchange/_methods/order.d.ts.map +1 -1
- package/script/src/api/exchange/_methods/order.js +4 -2
- package/script/src/api/exchange/_methods/order.js.map +1 -1
- package/script/src/api/exchange/_methods/perpDeploy.d.ts +53 -53
- package/script/src/api/exchange/_methods/registerReferrer.d.ts +2 -2
- package/script/src/api/exchange/_methods/reserveRequestWeight.d.ts +5 -5
- package/script/src/api/exchange/_methods/scheduleCancel.d.ts +5 -5
- package/script/src/api/exchange/_methods/sendAsset.d.ts +7 -7
- package/script/src/api/exchange/_methods/setDisplayName.d.ts +2 -2
- package/script/src/api/exchange/_methods/setReferrer.d.ts +2 -2
- package/script/src/api/exchange/_methods/spotDeploy.d.ts +53 -53
- package/script/src/api/exchange/_methods/spotSend.d.ts +7 -7
- package/script/src/api/exchange/_methods/spotUser.d.ts +2 -2
- package/script/src/api/exchange/_methods/subAccountModify.d.ts +2 -2
- package/script/src/api/exchange/_methods/subAccountSpotTransfer.d.ts +5 -5
- package/script/src/api/exchange/_methods/subAccountTransfer.d.ts +5 -5
- package/script/src/api/exchange/_methods/tokenDelegate.d.ts +7 -7
- package/script/src/api/exchange/_methods/twapCancel.d.ts +8 -8
- package/script/src/api/exchange/_methods/twapOrder.d.ts +12 -12
- package/script/src/api/exchange/_methods/updateIsolatedMargin.d.ts +8 -8
- package/script/src/api/exchange/_methods/updateLeverage.d.ts +8 -8
- package/script/src/api/exchange/_methods/usdClassTransfer.d.ts +7 -7
- package/script/src/api/exchange/_methods/usdSend.d.ts +7 -7
- package/script/src/api/exchange/_methods/userDexAbstraction.d.ts +4 -4
- package/script/src/api/exchange/_methods/validatorL1Stream.d.ts +5 -5
- package/script/src/api/exchange/_methods/vaultDistribute.d.ts +5 -5
- package/script/src/api/exchange/_methods/vaultModify.d.ts +2 -2
- package/script/src/api/exchange/_methods/vaultTransfer.d.ts +5 -5
- package/script/src/api/exchange/_methods/withdraw3.d.ts +7 -7
- package/script/src/api/info/_methods/_base/commonSchemas.d.ts +43 -43
- package/script/src/api/info/_methods/activeAssetData.d.ts +6 -6
- package/script/src/api/info/_methods/alignedQuoteTokenInfo.d.ts +5 -5
- package/script/src/api/info/_methods/allMids.d.ts +1 -1
- package/script/src/api/info/_methods/allPerpMetas.d.ts +7 -7
- package/script/src/api/info/_methods/blockDetails.d.ts +6 -6
- package/script/src/api/info/_methods/candleSnapshot.d.ts +10 -10
- package/script/src/api/info/_methods/clearinghouseState.d.ts +25 -25
- package/script/src/api/info/_methods/delegations.d.ts +2 -2
- package/script/src/api/info/_methods/delegatorHistory.d.ts +4 -4
- package/script/src/api/info/_methods/delegatorRewards.d.ts +2 -2
- package/script/src/api/info/_methods/delegatorSummary.d.ts +4 -4
- package/script/src/api/info/_methods/exchangeStatus.d.ts +1 -1
- package/script/src/api/info/_methods/extraAgents.d.ts +1 -1
- package/script/src/api/info/_methods/frontendOpenOrders.d.ts +6 -6
- package/script/src/api/info/_methods/fundingHistory.d.ts +5 -5
- package/script/src/api/info/_methods/historicalOrders.d.ts +7 -7
- package/script/src/api/info/_methods/l2Book.d.ts +7 -7
- package/script/src/api/info/_methods/marginTable.d.ts +3 -3
- package/script/src/api/info/_methods/maxMarketOrderNtls.d.ts +1 -1
- package/script/src/api/info/_methods/maxMarketOrderNtls.d.ts.map +1 -1
- package/script/src/api/info/_methods/meta.d.ts +7 -7
- package/script/src/api/info/_methods/metaAndAssetCtxs.d.ts +16 -16
- package/script/src/api/info/_methods/openOrders.d.ts +5 -5
- package/script/src/api/info/_methods/orderStatus.d.ts +8 -8
- package/script/src/api/info/_methods/perpDeployAuctionStatus.d.ts +5 -5
- package/script/src/api/info/_methods/perpDexLimits.d.ts +4 -4
- package/script/src/api/info/_methods/perpDexStatus.d.ts +1 -1
- package/script/src/api/info/_methods/perpDexs.d.ts +1 -1
- package/script/src/api/info/_methods/portfolio.d.ts +24 -24
- package/script/src/api/info/_methods/preTransferCheck.d.ts +1 -1
- package/script/src/api/info/_methods/predictedFundings.d.ts +3 -3
- package/script/src/api/info/_methods/recentTrades.d.ts +4 -4
- package/script/src/api/info/_methods/referral.d.ts +23 -23
- package/script/src/api/info/_methods/spotClearinghouseState.d.ts +6 -6
- package/script/src/api/info/_methods/spotDeployState.d.ts +15 -15
- package/script/src/api/info/_methods/spotMeta.d.ts +7 -7
- package/script/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts +14 -14
- package/script/src/api/info/_methods/spotPairDeployAuctionStatus.d.ts +5 -5
- package/script/src/api/info/_methods/subAccounts.d.ts +31 -31
- package/script/src/api/info/_methods/subAccounts2.d.ts +31 -31
- package/script/src/api/info/_methods/tokenDetails.d.ts +12 -12
- package/script/src/api/info/_methods/twapHistory.d.ts +7 -7
- package/script/src/api/info/_methods/txDetails.d.ts +2 -2
- package/script/src/api/info/_methods/userDetails.d.ts +2 -2
- package/script/src/api/info/_methods/userFees.d.ts +25 -25
- package/script/src/api/info/_methods/userFills.d.ts +10 -10
- package/script/src/api/info/_methods/userFillsByTime.d.ts +12 -12
- package/script/src/api/info/_methods/userFunding.d.ts +9 -9
- package/script/src/api/info/_methods/userFunding.js +2 -2
- package/script/src/api/info/_methods/userFunding.js.map +1 -1
- package/script/src/api/info/_methods/userNonFundingLedgerUpdates.d.ts +36 -36
- package/script/src/api/info/_methods/userRateLimit.d.ts +4 -4
- package/script/src/api/info/_methods/userToMultiSigSigners.d.ts +1 -1
- package/script/src/api/info/_methods/userTwapSliceFills.d.ts +10 -10
- package/script/src/api/info/_methods/userTwapSliceFillsByTime.d.ts +12 -12
- package/script/src/api/info/_methods/userVaultEquities.d.ts +2 -2
- package/script/src/api/info/_methods/validatorL1Votes.d.ts +1 -1
- package/script/src/api/info/_methods/validatorSummaries.d.ts +9 -9
- package/script/src/api/info/_methods/vaultDetails.d.ts +36 -36
- package/script/src/api/info/_methods/vaultSummaries.d.ts +2 -2
- package/script/src/api/info/_methods/webData2.d.ts +70 -70
- package/script/src/api/subscription/_methods/activeAssetCtx.d.ts +9 -9
- package/script/src/api/subscription/_methods/activeAssetData.d.ts +6 -6
- package/script/src/api/subscription/_methods/activeSpotAssetCtx.d.ts +7 -7
- package/script/src/api/subscription/_methods/allDexsAssetCtxs.d.ts +9 -9
- package/script/src/api/subscription/_methods/allDexsClearinghouseState.d.ts +25 -25
- package/script/src/api/subscription/_methods/allMids.d.ts +1 -1
- package/script/src/api/subscription/_methods/assetCtxs.d.ts +11 -9
- package/script/src/api/subscription/_methods/assetCtxs.d.ts.map +1 -1
- package/script/src/api/subscription/_methods/assetCtxs.js.map +1 -1
- package/script/src/api/subscription/_methods/bbo.d.ts +7 -7
- package/script/src/api/subscription/_methods/candle.d.ts +8 -8
- package/script/src/api/subscription/_methods/clearinghouseState.d.ts +27 -25
- package/script/src/api/subscription/_methods/clearinghouseState.d.ts.map +1 -1
- package/script/src/api/subscription/_methods/clearinghouseState.js +2 -0
- package/script/src/api/subscription/_methods/clearinghouseState.js.map +1 -1
- package/script/src/api/subscription/_methods/explorerBlock.d.ts +5 -3
- package/script/src/api/subscription/_methods/explorerBlock.d.ts.map +1 -1
- package/script/src/api/subscription/_methods/explorerBlock.js +2 -0
- package/script/src/api/subscription/_methods/explorerBlock.js.map +1 -1
- package/script/src/api/subscription/_methods/explorerTxs.d.ts +4 -2
- package/script/src/api/subscription/_methods/explorerTxs.d.ts.map +1 -1
- package/script/src/api/subscription/_methods/explorerTxs.js +2 -0
- package/script/src/api/subscription/_methods/explorerTxs.js.map +1 -1
- package/script/src/api/subscription/_methods/l2Book.d.ts +9 -9
- package/script/src/api/subscription/_methods/openOrders.d.ts +6 -6
- package/script/src/api/subscription/_methods/orderUpdates.d.ts +6 -6
- package/script/src/api/subscription/_methods/spotAssetCtxs.d.ts +7 -7
- package/script/src/api/subscription/_methods/spotState.d.ts +6 -6
- package/script/src/api/subscription/_methods/trades.d.ts +4 -4
- package/script/src/api/subscription/_methods/twapStates.d.ts +11 -6
- package/script/src/api/subscription/_methods/twapStates.d.ts.map +1 -1
- package/script/src/api/subscription/_methods/twapStates.js +6 -1
- package/script/src/api/subscription/_methods/twapStates.js.map +1 -1
- package/script/src/api/subscription/_methods/userEvents.d.ts +35 -35
- package/script/src/api/subscription/_methods/userFills.d.ts +10 -10
- package/script/src/api/subscription/_methods/userFundings.d.ts +5 -5
- package/script/src/api/subscription/_methods/userHistoricalOrders.d.ts +7 -7
- package/script/src/api/subscription/_methods/userNonFundingLedgerUpdates.d.ts +34 -34
- package/script/src/api/subscription/_methods/userTwapHistory.d.ts +7 -7
- package/script/src/api/subscription/_methods/userTwapSliceFills.d.ts +10 -10
- package/script/src/api/subscription/_methods/webData2.d.ts +70 -70
- package/script/src/api/subscription/_methods/webData3.d.ts +4 -4
- package/script/src/signing/mod.js +2 -2
- package/script/src/signing/mod.js.map +1 -1
- package/src/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.ts +146 -0
- package/src/src/api/_schemas.ts +4 -0
- package/src/src/api/exchange/_methods/_base/_nonce.ts +3 -2
- package/src/src/api/exchange/_methods/_base/_semaphore.ts +34 -59
- package/src/src/api/exchange/_methods/_base/execute.ts +3 -3
- package/src/src/api/exchange/_methods/order.ts +5 -3
- package/src/src/api/info/_methods/userFunding.ts +2 -2
- package/src/src/api/subscription/_methods/assetCtxs.ts +2 -0
- package/src/src/api/subscription/_methods/clearinghouseState.ts +2 -0
- package/src/src/api/subscription/_methods/explorerBlock.ts +2 -0
- package/src/src/api/subscription/_methods/explorerTxs.ts +2 -0
- package/src/src/api/subscription/_methods/twapStates.ts +9 -1
- package/src/src/signing/mod.ts +1 -1
- package/esm/deps/jsr.io/@std/msgpack/1.0.3/decode.d.ts +0 -21
- package/esm/deps/jsr.io/@std/msgpack/1.0.3/decode.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/msgpack/1.0.3/decode.js +0 -292
- package/esm/deps/jsr.io/@std/msgpack/1.0.3/decode.js.map +0 -1
- package/esm/deps/jsr.io/@std/msgpack/1.0.3/mod.d.ts +0 -44
- package/esm/deps/jsr.io/@std/msgpack/1.0.3/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/msgpack/1.0.3/mod.js +0 -46
- package/esm/deps/jsr.io/@std/msgpack/1.0.3/mod.js.map +0 -1
- package/script/deps/jsr.io/@std/msgpack/1.0.3/decode.d.ts +0 -21
- package/script/deps/jsr.io/@std/msgpack/1.0.3/decode.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/msgpack/1.0.3/decode.js +0 -295
- package/script/deps/jsr.io/@std/msgpack/1.0.3/decode.js.map +0 -1
- package/script/deps/jsr.io/@std/msgpack/1.0.3/mod.d.ts +0 -44
- package/script/deps/jsr.io/@std/msgpack/1.0.3/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/msgpack/1.0.3/mod.js +0 -62
- package/script/deps/jsr.io/@std/msgpack/1.0.3/mod.js.map +0 -1
- package/src/deps/jsr.io/@std/msgpack/1.0.3/decode.ts +0 -391
- package/src/deps/jsr.io/@std/msgpack/1.0.3/mod.ts +0 -47
package/src/src/api/_schemas.ts
CHANGED
|
@@ -10,6 +10,7 @@ export const UnsignedDecimal = /* @__PURE__ */ (() => {
|
|
|
10
10
|
return v.pipe(
|
|
11
11
|
v.union([v.string(), v.number()]),
|
|
12
12
|
v.toString(),
|
|
13
|
+
v.string(), // HACK: for correct JSONSchema generation
|
|
13
14
|
v.transform((value) => formatDecimalString(value)),
|
|
14
15
|
v.regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
15
16
|
);
|
|
@@ -20,6 +21,7 @@ export const Decimal = /* @__PURE__ */ (() => {
|
|
|
20
21
|
return v.pipe(
|
|
21
22
|
v.union([v.string(), v.number()]),
|
|
22
23
|
v.toString(),
|
|
24
|
+
v.string(), // HACK: for correct JSONSchema generation
|
|
23
25
|
v.transform((value) => formatDecimalString(value)),
|
|
24
26
|
v.regex(/^-?[0-9]+(\.[0-9]+)?$/),
|
|
25
27
|
);
|
|
@@ -30,6 +32,7 @@ export const Integer = /* @__PURE__ */ (() => {
|
|
|
30
32
|
return v.pipe(
|
|
31
33
|
v.union([v.string(), v.number()]),
|
|
32
34
|
v.toNumber(),
|
|
35
|
+
v.number(), // HACK: for correct JSONSchema generation
|
|
33
36
|
v.safeInteger(),
|
|
34
37
|
);
|
|
35
38
|
})();
|
|
@@ -39,6 +42,7 @@ export const UnsignedInteger = /* @__PURE__ */ (() => {
|
|
|
39
42
|
return v.pipe(
|
|
40
43
|
v.union([v.string(), v.number()]),
|
|
41
44
|
v.toNumber(),
|
|
45
|
+
v.number(), // HACK: for correct JSONSchema generation
|
|
42
46
|
v.safeInteger(),
|
|
43
47
|
v.minValue(0),
|
|
44
48
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Nonce manager for generating unique nonces per wallet address and network.
|
|
3
|
+
*
|
|
3
4
|
* Uses lazy cleanup: removes entries when Date.now() > lastNonce.
|
|
4
5
|
*/
|
|
5
6
|
class NonceManager {
|
|
@@ -24,5 +25,5 @@ class NonceManager {
|
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
/**
|
|
28
|
-
export const
|
|
28
|
+
/** Global nonce manager instance. */
|
|
29
|
+
export const globalNonceManager = /* @__PURE__ */ new NonceManager();
|
|
@@ -1,67 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
// Semaphore
|
|
3
|
-
// ============================================================
|
|
4
|
-
|
|
5
|
-
// TODO: Replace with @std/async/semaphore if the PR (https://github.com/denoland/std/pull/6894) will be merged
|
|
6
|
-
|
|
7
|
-
interface Node {
|
|
8
|
-
res: () => void;
|
|
9
|
-
next: Node | undefined;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class Semaphore {
|
|
13
|
-
#max: number;
|
|
14
|
-
#count: number;
|
|
15
|
-
#head: Node | undefined;
|
|
16
|
-
#tail: Node | undefined;
|
|
17
|
-
|
|
18
|
-
constructor(max: number = 1) {
|
|
19
|
-
if (max < 1) {
|
|
20
|
-
throw new TypeError(
|
|
21
|
-
`Cannot create semaphore as 'max' must be at least 1: current value is ${max}`,
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
this.#count = this.#max = max;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
acquire(): Promise<void> {
|
|
28
|
-
if (this.#count > 0) {
|
|
29
|
-
this.#count--;
|
|
30
|
-
return Promise.resolve();
|
|
31
|
-
}
|
|
32
|
-
return new Promise((res) => {
|
|
33
|
-
const node: Node = { res, next: undefined };
|
|
34
|
-
if (this.#tail) {
|
|
35
|
-
this.#tail = this.#tail.next = node;
|
|
36
|
-
} else {
|
|
37
|
-
this.#head = this.#tail = node;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
release(): void {
|
|
43
|
-
if (this.#head) {
|
|
44
|
-
this.#head.res();
|
|
45
|
-
this.#head = this.#head.next;
|
|
46
|
-
if (!this.#head) this.#tail = undefined;
|
|
47
|
-
} else if (this.#count < this.#max) {
|
|
48
|
-
this.#count++;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ============================================================
|
|
54
|
-
// RefCounted Registry
|
|
55
|
-
// ============================================================
|
|
1
|
+
import { Semaphore } from "../../../../../deps/jsr.io/@std/async/1.0.16/unstable_semaphore.js";
|
|
56
2
|
|
|
3
|
+
/**
|
|
4
|
+
* A reference-counted registry for lazily creating and reusing per-key values.
|
|
5
|
+
*
|
|
6
|
+
* @template K - Map key type.
|
|
7
|
+
* @template V - Stored value type.
|
|
8
|
+
*/
|
|
57
9
|
class RefCountedRegistry<K, V> {
|
|
58
10
|
#map = new Map<K, { value: V; refs: number }>();
|
|
59
11
|
#factory: () => V;
|
|
60
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new registry instance.
|
|
15
|
+
*
|
|
16
|
+
* @param factory - Factory function used to create a new value when a key is first referenced.
|
|
17
|
+
*/
|
|
61
18
|
constructor(factory: () => V) {
|
|
62
19
|
this.#factory = factory;
|
|
63
20
|
}
|
|
64
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Increments the reference count for a key and returns its value.
|
|
24
|
+
*
|
|
25
|
+
* If the key is not present, a new value is created via the factory.
|
|
26
|
+
*
|
|
27
|
+
* @param key - Registry key.
|
|
28
|
+
* @returns The value associated with the key.
|
|
29
|
+
*/
|
|
65
30
|
ref(key: K): V {
|
|
66
31
|
let entry = this.#map.get(key);
|
|
67
32
|
if (!entry) {
|
|
@@ -72,6 +37,13 @@ class RefCountedRegistry<K, V> {
|
|
|
72
37
|
return entry.value;
|
|
73
38
|
}
|
|
74
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Decrements the reference count for a key.
|
|
42
|
+
*
|
|
43
|
+
* When the count reaches zero, the entry is removed.
|
|
44
|
+
*
|
|
45
|
+
* @param key - Registry key.
|
|
46
|
+
*/
|
|
75
47
|
unref(key: K): void {
|
|
76
48
|
const entry = this.#map.get(key);
|
|
77
49
|
if (!entry) return;
|
|
@@ -81,12 +53,15 @@ class RefCountedRegistry<K, V> {
|
|
|
81
53
|
}
|
|
82
54
|
}
|
|
83
55
|
|
|
84
|
-
// ============================================================
|
|
85
|
-
// Helper
|
|
86
|
-
// ============================================================
|
|
87
|
-
|
|
88
56
|
const semaphores = new RefCountedRegistry(() => new Semaphore(1));
|
|
89
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Acquires a lock for the given key, executes the provided async function, and releases the lock.
|
|
60
|
+
*
|
|
61
|
+
* @param key The key to lock on.
|
|
62
|
+
* @param fn The async function to execute while holding the lock.
|
|
63
|
+
* @returns The result of the async function.
|
|
64
|
+
*/
|
|
90
65
|
export async function withLock<K, T>(key: K, fn: () => Promise<T>): Promise<T> {
|
|
91
66
|
const semaphore = semaphores.ref(key);
|
|
92
67
|
await semaphore.acquire();
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
signUserSignedAction,
|
|
11
11
|
} from "../../../../signing/mod.js";
|
|
12
12
|
import { assertSuccessResponse } from "./errors.js";
|
|
13
|
-
import {
|
|
13
|
+
import { globalNonceManager } from "./_nonce.js";
|
|
14
14
|
import { withLock } from "./_semaphore.js";
|
|
15
15
|
import type { SignatureSchema } from "./commonSchemas.js";
|
|
16
16
|
|
|
@@ -108,7 +108,7 @@ export async function executeL1Action<T>(
|
|
|
108
108
|
// Semaphore ensures requests arrive at server in nonce order (prevents out-of-order delivery)
|
|
109
109
|
const key = `${walletAddress}:${transport.isTestnet}`;
|
|
110
110
|
return await withLock(key, async () => {
|
|
111
|
-
const nonce = await (config.nonceManager?.(walletAddress) ??
|
|
111
|
+
const nonce = await (config.nonceManager?.(walletAddress) ?? globalNonceManager.getNonce(key));
|
|
112
112
|
|
|
113
113
|
// Validate and resolve options
|
|
114
114
|
const vaultAddress = v.parse(
|
|
@@ -186,7 +186,7 @@ export async function executeUserSignedAction<T>(
|
|
|
186
186
|
// Semaphore ensures requests arrive at server in nonce order (prevents out-of-order delivery)
|
|
187
187
|
const key = `${walletAddress}:${transport.isTestnet}`;
|
|
188
188
|
return withLock(key, async () => {
|
|
189
|
-
const nonce = await (config.nonceManager?.(walletAddress) ??
|
|
189
|
+
const nonce = await (config.nonceManager?.(walletAddress) ?? globalNonceManager.getNonce(key));
|
|
190
190
|
const signal = options?.signal;
|
|
191
191
|
|
|
192
192
|
// Add system fields for user-signed actions
|
|
@@ -141,11 +141,11 @@ export const OrderRequest = /* @__PURE__ */ (() => {
|
|
|
141
141
|
Address,
|
|
142
142
|
v.description("Builder address."),
|
|
143
143
|
),
|
|
144
|
-
/** Builder fee in 0.1bps (1 = 0.0001%). */
|
|
144
|
+
/** Builder fee in 0.1bps (1 = 0.0001%). Max 100 for perps (0.1%), 1000 for spot (1%). */
|
|
145
145
|
f: v.pipe(
|
|
146
146
|
UnsignedInteger,
|
|
147
|
-
v.maxValue(
|
|
148
|
-
v.description("Builder fee in 0.1bps (1 = 0.0001%)."),
|
|
147
|
+
v.maxValue(1000),
|
|
148
|
+
v.description("Builder fee in 0.1bps (1 = 0.0001%). Max 100 for perps (0.1%), 1000 for spot (1%)."),
|
|
149
149
|
),
|
|
150
150
|
})),
|
|
151
151
|
v.description("Builder fee."),
|
|
@@ -259,6 +259,8 @@ export const OrderResponse = /* @__PURE__ */ (() => {
|
|
|
259
259
|
v.description("Error message."),
|
|
260
260
|
),
|
|
261
261
|
}),
|
|
262
|
+
v.literal("waitingForFill"),
|
|
263
|
+
v.literal("waitingForTrigger"),
|
|
262
264
|
]),
|
|
263
265
|
),
|
|
264
266
|
v.description("Array of statuses for each placed order."),
|
|
@@ -25,7 +25,7 @@ export const UserFundingRequest = /* @__PURE__ */ (() => {
|
|
|
25
25
|
),
|
|
26
26
|
/** Start time (in ms since epoch). */
|
|
27
27
|
startTime: v.pipe(
|
|
28
|
-
UnsignedInteger,
|
|
28
|
+
v.nullish(UnsignedInteger),
|
|
29
29
|
v.description("Start time (in ms since epoch)."),
|
|
30
30
|
),
|
|
31
31
|
/** End time (in ms since epoch). */
|
|
@@ -131,7 +131,7 @@ export type UserFundingParameters = Omit<v.InferInput<typeof UserFundingRequest>
|
|
|
131
131
|
*
|
|
132
132
|
* const data = await userFunding(
|
|
133
133
|
* { transport },
|
|
134
|
-
* { user: "0x..."
|
|
134
|
+
* { user: "0x..." },
|
|
135
135
|
* );
|
|
136
136
|
* ```
|
|
137
137
|
*
|
|
@@ -80,6 +80,8 @@ export type AssetCtxsParameters = Omit<v.InferInput<typeof AssetCtxsRequest>, "t
|
|
|
80
80
|
* (data) => console.log(data),
|
|
81
81
|
* );
|
|
82
82
|
* ```
|
|
83
|
+
*
|
|
84
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
83
85
|
*/
|
|
84
86
|
export function assetCtxs(
|
|
85
87
|
config: SubscriptionConfig,
|
|
@@ -92,6 +92,8 @@ export type ClearinghouseStateParameters = Omit<v.InferInput<typeof Clearinghous
|
|
|
92
92
|
* (data) => console.log(data),
|
|
93
93
|
* );
|
|
94
94
|
* ```
|
|
95
|
+
*
|
|
96
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
95
97
|
*/
|
|
96
98
|
export function clearinghouseState(
|
|
97
99
|
config: SubscriptionConfig,
|
|
@@ -89,6 +89,8 @@ import type { ISubscription } from "../../../transport/mod.js";
|
|
|
89
89
|
* (data) => console.log(data),
|
|
90
90
|
* );
|
|
91
91
|
* ```
|
|
92
|
+
*
|
|
93
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
92
94
|
*/
|
|
93
95
|
export function explorerBlock(
|
|
94
96
|
config: SubscriptionConfig,
|
|
@@ -59,6 +59,8 @@ import type { ISubscription } from "../../../transport/mod.js";
|
|
|
59
59
|
* (data) => console.log(data),
|
|
60
60
|
* );
|
|
61
61
|
* ```
|
|
62
|
+
*
|
|
63
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
62
64
|
*/
|
|
63
65
|
export function explorerTxs(
|
|
64
66
|
config: SubscriptionConfig,
|
|
@@ -21,6 +21,11 @@ export const TwapStatesRequest = /* @__PURE__ */ (() => {
|
|
|
21
21
|
Address,
|
|
22
22
|
v.description("User address."),
|
|
23
23
|
),
|
|
24
|
+
/** DEX name (empty string for main dex). */
|
|
25
|
+
dex: v.pipe(
|
|
26
|
+
v.optional(v.string()),
|
|
27
|
+
v.description("DEX name (empty string for main dex)."),
|
|
28
|
+
),
|
|
24
29
|
}),
|
|
25
30
|
v.description("Subscribe to TWAP states updates for a specific user."),
|
|
26
31
|
);
|
|
@@ -87,6 +92,8 @@ export type TwapStatesParameters = Omit<v.InferInput<typeof TwapStatesRequest>,
|
|
|
87
92
|
* (data) => console.log(data),
|
|
88
93
|
* );
|
|
89
94
|
* ```
|
|
95
|
+
*
|
|
96
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
90
97
|
*/
|
|
91
98
|
export function twapStates(
|
|
92
99
|
config: SubscriptionConfig,
|
|
@@ -96,9 +103,10 @@ export function twapStates(
|
|
|
96
103
|
const payload = v.parse(TwapStatesRequest, {
|
|
97
104
|
type: "twapStates",
|
|
98
105
|
...params,
|
|
106
|
+
dex: params.dex ?? "", // same value as in response
|
|
99
107
|
});
|
|
100
108
|
return config.transport.subscribe<TwapStatesEvent>(payload.type, payload, (e) => {
|
|
101
|
-
if (e.detail.user === payload.user) {
|
|
109
|
+
if (e.detail.user === payload.user && e.detail.dex === payload.dex) {
|
|
102
110
|
listener(e.detail);
|
|
103
111
|
}
|
|
104
112
|
});
|
package/src/src/signing/mod.ts
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
|
|
64
64
|
import { keccak_256 } from "@noble/hashes/sha3.js";
|
|
65
65
|
import { bytesToHex, concatBytes, hexToBytes } from "@noble/hashes/utils.js";
|
|
66
|
-
import { encode as encodeMsgpack, type ValueType } from "../../deps/jsr.io/@std/msgpack/1.0.3/
|
|
66
|
+
import { encode as encodeMsgpack, type ValueType } from "../../deps/jsr.io/@std/msgpack/1.0.3/encode.js";
|
|
67
67
|
import { type AbstractWallet, type Signature, signTypedData } from "./_abstractWallet.js";
|
|
68
68
|
|
|
69
69
|
export {
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ValueType } from "./encode.js";
|
|
2
|
-
/**
|
|
3
|
-
* Decode a value from the {@link https://msgpack.org/ | MessagePack} binary format.
|
|
4
|
-
*
|
|
5
|
-
* If the input is not in valid message pack format, an error will be thrown.
|
|
6
|
-
*
|
|
7
|
-
* @example Usage
|
|
8
|
-
* ```ts
|
|
9
|
-
* import { decode } from "@std/msgpack/decode";
|
|
10
|
-
* import { assertEquals } from "@std/assert";
|
|
11
|
-
*
|
|
12
|
-
* const encoded = new Uint8Array([163, 72, 105, 33]);
|
|
13
|
-
*
|
|
14
|
-
* assertEquals(decode(encoded), "Hi!");
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @param data MessagePack binary data.
|
|
18
|
-
* @returns Decoded value from the MessagePack binary data.
|
|
19
|
-
*/
|
|
20
|
-
export declare function decode(data: Uint8Array): ValueType;
|
|
21
|
-
//# sourceMappingURL=decode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/msgpack/1.0.3/decode.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAclD"}
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
/**
|
|
4
|
-
* Decode a value from the {@link https://msgpack.org/ | MessagePack} binary format.
|
|
5
|
-
*
|
|
6
|
-
* If the input is not in valid message pack format, an error will be thrown.
|
|
7
|
-
*
|
|
8
|
-
* @example Usage
|
|
9
|
-
* ```ts
|
|
10
|
-
* import { decode } from "@std/msgpack/decode";
|
|
11
|
-
* import { assertEquals } from "@std/assert";
|
|
12
|
-
*
|
|
13
|
-
* const encoded = new Uint8Array([163, 72, 105, 33]);
|
|
14
|
-
*
|
|
15
|
-
* assertEquals(decode(encoded), "Hi!");
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* @param data MessagePack binary data.
|
|
19
|
-
* @returns Decoded value from the MessagePack binary data.
|
|
20
|
-
*/
|
|
21
|
-
export function decode(data) {
|
|
22
|
-
const pointer = { consumed: 0 };
|
|
23
|
-
const dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
24
|
-
const value = decodeSlice(data, dataView, pointer);
|
|
25
|
-
if (pointer.consumed < data.length) {
|
|
26
|
-
throw new EvalError("Messagepack decode did not consume whole array");
|
|
27
|
-
}
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
|
-
function decodeString(uint8, size, pointer) {
|
|
31
|
-
pointer.consumed += size;
|
|
32
|
-
const u8 = uint8.subarray(pointer.consumed - size, pointer.consumed);
|
|
33
|
-
if (u8.length !== size) {
|
|
34
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
35
|
-
}
|
|
36
|
-
return decoder.decode(u8);
|
|
37
|
-
}
|
|
38
|
-
function decodeArray(uint8, dataView, size, pointer) {
|
|
39
|
-
const arr = [];
|
|
40
|
-
for (let i = 0; i < size; i++) {
|
|
41
|
-
const value = decodeSlice(uint8, dataView, pointer);
|
|
42
|
-
arr.push(value);
|
|
43
|
-
}
|
|
44
|
-
return arr;
|
|
45
|
-
}
|
|
46
|
-
function decodeMap(uint8, dataView, size, pointer) {
|
|
47
|
-
const map = {};
|
|
48
|
-
for (let i = 0; i < size; i++) {
|
|
49
|
-
const key = decodeSlice(uint8, dataView, pointer);
|
|
50
|
-
const value = decodeSlice(uint8, dataView, pointer);
|
|
51
|
-
if (typeof key !== "number" && typeof key !== "string") {
|
|
52
|
-
throw new EvalError("Cannot decode a key of a map: The type of key is invalid, keys must be a number or a string");
|
|
53
|
-
}
|
|
54
|
-
map[key] = value;
|
|
55
|
-
}
|
|
56
|
-
return map;
|
|
57
|
-
}
|
|
58
|
-
const decoder = new TextDecoder();
|
|
59
|
-
const FIXMAP_BITS = 0b1000_0000;
|
|
60
|
-
const FIXMAP_MASK = 0b1111_0000;
|
|
61
|
-
const FIXARRAY_BITS = 0b1001_0000;
|
|
62
|
-
const FIXARRAY_MASK = 0b1111_0000;
|
|
63
|
-
const FIXSTR_BITS = 0b1010_0000;
|
|
64
|
-
const FIXSTR_MASK = 0b1110_0000;
|
|
65
|
-
/**
|
|
66
|
-
* Given a uint8array which contains a msgpack object,
|
|
67
|
-
* return the value of the object as well as how many bytes
|
|
68
|
-
* were consumed in obtaining this object
|
|
69
|
-
*/
|
|
70
|
-
function decodeSlice(uint8, dataView, pointer) {
|
|
71
|
-
if (pointer.consumed >= uint8.length) {
|
|
72
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
73
|
-
}
|
|
74
|
-
const type = dataView.getUint8(pointer.consumed);
|
|
75
|
-
pointer.consumed++;
|
|
76
|
-
if (type <= 0x7f) { // positive fixint - really small positive number
|
|
77
|
-
return type;
|
|
78
|
-
}
|
|
79
|
-
if ((type & FIXMAP_MASK) === FIXMAP_BITS) { // fixmap - small map
|
|
80
|
-
const size = type & ~FIXMAP_MASK;
|
|
81
|
-
return decodeMap(uint8, dataView, size, pointer);
|
|
82
|
-
}
|
|
83
|
-
if ((type & FIXARRAY_MASK) === FIXARRAY_BITS) { // fixarray - small array
|
|
84
|
-
const size = type & ~FIXARRAY_MASK;
|
|
85
|
-
return decodeArray(uint8, dataView, size, pointer);
|
|
86
|
-
}
|
|
87
|
-
if ((type & FIXSTR_MASK) === FIXSTR_BITS) { // fixstr - small string
|
|
88
|
-
const size = type & ~FIXSTR_MASK;
|
|
89
|
-
return decodeString(uint8, size, pointer);
|
|
90
|
-
}
|
|
91
|
-
if (type >= 0xe0) { // negative fixint - really small negative number
|
|
92
|
-
return type - 256;
|
|
93
|
-
}
|
|
94
|
-
switch (type) {
|
|
95
|
-
case 0xc0: // nil
|
|
96
|
-
return null;
|
|
97
|
-
case 0xc1: // (never used)
|
|
98
|
-
throw new Error("Messagepack decode encountered a type that is never used");
|
|
99
|
-
case 0xc2: // false
|
|
100
|
-
return false;
|
|
101
|
-
case 0xc3: // true
|
|
102
|
-
return true;
|
|
103
|
-
case 0xc4: { // bin 8 - small Uint8Array
|
|
104
|
-
if (pointer.consumed >= uint8.length) {
|
|
105
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
106
|
-
}
|
|
107
|
-
const length = dataView.getUint8(pointer.consumed);
|
|
108
|
-
pointer.consumed++;
|
|
109
|
-
const u8 = uint8.subarray(pointer.consumed, pointer.consumed + length);
|
|
110
|
-
if (u8.length !== length) {
|
|
111
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
112
|
-
}
|
|
113
|
-
pointer.consumed += length;
|
|
114
|
-
return u8;
|
|
115
|
-
}
|
|
116
|
-
case 0xc5: { // bin 16 - medium Uint8Array
|
|
117
|
-
if (pointer.consumed + 1 >= uint8.length) {
|
|
118
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
119
|
-
}
|
|
120
|
-
const length = dataView.getUint16(pointer.consumed);
|
|
121
|
-
pointer.consumed += 2;
|
|
122
|
-
const u8 = uint8.subarray(pointer.consumed, pointer.consumed + length);
|
|
123
|
-
if (u8.length !== length) {
|
|
124
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
125
|
-
}
|
|
126
|
-
pointer.consumed += length;
|
|
127
|
-
return u8;
|
|
128
|
-
}
|
|
129
|
-
case 0xc6: { // bin 32 - large Uint8Array
|
|
130
|
-
if (pointer.consumed + 3 >= uint8.length) {
|
|
131
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
132
|
-
}
|
|
133
|
-
const length = dataView.getUint32(pointer.consumed);
|
|
134
|
-
pointer.consumed += 4;
|
|
135
|
-
const u8 = uint8.subarray(pointer.consumed, pointer.consumed + length);
|
|
136
|
-
if (u8.length !== length) {
|
|
137
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
138
|
-
}
|
|
139
|
-
pointer.consumed += length;
|
|
140
|
-
return u8;
|
|
141
|
-
}
|
|
142
|
-
case 0xc7: // ext 8 - small extension type
|
|
143
|
-
case 0xc8: // ext 16 - medium extension type
|
|
144
|
-
case 0xc9: // ext 32 - large extension type
|
|
145
|
-
throw new Error("Cannot decode a slice: Large extension type 'ext' not implemented yet");
|
|
146
|
-
case 0xca: { // float 32
|
|
147
|
-
if (pointer.consumed + 3 >= uint8.length) {
|
|
148
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
149
|
-
}
|
|
150
|
-
const value = dataView.getFloat32(pointer.consumed);
|
|
151
|
-
pointer.consumed += 4;
|
|
152
|
-
return value;
|
|
153
|
-
}
|
|
154
|
-
case 0xcb: { // float 64
|
|
155
|
-
if (pointer.consumed + 7 >= uint8.length) {
|
|
156
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
157
|
-
}
|
|
158
|
-
const value = dataView.getFloat64(pointer.consumed);
|
|
159
|
-
pointer.consumed += 8;
|
|
160
|
-
return value;
|
|
161
|
-
}
|
|
162
|
-
case 0xcc: { // uint 8
|
|
163
|
-
if (pointer.consumed >= uint8.length) {
|
|
164
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
165
|
-
}
|
|
166
|
-
const value = dataView.getUint8(pointer.consumed);
|
|
167
|
-
pointer.consumed += 1;
|
|
168
|
-
return value;
|
|
169
|
-
}
|
|
170
|
-
case 0xcd: { // uint 16
|
|
171
|
-
if (pointer.consumed + 1 >= uint8.length) {
|
|
172
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
173
|
-
}
|
|
174
|
-
const value = dataView.getUint16(pointer.consumed);
|
|
175
|
-
pointer.consumed += 2;
|
|
176
|
-
return value;
|
|
177
|
-
}
|
|
178
|
-
case 0xce: { // uint 32
|
|
179
|
-
if (pointer.consumed + 3 >= uint8.length) {
|
|
180
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
181
|
-
}
|
|
182
|
-
const value = dataView.getUint32(pointer.consumed);
|
|
183
|
-
pointer.consumed += 4;
|
|
184
|
-
return value;
|
|
185
|
-
}
|
|
186
|
-
case 0xcf: { // uint 64
|
|
187
|
-
if (pointer.consumed + 7 >= uint8.length) {
|
|
188
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
189
|
-
}
|
|
190
|
-
const value = dataView.getBigUint64(pointer.consumed);
|
|
191
|
-
pointer.consumed += 8;
|
|
192
|
-
return value;
|
|
193
|
-
}
|
|
194
|
-
case 0xd0: { // int 8
|
|
195
|
-
if (pointer.consumed >= uint8.length) {
|
|
196
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
197
|
-
}
|
|
198
|
-
const value = dataView.getInt8(pointer.consumed);
|
|
199
|
-
pointer.consumed += 1;
|
|
200
|
-
return value;
|
|
201
|
-
}
|
|
202
|
-
case 0xd1: { // int 16
|
|
203
|
-
if (pointer.consumed + 1 >= uint8.length) {
|
|
204
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
205
|
-
}
|
|
206
|
-
const value = dataView.getInt16(pointer.consumed);
|
|
207
|
-
pointer.consumed += 2;
|
|
208
|
-
return value;
|
|
209
|
-
}
|
|
210
|
-
case 0xd2: { // int 32
|
|
211
|
-
if (pointer.consumed + 3 >= uint8.length) {
|
|
212
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
213
|
-
}
|
|
214
|
-
const value = dataView.getInt32(pointer.consumed);
|
|
215
|
-
pointer.consumed += 4;
|
|
216
|
-
return value;
|
|
217
|
-
}
|
|
218
|
-
case 0xd3: { // int 64
|
|
219
|
-
if (pointer.consumed + 7 >= uint8.length) {
|
|
220
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
221
|
-
}
|
|
222
|
-
const value = dataView.getBigInt64(pointer.consumed);
|
|
223
|
-
pointer.consumed += 8;
|
|
224
|
-
return value;
|
|
225
|
-
}
|
|
226
|
-
case 0xd4: // fixext 1 - 1 byte extension type
|
|
227
|
-
case 0xd5: // fixext 2 - 2 byte extension type
|
|
228
|
-
case 0xd6: // fixext 4 - 4 byte extension type
|
|
229
|
-
case 0xd7: // fixext 8 - 8 byte extension type
|
|
230
|
-
case 0xd8: // fixext 16 - 16 byte extension type
|
|
231
|
-
throw new Error("Cannot decode a slice: 'fixext' not implemented yet");
|
|
232
|
-
case 0xd9: { // str 8 - small string
|
|
233
|
-
if (pointer.consumed >= uint8.length) {
|
|
234
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
235
|
-
}
|
|
236
|
-
const length = dataView.getUint8(pointer.consumed);
|
|
237
|
-
pointer.consumed += 1;
|
|
238
|
-
return decodeString(uint8, length, pointer);
|
|
239
|
-
}
|
|
240
|
-
case 0xda: { // str 16 - medium string
|
|
241
|
-
if (pointer.consumed + 1 >= uint8.length) {
|
|
242
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
243
|
-
}
|
|
244
|
-
const length = dataView.getUint16(pointer.consumed);
|
|
245
|
-
pointer.consumed += 2;
|
|
246
|
-
return decodeString(uint8, length, pointer);
|
|
247
|
-
}
|
|
248
|
-
case 0xdb: { // str 32 - large string
|
|
249
|
-
if (pointer.consumed + 3 >= uint8.length) {
|
|
250
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
251
|
-
}
|
|
252
|
-
const length = dataView.getUint32(pointer.consumed);
|
|
253
|
-
pointer.consumed += 4;
|
|
254
|
-
return decodeString(uint8, length, pointer);
|
|
255
|
-
}
|
|
256
|
-
case 0xdc: { // array 16 - medium array
|
|
257
|
-
if (pointer.consumed + 1 >= uint8.length) {
|
|
258
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
259
|
-
}
|
|
260
|
-
const length = dataView.getUint16(pointer.consumed);
|
|
261
|
-
pointer.consumed += 2;
|
|
262
|
-
return decodeArray(uint8, dataView, length, pointer);
|
|
263
|
-
}
|
|
264
|
-
case 0xdd: { // array 32 - large array
|
|
265
|
-
if (pointer.consumed + 3 >= uint8.length) {
|
|
266
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
267
|
-
}
|
|
268
|
-
const length = dataView.getUint32(pointer.consumed);
|
|
269
|
-
pointer.consumed += 4;
|
|
270
|
-
return decodeArray(uint8, dataView, length, pointer);
|
|
271
|
-
}
|
|
272
|
-
case 0xde: { // map 16 - medium map
|
|
273
|
-
if (pointer.consumed + 1 >= uint8.length) {
|
|
274
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
275
|
-
}
|
|
276
|
-
const length = dataView.getUint16(pointer.consumed);
|
|
277
|
-
pointer.consumed += 2;
|
|
278
|
-
return decodeMap(uint8, dataView, length, pointer);
|
|
279
|
-
}
|
|
280
|
-
case 0xdf: { // map 32 - large map
|
|
281
|
-
if (pointer.consumed + 3 >= uint8.length) {
|
|
282
|
-
throw new EvalError("Messagepack decode reached end of array prematurely");
|
|
283
|
-
}
|
|
284
|
-
const length = dataView.getUint32(pointer.consumed);
|
|
285
|
-
pointer.consumed += 4;
|
|
286
|
-
return decodeMap(uint8, dataView, length, pointer);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
// All cases are covered for numbers between 0-255. Typescript isn't smart enough to know that.
|
|
290
|
-
throw new Error("Unreachable");
|
|
291
|
-
}
|
|
292
|
-
//# sourceMappingURL=decode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decode.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/msgpack/1.0.3/decode.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,qCAAqC;AAIrC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,MAAM,CAAC,IAAgB;IACrC,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAC3B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,CAChB,CAAC;IACF,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAEnD,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACnC,MAAM,IAAI,SAAS,CAAC,gDAAgD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,YAAY,CACnB,KAAiB,EACjB,IAAY,EACZ,OAA6B;IAE7B,OAAO,CAAC,QAAQ,IAA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