@nadohq/shared 0.14.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BigNumbers-CM-lXODL.d.ts +10 -0
- package/dist/BigNumbers-CM-lXODL.d.ts.map +1 -0
- package/dist/BigNumbers-CZl--in2.d.cts +10 -0
- package/dist/BigNumbers-CZl--in2.d.cts.map +1 -0
- package/dist/ChainEnv-C_iC1v8V.d.cts +9 -0
- package/dist/ChainEnv-C_iC1v8V.d.cts.map +1 -0
- package/dist/ChainEnv-CxBY-mBv.d.ts +9 -0
- package/dist/ChainEnv-CxBY-mBv.d.ts.map +1 -0
- package/dist/Clearinghouse-BSEaz5pq.d.cts +671 -0
- package/dist/Clearinghouse-BSEaz5pq.d.cts.map +1 -0
- package/dist/Clearinghouse-DnDIOiNH.d.ts +671 -0
- package/dist/Clearinghouse-DnDIOiNH.d.ts.map +1 -0
- package/dist/ERC20-B7MWgTx9.d.cts +145 -0
- package/dist/ERC20-B7MWgTx9.d.cts.map +1 -0
- package/dist/ERC20-D1Ys4UR9.d.ts +145 -0
- package/dist/ERC20-D1Ys4UR9.d.ts.map +1 -0
- package/dist/Endpoint-CDL8LY0g.d.ts +435 -0
- package/dist/Endpoint-CDL8LY0g.d.ts.map +1 -0
- package/dist/Endpoint-CKPE7OC6.d.cts +435 -0
- package/dist/Endpoint-CKPE7OC6.d.cts.map +1 -0
- package/dist/MockERC20-Dvjx8zWd.d.ts +241 -0
- package/dist/MockERC20-Dvjx8zWd.d.ts.map +1 -0
- package/dist/MockERC20-H_LdnMKX.d.cts +241 -0
- package/dist/MockERC20-H_LdnMKX.d.cts.map +1 -0
- package/dist/OrderExecutionType-BCH5Wop4.d.ts +12 -0
- package/dist/OrderExecutionType-BCH5Wop4.d.ts.map +1 -0
- package/dist/OrderExecutionType-gZHBzTTF.d.cts +12 -0
- package/dist/OrderExecutionType-gZHBzTTF.d.cts.map +1 -0
- package/dist/PerpEngine-BnN-Yxzr.d.cts +663 -0
- package/dist/PerpEngine-BnN-Yxzr.d.cts.map +1 -0
- package/dist/PerpEngine-S4CxsOLz.d.ts +663 -0
- package/dist/PerpEngine-S4CxsOLz.d.ts.map +1 -0
- package/dist/Querier-CEz3AkR5.d.cts +1151 -0
- package/dist/Querier-CEz3AkR5.d.cts.map +1 -0
- package/dist/Querier-ktPkIit7.d.ts +1151 -0
- package/dist/Querier-ktPkIit7.d.ts.map +1 -0
- package/dist/SpotEngine-CxCXv_mh.d.ts +703 -0
- package/dist/SpotEngine-CxCXv_mh.d.ts.map +1 -0
- package/dist/SpotEngine-DICQOt6X.d.cts +703 -0
- package/dist/SpotEngine-DICQOt6X.d.cts.map +1 -0
- package/dist/WalletNotProvidedError-B7hy83Dp.d.ts +7 -0
- package/dist/WalletNotProvidedError-B7hy83Dp.d.ts.map +1 -0
- package/dist/WalletNotProvidedError-BFEw-O_V.d.cts +7 -0
- package/dist/WalletNotProvidedError-BFEw-O_V.d.cts.map +1 -0
- package/dist/WithdrawPool-BFEPzU-O.d.cts +216 -0
- package/dist/WithdrawPool-BFEPzU-O.d.cts.map +1 -0
- package/dist/WithdrawPool-BwxqwHtJ.d.ts +216 -0
- package/dist/WithdrawPool-BwxqwHtJ.d.ts.map +1 -0
- package/dist/abis/Clearinghouse.cjs +784 -889
- package/dist/abis/Clearinghouse.cjs.map +1 -1
- package/dist/abis/Clearinghouse.d.cts +2 -669
- package/dist/abis/Clearinghouse.d.ts +2 -669
- package/dist/abis/Clearinghouse.js +783 -866
- package/dist/abis/Clearinghouse.js.map +1 -1
- package/dist/abis/ERC20.cjs +166 -213
- package/dist/abis/ERC20.cjs.map +1 -1
- package/dist/abis/ERC20.d.cts +2 -143
- package/dist/abis/ERC20.d.ts +2 -143
- package/dist/abis/ERC20.js +165 -190
- package/dist/abis/ERC20.js.map +1 -1
- package/dist/abis/Endpoint.cjs +513 -587
- package/dist/abis/Endpoint.cjs.map +1 -1
- package/dist/abis/Endpoint.d.cts +2 -433
- package/dist/abis/Endpoint.d.ts +2 -433
- package/dist/abis/Endpoint.js +512 -564
- package/dist/abis/Endpoint.js.map +1 -1
- package/dist/abis/MockERC20.cjs +273 -339
- package/dist/abis/MockERC20.cjs.map +1 -1
- package/dist/abis/MockERC20.d.cts +2 -239
- package/dist/abis/MockERC20.d.ts +2 -239
- package/dist/abis/MockERC20.js +272 -316
- package/dist/abis/MockERC20.js.map +1 -1
- package/dist/abis/PerpEngine.cjs +778 -884
- package/dist/abis/PerpEngine.cjs.map +1 -1
- package/dist/abis/PerpEngine.d.cts +2 -661
- package/dist/abis/PerpEngine.d.ts +2 -661
- package/dist/abis/PerpEngine.js +777 -861
- package/dist/abis/PerpEngine.js.map +1 -1
- package/dist/abis/Querier.cjs +1415 -1520
- package/dist/abis/Querier.cjs.map +1 -1
- package/dist/abis/Querier.d.cts +2 -1149
- package/dist/abis/Querier.d.ts +2 -1149
- package/dist/abis/Querier.js +1414 -1497
- package/dist/abis/Querier.js.map +1 -1
- package/dist/abis/SpotEngine.cjs +819 -935
- package/dist/abis/SpotEngine.cjs.map +1 -1
- package/dist/abis/SpotEngine.d.cts +2 -701
- package/dist/abis/SpotEngine.d.ts +2 -701
- package/dist/abis/SpotEngine.js +818 -912
- package/dist/abis/SpotEngine.js.map +1 -1
- package/dist/abis/WithdrawPool.cjs +249 -305
- package/dist/abis/WithdrawPool.cjs.map +1 -1
- package/dist/abis/WithdrawPool.d.cts +2 -214
- package/dist/abis/WithdrawPool.d.ts +2 -214
- package/dist/abis/WithdrawPool.js +248 -282
- package/dist/abis/WithdrawPool.js.map +1 -1
- package/dist/abis/index.cjs +19 -41
- package/dist/abis/index.d.cts +10 -9
- package/dist/abis/index.d.ts +10 -9
- package/dist/abis/index.js +10 -11
- package/dist/abis/nadoAbis.cjs +17 -41
- package/dist/abis/nadoAbis.cjs.map +1 -1
- package/dist/abis/nadoAbis.d.cts +2 -3821
- package/dist/abis/nadoAbis.d.ts +2 -3821
- package/dist/abis/nadoAbis.js +11 -13
- package/dist/abis/nadoAbis.js.map +1 -1
- package/dist/appendixTwapValue-2e-BBSSp.d.cts +31 -0
- package/dist/appendixTwapValue-2e-BBSSp.d.cts.map +1 -0
- package/dist/appendixTwapValue-D5Fv_hF5.d.ts +31 -0
- package/dist/appendixTwapValue-D5Fv_hF5.d.ts.map +1 -0
- package/dist/approveDepositAllowance-Dc7stdrU.d.ts +20 -0
- package/dist/approveDepositAllowance-Dc7stdrU.d.ts.map +1 -0
- package/dist/approveDepositAllowance-DzLfrUa1.d.cts +20 -0
- package/dist/approveDepositAllowance-DzLfrUa1.d.cts.map +1 -0
- package/dist/asyncResult-Cs02Ws6J.d.ts +6 -0
- package/dist/asyncResult-Cs02Ws6J.d.ts.map +1 -0
- package/dist/asyncResult-D-rEUypp.d.cts +6 -0
- package/dist/asyncResult-D-rEUypp.d.cts.map +1 -0
- package/dist/balanceTypes-BLk1F6NY.d.ts +40 -0
- package/dist/balanceTypes-BLk1F6NY.d.ts.map +1 -0
- package/dist/balanceTypes-DdDBwUwZ.d.cts +40 -0
- package/dist/balanceTypes-DdDBwUwZ.d.cts.map +1 -0
- package/dist/balanceValue-BHDw2fCR.d.cts +25 -0
- package/dist/balanceValue-BHDw2fCR.d.cts.map +1 -0
- package/dist/balanceValue-mNCg2O57.d.ts +25 -0
- package/dist/balanceValue-mNCg2O57.d.ts.map +1 -0
- package/dist/bigNumber-BLE4n-ku.d.ts +19 -0
- package/dist/bigNumber-BLE4n-ku.d.ts.map +1 -0
- package/dist/bigNumber-DX0JX9bQ.d.cts +19 -0
- package/dist/bigNumber-DX0JX9bQ.d.cts.map +1 -0
- package/dist/bitMaskValue-CWv12B9a.d.cts +12 -0
- package/dist/bitMaskValue-CWv12B9a.d.cts.map +1 -0
- package/dist/bitMaskValue-rhaIF9Xj.d.ts +12 -0
- package/dist/bitMaskValue-rhaIF9Xj.d.ts.map +1 -0
- package/dist/bytes-Bv66A6U8.d.ts +5 -0
- package/dist/bytes-Bv66A6U8.d.ts.map +1 -0
- package/dist/bytes-DAhqCt_o.d.cts +5 -0
- package/dist/bytes-DAhqCt_o.d.cts.map +1 -0
- package/dist/bytes32-CE-v0SzM.d.cts +49 -0
- package/dist/bytes32-CE-v0SzM.d.cts.map +1 -0
- package/dist/bytes32-gz7vDEim.d.ts +49 -0
- package/dist/bytes32-gz7vDEim.d.ts.map +1 -0
- package/dist/chainEnvToChain-B7RbZcmd.d.cts +696 -0
- package/dist/chainEnvToChain-B7RbZcmd.d.cts.map +1 -0
- package/dist/chainEnvToChain-C9Uw2moR.d.ts +696 -0
- package/dist/chainEnvToChain-C9Uw2moR.d.ts.map +1 -0
- package/dist/chunk-CKQMccvm.cjs +28 -0
- package/dist/clamp-B7YSY8XJ.d.cts +17 -0
- package/dist/clamp-B7YSY8XJ.d.cts.map +1 -0
- package/dist/clamp-CWW-gFbE.d.ts +17 -0
- package/dist/clamp-CWW-gFbE.d.ts.map +1 -0
- package/dist/consts/chainEnvToChain.cjs +12 -41
- package/dist/consts/chainEnvToChain.cjs.map +1 -1
- package/dist/consts/chainEnvToChain.d.cts +2 -684
- package/dist/consts/chainEnvToChain.d.ts +2 -684
- package/dist/consts/chainEnvToChain.js +9 -17
- package/dist/consts/chainEnvToChain.js.map +1 -1
- package/dist/consts/index.cjs +7 -27
- package/dist/consts/index.d.cts +3 -6
- package/dist/consts/index.d.ts +3 -6
- package/dist/consts/index.js +3 -4
- package/dist/consts/productIds.cjs +7 -32
- package/dist/consts/productIds.cjs.map +1 -1
- package/dist/consts/productIds.d.cts +2 -4
- package/dist/consts/productIds.d.ts +2 -4
- package/dist/consts/productIds.js +5 -8
- package/dist/consts/productIds.js.map +1 -1
- package/dist/createDeterministicLinkedSignerPrivateKey-C2v9BK5R.d.cts +20 -0
- package/dist/createDeterministicLinkedSignerPrivateKey-C2v9BK5R.d.cts.map +1 -0
- package/dist/createDeterministicLinkedSignerPrivateKey-XciG6RLh.d.ts +20 -0
- package/dist/createDeterministicLinkedSignerPrivateKey-XciG6RLh.d.ts.map +1 -0
- package/dist/decimalAdjustment-1vhO65Zz.d.ts +33 -0
- package/dist/decimalAdjustment-1vhO65Zz.d.ts.map +1 -0
- package/dist/decimalAdjustment-CMqU3rNy.d.cts +33 -0
- package/dist/decimalAdjustment-CMqU3rNy.d.cts.map +1 -0
- package/dist/deployments/index.cjs +3 -65
- package/dist/deployments/index.d.cts +8 -8
- package/dist/deployments/index.d.cts.map +1 -0
- package/dist/deployments/index.d.ts +8 -8
- package/dist/deployments/index.d.ts.map +1 -0
- package/dist/deployments/index.js +2 -32
- package/dist/deployments-Nr4Pqn99.cjs +79 -0
- package/dist/deployments-Nr4Pqn99.cjs.map +1 -0
- package/dist/deployments-ZEtLr8Dz.js +74 -0
- package/dist/deployments-ZEtLr8Dz.js.map +1 -0
- package/dist/depositCollateral-476kzs4N.d.ts +24 -0
- package/dist/depositCollateral-476kzs4N.d.ts.map +1 -0
- package/dist/depositCollateral-CmEXlJQs.d.cts +24 -0
- package/dist/depositCollateral-CmEXlJQs.d.cts.map +1 -0
- package/dist/eip712/eip712ValueTypes.cjs +0 -19
- package/dist/eip712/eip712ValueTypes.d.cts +2 -50
- package/dist/eip712/eip712ValueTypes.d.ts +2 -50
- package/dist/eip712/eip712ValueTypes.js +1 -1
- package/dist/eip712/getNadoEIP712Domain.cjs +18 -36
- package/dist/eip712/getNadoEIP712Domain.cjs.map +1 -1
- package/dist/eip712/getNadoEIP712Domain.d.cts +2 -11
- package/dist/eip712/getNadoEIP712Domain.d.ts +2 -11
- package/dist/eip712/getNadoEIP712Domain.js +16 -12
- package/dist/eip712/getNadoEIP712Domain.js.map +1 -1
- package/dist/eip712/getNadoEIP712PrimaryType.cjs +13 -32
- package/dist/eip712/getNadoEIP712PrimaryType.cjs.map +1 -1
- package/dist/eip712/getNadoEIP712PrimaryType.d.cts +2 -16
- package/dist/eip712/getNadoEIP712PrimaryType.d.ts +2 -16
- package/dist/eip712/getNadoEIP712PrimaryType.js +11 -8
- package/dist/eip712/getNadoEIP712PrimaryType.js.map +1 -1
- package/dist/eip712/getNadoEIP712Types.cjs +209 -135
- package/dist/eip712/getNadoEIP712Types.cjs.map +1 -1
- package/dist/eip712/getNadoEIP712Types.d.cts +2 -20
- package/dist/eip712/getNadoEIP712Types.d.ts +2 -20
- package/dist/eip712/getNadoEIP712Types.js +208 -112
- package/dist/eip712/getNadoEIP712Types.js.map +1 -1
- package/dist/eip712/getNadoEIP712Values.cjs +167 -195
- package/dist/eip712/getNadoEIP712Values.cjs.map +1 -1
- package/dist/eip712/getNadoEIP712Values.d.cts +2 -20
- package/dist/eip712/getNadoEIP712Values.d.ts +2 -20
- package/dist/eip712/getNadoEIP712Values.js +165 -171
- package/dist/eip712/getNadoEIP712Values.js.map +1 -1
- package/dist/eip712/getOrderVerifyingAddress.cjs +12 -31
- package/dist/eip712/getOrderVerifyingAddress.cjs.map +1 -1
- package/dist/eip712/getOrderVerifyingAddress.d.cts +2 -9
- package/dist/eip712/getOrderVerifyingAddress.d.ts +2 -9
- package/dist/eip712/getOrderVerifyingAddress.js +9 -7
- package/dist/eip712/getOrderVerifyingAddress.js.map +1 -1
- package/dist/eip712/getSignedTransactionRequest.cjs +15 -39
- package/dist/eip712/getSignedTransactionRequest.cjs.map +1 -1
- package/dist/eip712/getSignedTransactionRequest.d.cts +2 -19
- package/dist/eip712/getSignedTransactionRequest.d.ts +2 -19
- package/dist/eip712/getSignedTransactionRequest.js +11 -13
- package/dist/eip712/getSignedTransactionRequest.js.map +1 -1
- package/dist/eip712/index.cjs +15 -43
- package/dist/eip712/index.d.cts +11 -17
- package/dist/eip712/index.d.ts +11 -17
- package/dist/eip712/index.js +8 -12
- package/dist/eip712/orderDigest.cjs +24 -42
- package/dist/eip712/orderDigest.cjs.map +1 -1
- package/dist/eip712/orderDigest.d.cts +2 -20
- package/dist/eip712/orderDigest.d.ts +2 -20
- package/dist/eip712/orderDigest.js +18 -15
- package/dist/eip712/orderDigest.js.map +1 -1
- package/dist/eip712/signableRequestType.cjs +0 -19
- package/dist/eip712/signableRequestType.d.cts +2 -27
- package/dist/eip712/signableRequestType.d.ts +2 -27
- package/dist/eip712/signableRequestType.js +1 -1
- package/dist/eip712/signatureParamTypes.cjs +0 -19
- package/dist/eip712/signatureParamTypes.d.cts +2 -73
- package/dist/eip712/signatureParamTypes.d.ts +2 -73
- package/dist/eip712/signatureParamTypes.js +1 -1
- package/dist/eip712ValueTypes-DUvhlJpT.d.ts +49 -0
- package/dist/eip712ValueTypes-DUvhlJpT.d.ts.map +1 -0
- package/dist/eip712ValueTypes-WH3jtsab.d.cts +49 -0
- package/dist/eip712ValueTypes-WH3jtsab.d.cts.map +1 -0
- package/dist/encoding/encoding.cjs +46 -87
- package/dist/encoding/encoding.cjs.map +1 -1
- package/dist/encoding/encoding.d.cts +2 -35
- package/dist/encoding/encoding.d.ts +2 -35
- package/dist/encoding/encoding.js +41 -65
- package/dist/encoding/encoding.js.map +1 -1
- package/dist/encoding/index.cjs +6 -25
- package/dist/encoding/index.d.cts +2 -7
- package/dist/encoding/index.d.ts +2 -7
- package/dist/encoding/index.js +2 -3
- package/dist/encoding-COa5q5x1.d.cts +33 -0
- package/dist/encoding-COa5q5x1.d.cts.map +1 -0
- package/dist/encoding-Cxt77WO_.d.ts +33 -0
- package/dist/encoding-Cxt77WO_.d.ts.map +1 -0
- package/dist/execute/approveDepositAllowance.cjs +11 -36
- package/dist/execute/approveDepositAllowance.cjs.map +1 -1
- package/dist/execute/approveDepositAllowance.d.cts +2 -18
- package/dist/execute/approveDepositAllowance.d.ts +2 -18
- package/dist/execute/approveDepositAllowance.js +10 -13
- package/dist/execute/approveDepositAllowance.js.map +1 -1
- package/dist/execute/depositCollateral.cjs +27 -57
- package/dist/execute/depositCollateral.cjs.map +1 -1
- package/dist/execute/depositCollateral.d.cts +2 -21
- package/dist/execute/depositCollateral.d.ts +2 -21
- package/dist/execute/depositCollateral.js +24 -33
- package/dist/execute/depositCollateral.js.map +1 -1
- package/dist/execute/index.cjs +5 -27
- package/dist/execute/index.d.cts +3 -9
- package/dist/execute/index.d.ts +3 -9
- package/dist/execute/index.js +3 -4
- package/dist/getNadoEIP712Domain-CSV6Zxuw.d.ts +13 -0
- package/dist/getNadoEIP712Domain-CSV6Zxuw.d.ts.map +1 -0
- package/dist/getNadoEIP712Domain-iDIuXsMf.d.cts +13 -0
- package/dist/getNadoEIP712Domain-iDIuXsMf.d.cts.map +1 -0
- package/dist/getNadoEIP712PrimaryType-06Sfytq4.d.ts +12 -0
- package/dist/getNadoEIP712PrimaryType-06Sfytq4.d.ts.map +1 -0
- package/dist/getNadoEIP712PrimaryType-DyOGHC2S.d.cts +12 -0
- package/dist/getNadoEIP712PrimaryType-DyOGHC2S.d.cts.map +1 -0
- package/dist/getNadoEIP712Types-mK6qHv4z.d.cts +16 -0
- package/dist/getNadoEIP712Types-mK6qHv4z.d.cts.map +1 -0
- package/dist/getNadoEIP712Types-mvpnvnQN.d.ts +16 -0
- package/dist/getNadoEIP712Types-mvpnvnQN.d.ts.map +1 -0
- package/dist/getNadoEIP712Values-CIQ84bij.d.ts +16 -0
- package/dist/getNadoEIP712Values-CIQ84bij.d.ts.map +1 -0
- package/dist/getNadoEIP712Values-DcBLDRmy.d.cts +16 -0
- package/dist/getNadoEIP712Values-DcBLDRmy.d.cts.map +1 -0
- package/dist/getOrderVerifyingAddress-BygcgBA1.d.ts +11 -0
- package/dist/getOrderVerifyingAddress-BygcgBA1.d.ts.map +1 -0
- package/dist/getOrderVerifyingAddress-CHRCQ8AZ.d.cts +11 -0
- package/dist/getOrderVerifyingAddress-CHRCQ8AZ.d.cts.map +1 -0
- package/dist/getSignedTransactionRequest-BJVBUKpD.d.cts +15 -0
- package/dist/getSignedTransactionRequest-BJVBUKpD.d.cts.map +1 -0
- package/dist/getSignedTransactionRequest-GAXb1D7h.d.ts +15 -0
- package/dist/getSignedTransactionRequest-GAXb1D7h.d.ts.map +1 -0
- package/dist/getValidatedAddress-BQJEkmbN.d.cts +11 -0
- package/dist/getValidatedAddress-BQJEkmbN.d.cts.map +1 -0
- package/dist/getValidatedAddress-BmCqRBeh.d.ts +11 -0
- package/dist/getValidatedAddress-BmCqRBeh.d.ts.map +1 -0
- package/dist/getValidatedHex-DuwBnuEB.d.ts +11 -0
- package/dist/getValidatedHex-DuwBnuEB.d.ts.map +1 -0
- package/dist/getValidatedHex-PXNPR4pI.d.cts +11 -0
- package/dist/getValidatedHex-PXNPR4pI.d.cts.map +1 -0
- package/dist/healthTypes-D_CkTy9b.d.ts +17 -0
- package/dist/healthTypes-D_CkTy9b.d.ts.map +1 -0
- package/dist/healthTypes-rZq7PTC8.d.cts +17 -0
- package/dist/healthTypes-rZq7PTC8.d.cts.map +1 -0
- package/dist/index-B1btZMWF.d.ts +1 -0
- package/dist/index-BCsiC0tv.d.cts +1 -0
- package/dist/index-BVJyZlmP2.d.cts +1 -0
- package/dist/index-Ba3GYDF9.d.ts +1 -0
- package/dist/index-Bq2ftOXk2.d.cts +1 -0
- package/dist/index-Br3qA4B52.d.ts +1 -0
- package/dist/index-C9nY9t1j.d.ts +1 -0
- package/dist/index-CB5PSF-Q.d.ts +1 -0
- package/dist/index-CHmsNSsb.d.ts +1 -0
- package/dist/index-CI4LJief.d.ts +1 -0
- package/dist/index-CQ25UCod.d.cts +1 -0
- package/dist/index-D4eheNJJ.d.cts +1 -0
- package/dist/index-D6CnpA_r.d.cts +1 -0
- package/dist/index-ZFCPoV_B2.d.ts +1 -0
- package/dist/index-_1bfRgi2.d.cts +1 -0
- package/dist/index-zO0Ly4bS.d.cts +1 -0
- package/dist/index.cjs +137 -39
- package/dist/index.d.cts +64 -67
- package/dist/index.d.ts +64 -67
- package/dist/index.js +57 -10
- package/dist/interest-CUXHxrel.d.ts +52 -0
- package/dist/interest-CUXHxrel.d.ts.map +1 -0
- package/dist/interest-DRpagIcs.d.cts +52 -0
- package/dist/interest-DRpagIcs.d.cts.map +1 -0
- package/dist/isWriteableContract-DcM3nqdX.d.ts +8 -0
- package/dist/isWriteableContract-DcM3nqdX.d.ts.map +1 -0
- package/dist/isWriteableContract-ZGxc9VmC.d.cts +8 -0
- package/dist/isWriteableContract-ZGxc9VmC.d.cts.map +1 -0
- package/dist/mapValues-cO_NBiCx.d.ts +9 -0
- package/dist/mapValues-cO_NBiCx.d.ts.map +1 -0
- package/dist/mapValues-jlfbJybF.d.cts +9 -0
- package/dist/mapValues-jlfbJybF.d.cts.map +1 -0
- package/dist/marketTypes-BSevYB-h.d.cts +33 -0
- package/dist/marketTypes-BSevYB-h.d.cts.map +1 -0
- package/dist/marketTypes-C37HnBB7.d.ts +33 -0
- package/dist/marketTypes-C37HnBB7.d.ts.map +1 -0
- package/dist/nadoAbis-DR-8nVpe.d.ts +3823 -0
- package/dist/nadoAbis-DR-8nVpe.d.ts.map +1 -0
- package/dist/nadoAbis-m_V_D5Iu.d.cts +3823 -0
- package/dist/nadoAbis-m_V_D5Iu.d.cts.map +1 -0
- package/dist/nadoContractTypes-Cp3kD2DC.d.cts +13 -0
- package/dist/nadoContractTypes-Cp3kD2DC.d.cts.map +1 -0
- package/dist/nadoContractTypes-PWzd6_3s.d.ts +13 -0
- package/dist/nadoContractTypes-PWzd6_3s.d.ts.map +1 -0
- package/dist/orderAppendixTypes-5NqkTOxO.d.ts +79 -0
- package/dist/orderAppendixTypes-5NqkTOxO.d.ts.map +1 -0
- package/dist/orderAppendixTypes-CM-eb5WL.d.cts +79 -0
- package/dist/orderAppendixTypes-CM-eb5WL.d.cts.map +1 -0
- package/dist/orderDigest-DzYNH958.d.ts +17 -0
- package/dist/orderDigest-DzYNH958.d.ts.map +1 -0
- package/dist/orderDigest-aIOz0KyI.d.cts +17 -0
- package/dist/orderDigest-aIOz0KyI.d.cts.map +1 -0
- package/dist/orderNonce-BgvYpe4l.d.ts +16 -0
- package/dist/orderNonce-BgvYpe4l.d.ts.map +1 -0
- package/dist/orderNonce-p8m6ZrSd.d.cts +16 -0
- package/dist/orderNonce-p8m6ZrSd.d.cts.map +1 -0
- package/dist/packOrderAppendix-BokzjU2O.d.ts +11 -0
- package/dist/packOrderAppendix-BokzjU2O.d.ts.map +1 -0
- package/dist/packOrderAppendix-DJlhe5P5.d.cts +11 -0
- package/dist/packOrderAppendix-DJlhe5P5.d.cts.map +1 -0
- package/dist/productIds-CCewi4tC.d.ts +6 -0
- package/dist/productIds-CCewi4tC.d.ts.map +1 -0
- package/dist/productIds-COuWMJat.d.cts +6 -0
- package/dist/productIds-COuWMJat.d.cts.map +1 -0
- package/dist/productTypeFilter-B0oL5G_q.d.ts +11 -0
- package/dist/productTypeFilter-B0oL5G_q.d.ts.map +1 -0
- package/dist/productTypeFilter-B6CoWHmB.d.cts +11 -0
- package/dist/productTypeFilter-B6CoWHmB.d.cts.map +1 -0
- package/dist/productTypes-B7T8OB24.d.ts +57 -0
- package/dist/productTypes-B7T8OB24.d.ts.map +1 -0
- package/dist/productTypes-COwl-Svz.d.cts +57 -0
- package/dist/productTypes-COwl-Svz.d.cts.map +1 -0
- package/dist/recvTime-C6ulZVuR.d.ts +11 -0
- package/dist/recvTime-C6ulZVuR.d.ts.map +1 -0
- package/dist/recvTime-lSkRnXFh.d.cts +11 -0
- package/dist/recvTime-lSkRnXFh.d.cts.map +1 -0
- package/dist/signableRequestType-AQGiKX97.d.cts +24 -0
- package/dist/signableRequestType-AQGiKX97.d.cts.map +1 -0
- package/dist/signableRequestType-B69C0QQm.d.ts +24 -0
- package/dist/signableRequestType-B69C0QQm.d.ts.map +1 -0
- package/dist/signatureParamTypes-BEG1v7Qn.d.cts +73 -0
- package/dist/signatureParamTypes-BEG1v7Qn.d.cts.map +1 -0
- package/dist/signatureParamTypes-ByiLhbva.d.ts +73 -0
- package/dist/signatureParamTypes-ByiLhbva.d.ts.map +1 -0
- package/dist/subaccountTypes-BGE4tJKb.d.cts +15 -0
- package/dist/subaccountTypes-BGE4tJKb.d.cts.map +1 -0
- package/dist/subaccountTypes-FoLRswIa.d.ts +15 -0
- package/dist/subaccountTypes-FoLRswIa.d.ts.map +1 -0
- package/dist/sumBigNumberBy-BWQ-bPpk.d.cts +12 -0
- package/dist/sumBigNumberBy-BWQ-bPpk.d.cts.map +1 -0
- package/dist/sumBigNumberBy-wVwOxwyc.d.ts +12 -0
- package/dist/sumBigNumberBy-wVwOxwyc.d.ts.map +1 -0
- package/dist/time-BpZLFNOC.d.ts +19 -0
- package/dist/time-BpZLFNOC.d.ts.map +1 -0
- package/dist/time-D6SSEenZ.d.cts +19 -0
- package/dist/time-D6SSEenZ.d.cts.map +1 -0
- package/dist/toBigInt-PqI3ILSN.d.ts +12 -0
- package/dist/toBigInt-PqI3ILSN.d.ts.map +1 -0
- package/dist/toBigInt-cEajjeFa.d.cts +12 -0
- package/dist/toBigInt-cEajjeFa.d.cts.map +1 -0
- package/dist/toIntegerString-CHveFt3s.d.cts +12 -0
- package/dist/toIntegerString-CHveFt3s.d.cts.map +1 -0
- package/dist/toIntegerString-sATPFuxt.d.ts +12 -0
- package/dist/toIntegerString-sATPFuxt.d.ts.map +1 -0
- package/dist/toPrintableObject-CwWr2voJ.d.cts +13 -0
- package/dist/toPrintableObject-CwWr2voJ.d.cts.map +1 -0
- package/dist/toPrintableObject-kBzCvR0Y.d.ts +13 -0
- package/dist/toPrintableObject-kBzCvR0Y.d.ts.map +1 -0
- package/dist/types/ChainEnv.cjs +15 -42
- package/dist/types/ChainEnv.cjs.map +1 -1
- package/dist/types/ChainEnv.d.cts +2 -7
- package/dist/types/ChainEnv.d.ts +2 -7
- package/dist/types/ChainEnv.js +11 -16
- package/dist/types/ChainEnv.js.map +1 -1
- package/dist/types/OrderExecutionType.cjs +0 -19
- package/dist/types/OrderExecutionType.d.cts +2 -10
- package/dist/types/OrderExecutionType.d.ts +2 -10
- package/dist/types/OrderExecutionType.js +1 -1
- package/dist/types/balanceTypes.cjs +0 -19
- package/dist/types/balanceTypes.d.cts +2 -38
- package/dist/types/balanceTypes.d.ts +2 -38
- package/dist/types/balanceTypes.js +1 -1
- package/dist/types/bytes.cjs +0 -19
- package/dist/types/bytes.d.cts +2 -3
- package/dist/types/bytes.d.ts +2 -3
- package/dist/types/bytes.js +1 -1
- package/dist/types/healthTypes.cjs +0 -19
- package/dist/types/healthTypes.d.cts +2 -15
- package/dist/types/healthTypes.d.ts +2 -15
- package/dist/types/healthTypes.js +1 -1
- package/dist/types/index.cjs +9 -45
- package/dist/types/index.d.cts +12 -15
- package/dist/types/index.d.ts +12 -15
- package/dist/types/index.js +3 -13
- package/dist/types/marketTypes.cjs +0 -19
- package/dist/types/marketTypes.d.cts +2 -31
- package/dist/types/marketTypes.d.ts +2 -31
- package/dist/types/marketTypes.js +1 -1
- package/dist/types/nadoContractTypes.cjs +0 -19
- package/dist/types/nadoContractTypes.d.cts +2 -14
- package/dist/types/nadoContractTypes.d.ts +2 -14
- package/dist/types/nadoContractTypes.js +1 -1
- package/dist/types/orderAppendixTypes.cjs +0 -19
- package/dist/types/orderAppendixTypes.d.cts +2 -78
- package/dist/types/orderAppendixTypes.d.ts +2 -78
- package/dist/types/orderAppendixTypes.js +1 -1
- package/dist/types/productTypes.cjs +24 -44
- package/dist/types/productTypes.cjs.map +1 -1
- package/dist/types/productTypes.d.cts +2 -55
- package/dist/types/productTypes.d.ts +2 -55
- package/dist/types/productTypes.js +22 -20
- package/dist/types/productTypes.js.map +1 -1
- package/dist/types/subaccountTypes.cjs +0 -19
- package/dist/types/subaccountTypes.d.cts +2 -13
- package/dist/types/subaccountTypes.d.ts +2 -13
- package/dist/types/subaccountTypes.js +1 -1
- package/dist/types/viemTypes.cjs +0 -19
- package/dist/types/viemTypes.d.cts +2 -23
- package/dist/types/viemTypes.d.ts +2 -23
- package/dist/types/viemTypes.js +1 -1
- package/dist/types-BdV1zhbS.d.cts +23 -0
- package/dist/types-BdV1zhbS.d.cts.map +1 -0
- package/dist/types-Cqqkhcva.d.ts +23 -0
- package/dist/types-Cqqkhcva.d.ts.map +1 -0
- package/dist/unpackOrderAppendix-Dx0MDs4V.d.ts +12 -0
- package/dist/unpackOrderAppendix-Dx0MDs4V.d.ts.map +1 -0
- package/dist/unpackOrderAppendix-E8HT7dKm.d.cts +12 -0
- package/dist/unpackOrderAppendix-E8HT7dKm.d.cts.map +1 -0
- package/dist/utils/asyncResult.cjs +6 -33
- package/dist/utils/asyncResult.cjs.map +1 -1
- package/dist/utils/asyncResult.d.cts +2 -4
- package/dist/utils/asyncResult.d.ts +2 -4
- package/dist/utils/asyncResult.js +5 -10
- package/dist/utils/asyncResult.js.map +1 -1
- package/dist/utils/balanceValue.cjs +25 -36
- package/dist/utils/balanceValue.cjs.map +1 -1
- package/dist/utils/balanceValue.d.cts +2 -25
- package/dist/utils/balanceValue.d.ts +2 -25
- package/dist/utils/balanceValue.js +22 -11
- package/dist/utils/balanceValue.js.map +1 -1
- package/dist/utils/bytes32.cjs +69 -79
- package/dist/utils/bytes32.cjs.map +1 -1
- package/dist/utils/bytes32.d.cts +2 -47
- package/dist/utils/bytes32.d.ts +2 -47
- package/dist/utils/bytes32.js +61 -50
- package/dist/utils/bytes32.js.map +1 -1
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.cjs +29 -53
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.cjs.map +1 -1
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.d.cts +2 -20
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.d.ts +2 -20
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.js +25 -28
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.js.map +1 -1
- package/dist/utils/errors/WalletNotProvidedError.cjs +9 -33
- package/dist/utils/errors/WalletNotProvidedError.cjs.map +1 -1
- package/dist/utils/errors/WalletNotProvidedError.d.cts +2 -5
- package/dist/utils/errors/WalletNotProvidedError.d.ts +2 -5
- package/dist/utils/errors/WalletNotProvidedError.js +8 -10
- package/dist/utils/errors/WalletNotProvidedError.js.map +1 -1
- package/dist/utils/errors/index.cjs +3 -25
- package/dist/utils/errors/index.d.cts +2 -1
- package/dist/utils/errors/index.d.ts +2 -1
- package/dist/utils/errors/index.js +2 -3
- package/dist/utils/getValidatedAddress.cjs +13 -34
- package/dist/utils/getValidatedAddress.cjs.map +1 -1
- package/dist/utils/getValidatedAddress.d.cts +2 -9
- package/dist/utils/getValidatedAddress.d.ts +2 -9
- package/dist/utils/getValidatedAddress.js +10 -10
- package/dist/utils/getValidatedAddress.js.map +1 -1
- package/dist/utils/getValidatedHex.cjs +13 -34
- package/dist/utils/getValidatedHex.cjs.map +1 -1
- package/dist/utils/getValidatedHex.d.cts +2 -9
- package/dist/utils/getValidatedHex.d.ts +2 -9
- package/dist/utils/getValidatedHex.js +10 -10
- package/dist/utils/getValidatedHex.js.map +1 -1
- package/dist/utils/index.cjs +74 -53
- package/dist/utils/index.d.cts +28 -37
- package/dist/utils/index.d.ts +28 -37
- package/dist/utils/index.js +27 -17
- package/dist/utils/interest.cjs +73 -81
- package/dist/utils/interest.cjs.map +1 -1
- package/dist/utils/interest.d.cts +2 -50
- package/dist/utils/interest.d.ts +2 -50
- package/dist/utils/interest.js +67 -53
- package/dist/utils/interest.js.map +1 -1
- package/dist/utils/isWriteableContract.cjs +6 -30
- package/dist/utils/isWriteableContract.cjs.map +1 -1
- package/dist/utils/isWriteableContract.d.cts +2 -6
- package/dist/utils/isWriteableContract.d.ts +2 -6
- package/dist/utils/isWriteableContract.js +5 -7
- package/dist/utils/isWriteableContract.js.map +1 -1
- package/dist/utils/mapValues.cjs +6 -35
- package/dist/utils/mapValues.cjs.map +1 -1
- package/dist/utils/mapValues.d.cts +2 -7
- package/dist/utils/mapValues.d.ts +2 -7
- package/dist/utils/mapValues.js +5 -12
- package/dist/utils/mapValues.js.map +1 -1
- package/dist/utils/math/BigNumbers.cjs +11 -35
- package/dist/utils/math/BigNumbers.cjs.map +1 -1
- package/dist/utils/math/BigNumbers.d.cts +2 -10
- package/dist/utils/math/BigNumbers.d.ts +2 -10
- package/dist/utils/math/BigNumbers.js +9 -11
- package/dist/utils/math/BigNumbers.js.map +1 -1
- package/dist/utils/math/bigNumber.cjs +24 -56
- package/dist/utils/math/bigNumber.cjs.map +1 -1
- package/dist/utils/math/bigNumber.d.cts +2 -17
- package/dist/utils/math/bigNumber.d.ts +2 -17
- package/dist/utils/math/bigNumber.js +20 -22
- package/dist/utils/math/bigNumber.js.map +1 -1
- package/dist/utils/math/clamp.cjs +14 -35
- package/dist/utils/math/clamp.cjs.map +1 -1
- package/dist/utils/math/clamp.d.cts +2 -15
- package/dist/utils/math/clamp.d.ts +2 -15
- package/dist/utils/math/clamp.js +13 -12
- package/dist/utils/math/clamp.js.map +1 -1
- package/dist/utils/math/decimalAdjustment.cjs +38 -57
- package/dist/utils/math/decimalAdjustment.cjs.map +1 -1
- package/dist/utils/math/decimalAdjustment.d.cts +2 -31
- package/dist/utils/math/decimalAdjustment.d.ts +2 -31
- package/dist/utils/math/decimalAdjustment.js +34 -31
- package/dist/utils/math/decimalAdjustment.js.map +1 -1
- package/dist/utils/math/index.cjs +17 -37
- package/dist/utils/math/index.d.cts +8 -8
- package/dist/utils/math/index.d.ts +8 -8
- package/dist/utils/math/index.js +8 -9
- package/dist/utils/math/sumBigNumberBy.cjs +14 -33
- package/dist/utils/math/sumBigNumberBy.cjs.map +1 -1
- package/dist/utils/math/sumBigNumberBy.d.cts +2 -10
- package/dist/utils/math/sumBigNumberBy.d.ts +2 -10
- package/dist/utils/math/sumBigNumberBy.js +12 -9
- package/dist/utils/math/sumBigNumberBy.js.map +1 -1
- package/dist/utils/math/toBigInt.cjs +12 -31
- package/dist/utils/math/toBigInt.cjs.map +1 -1
- package/dist/utils/math/toBigInt.d.cts +2 -11
- package/dist/utils/math/toBigInt.d.ts +2 -11
- package/dist/utils/math/toBigInt.js +10 -7
- package/dist/utils/math/toBigInt.js.map +1 -1
- package/dist/utils/math/toIntegerString.cjs +12 -31
- package/dist/utils/math/toIntegerString.cjs.map +1 -1
- package/dist/utils/math/toIntegerString.d.cts +2 -11
- package/dist/utils/math/toIntegerString.d.ts +2 -11
- package/dist/utils/math/toIntegerString.js +10 -7
- package/dist/utils/math/toIntegerString.js.map +1 -1
- package/dist/utils/orders/appendix/appendixIsolatedValue.cjs +30 -46
- package/dist/utils/orders/appendix/appendixIsolatedValue.cjs.map +1 -1
- package/dist/utils/orders/appendix/appendixIsolatedValue.d.cts +7 -7
- package/dist/utils/orders/appendix/appendixIsolatedValue.d.cts.map +1 -0
- package/dist/utils/orders/appendix/appendixIsolatedValue.d.ts +7 -7
- package/dist/utils/orders/appendix/appendixIsolatedValue.d.ts.map +1 -0
- package/dist/utils/orders/appendix/appendixIsolatedValue.js +27 -26
- package/dist/utils/orders/appendix/appendixIsolatedValue.js.map +1 -1
- package/dist/utils/orders/appendix/appendixTwapValue.cjs +38 -45
- package/dist/utils/orders/appendix/appendixTwapValue.cjs.map +1 -1
- package/dist/utils/orders/appendix/appendixTwapValue.d.cts +2 -29
- package/dist/utils/orders/appendix/appendixTwapValue.d.ts +2 -29
- package/dist/utils/orders/appendix/appendixTwapValue.js +36 -21
- package/dist/utils/orders/appendix/appendixTwapValue.js.map +1 -1
- package/dist/utils/orders/appendix/bitMaskValue.cjs +14 -31
- package/dist/utils/orders/appendix/bitMaskValue.cjs.map +1 -1
- package/dist/utils/orders/appendix/bitMaskValue.d.cts +2 -10
- package/dist/utils/orders/appendix/bitMaskValue.d.ts +2 -10
- package/dist/utils/orders/appendix/bitMaskValue.js +13 -8
- package/dist/utils/orders/appendix/bitMaskValue.js.map +1 -1
- package/dist/utils/orders/appendix/index.cjs +10 -33
- package/dist/utils/orders/appendix/index.d.cts +6 -9
- package/dist/utils/orders/appendix/index.d.ts +6 -9
- package/dist/utils/orders/appendix/index.js +5 -7
- package/dist/utils/orders/appendix/packOrderAppendix.cjs +55 -87
- package/dist/utils/orders/appendix/packOrderAppendix.cjs.map +1 -1
- package/dist/utils/orders/appendix/packOrderAppendix.d.cts +2 -12
- package/dist/utils/orders/appendix/packOrderAppendix.d.ts +2 -12
- package/dist/utils/orders/appendix/packOrderAppendix.js +52 -62
- package/dist/utils/orders/appendix/packOrderAppendix.js.map +1 -1
- package/dist/utils/orders/appendix/types.cjs +0 -19
- package/dist/utils/orders/appendix/types.d.cts +2 -21
- package/dist/utils/orders/appendix/types.d.ts +2 -21
- package/dist/utils/orders/appendix/types.js +1 -1
- package/dist/utils/orders/appendix/unpackOrderAppendix.cjs +78 -118
- package/dist/utils/orders/appendix/unpackOrderAppendix.cjs.map +1 -1
- package/dist/utils/orders/appendix/unpackOrderAppendix.d.cts +2 -12
- package/dist/utils/orders/appendix/unpackOrderAppendix.d.ts +2 -12
- package/dist/utils/orders/appendix/unpackOrderAppendix.js +75 -93
- package/dist/utils/orders/appendix/unpackOrderAppendix.js.map +1 -1
- package/dist/utils/orders/index.cjs +15 -29
- package/dist/utils/orders/index.d.cts +8 -11
- package/dist/utils/orders/index.d.ts +8 -11
- package/dist/utils/orders/index.js +7 -5
- package/dist/utils/orders/orderNonce.cjs +23 -38
- package/dist/utils/orders/orderNonce.cjs.map +1 -1
- package/dist/utils/orders/orderNonce.d.cts +2 -14
- package/dist/utils/orders/orderNonce.d.ts +2 -14
- package/dist/utils/orders/orderNonce.js +18 -11
- package/dist/utils/orders/orderNonce.js.map +1 -1
- package/dist/utils/orders/recvTime.cjs +12 -30
- package/dist/utils/orders/recvTime.cjs.map +1 -1
- package/dist/utils/orders/recvTime.d.cts +2 -9
- package/dist/utils/orders/recvTime.d.ts +2 -9
- package/dist/utils/orders/recvTime.js +11 -7
- package/dist/utils/orders/recvTime.js.map +1 -1
- package/dist/utils/productTypeFilter.cjs +13 -40
- package/dist/utils/productTypeFilter.cjs.map +1 -1
- package/dist/utils/productTypeFilter.d.cts +2 -11
- package/dist/utils/productTypeFilter.d.ts +2 -11
- package/dist/utils/productTypeFilter.js +9 -16
- package/dist/utils/productTypeFilter.js.map +1 -1
- package/dist/utils/time.cjs +23 -42
- package/dist/utils/time.cjs.map +1 -1
- package/dist/utils/time.d.cts +2 -17
- package/dist/utils/time.d.ts +2 -17
- package/dist/utils/time.js +20 -17
- package/dist/utils/time.js.map +1 -1
- package/dist/utils/toPrintableObject.cjs +21 -66
- package/dist/utils/toPrintableObject.cjs.map +1 -1
- package/dist/utils/toPrintableObject.d.cts +2 -11
- package/dist/utils/toPrintableObject.d.ts +2 -11
- package/dist/utils/toPrintableObject.js +17 -32
- package/dist/utils/toPrintableObject.js.map +1 -1
- package/dist/viemTypes-D3kRC8jF.d.ts +25 -0
- package/dist/viemTypes-D3kRC8jF.d.ts.map +1 -0
- package/dist/viemTypes-Mjfxe2ou.d.cts +25 -0
- package/dist/viemTypes-Mjfxe2ou.d.cts.map +1 -0
- package/package.json +9 -9
- package/dist/abis/index.cjs.map +0 -1
- package/dist/abis/index.js.map +0 -1
- package/dist/chunk-2GPIH63F.js +0 -33
- package/dist/chunk-2GPIH63F.js.map +0 -1
- package/dist/chunk-5WRI5ZAA.js +0 -31
- package/dist/chunk-5WRI5ZAA.js.map +0 -1
- package/dist/consts/index.cjs.map +0 -1
- package/dist/consts/index.js.map +0 -1
- package/dist/deployments/index.cjs.map +0 -1
- package/dist/deployments/index.js.map +0 -1
- package/dist/eip712/eip712ValueTypes.cjs.map +0 -1
- package/dist/eip712/eip712ValueTypes.js.map +0 -1
- package/dist/eip712/index.cjs.map +0 -1
- package/dist/eip712/index.js.map +0 -1
- package/dist/eip712/signableRequestType.cjs.map +0 -1
- package/dist/eip712/signableRequestType.js.map +0 -1
- package/dist/eip712/signatureParamTypes.cjs.map +0 -1
- package/dist/eip712/signatureParamTypes.js.map +0 -1
- package/dist/encoding/index.cjs.map +0 -1
- package/dist/encoding/index.js.map +0 -1
- package/dist/execute/index.cjs.map +0 -1
- package/dist/execute/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types/OrderExecutionType.cjs.map +0 -1
- package/dist/types/OrderExecutionType.js.map +0 -1
- package/dist/types/balanceTypes.cjs.map +0 -1
- package/dist/types/balanceTypes.js.map +0 -1
- package/dist/types/bytes.cjs.map +0 -1
- package/dist/types/bytes.js.map +0 -1
- package/dist/types/healthTypes.cjs.map +0 -1
- package/dist/types/healthTypes.js.map +0 -1
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/marketTypes.cjs.map +0 -1
- package/dist/types/marketTypes.js.map +0 -1
- package/dist/types/nadoContractTypes.cjs.map +0 -1
- package/dist/types/nadoContractTypes.js.map +0 -1
- package/dist/types/orderAppendixTypes.cjs.map +0 -1
- package/dist/types/orderAppendixTypes.js.map +0 -1
- package/dist/types/subaccountTypes.cjs.map +0 -1
- package/dist/types/subaccountTypes.js.map +0 -1
- package/dist/types/viemTypes.cjs.map +0 -1
- package/dist/types/viemTypes.js.map +0 -1
- package/dist/utils/bytes32.test.cjs +0 -203
- package/dist/utils/bytes32.test.cjs.map +0 -1
- package/dist/utils/bytes32.test.d.cts +0 -2
- package/dist/utils/bytes32.test.d.ts +0 -2
- package/dist/utils/bytes32.test.js +0 -165
- package/dist/utils/bytes32.test.js.map +0 -1
- package/dist/utils/errors/index.cjs.map +0 -1
- package/dist/utils/errors/index.js.map +0 -1
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/math/index.cjs.map +0 -1
- package/dist/utils/math/index.js.map +0 -1
- package/dist/utils/orders/appendix/index.cjs.map +0 -1
- package/dist/utils/orders/appendix/index.js.map +0 -1
- package/dist/utils/orders/appendix/orderAppendix.test.cjs +0 -218
- package/dist/utils/orders/appendix/orderAppendix.test.cjs.map +0 -1
- package/dist/utils/orders/appendix/orderAppendix.test.d.cts +0 -2
- package/dist/utils/orders/appendix/orderAppendix.test.d.ts +0 -2
- package/dist/utils/orders/appendix/orderAppendix.test.js +0 -173
- package/dist/utils/orders/appendix/orderAppendix.test.js.map +0 -1
- package/dist/utils/orders/appendix/types.cjs.map +0 -1
- package/dist/utils/orders/appendix/types.js.map +0 -1
- package/dist/utils/orders/index.cjs.map +0 -1
- package/dist/utils/orders/index.js.map +0 -1
|
@@ -1,73 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { BigNumberish } from '../utils/math/bigNumber.js';
|
|
4
|
-
import '../types/bytes.js';
|
|
5
|
-
import 'bignumber.js';
|
|
6
|
-
|
|
7
|
-
interface SignedTx<TBaseTx> {
|
|
8
|
-
tx: TBaseTx;
|
|
9
|
-
signature: string;
|
|
10
|
-
}
|
|
11
|
-
interface SignedEIP712OrderParams {
|
|
12
|
-
order: EIP712OrderParams;
|
|
13
|
-
signature: string;
|
|
14
|
-
}
|
|
15
|
-
interface EIP712WithdrawCollateralParams extends Subaccount {
|
|
16
|
-
productId: number;
|
|
17
|
-
amount: BigNumberish;
|
|
18
|
-
nonce: string;
|
|
19
|
-
}
|
|
20
|
-
interface EIP712LiquidateSubaccountParams extends Subaccount {
|
|
21
|
-
liquidateeOwner: string;
|
|
22
|
-
liquidateeName: string;
|
|
23
|
-
mode: number;
|
|
24
|
-
healthGroup: BigNumberish;
|
|
25
|
-
amount: BigNumberish;
|
|
26
|
-
nonce: string;
|
|
27
|
-
}
|
|
28
|
-
interface EIP712OrderParams extends Subaccount {
|
|
29
|
-
expiration: BigNumberish;
|
|
30
|
-
price: BigNumberish;
|
|
31
|
-
amount: BigNumberish;
|
|
32
|
-
nonce: string;
|
|
33
|
-
appendix: BigNumberish;
|
|
34
|
-
}
|
|
35
|
-
interface EIP712ListTriggerOrdersParams extends Subaccount {
|
|
36
|
-
recvTime: BigNumberish;
|
|
37
|
-
}
|
|
38
|
-
interface EIP712CancelOrdersParams extends Subaccount {
|
|
39
|
-
productIds: number[];
|
|
40
|
-
digests: string[];
|
|
41
|
-
nonce: string;
|
|
42
|
-
}
|
|
43
|
-
interface EIP712CancelProductOrdersParams extends Subaccount {
|
|
44
|
-
productIds: number[];
|
|
45
|
-
nonce: string;
|
|
46
|
-
}
|
|
47
|
-
interface EIP712LinkSignerParams extends Subaccount {
|
|
48
|
-
signer: Address;
|
|
49
|
-
nonce: string;
|
|
50
|
-
}
|
|
51
|
-
interface EIP712TransferQuoteParams extends Subaccount {
|
|
52
|
-
recipientSubaccountName: string;
|
|
53
|
-
amount: BigNumberish;
|
|
54
|
-
nonce: string;
|
|
55
|
-
}
|
|
56
|
-
interface EIP712LeaderboardAuthenticationParams extends Subaccount {
|
|
57
|
-
expiration: BigNumberish;
|
|
58
|
-
contestIds: number[];
|
|
59
|
-
}
|
|
60
|
-
interface EIP712SocialAuthenticationParams extends Subaccount {
|
|
61
|
-
expiration: BigNumberish;
|
|
62
|
-
provider: 'twitter';
|
|
63
|
-
}
|
|
64
|
-
interface EIP712MintNlpParams extends Subaccount {
|
|
65
|
-
quoteAmount: BigNumberish;
|
|
66
|
-
nonce: string;
|
|
67
|
-
}
|
|
68
|
-
interface EIP712BurnNlpParams extends Subaccount {
|
|
69
|
-
nlpAmount: BigNumberish;
|
|
70
|
-
nonce: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export type { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712SocialAuthenticationParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, SignedEIP712OrderParams, SignedTx };
|
|
1
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712WithdrawCollateralParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, m as SignedTx, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, p as SignedEIP712OrderParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "../signatureParamTypes-ByiLhbva.js";
|
|
2
|
+
export { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712SocialAuthenticationParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, SignedEIP712OrderParams, SignedTx };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { t as BigNumberish } from "./bigNumber-BLE4n-ku.js";
|
|
2
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712WithdrawCollateralParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "./signatureParamTypes-ByiLhbva.js";
|
|
3
|
+
import { Hex } from "viem";
|
|
4
|
+
|
|
5
|
+
//#region src/eip712/eip712ValueTypes.d.ts
|
|
6
|
+
type WithEIP712Sender<T extends {
|
|
7
|
+
subaccountOwner: string;
|
|
8
|
+
subaccountName: string;
|
|
9
|
+
}> = Omit<T, 'subaccountOwner' | 'subaccountName'> & {
|
|
10
|
+
sender: Hex;
|
|
11
|
+
};
|
|
12
|
+
type EIP712WithdrawCollateralValues = WithEIP712Sender<EIP712WithdrawCollateralParams>;
|
|
13
|
+
type EIP712LiquidateSubaccountValues = Omit<WithEIP712Sender<EIP712LiquidateSubaccountParams>, 'liquidateeOwner' | 'liquidateeName'> & {
|
|
14
|
+
liquidatee: string;
|
|
15
|
+
};
|
|
16
|
+
type EIP712OrderValues = Omit<WithEIP712Sender<EIP712OrderParams>, 'price'> & {
|
|
17
|
+
priceX18: BigNumberish;
|
|
18
|
+
};
|
|
19
|
+
type EIP712ListTriggerOrdersValues = WithEIP712Sender<EIP712ListTriggerOrdersParams>;
|
|
20
|
+
type EIP712OrderCancellationValues = WithEIP712Sender<EIP712CancelOrdersParams>;
|
|
21
|
+
type EIP712ProductOrdersCancellationValues = WithEIP712Sender<EIP712CancelProductOrdersParams>;
|
|
22
|
+
type EIP712LinkSignerValues = WithEIP712Sender<EIP712LinkSignerParams>;
|
|
23
|
+
type EIP712TransferQuoteValues = Omit<WithEIP712Sender<EIP712TransferQuoteParams>, 'recipientSubaccountName'> & {
|
|
24
|
+
recipient: string;
|
|
25
|
+
};
|
|
26
|
+
type EIP712LeaderboardAuthenticationValues = WithEIP712Sender<EIP712LeaderboardAuthenticationParams>;
|
|
27
|
+
type EIP712SocialAuthenticationValues = WithEIP712Sender<EIP712SocialAuthenticationParams>;
|
|
28
|
+
type EIP712MintNlpValues = WithEIP712Sender<EIP712MintNlpParams>;
|
|
29
|
+
type EIP712BurnNlpValues = WithEIP712Sender<EIP712BurnNlpParams>;
|
|
30
|
+
/**
|
|
31
|
+
* All possible requests to be signed, to the EIP712 value interface
|
|
32
|
+
*/
|
|
33
|
+
interface SignableRequestTypeToEIP712Values {
|
|
34
|
+
burn_nlp: EIP712BurnNlpValues;
|
|
35
|
+
cancel_orders: EIP712OrderCancellationValues;
|
|
36
|
+
cancel_product_orders: EIP712ProductOrdersCancellationValues;
|
|
37
|
+
leaderboard_authentication: EIP712LeaderboardAuthenticationValues;
|
|
38
|
+
link_signer: EIP712LinkSignerValues;
|
|
39
|
+
liquidate_subaccount: EIP712LiquidateSubaccountValues;
|
|
40
|
+
list_trigger_orders: EIP712ListTriggerOrdersValues;
|
|
41
|
+
mint_nlp: EIP712MintNlpValues;
|
|
42
|
+
place_order: EIP712OrderValues;
|
|
43
|
+
social_authentication: EIP712SocialAuthenticationValues;
|
|
44
|
+
transfer_quote: EIP712TransferQuoteValues;
|
|
45
|
+
withdraw_collateral: EIP712WithdrawCollateralValues;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { EIP712ListTriggerOrdersValues as a, EIP712OrderValues as c, EIP712TransferQuoteValues as d, EIP712WithdrawCollateralValues as f, EIP712LiquidateSubaccountValues as i, EIP712ProductOrdersCancellationValues as l, EIP712LeaderboardAuthenticationValues as n, EIP712MintNlpValues as o, SignableRequestTypeToEIP712Values as p, EIP712LinkSignerValues as r, EIP712OrderCancellationValues as s, EIP712BurnNlpValues as t, EIP712SocialAuthenticationValues as u };
|
|
49
|
+
//# sourceMappingURL=eip712ValueTypes-DUvhlJpT.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eip712ValueTypes-DUvhlJpT.d.ts","names":[],"sources":["../src/eip712/src/eip712/eip712ValueTypes.ts"],"mappings":";;;;;KAiBK,gBAAA;EACS,eAAA;EAAyB,cAAA;AAAA,KACnC,IAAA,CAAK,CAAA;EAEP,MAAA,EAAQ,GAAA;AAAA;AAAA,KAGE,8BAAA,GACV,gBAAgB,CAAC,8BAAA;AAAA,KAEP,+BAAA,GAAkC,IAAA,CAC5C,gBAAA,CAAiB,+BAAA;EAIjB,UAAA;AAAA;AAAA,KAGU,iBAAA,GAAoB,IAAA,CAC9B,gBAAA,CAAiB,iBAAA;EAGjB,QAAA,EAAU,YAAA;AAAA;AAAA,KAGA,6BAAA,GACV,gBAAgB,CAAC,6BAAA;AAAA,KAEP,6BAAA,GACV,gBAAgB,CAAC,wBAAA;AAAA,KAEP,qCAAA,GACV,gBAAgB,CAAC,+BAAA;AAAA,KAEP,sBAAA,GAAyB,gBAAgB,CAAC,sBAAA;AAAA,KAE1C,yBAAA,GAA4B,IAAA,CACtC,gBAAA,CAAiB,yBAAA;EAIjB,SAAA;AAAA;AAAA,KAGU,qCAAA,GACV,gBAAgB,CAAC,qCAAA;AAAA,KAEP,gCAAA,GACV,gBAAgB,CAAC,gCAAA;AAAA,KAEP,mBAAA,GAAsB,gBAAgB,CAAC,mBAAA;AAAA,KAEvC,mBAAA,GAAsB,gBAAgB,CAAC,mBAAA;AA5CF;AAEjD;;AAFiD,UAiDhC,iCAAA;EACf,QAAA,EAAU,mBAAA;EACV,aAAA,EAAe,6BAAA;EACf,qBAAA,EAAuB,qCAAA;EACvB,0BAAA,EAA4B,qCAAA;EAC5B,WAAA,EAAa,sBAAA;EACb,oBAAA,EAAsB,+BAAA;EACtB,mBAAA,EAAqB,6BAAA;EACrB,QAAA,EAAU,mBAAA;EACV,WAAA,EAAa,iBAAA;EACb,qBAAA,EAAuB,gCAAA;EACvB,cAAA,EAAgB,yBAAA;EAChB,mBAAA,EAAqB,8BAAA;AAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { t as BigNumberish } from "./bigNumber-DX0JX9bQ.cjs";
|
|
2
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712WithdrawCollateralParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "./signatureParamTypes-BEG1v7Qn.cjs";
|
|
3
|
+
import { Hex } from "viem";
|
|
4
|
+
|
|
5
|
+
//#region src/eip712/eip712ValueTypes.d.ts
|
|
6
|
+
type WithEIP712Sender<T extends {
|
|
7
|
+
subaccountOwner: string;
|
|
8
|
+
subaccountName: string;
|
|
9
|
+
}> = Omit<T, 'subaccountOwner' | 'subaccountName'> & {
|
|
10
|
+
sender: Hex;
|
|
11
|
+
};
|
|
12
|
+
type EIP712WithdrawCollateralValues = WithEIP712Sender<EIP712WithdrawCollateralParams>;
|
|
13
|
+
type EIP712LiquidateSubaccountValues = Omit<WithEIP712Sender<EIP712LiquidateSubaccountParams>, 'liquidateeOwner' | 'liquidateeName'> & {
|
|
14
|
+
liquidatee: string;
|
|
15
|
+
};
|
|
16
|
+
type EIP712OrderValues = Omit<WithEIP712Sender<EIP712OrderParams>, 'price'> & {
|
|
17
|
+
priceX18: BigNumberish;
|
|
18
|
+
};
|
|
19
|
+
type EIP712ListTriggerOrdersValues = WithEIP712Sender<EIP712ListTriggerOrdersParams>;
|
|
20
|
+
type EIP712OrderCancellationValues = WithEIP712Sender<EIP712CancelOrdersParams>;
|
|
21
|
+
type EIP712ProductOrdersCancellationValues = WithEIP712Sender<EIP712CancelProductOrdersParams>;
|
|
22
|
+
type EIP712LinkSignerValues = WithEIP712Sender<EIP712LinkSignerParams>;
|
|
23
|
+
type EIP712TransferQuoteValues = Omit<WithEIP712Sender<EIP712TransferQuoteParams>, 'recipientSubaccountName'> & {
|
|
24
|
+
recipient: string;
|
|
25
|
+
};
|
|
26
|
+
type EIP712LeaderboardAuthenticationValues = WithEIP712Sender<EIP712LeaderboardAuthenticationParams>;
|
|
27
|
+
type EIP712SocialAuthenticationValues = WithEIP712Sender<EIP712SocialAuthenticationParams>;
|
|
28
|
+
type EIP712MintNlpValues = WithEIP712Sender<EIP712MintNlpParams>;
|
|
29
|
+
type EIP712BurnNlpValues = WithEIP712Sender<EIP712BurnNlpParams>;
|
|
30
|
+
/**
|
|
31
|
+
* All possible requests to be signed, to the EIP712 value interface
|
|
32
|
+
*/
|
|
33
|
+
interface SignableRequestTypeToEIP712Values {
|
|
34
|
+
burn_nlp: EIP712BurnNlpValues;
|
|
35
|
+
cancel_orders: EIP712OrderCancellationValues;
|
|
36
|
+
cancel_product_orders: EIP712ProductOrdersCancellationValues;
|
|
37
|
+
leaderboard_authentication: EIP712LeaderboardAuthenticationValues;
|
|
38
|
+
link_signer: EIP712LinkSignerValues;
|
|
39
|
+
liquidate_subaccount: EIP712LiquidateSubaccountValues;
|
|
40
|
+
list_trigger_orders: EIP712ListTriggerOrdersValues;
|
|
41
|
+
mint_nlp: EIP712MintNlpValues;
|
|
42
|
+
place_order: EIP712OrderValues;
|
|
43
|
+
social_authentication: EIP712SocialAuthenticationValues;
|
|
44
|
+
transfer_quote: EIP712TransferQuoteValues;
|
|
45
|
+
withdraw_collateral: EIP712WithdrawCollateralValues;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { EIP712ListTriggerOrdersValues as a, EIP712OrderValues as c, EIP712TransferQuoteValues as d, EIP712WithdrawCollateralValues as f, EIP712LiquidateSubaccountValues as i, EIP712ProductOrdersCancellationValues as l, EIP712LeaderboardAuthenticationValues as n, EIP712MintNlpValues as o, SignableRequestTypeToEIP712Values as p, EIP712LinkSignerValues as r, EIP712OrderCancellationValues as s, EIP712BurnNlpValues as t, EIP712SocialAuthenticationValues as u };
|
|
49
|
+
//# sourceMappingURL=eip712ValueTypes-WH3jtsab.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eip712ValueTypes-WH3jtsab.d.cts","names":[],"sources":["../src/eip712/src/eip712/eip712ValueTypes.ts"],"mappings":";;;;;KAiBK,gBAAA;EACS,eAAA;EAAyB,cAAA;AAAA,KACnC,IAAA,CAAK,CAAA;EAEP,MAAA,EAAQ,GAAA;AAAA;AAAA,KAGE,8BAAA,GACV,gBAAgB,CAAC,8BAAA;AAAA,KAEP,+BAAA,GAAkC,IAAA,CAC5C,gBAAA,CAAiB,+BAAA;EAIjB,UAAA;AAAA;AAAA,KAGU,iBAAA,GAAoB,IAAA,CAC9B,gBAAA,CAAiB,iBAAA;EAGjB,QAAA,EAAU,YAAA;AAAA;AAAA,KAGA,6BAAA,GACV,gBAAgB,CAAC,6BAAA;AAAA,KAEP,6BAAA,GACV,gBAAgB,CAAC,wBAAA;AAAA,KAEP,qCAAA,GACV,gBAAgB,CAAC,+BAAA;AAAA,KAEP,sBAAA,GAAyB,gBAAgB,CAAC,sBAAA;AAAA,KAE1C,yBAAA,GAA4B,IAAA,CACtC,gBAAA,CAAiB,yBAAA;EAIjB,SAAA;AAAA;AAAA,KAGU,qCAAA,GACV,gBAAgB,CAAC,qCAAA;AAAA,KAEP,gCAAA,GACV,gBAAgB,CAAC,gCAAA;AAAA,KAEP,mBAAA,GAAsB,gBAAgB,CAAC,mBAAA;AAAA,KAEvC,mBAAA,GAAsB,gBAAgB,CAAC,mBAAA;AA5CF;AAEjD;;AAFiD,UAiDhC,iCAAA;EACf,QAAA,EAAU,mBAAA;EACV,aAAA,EAAe,6BAAA;EACf,qBAAA,EAAuB,qCAAA;EACvB,0BAAA,EAA4B,qCAAA;EAC5B,WAAA,EAAa,sBAAA;EACb,oBAAA,EAAsB,+BAAA;EACtB,mBAAA,EAAqB,6BAAA;EACrB,QAAA,EAAU,mBAAA;EACV,WAAA,EAAa,iBAAA;EACb,qBAAA,EAAuB,gCAAA;EACvB,cAAA,EAAgB,yBAAA;EAChB,mBAAA,EAAqB,8BAAA;AAAA"}
|
|
@@ -1,94 +1,53 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/encoding/encoding.ts
|
|
21
|
-
var encoding_exports = {};
|
|
22
|
-
__export(encoding_exports, {
|
|
23
|
-
SlowModeTxType: () => SlowModeTxType,
|
|
24
|
-
encodeClaimBuilderFeeTx: () => encodeClaimBuilderFeeTx,
|
|
25
|
-
encodeSignedOrder: () => encodeSignedOrder,
|
|
26
|
-
encodeSignedWithdrawCollateralTx: () => encodeSignedWithdrawCollateralTx
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(encoding_exports);
|
|
29
|
-
var import_viem = require("viem");
|
|
30
|
-
var import_utils = require("../utils/index.cjs");
|
|
31
|
-
var SlowModeTxType = /* @__PURE__ */ ((SlowModeTxType2) => {
|
|
32
|
-
SlowModeTxType2[SlowModeTxType2["DepositCollateral"] = 1] = "DepositCollateral";
|
|
33
|
-
SlowModeTxType2[SlowModeTxType2["WithdrawCollateral"] = 2] = "WithdrawCollateral";
|
|
34
|
-
SlowModeTxType2[SlowModeTxType2["LinkSigner"] = 13] = "LinkSigner";
|
|
35
|
-
SlowModeTxType2[SlowModeTxType2["ClaimBuilderFee"] = 31] = "ClaimBuilderFee";
|
|
36
|
-
return SlowModeTxType2;
|
|
37
|
-
})(SlowModeTxType || {});
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../chunk-CKQMccvm.cjs");
|
|
3
|
+
const require_utils_math_decimalAdjustment = require("../utils/math/decimalAdjustment.cjs");
|
|
4
|
+
const require_utils_math_toBigInt = require("../utils/math/toBigInt.cjs");
|
|
5
|
+
let viem = require("viem");
|
|
6
|
+
//#region src/encoding/encoding.ts
|
|
7
|
+
/**
|
|
8
|
+
* Transaction type identifiers for slow mode transactions.
|
|
9
|
+
*/
|
|
10
|
+
let SlowModeTxType = /* @__PURE__ */ function(SlowModeTxType) {
|
|
11
|
+
SlowModeTxType[SlowModeTxType["DepositCollateral"] = 1] = "DepositCollateral";
|
|
12
|
+
SlowModeTxType[SlowModeTxType["WithdrawCollateral"] = 2] = "WithdrawCollateral";
|
|
13
|
+
SlowModeTxType[SlowModeTxType["LinkSigner"] = 13] = "LinkSigner";
|
|
14
|
+
SlowModeTxType[SlowModeTxType["ClaimBuilderFee"] = 31] = "ClaimBuilderFee";
|
|
15
|
+
return SlowModeTxType;
|
|
16
|
+
}({});
|
|
38
17
|
function encodeSignedWithdrawCollateralTx(signed) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
signed.tx.subaccountOwner,
|
|
47
|
-
signed.tx.subaccountName,
|
|
48
|
-
signed.tx.productId,
|
|
49
|
-
signed.tx.amount,
|
|
50
|
-
signed.tx.nonce
|
|
51
|
-
],
|
|
52
|
-
signed.signature
|
|
53
|
-
]
|
|
54
|
-
]
|
|
55
|
-
);
|
|
18
|
+
return (0, viem.encodeAbiParameters)((0, viem.parseAbiParameters)("(tuple(address sender, string subaccountName, uint32 productId, uint128 amount, uint64 nonce), bytes signature)"), [[[
|
|
19
|
+
signed.tx.subaccountOwner,
|
|
20
|
+
signed.tx.subaccountName,
|
|
21
|
+
signed.tx.productId,
|
|
22
|
+
signed.tx.amount,
|
|
23
|
+
signed.tx.nonce
|
|
24
|
+
], signed.signature]]);
|
|
56
25
|
}
|
|
57
26
|
function encodeSignedOrder(signed) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
signed.order.subaccountName,
|
|
67
|
-
(0, import_utils.toBigInt)((0, import_utils.addDecimals)(signed.order.price)),
|
|
68
|
-
signed.order.amount,
|
|
69
|
-
signed.order.expiration,
|
|
70
|
-
signed.order.nonce
|
|
71
|
-
],
|
|
72
|
-
signed.signature
|
|
73
|
-
]
|
|
74
|
-
]
|
|
75
|
-
);
|
|
27
|
+
return (0, viem.encodeAbiParameters)((0, viem.parseAbiParameters)("(tuple(tuple(address sender, string subaccountName, int128 priceX18, int128 amount, uint64 expiration, uint64 nonce), bytes signature))"), [[[
|
|
28
|
+
signed.order.subaccountOwner,
|
|
29
|
+
signed.order.subaccountName,
|
|
30
|
+
require_utils_math_toBigInt.toBigInt(require_utils_math_decimalAdjustment.addDecimals(signed.order.price)),
|
|
31
|
+
signed.order.amount,
|
|
32
|
+
signed.order.expiration,
|
|
33
|
+
signed.order.nonce
|
|
34
|
+
], signed.signature]]);
|
|
76
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Encodes a ClaimBuilderFee slow mode transaction.
|
|
38
|
+
*
|
|
39
|
+
* Format: [tx_type_byte] + [abi_encoded_params]
|
|
40
|
+
*
|
|
41
|
+
* @param params - The claim builder fee parameters
|
|
42
|
+
* @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction
|
|
43
|
+
*/
|
|
77
44
|
function encodeClaimBuilderFeeTx(params) {
|
|
78
|
-
|
|
79
|
-
(0, import_viem.parseAbiParameters)("bytes32 sender, uint32 builderId"),
|
|
80
|
-
[params.sender, params.builderId]
|
|
81
|
-
);
|
|
82
|
-
return (0, import_viem.encodePacked)(
|
|
83
|
-
["uint8", "bytes"],
|
|
84
|
-
[31 /* ClaimBuilderFee */, txBytes]
|
|
85
|
-
);
|
|
45
|
+
return (0, viem.encodePacked)(["uint8", "bytes"], [31, (0, viem.encodeAbiParameters)((0, viem.parseAbiParameters)("bytes32 sender, uint32 builderId"), [params.sender, params.builderId])]);
|
|
86
46
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
});
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.SlowModeTxType = SlowModeTxType;
|
|
49
|
+
exports.encodeClaimBuilderFeeTx = encodeClaimBuilderFeeTx;
|
|
50
|
+
exports.encodeSignedOrder = encodeSignedOrder;
|
|
51
|
+
exports.encodeSignedWithdrawCollateralTx = encodeSignedWithdrawCollateralTx;
|
|
52
|
+
|
|
94
53
|
//# sourceMappingURL=encoding.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/encoding/encoding.ts"],"sourcesContent":["import {\n encodeAbiParameters,\n encodePacked,\n parseAbiParameters,\n type Hex,\n} from 'viem';\nimport {\n EIP712WithdrawCollateralParams,\n SignedEIP712OrderParams,\n SignedTx,\n} from '../eip712';\nimport { addDecimals, toBigInt } from '../utils';\n\n/**\n * Transaction type identifiers for slow mode transactions.\n */\nexport enum SlowModeTxType {\n DepositCollateral = 1,\n WithdrawCollateral = 2,\n LinkSigner = 13,\n ClaimBuilderFee = 31,\n}\n\nexport function encodeSignedWithdrawCollateralTx(\n signed: SignedTx<EIP712WithdrawCollateralParams>,\n) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(address sender, string subaccountName, uint32 productId, uint128 amount, uint64 nonce), bytes signature)',\n ),\n [\n [\n [\n signed.tx.subaccountOwner,\n signed.tx.subaccountName,\n signed.tx.productId,\n signed.tx.amount,\n signed.tx.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport function encodeSignedOrder(signed: SignedEIP712OrderParams) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(tuple(address sender, string subaccountName, int128 priceX18, int128 amount, uint64 expiration, uint64 nonce), bytes signature))',\n ),\n [\n [\n [\n signed.order.subaccountOwner,\n signed.order.subaccountName,\n toBigInt(addDecimals(signed.order.price)),\n signed.order.amount,\n signed.order.expiration,\n signed.order.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport interface ClaimBuilderFeeParams {\n /** The sender subaccount as bytes32 */\n sender: Hex;\n /** The builder ID to claim fees for */\n builderId: number;\n}\n\n/**\n * Encodes a ClaimBuilderFee slow mode transaction.\n *\n * Format: [tx_type_byte] + [abi_encoded_params]\n *\n * @param params - The claim builder fee parameters\n * @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction\n */\nexport function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex {\n const txBytes = encodeAbiParameters(\n parseAbiParameters('bytes32 sender, uint32 builderId'),\n [params.sender, params.builderId],\n );\n\n return encodePacked(\n ['uint8', 'bytes'],\n [SlowModeTxType.ClaimBuilderFee, txBytes],\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"encoding.cjs","names":["toBigInt","addDecimals"],"sources":["../../src/encoding/encoding.ts"],"sourcesContent":["import {\n encodeAbiParameters,\n encodePacked,\n parseAbiParameters,\n type Hex,\n} from 'viem';\nimport {\n EIP712WithdrawCollateralParams,\n SignedEIP712OrderParams,\n SignedTx,\n} from '../eip712';\nimport { addDecimals, toBigInt } from '../utils';\n\n/**\n * Transaction type identifiers for slow mode transactions.\n */\nexport enum SlowModeTxType {\n DepositCollateral = 1,\n WithdrawCollateral = 2,\n LinkSigner = 13,\n ClaimBuilderFee = 31,\n}\n\nexport function encodeSignedWithdrawCollateralTx(\n signed: SignedTx<EIP712WithdrawCollateralParams>,\n) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(address sender, string subaccountName, uint32 productId, uint128 amount, uint64 nonce), bytes signature)',\n ),\n [\n [\n [\n signed.tx.subaccountOwner,\n signed.tx.subaccountName,\n signed.tx.productId,\n signed.tx.amount,\n signed.tx.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport function encodeSignedOrder(signed: SignedEIP712OrderParams) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(tuple(address sender, string subaccountName, int128 priceX18, int128 amount, uint64 expiration, uint64 nonce), bytes signature))',\n ),\n [\n [\n [\n signed.order.subaccountOwner,\n signed.order.subaccountName,\n toBigInt(addDecimals(signed.order.price)),\n signed.order.amount,\n signed.order.expiration,\n signed.order.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport interface ClaimBuilderFeeParams {\n /** The sender subaccount as bytes32 */\n sender: Hex;\n /** The builder ID to claim fees for */\n builderId: number;\n}\n\n/**\n * Encodes a ClaimBuilderFee slow mode transaction.\n *\n * Format: [tx_type_byte] + [abi_encoded_params]\n *\n * @param params - The claim builder fee parameters\n * @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction\n */\nexport function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex {\n const txBytes = encodeAbiParameters(\n parseAbiParameters('bytes32 sender, uint32 builderId'),\n [params.sender, params.builderId],\n );\n\n return encodePacked(\n ['uint8', 'bytes'],\n [SlowModeTxType.ClaimBuilderFee, txBytes],\n );\n}\n"],"mappings":";;;;;;;;;AAgBA,IAAY,iBAAL,yBAAA,gBAAA;CACL,eAAA,eAAA,uBAAA,KAAA;CACA,eAAA,eAAA,wBAAA,KAAA;CACA,eAAA,eAAA,gBAAA,MAAA;CACA,eAAA,eAAA,qBAAA,MAAA;;AACF,EAAA,CAAA,CAAA;AAEA,SAAgB,iCACd,QACA;CACA,QAAA,GAAA,KAAA,sBAAA,GAAA,KAAA,oBAEI,iHACF,GACA,CACE,CACE;EACE,OAAO,GAAG;EACV,OAAO,GAAG;EACV,OAAO,GAAG;EACV,OAAO,GAAG;EACV,OAAO,GAAG;CACZ,GACA,OAAO,SACT,CACF,CACF;AACF;AAEA,SAAgB,kBAAkB,QAAiC;CACjE,QAAA,GAAA,KAAA,sBAAA,GAAA,KAAA,oBAEI,yIACF,GACA,CACE,CACE;EACE,OAAO,MAAM;EACb,OAAO,MAAM;EACbA,4BAAAA,SAASC,qCAAAA,YAAY,OAAO,MAAM,KAAK,CAAC;EACxC,OAAO,MAAM;EACb,OAAO,MAAM;EACb,OAAO,MAAM;CACf,GACA,OAAO,SACT,CACF,CACF;AACF;;;;;;;;;AAiBA,SAAgB,wBAAwB,QAAoC;CAM1E,QAAA,GAAA,KAAA,cACE,CAAC,SAAS,OAAO,GACjB,CAAA,KAAA,GAAA,KAAA,sBAAA,GAAA,KAAA,oBANmB,kCAAkC,GACrD,CAAC,OAAO,QAAQ,OAAO,SAAS,CAKO,CAAC,CAC1C;AACF"}
|
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import '../types/subaccountTypes.cjs';
|
|
4
|
-
import '../types/bytes.cjs';
|
|
5
|
-
import '../utils/math/bigNumber.cjs';
|
|
6
|
-
import 'bignumber.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Transaction type identifiers for slow mode transactions.
|
|
10
|
-
*/
|
|
11
|
-
declare enum SlowModeTxType {
|
|
12
|
-
DepositCollateral = 1,
|
|
13
|
-
WithdrawCollateral = 2,
|
|
14
|
-
LinkSigner = 13,
|
|
15
|
-
ClaimBuilderFee = 31
|
|
16
|
-
}
|
|
17
|
-
declare function encodeSignedWithdrawCollateralTx(signed: SignedTx<EIP712WithdrawCollateralParams>): `0x${string}`;
|
|
18
|
-
declare function encodeSignedOrder(signed: SignedEIP712OrderParams): `0x${string}`;
|
|
19
|
-
interface ClaimBuilderFeeParams {
|
|
20
|
-
/** The sender subaccount as bytes32 */
|
|
21
|
-
sender: Hex;
|
|
22
|
-
/** The builder ID to claim fees for */
|
|
23
|
-
builderId: number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Encodes a ClaimBuilderFee slow mode transaction.
|
|
27
|
-
*
|
|
28
|
-
* Format: [tx_type_byte] + [abi_encoded_params]
|
|
29
|
-
*
|
|
30
|
-
* @param params - The claim builder fee parameters
|
|
31
|
-
* @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction
|
|
32
|
-
*/
|
|
33
|
-
declare function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex;
|
|
34
|
-
|
|
35
|
-
export { type ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
1
|
+
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-COa5q5x1.cjs";
|
|
2
|
+
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import '../types/subaccountTypes.js';
|
|
4
|
-
import '../types/bytes.js';
|
|
5
|
-
import '../utils/math/bigNumber.js';
|
|
6
|
-
import 'bignumber.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Transaction type identifiers for slow mode transactions.
|
|
10
|
-
*/
|
|
11
|
-
declare enum SlowModeTxType {
|
|
12
|
-
DepositCollateral = 1,
|
|
13
|
-
WithdrawCollateral = 2,
|
|
14
|
-
LinkSigner = 13,
|
|
15
|
-
ClaimBuilderFee = 31
|
|
16
|
-
}
|
|
17
|
-
declare function encodeSignedWithdrawCollateralTx(signed: SignedTx<EIP712WithdrawCollateralParams>): `0x${string}`;
|
|
18
|
-
declare function encodeSignedOrder(signed: SignedEIP712OrderParams): `0x${string}`;
|
|
19
|
-
interface ClaimBuilderFeeParams {
|
|
20
|
-
/** The sender subaccount as bytes32 */
|
|
21
|
-
sender: Hex;
|
|
22
|
-
/** The builder ID to claim fees for */
|
|
23
|
-
builderId: number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Encodes a ClaimBuilderFee slow mode transaction.
|
|
27
|
-
*
|
|
28
|
-
* Format: [tx_type_byte] + [abi_encoded_params]
|
|
29
|
-
*
|
|
30
|
-
* @param params - The claim builder fee parameters
|
|
31
|
-
* @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction
|
|
32
|
-
*/
|
|
33
|
-
declare function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex;
|
|
34
|
-
|
|
35
|
-
export { type ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
1
|
+
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-Cxt77WO_.js";
|
|
2
|
+
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
@@ -1,72 +1,48 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return SlowModeTxType2;
|
|
16
|
-
})(SlowModeTxType || {});
|
|
1
|
+
import { addDecimals } from "../utils/math/decimalAdjustment.js";
|
|
2
|
+
import { toBigInt } from "../utils/math/toBigInt.js";
|
|
3
|
+
import { encodeAbiParameters, encodePacked, parseAbiParameters } from "viem";
|
|
4
|
+
//#region src/encoding/encoding.ts
|
|
5
|
+
/**
|
|
6
|
+
* Transaction type identifiers for slow mode transactions.
|
|
7
|
+
*/
|
|
8
|
+
let SlowModeTxType = /* @__PURE__ */ function(SlowModeTxType) {
|
|
9
|
+
SlowModeTxType[SlowModeTxType["DepositCollateral"] = 1] = "DepositCollateral";
|
|
10
|
+
SlowModeTxType[SlowModeTxType["WithdrawCollateral"] = 2] = "WithdrawCollateral";
|
|
11
|
+
SlowModeTxType[SlowModeTxType["LinkSigner"] = 13] = "LinkSigner";
|
|
12
|
+
SlowModeTxType[SlowModeTxType["ClaimBuilderFee"] = 31] = "ClaimBuilderFee";
|
|
13
|
+
return SlowModeTxType;
|
|
14
|
+
}({});
|
|
17
15
|
function encodeSignedWithdrawCollateralTx(signed) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
signed.tx.subaccountOwner,
|
|
26
|
-
signed.tx.subaccountName,
|
|
27
|
-
signed.tx.productId,
|
|
28
|
-
signed.tx.amount,
|
|
29
|
-
signed.tx.nonce
|
|
30
|
-
],
|
|
31
|
-
signed.signature
|
|
32
|
-
]
|
|
33
|
-
]
|
|
34
|
-
);
|
|
16
|
+
return encodeAbiParameters(parseAbiParameters("(tuple(address sender, string subaccountName, uint32 productId, uint128 amount, uint64 nonce), bytes signature)"), [[[
|
|
17
|
+
signed.tx.subaccountOwner,
|
|
18
|
+
signed.tx.subaccountName,
|
|
19
|
+
signed.tx.productId,
|
|
20
|
+
signed.tx.amount,
|
|
21
|
+
signed.tx.nonce
|
|
22
|
+
], signed.signature]]);
|
|
35
23
|
}
|
|
36
24
|
function encodeSignedOrder(signed) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
signed.order.subaccountName,
|
|
46
|
-
toBigInt(addDecimals(signed.order.price)),
|
|
47
|
-
signed.order.amount,
|
|
48
|
-
signed.order.expiration,
|
|
49
|
-
signed.order.nonce
|
|
50
|
-
],
|
|
51
|
-
signed.signature
|
|
52
|
-
]
|
|
53
|
-
]
|
|
54
|
-
);
|
|
25
|
+
return encodeAbiParameters(parseAbiParameters("(tuple(tuple(address sender, string subaccountName, int128 priceX18, int128 amount, uint64 expiration, uint64 nonce), bytes signature))"), [[[
|
|
26
|
+
signed.order.subaccountOwner,
|
|
27
|
+
signed.order.subaccountName,
|
|
28
|
+
toBigInt(addDecimals(signed.order.price)),
|
|
29
|
+
signed.order.amount,
|
|
30
|
+
signed.order.expiration,
|
|
31
|
+
signed.order.nonce
|
|
32
|
+
], signed.signature]]);
|
|
55
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Encodes a ClaimBuilderFee slow mode transaction.
|
|
36
|
+
*
|
|
37
|
+
* Format: [tx_type_byte] + [abi_encoded_params]
|
|
38
|
+
*
|
|
39
|
+
* @param params - The claim builder fee parameters
|
|
40
|
+
* @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction
|
|
41
|
+
*/
|
|
56
42
|
function encodeClaimBuilderFeeTx(params) {
|
|
57
|
-
|
|
58
|
-
parseAbiParameters("bytes32 sender, uint32 builderId"),
|
|
59
|
-
[params.sender, params.builderId]
|
|
60
|
-
);
|
|
61
|
-
return encodePacked(
|
|
62
|
-
["uint8", "bytes"],
|
|
63
|
-
[31 /* ClaimBuilderFee */, txBytes]
|
|
64
|
-
);
|
|
43
|
+
return encodePacked(["uint8", "bytes"], [31, encodeAbiParameters(parseAbiParameters("bytes32 sender, uint32 builderId"), [params.sender, params.builderId])]);
|
|
65
44
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
encodeSignedOrder,
|
|
70
|
-
encodeSignedWithdrawCollateralTx
|
|
71
|
-
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
47
|
+
|
|
72
48
|
//# sourceMappingURL=encoding.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/encoding/encoding.ts"],"sourcesContent":["import {\n encodeAbiParameters,\n encodePacked,\n parseAbiParameters,\n type Hex,\n} from 'viem';\nimport {\n EIP712WithdrawCollateralParams,\n SignedEIP712OrderParams,\n SignedTx,\n} from '../eip712';\nimport { addDecimals, toBigInt } from '../utils';\n\n/**\n * Transaction type identifiers for slow mode transactions.\n */\nexport enum SlowModeTxType {\n DepositCollateral = 1,\n WithdrawCollateral = 2,\n LinkSigner = 13,\n ClaimBuilderFee = 31,\n}\n\nexport function encodeSignedWithdrawCollateralTx(\n signed: SignedTx<EIP712WithdrawCollateralParams>,\n) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(address sender, string subaccountName, uint32 productId, uint128 amount, uint64 nonce), bytes signature)',\n ),\n [\n [\n [\n signed.tx.subaccountOwner,\n signed.tx.subaccountName,\n signed.tx.productId,\n signed.tx.amount,\n signed.tx.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport function encodeSignedOrder(signed: SignedEIP712OrderParams) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(tuple(address sender, string subaccountName, int128 priceX18, int128 amount, uint64 expiration, uint64 nonce), bytes signature))',\n ),\n [\n [\n [\n signed.order.subaccountOwner,\n signed.order.subaccountName,\n toBigInt(addDecimals(signed.order.price)),\n signed.order.amount,\n signed.order.expiration,\n signed.order.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport interface ClaimBuilderFeeParams {\n /** The sender subaccount as bytes32 */\n sender: Hex;\n /** The builder ID to claim fees for */\n builderId: number;\n}\n\n/**\n * Encodes a ClaimBuilderFee slow mode transaction.\n *\n * Format: [tx_type_byte] + [abi_encoded_params]\n *\n * @param params - The claim builder fee parameters\n * @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction\n */\nexport function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex {\n const txBytes = encodeAbiParameters(\n parseAbiParameters('bytes32 sender, uint32 builderId'),\n [params.sender, params.builderId],\n );\n\n return encodePacked(\n ['uint8', 'bytes'],\n [SlowModeTxType.ClaimBuilderFee, txBytes],\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"encoding.js","names":[],"sources":["../../src/encoding/encoding.ts"],"sourcesContent":["import {\n encodeAbiParameters,\n encodePacked,\n parseAbiParameters,\n type Hex,\n} from 'viem';\nimport {\n EIP712WithdrawCollateralParams,\n SignedEIP712OrderParams,\n SignedTx,\n} from '../eip712';\nimport { addDecimals, toBigInt } from '../utils';\n\n/**\n * Transaction type identifiers for slow mode transactions.\n */\nexport enum SlowModeTxType {\n DepositCollateral = 1,\n WithdrawCollateral = 2,\n LinkSigner = 13,\n ClaimBuilderFee = 31,\n}\n\nexport function encodeSignedWithdrawCollateralTx(\n signed: SignedTx<EIP712WithdrawCollateralParams>,\n) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(address sender, string subaccountName, uint32 productId, uint128 amount, uint64 nonce), bytes signature)',\n ),\n [\n [\n [\n signed.tx.subaccountOwner,\n signed.tx.subaccountName,\n signed.tx.productId,\n signed.tx.amount,\n signed.tx.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport function encodeSignedOrder(signed: SignedEIP712OrderParams) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(tuple(address sender, string subaccountName, int128 priceX18, int128 amount, uint64 expiration, uint64 nonce), bytes signature))',\n ),\n [\n [\n [\n signed.order.subaccountOwner,\n signed.order.subaccountName,\n toBigInt(addDecimals(signed.order.price)),\n signed.order.amount,\n signed.order.expiration,\n signed.order.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport interface ClaimBuilderFeeParams {\n /** The sender subaccount as bytes32 */\n sender: Hex;\n /** The builder ID to claim fees for */\n builderId: number;\n}\n\n/**\n * Encodes a ClaimBuilderFee slow mode transaction.\n *\n * Format: [tx_type_byte] + [abi_encoded_params]\n *\n * @param params - The claim builder fee parameters\n * @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction\n */\nexport function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex {\n const txBytes = encodeAbiParameters(\n parseAbiParameters('bytes32 sender, uint32 builderId'),\n [params.sender, params.builderId],\n );\n\n return encodePacked(\n ['uint8', 'bytes'],\n [SlowModeTxType.ClaimBuilderFee, txBytes],\n );\n}\n"],"mappings":";;;;;;;AAgBA,IAAY,iBAAL,yBAAA,gBAAA;CACL,eAAA,eAAA,uBAAA,KAAA;CACA,eAAA,eAAA,wBAAA,KAAA;CACA,eAAA,eAAA,gBAAA,MAAA;CACA,eAAA,eAAA,qBAAA,MAAA;;AACF,EAAA,CAAA,CAAA;AAEA,SAAgB,iCACd,QACA;CACA,OAAO,oBACL,mBACE,iHACF,GACA,CACE,CACE;EACE,OAAO,GAAG;EACV,OAAO,GAAG;EACV,OAAO,GAAG;EACV,OAAO,GAAG;EACV,OAAO,GAAG;CACZ,GACA,OAAO,SACT,CACF,CACF;AACF;AAEA,SAAgB,kBAAkB,QAAiC;CACjE,OAAO,oBACL,mBACE,yIACF,GACA,CACE,CACE;EACE,OAAO,MAAM;EACb,OAAO,MAAM;EACb,SAAS,YAAY,OAAO,MAAM,KAAK,CAAC;EACxC,OAAO,MAAM;EACb,OAAO,MAAM;EACb,OAAO,MAAM;CACf,GACA,OAAO,SACT,CACF,CACF;AACF;;;;;;;;;AAiBA,SAAgB,wBAAwB,QAAoC;CAM1E,OAAO,aACL,CAAC,SAAS,OAAO,GACjB,CAAA,IAPc,oBACd,mBAAmB,kCAAkC,GACrD,CAAC,OAAO,QAAQ,OAAO,SAAS,CAKO,CAAC,CAC1C;AACF"}
|
package/dist/encoding/index.cjs
CHANGED
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/encoding/index.ts
|
|
18
|
-
var encoding_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(encoding_exports);
|
|
20
|
-
__reExport(encoding_exports, require("./encoding.cjs"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("./encoding.cjs")
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_encoding_encoding = require("./encoding.cjs");
|
|
3
|
+
exports.SlowModeTxType = require_encoding_encoding.SlowModeTxType;
|
|
4
|
+
exports.encodeClaimBuilderFeeTx = require_encoding_encoding.encodeClaimBuilderFeeTx;
|
|
5
|
+
exports.encodeSignedOrder = require_encoding_encoding.encodeSignedOrder;
|
|
6
|
+
exports.encodeSignedWithdrawCollateralTx = require_encoding_encoding.encodeSignedWithdrawCollateralTx;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../eip712/signatureParamTypes.cjs';
|
|
4
|
-
import '../types/subaccountTypes.cjs';
|
|
5
|
-
import '../types/bytes.cjs';
|
|
6
|
-
import '../utils/math/bigNumber.cjs';
|
|
7
|
-
import 'bignumber.js';
|
|
1
|
+
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-COa5q5x1.cjs";
|
|
2
|
+
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
package/dist/encoding/index.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../eip712/signatureParamTypes.js';
|
|
4
|
-
import '../types/subaccountTypes.js';
|
|
5
|
-
import '../types/bytes.js';
|
|
6
|
-
import '../utils/math/bigNumber.js';
|
|
7
|
-
import 'bignumber.js';
|
|
1
|
+
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-Cxt77WO_.js";
|
|
2
|
+
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
package/dist/encoding/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx } from "./encoding.js";
|
|
2
|
+
export { SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|