@nktkas/hyperliquid 0.30.0 → 0.30.3
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 +83 -19
- package/esm/bin/cli.js +10 -0
- package/esm/bin/cli.js.map +1 -1
- package/esm/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.d.ts +94 -0
- package/esm/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.js +138 -0
- package/esm/deps/jsr.io/@std/async/1.1.0/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 +24 -13
- package/esm/src/api/exchange/_methods/approveAgent.d.ts.map +1 -1
- package/esm/src/api/exchange/_methods/approveAgent.js +21 -3
- package/esm/src/api/exchange/_methods/approveAgent.js.map +1 -1
- package/esm/src/api/exchange/_methods/approveBuilderFee.d.ts +4 -4
- package/esm/src/api/exchange/_methods/batchModify.d.ts +29 -29
- package/esm/src/api/exchange/_methods/borrowLend.d.ts +173 -0
- package/esm/src/api/exchange/_methods/borrowLend.d.ts.map +1 -0
- package/esm/src/api/exchange/_methods/borrowLend.js +75 -0
- package/esm/src/api/exchange/_methods/borrowLend.js.map +1 -0
- 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 +19 -19
- 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 +17 -17
- 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 +12 -12
- 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 +12 -12
- package/esm/src/api/exchange/_methods/userDexAbstraction.d.ts +4 -4
- package/esm/src/api/exchange/_methods/userPortfolioMargin.d.ts +193 -0
- package/esm/src/api/exchange/_methods/userPortfolioMargin.d.ts.map +1 -0
- package/esm/src/api/exchange/_methods/userPortfolioMargin.js +92 -0
- package/esm/src/api/exchange/_methods/userPortfolioMargin.js.map +1 -0
- 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 +12 -12
- package/esm/src/api/exchange/client.d.ts +8 -0
- package/esm/src/api/exchange/client.d.ts.map +1 -1
- package/esm/src/api/exchange/client.js +10 -0
- package/esm/src/api/exchange/client.js.map +1 -1
- package/esm/src/api/exchange/mod.d.ts +2 -0
- package/esm/src/api/exchange/mod.d.ts.map +1 -1
- package/esm/src/api/exchange/mod.js +2 -0
- package/esm/src/api/exchange/mod.js.map +1 -1
- 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/activeAssetData.js +2 -2
- package/esm/src/api/info/_methods/activeAssetData.js.map +1 -1
- package/esm/src/api/info/_methods/alignedQuoteTokenInfo.d.ts +5 -5
- package/esm/src/api/info/_methods/allBorrowLendReserveStates.d.ts +71 -0
- package/esm/src/api/info/_methods/allBorrowLendReserveStates.d.ts.map +1 -0
- package/esm/src/api/info/_methods/allBorrowLendReserveStates.js +56 -0
- package/esm/src/api/info/_methods/allBorrowLendReserveStates.js.map +1 -0
- 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/borrowLendReserveState.d.ts +79 -0
- package/esm/src/api/info/_methods/borrowLendReserveState.d.ts.map +1 -0
- package/esm/src/api/info/_methods/borrowLendReserveState.js +76 -0
- package/esm/src/api/info/_methods/borrowLendReserveState.js.map +1 -0
- package/esm/src/api/info/_methods/borrowLendUserState.d.ts +103 -0
- package/esm/src/api/info/_methods/borrowLendUserState.d.ts.map +1 -0
- package/esm/src/api/info/_methods/borrowLendUserState.js +85 -0
- package/esm/src/api/info/_methods/borrowLendUserState.js.map +1 -0
- 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/clearinghouseState.js +3 -3
- package/esm/src/api/info/_methods/clearinghouseState.js.map +1 -1
- 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 +6 -2
- package/esm/src/api/info/_methods/perpDexs.d.ts.map +1 -1
- package/esm/src/api/info/_methods/perpDexs.js +3 -1
- package/esm/src/api/info/_methods/perpDexs.js.map +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 +43 -7
- package/esm/src/api/info/_methods/spotMeta.d.ts.map +1 -1
- package/esm/src/api/info/_methods/spotMeta.js +16 -0
- package/esm/src/api/info/_methods/spotMeta.js.map +1 -1
- package/esm/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts +52 -14
- package/esm/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts.map +1 -1
- 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/userBorrowLendInterest.d.ts +73 -0
- package/esm/src/api/info/_methods/userBorrowLendInterest.d.ts.map +1 -0
- package/esm/src/api/info/_methods/userBorrowLendInterest.js +72 -0
- package/esm/src/api/info/_methods/userBorrowLendInterest.js.map +1 -0
- 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 +93 -36
- package/esm/src/api/info/_methods/userNonFundingLedgerUpdates.d.ts.map +1 -1
- package/esm/src/api/info/_methods/userNonFundingLedgerUpdates.js +33 -0
- package/esm/src/api/info/_methods/userNonFundingLedgerUpdates.js.map +1 -1
- 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/info/client.d.ts +16 -0
- package/esm/src/api/info/client.d.ts.map +1 -1
- package/esm/src/api/info/client.js +20 -0
- package/esm/src/api/info/client.js.map +1 -1
- package/esm/src/api/info/mod.d.ts +4 -0
- package/esm/src/api/info/mod.d.ts.map +1 -1
- package/esm/src/api/info/mod.js +4 -0
- package/esm/src/api/info/mod.js.map +1 -1
- 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 +109 -34
- package/esm/src/api/subscription/_methods/userNonFundingLedgerUpdates.d.ts.map +1 -1
- 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/bin/cli.js +10 -0
- package/script/bin/cli.js.map +1 -1
- package/script/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.d.ts +94 -0
- package/script/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.js +142 -0
- package/script/deps/jsr.io/@std/async/1.1.0/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 +24 -13
- package/script/src/api/exchange/_methods/approveAgent.d.ts.map +1 -1
- package/script/src/api/exchange/_methods/approveAgent.js +21 -3
- package/script/src/api/exchange/_methods/approveAgent.js.map +1 -1
- package/script/src/api/exchange/_methods/approveBuilderFee.d.ts +4 -4
- package/script/src/api/exchange/_methods/batchModify.d.ts +29 -29
- package/script/src/api/exchange/_methods/borrowLend.d.ts +173 -0
- package/script/src/api/exchange/_methods/borrowLend.d.ts.map +1 -0
- package/script/src/api/exchange/_methods/borrowLend.js +112 -0
- package/script/src/api/exchange/_methods/borrowLend.js.map +1 -0
- 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 +19 -19
- 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 +17 -17
- 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 +12 -12
- 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 +12 -12
- package/script/src/api/exchange/_methods/userDexAbstraction.d.ts +4 -4
- package/script/src/api/exchange/_methods/userPortfolioMargin.d.ts +193 -0
- package/script/src/api/exchange/_methods/userPortfolioMargin.d.ts.map +1 -0
- package/script/src/api/exchange/_methods/userPortfolioMargin.js +129 -0
- package/script/src/api/exchange/_methods/userPortfolioMargin.js.map +1 -0
- 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 +12 -12
- package/script/src/api/exchange/client.d.ts +8 -0
- package/script/src/api/exchange/client.d.ts.map +1 -1
- package/script/src/api/exchange/client.js +10 -0
- package/script/src/api/exchange/client.js.map +1 -1
- package/script/src/api/exchange/mod.d.ts +2 -0
- package/script/src/api/exchange/mod.d.ts.map +1 -1
- package/script/src/api/exchange/mod.js +2 -0
- package/script/src/api/exchange/mod.js.map +1 -1
- 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/activeAssetData.js +1 -1
- package/script/src/api/info/_methods/activeAssetData.js.map +1 -1
- package/script/src/api/info/_methods/alignedQuoteTokenInfo.d.ts +5 -5
- package/script/src/api/info/_methods/allBorrowLendReserveStates.d.ts +71 -0
- package/script/src/api/info/_methods/allBorrowLendReserveStates.d.ts.map +1 -0
- package/script/src/api/info/_methods/allBorrowLendReserveStates.js +93 -0
- package/script/src/api/info/_methods/allBorrowLendReserveStates.js.map +1 -0
- 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/borrowLendReserveState.d.ts +79 -0
- package/script/src/api/info/_methods/borrowLendReserveState.d.ts.map +1 -0
- package/script/src/api/info/_methods/borrowLendReserveState.js +113 -0
- package/script/src/api/info/_methods/borrowLendReserveState.js.map +1 -0
- package/script/src/api/info/_methods/borrowLendUserState.d.ts +103 -0
- package/script/src/api/info/_methods/borrowLendUserState.d.ts.map +1 -0
- package/script/src/api/info/_methods/borrowLendUserState.js +122 -0
- package/script/src/api/info/_methods/borrowLendUserState.js.map +1 -0
- 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/clearinghouseState.js +3 -3
- package/script/src/api/info/_methods/clearinghouseState.js.map +1 -1
- 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 +6 -2
- package/script/src/api/info/_methods/perpDexs.d.ts.map +1 -1
- package/script/src/api/info/_methods/perpDexs.js +3 -1
- package/script/src/api/info/_methods/perpDexs.js.map +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 +43 -7
- package/script/src/api/info/_methods/spotMeta.d.ts.map +1 -1
- package/script/src/api/info/_methods/spotMeta.js +16 -0
- package/script/src/api/info/_methods/spotMeta.js.map +1 -1
- package/script/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts +52 -14
- package/script/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts.map +1 -1
- 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/userBorrowLendInterest.d.ts +73 -0
- package/script/src/api/info/_methods/userBorrowLendInterest.d.ts.map +1 -0
- package/script/src/api/info/_methods/userBorrowLendInterest.js +109 -0
- package/script/src/api/info/_methods/userBorrowLendInterest.js.map +1 -0
- 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 +93 -36
- package/script/src/api/info/_methods/userNonFundingLedgerUpdates.d.ts.map +1 -1
- package/script/src/api/info/_methods/userNonFundingLedgerUpdates.js +33 -0
- package/script/src/api/info/_methods/userNonFundingLedgerUpdates.js.map +1 -1
- 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/info/client.d.ts +16 -0
- package/script/src/api/info/client.d.ts.map +1 -1
- package/script/src/api/info/client.js +20 -0
- package/script/src/api/info/client.js.map +1 -1
- package/script/src/api/info/mod.d.ts +4 -0
- package/script/src/api/info/mod.d.ts.map +1 -1
- package/script/src/api/info/mod.js +4 -0
- package/script/src/api/info/mod.js.map +1 -1
- 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 +109 -34
- package/script/src/api/subscription/_methods/userNonFundingLedgerUpdates.d.ts.map +1 -1
- 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/bin/cli.ts +10 -0
- package/src/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.ts +147 -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/approveAgent.ts +25 -5
- package/src/src/api/exchange/_methods/borrowLend.ts +133 -0
- package/src/src/api/exchange/_methods/order.ts +5 -3
- package/src/src/api/exchange/_methods/userPortfolioMargin.ts +156 -0
- package/src/src/api/exchange/client.ts +34 -0
- package/src/src/api/exchange/mod.ts +2 -0
- package/src/src/api/info/_methods/activeAssetData.ts +2 -2
- package/src/src/api/info/_methods/allBorrowLendReserveStates.ts +82 -0
- package/src/src/api/info/_methods/borrowLendReserveState.ts +131 -0
- package/src/src/api/info/_methods/borrowLendUserState.ts +144 -0
- package/src/src/api/info/_methods/clearinghouseState.ts +3 -3
- package/src/src/api/info/_methods/perpDexs.ts +6 -1
- package/src/src/api/info/_methods/spotMeta.ts +41 -0
- package/src/src/api/info/_methods/userBorrowLendInterest.ts +122 -0
- package/src/src/api/info/_methods/userFunding.ts +2 -2
- package/src/src/api/info/_methods/userNonFundingLedgerUpdates.ts +69 -0
- package/src/src/api/info/client.ts +60 -0
- package/src/src/api/info/mod.ts +4 -0
- 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
|
@@ -12,17 +12,17 @@ export declare const BatchModifyRequest: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
12
12
|
/** Order modifications. */
|
|
13
13
|
readonly modifies: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
14
14
|
/** Order ID or Client Order ID. */
|
|
15
|
-
readonly oid: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>], undefined>, v.DescriptionAction<number | `0x${string}`, "Order ID or Client Order ID.">]>;
|
|
15
|
+
readonly oid: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>], undefined>, v.DescriptionAction<number | `0x${string}`, "Order ID or Client Order ID.">]>;
|
|
16
16
|
/** New order parameters. */
|
|
17
17
|
readonly order: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
18
18
|
/** Asset ID. */
|
|
19
|
-
readonly a: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Asset ID.">]>;
|
|
19
|
+
readonly a: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Asset ID.">]>;
|
|
20
20
|
/** Position side (`true` for long, `false` for short). */
|
|
21
21
|
readonly b: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Position side (`true` for long, `false` for short).">]>;
|
|
22
22
|
/** Price. */
|
|
23
|
-
readonly p: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Price.">]>;
|
|
23
|
+
readonly p: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Price.">]>;
|
|
24
24
|
/** Size (in base currency units). */
|
|
25
|
-
readonly s: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Size (in base currency units).">]>;
|
|
25
|
+
readonly s: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Size (in base currency units).">]>;
|
|
26
26
|
/** Is reduce-only? */
|
|
27
27
|
readonly r: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Is reduce-only?">]>;
|
|
28
28
|
/** Order type (`limit` for limit orders, `trigger` for stop-loss/take-profit orders). */
|
|
@@ -47,7 +47,7 @@ export declare const BatchModifyRequest: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
47
47
|
/** Is market order? */
|
|
48
48
|
readonly isMarket: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Is market order?">]>;
|
|
49
49
|
/** Trigger price. */
|
|
50
|
-
readonly triggerPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Trigger price.">]>;
|
|
50
|
+
readonly triggerPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Trigger price.">]>;
|
|
51
51
|
/** Indicates whether it is take profit or stop loss. */
|
|
52
52
|
readonly tpsl: v.SchemaWithPipe<readonly [v.PicklistSchema<["tp", "sl"], undefined>, v.DescriptionAction<"tp" | "sl", "Indicates whether it is take profit or stop loss.">]>;
|
|
53
53
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -135,7 +135,7 @@ export declare const BatchModifyRequest: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
135
135
|
}[];
|
|
136
136
|
}, "Action to perform.">]>;
|
|
137
137
|
/** Nonce (timestamp in ms) used to prevent replay attacks. */
|
|
138
|
-
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
138
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
139
139
|
/** ECDSA signature components. */
|
|
140
140
|
readonly signature: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
141
141
|
readonly r: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>, v.DescriptionAction<`0x${string}`, "First 32-byte component.">]>;
|
|
@@ -153,7 +153,7 @@ export declare const BatchModifyRequest: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
153
153
|
/** Vault address (for vault trading). */
|
|
154
154
|
readonly vaultAddress: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Vault address (for vault trading).">]>;
|
|
155
155
|
/** Expiration time of the action. */
|
|
156
|
-
readonly expiresAfter: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Expiration time of the action.">]>;
|
|
156
|
+
readonly expiresAfter: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Expiration time of the action.">]>;
|
|
157
157
|
}, undefined>, v.DescriptionAction<{
|
|
158
158
|
action: {
|
|
159
159
|
type: "batchModify";
|
|
@@ -201,7 +201,7 @@ export declare const BatchModifyResponse: v.SchemaWithPipe<readonly [v.SchemaWit
|
|
|
201
201
|
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
202
202
|
readonly statuses: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
203
203
|
readonly resting: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
204
|
-
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
204
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
205
205
|
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
206
206
|
}, undefined>, v.DescriptionAction<{
|
|
207
207
|
oid: number;
|
|
@@ -209,9 +209,9 @@ export declare const BatchModifyResponse: v.SchemaWithPipe<readonly [v.SchemaWit
|
|
|
209
209
|
}, "Resting order status.">]>;
|
|
210
210
|
}, undefined>, v.ObjectSchema<{
|
|
211
211
|
readonly filled: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
212
|
-
readonly totalSz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Total size filled.">]>;
|
|
213
|
-
readonly avgPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Average price of fill.">]>;
|
|
214
|
-
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
212
|
+
readonly totalSz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Total size filled.">]>;
|
|
213
|
+
readonly avgPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Average price of fill.">]>;
|
|
214
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
215
215
|
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
216
216
|
}, undefined>, v.DescriptionAction<{
|
|
217
217
|
totalSz: string;
|
|
@@ -221,7 +221,7 @@ export declare const BatchModifyResponse: v.SchemaWithPipe<readonly [v.SchemaWit
|
|
|
221
221
|
}, "Filled order status.">]>;
|
|
222
222
|
}, undefined>, v.ObjectSchema<{
|
|
223
223
|
readonly error: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
224
|
-
}, undefined>], undefined>, undefined>, v.DescriptionAction<({
|
|
224
|
+
}, undefined>, v.LiteralSchema<"waitingForFill", undefined>, v.LiteralSchema<"waitingForTrigger", undefined>], undefined>, undefined>, v.DescriptionAction<({
|
|
225
225
|
resting: {
|
|
226
226
|
oid: number;
|
|
227
227
|
cloid?: `0x${string}` | undefined;
|
|
@@ -235,7 +235,7 @@ export declare const BatchModifyResponse: v.SchemaWithPipe<readonly [v.SchemaWit
|
|
|
235
235
|
};
|
|
236
236
|
} | {
|
|
237
237
|
error: string;
|
|
238
|
-
})[], "Array of statuses for each placed order.">]>;
|
|
238
|
+
} | "waitingForFill" | "waitingForTrigger")[], "Array of statuses for each placed order.">]>;
|
|
239
239
|
}, undefined>, v.DescriptionAction<{
|
|
240
240
|
statuses: ({
|
|
241
241
|
resting: {
|
|
@@ -251,7 +251,7 @@ export declare const BatchModifyResponse: v.SchemaWithPipe<readonly [v.SchemaWit
|
|
|
251
251
|
};
|
|
252
252
|
} | {
|
|
253
253
|
error: string;
|
|
254
|
-
})[];
|
|
254
|
+
} | "waitingForFill" | "waitingForTrigger")[];
|
|
255
255
|
}, "Specific data.">]>;
|
|
256
256
|
}, undefined>, v.DescriptionAction<{
|
|
257
257
|
type: "order";
|
|
@@ -270,7 +270,7 @@ export declare const BatchModifyResponse: v.SchemaWithPipe<readonly [v.SchemaWit
|
|
|
270
270
|
};
|
|
271
271
|
} | {
|
|
272
272
|
error: string;
|
|
273
|
-
})[];
|
|
273
|
+
} | "waitingForFill" | "waitingForTrigger")[];
|
|
274
274
|
};
|
|
275
275
|
}, "Response details.">]>;
|
|
276
276
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -292,7 +292,7 @@ export declare const BatchModifyResponse: v.SchemaWithPipe<readonly [v.SchemaWit
|
|
|
292
292
|
};
|
|
293
293
|
} | {
|
|
294
294
|
error: string;
|
|
295
|
-
})[];
|
|
295
|
+
} | "waitingForFill" | "waitingForTrigger")[];
|
|
296
296
|
};
|
|
297
297
|
};
|
|
298
298
|
}, "Response for order placement.">]>, v.DescriptionAction<{
|
|
@@ -314,7 +314,7 @@ export declare const BatchModifyResponse: v.SchemaWithPipe<readonly [v.SchemaWit
|
|
|
314
314
|
};
|
|
315
315
|
} | {
|
|
316
316
|
error: string;
|
|
317
|
-
})[];
|
|
317
|
+
} | "waitingForFill" | "waitingForTrigger")[];
|
|
318
318
|
};
|
|
319
319
|
};
|
|
320
320
|
}, "Response for order batch modifications.">]>;
|
|
@@ -328,17 +328,17 @@ declare const BatchModifyParameters: Omit<v.ObjectSchema<{
|
|
|
328
328
|
/** Order modifications. */
|
|
329
329
|
readonly modifies: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
330
330
|
/** Order ID or Client Order ID. */
|
|
331
|
-
readonly oid: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>], undefined>, v.DescriptionAction<number | `0x${string}`, "Order ID or Client Order ID.">]>;
|
|
331
|
+
readonly oid: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>], undefined>, v.DescriptionAction<number | `0x${string}`, "Order ID or Client Order ID.">]>;
|
|
332
332
|
/** New order parameters. */
|
|
333
333
|
readonly order: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
334
334
|
/** Asset ID. */
|
|
335
|
-
readonly a: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Asset ID.">]>;
|
|
335
|
+
readonly a: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Asset ID.">]>;
|
|
336
336
|
/** Position side (`true` for long, `false` for short). */
|
|
337
337
|
readonly b: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Position side (`true` for long, `false` for short).">]>;
|
|
338
338
|
/** Price. */
|
|
339
|
-
readonly p: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Price.">]>;
|
|
339
|
+
readonly p: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Price.">]>;
|
|
340
340
|
/** Size (in base currency units). */
|
|
341
|
-
readonly s: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Size (in base currency units).">]>;
|
|
341
|
+
readonly s: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Size (in base currency units).">]>;
|
|
342
342
|
/** Is reduce-only? */
|
|
343
343
|
readonly r: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Is reduce-only?">]>;
|
|
344
344
|
/** Order type (`limit` for limit orders, `trigger` for stop-loss/take-profit orders). */
|
|
@@ -363,7 +363,7 @@ declare const BatchModifyParameters: Omit<v.ObjectSchema<{
|
|
|
363
363
|
/** Is market order? */
|
|
364
364
|
readonly isMarket: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Is market order?">]>;
|
|
365
365
|
/** Trigger price. */
|
|
366
|
-
readonly triggerPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Trigger price.">]>;
|
|
366
|
+
readonly triggerPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Trigger price.">]>;
|
|
367
367
|
/** Indicates whether it is take profit or stop loss. */
|
|
368
368
|
readonly tpsl: v.SchemaWithPipe<readonly [v.PicklistSchema<["tp", "sl"], undefined>, v.DescriptionAction<"tp" | "sl", "Indicates whether it is take profit or stop loss.">]>;
|
|
369
369
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -432,17 +432,17 @@ declare const BatchModifyParameters: Omit<v.ObjectSchema<{
|
|
|
432
432
|
/** Order modifications. */
|
|
433
433
|
readonly modifies: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
434
434
|
/** Order ID or Client Order ID. */
|
|
435
|
-
readonly oid: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>], undefined>, v.DescriptionAction<number | `0x${string}`, "Order ID or Client Order ID.">]>;
|
|
435
|
+
readonly oid: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>], undefined>, v.DescriptionAction<number | `0x${string}`, "Order ID or Client Order ID.">]>;
|
|
436
436
|
/** New order parameters. */
|
|
437
437
|
readonly order: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
438
438
|
/** Asset ID. */
|
|
439
|
-
readonly a: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Asset ID.">]>;
|
|
439
|
+
readonly a: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Asset ID.">]>;
|
|
440
440
|
/** Position side (`true` for long, `false` for short). */
|
|
441
441
|
readonly b: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Position side (`true` for long, `false` for short).">]>;
|
|
442
442
|
/** Price. */
|
|
443
|
-
readonly p: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Price.">]>;
|
|
443
|
+
readonly p: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Price.">]>;
|
|
444
444
|
/** Size (in base currency units). */
|
|
445
|
-
readonly s: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Size (in base currency units).">]>;
|
|
445
|
+
readonly s: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Size (in base currency units).">]>;
|
|
446
446
|
/** Is reduce-only? */
|
|
447
447
|
readonly r: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Is reduce-only?">]>;
|
|
448
448
|
/** Order type (`limit` for limit orders, `trigger` for stop-loss/take-profit orders). */
|
|
@@ -467,7 +467,7 @@ declare const BatchModifyParameters: Omit<v.ObjectSchema<{
|
|
|
467
467
|
/** Is market order? */
|
|
468
468
|
readonly isMarket: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Is market order?">]>;
|
|
469
469
|
/** Trigger price. */
|
|
470
|
-
readonly triggerPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Trigger price.">]>;
|
|
470
|
+
readonly triggerPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.CheckAction<string, "Value must be greater than zero.">, v.DescriptionAction<string, "Trigger price.">]>;
|
|
471
471
|
/** Indicates whether it is take profit or stop loss. */
|
|
472
472
|
readonly tpsl: v.SchemaWithPipe<readonly [v.PicklistSchema<["tp", "sl"], undefined>, v.DescriptionAction<"tp" | "sl", "Indicates whether it is take profit or stop loss.">]>;
|
|
473
473
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -600,7 +600,7 @@ declare const BatchModifyParameters: Omit<v.ObjectSchema<{
|
|
|
600
600
|
c?: `0x${string}` | undefined;
|
|
601
601
|
};
|
|
602
602
|
}[];
|
|
603
|
-
}, v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.
|
|
603
|
+
}, v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue> | v.UnionIssue<v.StringIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34>>>;
|
|
604
604
|
readonly "~types"?: {
|
|
605
605
|
readonly input: {
|
|
606
606
|
modifies: {
|
|
@@ -650,7 +650,7 @@ declare const BatchModifyParameters: Omit<v.ObjectSchema<{
|
|
|
650
650
|
};
|
|
651
651
|
}[];
|
|
652
652
|
};
|
|
653
|
-
readonly issue: v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.
|
|
653
|
+
readonly issue: v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue> | v.UnionIssue<v.StringIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34>>;
|
|
654
654
|
} | undefined;
|
|
655
655
|
};
|
|
656
656
|
/** Action parameters for the {@linkcode batchModify} function. */
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
/** Borrow or lend assets. */
|
|
3
|
+
export declare const BorrowLendRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
4
|
+
/** Action to perform. */
|
|
5
|
+
readonly action: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
6
|
+
/** Type of action. */
|
|
7
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"borrowLend", undefined>, v.DescriptionAction<"borrowLend", "Type of action.">]>;
|
|
8
|
+
/** Operation type. */
|
|
9
|
+
readonly operation: v.SchemaWithPipe<readonly [v.PicklistSchema<["supply", "withdraw", "repay", "borrow"], undefined>, v.DescriptionAction<"supply" | "withdraw" | "repay" | "borrow", "Operation type.">]>;
|
|
10
|
+
/** Token ID. */
|
|
11
|
+
readonly token: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Token ID.">]>;
|
|
12
|
+
/** Amount to supply/withdraw (null = full). */
|
|
13
|
+
readonly amount: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Amount to supply/withdraw (null = full).">]>;
|
|
14
|
+
}, undefined>, v.DescriptionAction<{
|
|
15
|
+
type: "borrowLend";
|
|
16
|
+
operation: "supply" | "withdraw" | "repay" | "borrow";
|
|
17
|
+
token: number;
|
|
18
|
+
amount: string | null;
|
|
19
|
+
}, "Action to perform.">]>;
|
|
20
|
+
/** Nonce (timestamp in ms) used to prevent replay attacks. */
|
|
21
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
22
|
+
/** ECDSA signature components. */
|
|
23
|
+
readonly signature: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
24
|
+
readonly r: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>, v.DescriptionAction<`0x${string}`, "First 32-byte component.">]>;
|
|
25
|
+
readonly s: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>, v.DescriptionAction<`0x${string}`, "Second 32-byte component.">]>;
|
|
26
|
+
readonly v: v.SchemaWithPipe<readonly [v.PicklistSchema<[27, 28], undefined>, v.DescriptionAction<27 | 28, "Recovery identifier.">]>;
|
|
27
|
+
}, undefined>, v.DescriptionAction<{
|
|
28
|
+
r: `0x${string}`;
|
|
29
|
+
s: `0x${string}`;
|
|
30
|
+
v: 27 | 28;
|
|
31
|
+
}, "ECDSA signature components.">]>, v.DescriptionAction<{
|
|
32
|
+
r: `0x${string}`;
|
|
33
|
+
s: `0x${string}`;
|
|
34
|
+
v: 27 | 28;
|
|
35
|
+
}, "ECDSA signature components.">]>;
|
|
36
|
+
/** Vault address (for vault trading). */
|
|
37
|
+
readonly vaultAddress: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Vault address (for vault trading).">]>;
|
|
38
|
+
/** Expiration time of the action. */
|
|
39
|
+
readonly expiresAfter: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Expiration time of the action.">]>;
|
|
40
|
+
}, undefined>, v.DescriptionAction<{
|
|
41
|
+
action: {
|
|
42
|
+
type: "borrowLend";
|
|
43
|
+
operation: "supply" | "withdraw" | "repay" | "borrow";
|
|
44
|
+
token: number;
|
|
45
|
+
amount: string | null;
|
|
46
|
+
};
|
|
47
|
+
nonce: number;
|
|
48
|
+
signature: {
|
|
49
|
+
r: `0x${string}`;
|
|
50
|
+
s: `0x${string}`;
|
|
51
|
+
v: 27 | 28;
|
|
52
|
+
};
|
|
53
|
+
vaultAddress?: `0x${string}` | undefined;
|
|
54
|
+
expiresAfter?: number | undefined;
|
|
55
|
+
}, "Borrow or lend assets.">]>;
|
|
56
|
+
export type BorrowLendRequest = v.InferOutput<typeof BorrowLendRequest>;
|
|
57
|
+
/** Successful response without specific data or error response. */
|
|
58
|
+
export declare const BorrowLendResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
59
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
|
|
60
|
+
readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
61
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
|
|
62
|
+
}, undefined>, v.DescriptionAction<{
|
|
63
|
+
type: "default";
|
|
64
|
+
}, "Response details.">]>;
|
|
65
|
+
}, undefined>, v.DescriptionAction<{
|
|
66
|
+
status: "ok";
|
|
67
|
+
response: {
|
|
68
|
+
type: "default";
|
|
69
|
+
};
|
|
70
|
+
}, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
71
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
|
|
72
|
+
readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
73
|
+
}, undefined>, v.DescriptionAction<{
|
|
74
|
+
status: "err";
|
|
75
|
+
response: string;
|
|
76
|
+
}, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
|
|
77
|
+
status: "err";
|
|
78
|
+
response: string;
|
|
79
|
+
} | {
|
|
80
|
+
status: "ok";
|
|
81
|
+
response: {
|
|
82
|
+
type: "default";
|
|
83
|
+
};
|
|
84
|
+
}, "Successful response without specific data or error response.">]>;
|
|
85
|
+
export type BorrowLendResponse = v.InferOutput<typeof BorrowLendResponse>;
|
|
86
|
+
import { type ExchangeConfig, type ExtractRequestOptions } from "./_base/execute.js";
|
|
87
|
+
import type { ExcludeErrorResponse } from "./_base/errors.js";
|
|
88
|
+
/** Schema for user-provided action parameters (excludes system fields). */
|
|
89
|
+
declare const BorrowLendParameters: Omit<v.ObjectSchema<{
|
|
90
|
+
/** Type of action. */
|
|
91
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"borrowLend", undefined>, v.DescriptionAction<"borrowLend", "Type of action.">]>;
|
|
92
|
+
/** Operation type. */
|
|
93
|
+
readonly operation: v.SchemaWithPipe<readonly [v.PicklistSchema<["supply", "withdraw", "repay", "borrow"], undefined>, v.DescriptionAction<"supply" | "withdraw" | "repay" | "borrow", "Operation type.">]>;
|
|
94
|
+
/** Token ID. */
|
|
95
|
+
readonly token: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Token ID.">]>;
|
|
96
|
+
/** Amount to supply/withdraw (null = full). */
|
|
97
|
+
readonly amount: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Amount to supply/withdraw (null = full).">]>;
|
|
98
|
+
}, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
|
|
99
|
+
readonly entries: Omit<{
|
|
100
|
+
/** Type of action. */
|
|
101
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"borrowLend", undefined>, v.DescriptionAction<"borrowLend", "Type of action.">]>;
|
|
102
|
+
/** Operation type. */
|
|
103
|
+
readonly operation: v.SchemaWithPipe<readonly [v.PicklistSchema<["supply", "withdraw", "repay", "borrow"], undefined>, v.DescriptionAction<"supply" | "withdraw" | "repay" | "borrow", "Operation type.">]>;
|
|
104
|
+
/** Token ID. */
|
|
105
|
+
readonly token: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Token ID.">]>;
|
|
106
|
+
/** Amount to supply/withdraw (null = full). */
|
|
107
|
+
readonly amount: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToStringAction<string | number, undefined>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Amount to supply/withdraw (null = full).">]>;
|
|
108
|
+
}, "type">;
|
|
109
|
+
readonly "~standard": v.StandardProps<{
|
|
110
|
+
operation: "supply" | "withdraw" | "repay" | "borrow";
|
|
111
|
+
token: string | number;
|
|
112
|
+
amount: string | number | null;
|
|
113
|
+
}, {
|
|
114
|
+
operation: "supply" | "withdraw" | "repay" | "borrow";
|
|
115
|
+
token: number;
|
|
116
|
+
amount: string | null;
|
|
117
|
+
}>;
|
|
118
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
119
|
+
operation: "supply" | "withdraw" | "repay" | "borrow";
|
|
120
|
+
token: number;
|
|
121
|
+
amount: string | null;
|
|
122
|
+
}, v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.PicklistIssue>;
|
|
123
|
+
readonly "~types"?: {
|
|
124
|
+
readonly input: {
|
|
125
|
+
operation: "supply" | "withdraw" | "repay" | "borrow";
|
|
126
|
+
token: string | number;
|
|
127
|
+
amount: string | number | null;
|
|
128
|
+
};
|
|
129
|
+
readonly output: {
|
|
130
|
+
operation: "supply" | "withdraw" | "repay" | "borrow";
|
|
131
|
+
token: number;
|
|
132
|
+
amount: string | null;
|
|
133
|
+
};
|
|
134
|
+
readonly issue: v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.PicklistIssue;
|
|
135
|
+
} | undefined;
|
|
136
|
+
};
|
|
137
|
+
/** Action parameters for the {@linkcode borrowLend} function. */
|
|
138
|
+
export type BorrowLendParameters = v.InferInput<typeof BorrowLendParameters>;
|
|
139
|
+
/** Request options for the {@linkcode borrowLend} function. */
|
|
140
|
+
export type BorrowLendOptions = ExtractRequestOptions<v.InferInput<typeof BorrowLendRequest>>;
|
|
141
|
+
/** Successful variant of {@linkcode BorrowLendResponse} without errors. */
|
|
142
|
+
export type BorrowLendSuccessResponse = ExcludeErrorResponse<BorrowLendResponse>;
|
|
143
|
+
/**
|
|
144
|
+
* Borrow or lend assets.
|
|
145
|
+
*
|
|
146
|
+
* @param config - General configuration for Exchange API requests.
|
|
147
|
+
* @param params - Parameters specific to the API request.
|
|
148
|
+
* @param opts - Request execution options.
|
|
149
|
+
*
|
|
150
|
+
* @returns Successful response without specific data.
|
|
151
|
+
*
|
|
152
|
+
* @throws {ValiError} When the request parameters fail validation (before sending).
|
|
153
|
+
* @throws {TransportError} When the transport layer throws an error.
|
|
154
|
+
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```ts
|
|
158
|
+
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
159
|
+
* import { borrowLend } from "@nktkas/hyperliquid/api/exchange";
|
|
160
|
+
* import { privateKeyToAccount } from "npm:viem/accounts";
|
|
161
|
+
*
|
|
162
|
+
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
163
|
+
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
164
|
+
*
|
|
165
|
+
* const data = await borrowLend(
|
|
166
|
+
* { transport, wallet },
|
|
167
|
+
* { operation: "supply", token: 0, amount: "20" },
|
|
168
|
+
* );
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
export declare function borrowLend(config: ExchangeConfig, params: BorrowLendParameters, opts?: BorrowLendOptions): Promise<BorrowLendSuccessResponse>;
|
|
172
|
+
export {};
|
|
173
|
+
//# sourceMappingURL=borrowLend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borrowLend.d.ts","sourceRoot":"","sources":["../../../../../src/src/api/exchange/_methods/borrowLend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B,6BAA6B;AAC7B,eAAO,MAAM,iBAAiB;IAGxB,yBAAyB;;QAGrB,sBAAsB;;QAKtB,sBAAsB;;QAKtB,gBAAgB;;QAKhB,+CAA+C;;;;;;;;IAQnD,8DAA8D;;IAK9D,kCAAkC;;;;;;;;;;;;;;IAKlC,yCAAyC;;IAKzC,qCAAqC;;;;;;;;;;;;;;;;;8BAQvC,CAAC;AACL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAExE,mEAAmE;AACnE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;oEAK3B,CAAC;AACL,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM1E,OAAO,EAAE,KAAK,cAAc,EAAmB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACtG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,2EAA2E;AAC3E,QAAA,MAAM,oBAAoB;IAlEhB,sBAAsB;;IAKtB,sBAAsB;;IAKtB,gBAAgB;;IAKhB,+CAA+C;;;;QAf/C,sBAAsB;;QAKtB,sBAAsB;;QAKtB,gBAAgB;;QAKhB,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDrD,CAAC;AACL,iEAAiE;AACjE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7E,+DAA+D;AAC/D,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAE9F,2EAA2E;AAC3E,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,oBAAoB,EAC5B,IAAI,CAAC,EAAE,iBAAiB,GACvB,OAAO,CAAC,yBAAyB,CAAC,CAGpC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// API Schemas
|
|
4
|
+
// ============================================================
|
|
5
|
+
import { Address, UnsignedDecimal, UnsignedInteger } from "../../_schemas.js";
|
|
6
|
+
import { ErrorResponse, SignatureSchema, SuccessResponse } from "./_base/commonSchemas.js";
|
|
7
|
+
/** Borrow or lend assets. */
|
|
8
|
+
export const BorrowLendRequest = /* @__PURE__ */ (() => {
|
|
9
|
+
return v.pipe(v.object({
|
|
10
|
+
/** Action to perform. */
|
|
11
|
+
action: v.pipe(v.object({
|
|
12
|
+
/** Type of action. */
|
|
13
|
+
type: v.pipe(v.literal("borrowLend"), v.description("Type of action.")),
|
|
14
|
+
/** Operation type. */
|
|
15
|
+
operation: v.pipe(v.picklist(["supply", "withdraw", "repay", "borrow"]), v.description("Operation type.")),
|
|
16
|
+
/** Token ID. */
|
|
17
|
+
token: v.pipe(UnsignedInteger, v.description("Token ID.")),
|
|
18
|
+
/** Amount to supply/withdraw (null = full). */
|
|
19
|
+
amount: v.pipe(v.nullable(UnsignedDecimal), v.description("Amount to supply/withdraw (null = full).")),
|
|
20
|
+
}), v.description("Action to perform.")),
|
|
21
|
+
/** Nonce (timestamp in ms) used to prevent replay attacks. */
|
|
22
|
+
nonce: v.pipe(UnsignedInteger, v.description("Nonce (timestamp in ms) used to prevent replay attacks.")),
|
|
23
|
+
/** ECDSA signature components. */
|
|
24
|
+
signature: v.pipe(SignatureSchema, v.description("ECDSA signature components.")),
|
|
25
|
+
/** Vault address (for vault trading). */
|
|
26
|
+
vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
|
|
27
|
+
/** Expiration time of the action. */
|
|
28
|
+
expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
|
|
29
|
+
}), v.description("Borrow or lend assets."));
|
|
30
|
+
})();
|
|
31
|
+
/** Successful response without specific data or error response. */
|
|
32
|
+
export const BorrowLendResponse = /* @__PURE__ */ (() => {
|
|
33
|
+
return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
|
|
34
|
+
})();
|
|
35
|
+
// ============================================================
|
|
36
|
+
// Execution Logic
|
|
37
|
+
// ============================================================
|
|
38
|
+
import { executeL1Action } from "./_base/execute.js";
|
|
39
|
+
/** Schema for user-provided action parameters (excludes system fields). */
|
|
40
|
+
const BorrowLendParameters = /* @__PURE__ */ (() => {
|
|
41
|
+
return v.omit(v.object(BorrowLendRequest.entries.action.entries), ["type"]);
|
|
42
|
+
})();
|
|
43
|
+
/**
|
|
44
|
+
* Borrow or lend assets.
|
|
45
|
+
*
|
|
46
|
+
* @param config - General configuration for Exchange API requests.
|
|
47
|
+
* @param params - Parameters specific to the API request.
|
|
48
|
+
* @param opts - Request execution options.
|
|
49
|
+
*
|
|
50
|
+
* @returns Successful response without specific data.
|
|
51
|
+
*
|
|
52
|
+
* @throws {ValiError} When the request parameters fail validation (before sending).
|
|
53
|
+
* @throws {TransportError} When the transport layer throws an error.
|
|
54
|
+
* @throws {ApiRequestError} When the API returns an unsuccessful response.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { HttpTransport } from "@nktkas/hyperliquid";
|
|
59
|
+
* import { borrowLend } from "@nktkas/hyperliquid/api/exchange";
|
|
60
|
+
* import { privateKeyToAccount } from "npm:viem/accounts";
|
|
61
|
+
*
|
|
62
|
+
* const wallet = privateKeyToAccount("0x..."); // viem or ethers
|
|
63
|
+
* const transport = new HttpTransport(); // or `WebSocketTransport`
|
|
64
|
+
*
|
|
65
|
+
* const data = await borrowLend(
|
|
66
|
+
* { transport, wallet },
|
|
67
|
+
* { operation: "supply", token: 0, amount: "20" },
|
|
68
|
+
* );
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export function borrowLend(config, params, opts) {
|
|
72
|
+
const action = v.parse(BorrowLendParameters, params);
|
|
73
|
+
return executeL1Action(config, { type: "borrowLend", ...action }, opts);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=borrowLend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borrowLend.js","sourceRoot":"","sources":["../../../../../src/src/api/exchange/_methods/borrowLend.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,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3F,6BAA6B;AAC7B,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACrD,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,YAAY,CAAC,EACvB,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CACjC;YACD,sBAAsB;YACtB,SAAS,EAAE,CAAC,CAAC,IAAI,CACf,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,EACrD,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CACjC;YACD,gBAAgB;YAChB,KAAK,EAAE,CAAC,CAAC,IAAI,CACX,eAAe,EACf,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAC3B;YACD,+CAA+C;YAC/C,MAAM,EAAE,CAAC,CAAC,IAAI,CACZ,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,EAC3B,CAAC,CAAC,WAAW,CAAC,0CAA0C,CAAC,CAC1D;SACF,CAAC,EACF,CAAC,CAAC,WAAW,CAAC,oBAAoB,CAAC,CACpC;QACD,8DAA8D;QAC9D,KAAK,EAAE,CAAC,CAAC,IAAI,CACX,eAAe,EACf,CAAC,CAAC,WAAW,CAAC,yDAAyD,CAAC,CACzE;QACD,kCAAkC;QAClC,SAAS,EAAE,CAAC,CAAC,IAAI,CACf,eAAe,EACf,CAAC,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAC7C;QACD,yCAAyC;QACzC,YAAY,EAAE,CAAC,CAAC,IAAI,CAClB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EACnB,CAAC,CAAC,WAAW,CAAC,oCAAoC,CAAC,CACpD;QACD,qCAAqC;QACrC,YAAY,EAAE,CAAC,CAAC,IAAI,CAClB,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,EAC3B,CAAC,CAAC,WAAW,CAAC,gCAAgC,CAAC,CAChD;KACF,CAAC,EACF,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC,CACxC,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAGL,mEAAmE;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACtD,OAAO,CAAC,CAAC,IAAI,CACX,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,EACzC,CAAC,CAAC,WAAW,CAAC,8DAA8D,CAAC,CAC9E,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAGL,+DAA+D;AAC/D,kBAAkB;AAClB,+DAA+D;AAE/D,OAAO,EAAuB,eAAe,EAA8B,MAAM,oBAAoB,CAAC;AAGtG,2EAA2E;AAC3E,MAAM,oBAAoB,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACjD,OAAO,CAAC,CAAC,IAAI,CACX,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAClD,CAAC,MAAM,CAAC,CACT,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAUL;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,UAAU,CACxB,MAAsB,EACtB,MAA4B,EAC5B,IAAwB;IAExB,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IACrD,OAAO,eAAe,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -13,9 +13,9 @@ export declare const CDepositRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
13
13
|
/** HyperLiquid network type. */
|
|
14
14
|
readonly hyperliquidChain: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["Mainnet", "Testnet"], undefined>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>;
|
|
15
15
|
/** Amount of wei to deposit into staking balance (float * 1e8). */
|
|
16
|
-
readonly wei: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Amount of wei to deposit into staking balance (float * 1e8).">]>;
|
|
16
|
+
readonly wei: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Amount of wei to deposit into staking balance (float * 1e8).">]>;
|
|
17
17
|
/** Nonce (timestamp in ms) used to prevent replay attacks. */
|
|
18
|
-
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
18
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
19
19
|
}, undefined>, v.DescriptionAction<{
|
|
20
20
|
type: "cDeposit";
|
|
21
21
|
signatureChainId: `0x${string}`;
|
|
@@ -24,7 +24,7 @@ export declare const CDepositRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
24
24
|
nonce: number;
|
|
25
25
|
}, "Action to perform.">]>;
|
|
26
26
|
/** Nonce (timestamp in ms) used to prevent replay attacks. */
|
|
27
|
-
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
27
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
28
28
|
/** ECDSA signature components. */
|
|
29
29
|
readonly signature: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
30
30
|
readonly r: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>, v.DescriptionAction<`0x${string}`, "First 32-byte component.">]>;
|
|
@@ -98,9 +98,9 @@ declare const CDepositParameters: Omit<v.ObjectSchema<{
|
|
|
98
98
|
/** HyperLiquid network type. */
|
|
99
99
|
readonly hyperliquidChain: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["Mainnet", "Testnet"], undefined>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>;
|
|
100
100
|
/** Amount of wei to deposit into staking balance (float * 1e8). */
|
|
101
|
-
readonly wei: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Amount of wei to deposit into staking balance (float * 1e8).">]>;
|
|
101
|
+
readonly wei: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Amount of wei to deposit into staking balance (float * 1e8).">]>;
|
|
102
102
|
/** Nonce (timestamp in ms) used to prevent replay attacks. */
|
|
103
|
-
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
103
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
104
104
|
}, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
|
|
105
105
|
readonly entries: Omit<{
|
|
106
106
|
/** Type of action. */
|
|
@@ -110,9 +110,9 @@ declare const CDepositParameters: Omit<v.ObjectSchema<{
|
|
|
110
110
|
/** HyperLiquid network type. */
|
|
111
111
|
readonly hyperliquidChain: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["Mainnet", "Testnet"], undefined>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>;
|
|
112
112
|
/** Amount of wei to deposit into staking balance (float * 1e8). */
|
|
113
|
-
readonly wei: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Amount of wei to deposit into staking balance (float * 1e8).">]>;
|
|
113
|
+
readonly wei: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Amount of wei to deposit into staking balance (float * 1e8).">]>;
|
|
114
114
|
/** Nonce (timestamp in ms) used to prevent replay attacks. */
|
|
115
|
-
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
115
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
116
116
|
}, "type" | "nonce" | "signatureChainId" | "hyperliquidChain">;
|
|
117
117
|
readonly "~standard": v.StandardProps<{
|
|
118
118
|
wei: string | number;
|
|
@@ -20,7 +20,7 @@ export declare const CSignerActionRequest: v.SchemaWithPipe<readonly [v.ObjectSc
|
|
|
20
20
|
unjailSelf: null;
|
|
21
21
|
}, "Action to jail or unjail the signer.">]>;
|
|
22
22
|
/** Nonce (timestamp in ms) used to prevent replay attacks. */
|
|
23
|
-
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
23
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
|
|
24
24
|
/** ECDSA signature components. */
|
|
25
25
|
readonly signature: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
26
26
|
readonly r: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>, v.DescriptionAction<`0x${string}`, "First 32-byte component.">]>;
|
|
@@ -36,7 +36,7 @@ export declare const CSignerActionRequest: v.SchemaWithPipe<readonly [v.ObjectSc
|
|
|
36
36
|
v: 27 | 28;
|
|
37
37
|
}, "ECDSA signature components.">]>;
|
|
38
38
|
/** Expiration time of the action. */
|
|
39
|
-
readonly expiresAfter: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Expiration time of the action.">]>;
|
|
39
|
+
readonly expiresAfter: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Expiration time of the action.">]>;
|
|
40
40
|
}, undefined>, v.DescriptionAction<{
|
|
41
41
|
action: {
|
|
42
42
|
type: "CSignerAction";
|