@nadohq/shared 0.15.0 → 0.18.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
package/dist/utils/interest.d.ts
CHANGED
|
@@ -1,50 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { BigNumberish } from './math/bigNumber.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Calculate amount total borrowed for a product
|
|
7
|
-
*/
|
|
8
|
-
declare function calcTotalBorrowed(totalBorrowsNormalized: BigNumberish, cumulativeBorrowsMultiplierX18: BigNumberish): BigNumber__default;
|
|
9
|
-
/**
|
|
10
|
-
* Calculate amount total deposited for a product.
|
|
11
|
-
*/
|
|
12
|
-
declare function calcTotalDeposited(totalDepositsNormalized: BigNumberish, cumulativeDepositsMultiplierX18: BigNumberish): BigNumber__default;
|
|
13
|
-
/**
|
|
14
|
-
* Calculates utilization ratio = abs(total borrowed / total deposited)
|
|
15
|
-
*
|
|
16
|
-
* @param product Spot product
|
|
17
|
-
*/
|
|
18
|
-
declare function calcUtilizationRatio(product: SpotProduct): BigNumber__default;
|
|
19
|
-
/**
|
|
20
|
-
* Calculates per-second borrow interest rate for a product. For example, a returned rate of 0.1 indicates 10% borrower
|
|
21
|
-
* interest. The calculation for interest rate is as follows:
|
|
22
|
-
*
|
|
23
|
-
* If utilization ratio > inflection:
|
|
24
|
-
* annual rate = (1 - utilization ratio) / (1 - inflection) * interestLargeCap + interestFloor + interestSmallCap
|
|
25
|
-
*
|
|
26
|
-
* If utilization ratio < inflection:
|
|
27
|
-
* annual rate = utilization * interestSmallCap / inflection + utilization
|
|
28
|
-
*
|
|
29
|
-
* The returned rate is annual rate / 31536000 seconds per year.
|
|
30
|
-
*
|
|
31
|
-
* @param product Spot product
|
|
32
|
-
*/
|
|
33
|
-
declare function calcBorrowRatePerSecond(product: SpotProduct): BigNumber__default;
|
|
34
|
-
/**
|
|
35
|
-
* Calculates borrower interest rate compounded for a period of time.
|
|
36
|
-
*
|
|
37
|
-
* @param product Spot product
|
|
38
|
-
* @param seconds Number of seconds for the time period
|
|
39
|
-
*/
|
|
40
|
-
declare function calcBorrowRateForTimeRange(product: SpotProduct, seconds: BigNumberish, minDepositRate: BigNumberish): BigNumber__default;
|
|
41
|
-
/**
|
|
42
|
-
* Calculate depositor interest rate compounded for a period of time.
|
|
43
|
-
*
|
|
44
|
-
* @param product Spot product
|
|
45
|
-
* @param seconds Number of seconds for the time period
|
|
46
|
-
* @param interestFeeFrac Fraction of paid borrower interest that is paid as a fee (0.2 = 20% fee)
|
|
47
|
-
*/
|
|
48
|
-
declare function calcRealizedDepositRateForTimeRange(product: SpotProduct, seconds: BigNumberish, interestFeeFrac: BigNumberish, minDepositRate: BigNumberish): BigNumber__default;
|
|
49
|
-
|
|
50
|
-
export { calcBorrowRateForTimeRange, calcBorrowRatePerSecond, calcRealizedDepositRateForTimeRange, calcTotalBorrowed, calcTotalDeposited, calcUtilizationRatio };
|
|
1
|
+
import { a as calcTotalDeposited, i as calcTotalBorrowed, n as calcBorrowRatePerSecond, o as calcUtilizationRatio, r as calcRealizedDepositRateForTimeRange, t as calcBorrowRateForTimeRange } from "../interest-CUXHxrel.js";
|
|
2
|
+
export { calcBorrowRateForTimeRange, calcBorrowRatePerSecond, calcRealizedDepositRateForTimeRange, calcTotalBorrowed, calcTotalDeposited, calcUtilizationRatio };
|
package/dist/utils/interest.js
CHANGED
|
@@ -1,66 +1,80 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { toBigNumber } from "./math/bigNumber.js";
|
|
2
|
+
import { BigNumbers } from "./math/BigNumbers.js";
|
|
3
|
+
import { removeDecimals } from "./math/decimalAdjustment.js";
|
|
4
|
+
import "./time.js";
|
|
5
|
+
//#region src/utils/interest.ts
|
|
6
|
+
/**
|
|
7
|
+
* Calculate amount total borrowed for a product
|
|
8
|
+
*/
|
|
6
9
|
function calcTotalBorrowed(totalBorrowsNormalized, cumulativeBorrowsMultiplierX18) {
|
|
7
|
-
|
|
8
|
-
removeDecimals(cumulativeBorrowsMultiplierX18)
|
|
9
|
-
);
|
|
10
|
+
return toBigNumber(totalBorrowsNormalized).multipliedBy(removeDecimals(cumulativeBorrowsMultiplierX18));
|
|
10
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Calculate amount total deposited for a product.
|
|
14
|
+
*/
|
|
11
15
|
function calcTotalDeposited(totalDepositsNormalized, cumulativeDepositsMultiplierX18) {
|
|
12
|
-
|
|
13
|
-
removeDecimals(cumulativeDepositsMultiplierX18)
|
|
14
|
-
);
|
|
16
|
+
return toBigNumber(totalDepositsNormalized).multipliedBy(removeDecimals(cumulativeDepositsMultiplierX18));
|
|
15
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Calculates utilization ratio = abs(total borrowed / total deposited)
|
|
20
|
+
*
|
|
21
|
+
* @param product Spot product
|
|
22
|
+
*/
|
|
16
23
|
function calcUtilizationRatio(product) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
return product.totalBorrowed.abs().div(product.totalDeposited);
|
|
24
|
+
if (product.totalDeposited.eq(0) || product.totalBorrowed.eq(0)) return toBigNumber(0);
|
|
25
|
+
return product.totalBorrowed.abs().div(product.totalDeposited);
|
|
21
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Calculates per-second borrow interest rate for a product. For example, a returned rate of 0.1 indicates 10% borrower
|
|
29
|
+
* interest. The calculation for interest rate is as follows:
|
|
30
|
+
*
|
|
31
|
+
* If utilization ratio > inflection:
|
|
32
|
+
* annual rate = (1 - utilization ratio) / (1 - inflection) * interestLargeCap + interestFloor + interestSmallCap
|
|
33
|
+
*
|
|
34
|
+
* If utilization ratio < inflection:
|
|
35
|
+
* annual rate = utilization * interestSmallCap / inflection + utilization
|
|
36
|
+
*
|
|
37
|
+
* The returned rate is annual rate / 31536000 seconds per year.
|
|
38
|
+
*
|
|
39
|
+
* @param product Spot product
|
|
40
|
+
*/
|
|
22
41
|
function calcBorrowRatePerSecond(product) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const utilizationTerm = interestLargeCap.times(
|
|
37
|
-
toBigNumber(utilization).minus(interestInflectionUtil).div(BigNumbers.ONE.minus(interestInflectionUtil))
|
|
38
|
-
);
|
|
39
|
-
annualRate = interestFloor.plus(interestSmallCap).plus(utilizationTerm);
|
|
40
|
-
} else {
|
|
41
|
-
const utilizationTerm = utilization.div(interestInflectionUtil).times(interestSmallCap);
|
|
42
|
-
annualRate = interestFloor.plus(utilizationTerm);
|
|
43
|
-
}
|
|
44
|
-
return annualRate.div(TimeInSeconds.YEAR);
|
|
42
|
+
const { interestFloor, interestInflectionUtil, interestSmallCap, interestLargeCap } = product;
|
|
43
|
+
const utilization = calcUtilizationRatio(product);
|
|
44
|
+
if (utilization.eq(0)) return toBigNumber(0);
|
|
45
|
+
const pastInflection = utilization.gt(interestInflectionUtil);
|
|
46
|
+
let annualRate;
|
|
47
|
+
if (pastInflection) {
|
|
48
|
+
const utilizationTerm = interestLargeCap.times(toBigNumber(utilization).minus(interestInflectionUtil).div(BigNumbers.ONE.minus(interestInflectionUtil)));
|
|
49
|
+
annualRate = interestFloor.plus(interestSmallCap).plus(utilizationTerm);
|
|
50
|
+
} else {
|
|
51
|
+
const utilizationTerm = utilization.div(interestInflectionUtil).times(interestSmallCap);
|
|
52
|
+
annualRate = interestFloor.plus(utilizationTerm);
|
|
53
|
+
}
|
|
54
|
+
return annualRate.div(31536e3);
|
|
45
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Calculates borrower interest rate compounded for a period of time.
|
|
58
|
+
*
|
|
59
|
+
* @param product Spot product
|
|
60
|
+
* @param seconds Number of seconds for the time period
|
|
61
|
+
*/
|
|
46
62
|
function calcBorrowRateForTimeRange(product, seconds, minDepositRate) {
|
|
47
|
-
|
|
48
|
-
const borrowRateForTime = borrowRatePerSecond.plus(1).toNumber() ** toBigNumber(seconds).toNumber() - 1;
|
|
49
|
-
return toBigNumber(borrowRateForTime).plus(toBigNumber(minDepositRate));
|
|
63
|
+
return toBigNumber(calcBorrowRatePerSecond(product).plus(1).toNumber() ** toBigNumber(seconds).toNumber() - 1).plus(toBigNumber(minDepositRate));
|
|
50
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Calculate depositor interest rate compounded for a period of time.
|
|
67
|
+
*
|
|
68
|
+
* @param product Spot product
|
|
69
|
+
* @param seconds Number of seconds for the time period
|
|
70
|
+
* @param interestFeeFrac Fraction of paid borrower interest that is paid as a fee (0.2 = 20% fee)
|
|
71
|
+
*/
|
|
51
72
|
function calcRealizedDepositRateForTimeRange(product, seconds, interestFeeFrac, minDepositRate) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
return utilization.times(calcBorrowRateForTimeRange(product, seconds, toBigNumber(0))).times(BigNumbers.ONE.minus(toBigNumber(interestFeeFrac))).plus(toBigNumber(minDepositRate));
|
|
73
|
+
const utilization = calcUtilizationRatio(product);
|
|
74
|
+
if (utilization.eq(0)) return toBigNumber(0);
|
|
75
|
+
return utilization.times(calcBorrowRateForTimeRange(product, seconds, toBigNumber(0))).times(BigNumbers.ONE.minus(toBigNumber(interestFeeFrac))).plus(toBigNumber(minDepositRate));
|
|
57
76
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
calcRealizedDepositRateForTimeRange,
|
|
62
|
-
calcTotalBorrowed,
|
|
63
|
-
calcTotalDeposited,
|
|
64
|
-
calcUtilizationRatio
|
|
65
|
-
};
|
|
77
|
+
//#endregion
|
|
78
|
+
export { calcBorrowRateForTimeRange, calcBorrowRatePerSecond, calcRealizedDepositRateForTimeRange, calcTotalBorrowed, calcTotalDeposited, calcUtilizationRatio };
|
|
79
|
+
|
|
66
80
|
//# sourceMappingURL=interest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/interest.ts"],"sourcesContent":["import BigNumber from 'bignumber.js';\nimport { SpotProduct } from '../types/productTypes';\nimport { BigNumberish, BigNumbers, removeDecimals, toBigNumber } from './math';\nimport { TimeInSeconds } from './time';\n\n/**\n * Calculate amount total borrowed for a product\n */\nexport function calcTotalBorrowed(\n totalBorrowsNormalized: BigNumberish,\n cumulativeBorrowsMultiplierX18: BigNumberish,\n): BigNumber {\n return toBigNumber(totalBorrowsNormalized).multipliedBy(\n removeDecimals(cumulativeBorrowsMultiplierX18),\n );\n}\n\n/**\n * Calculate amount total deposited for a product.\n */\nexport function calcTotalDeposited(\n totalDepositsNormalized: BigNumberish,\n cumulativeDepositsMultiplierX18: BigNumberish,\n): BigNumber {\n return toBigNumber(totalDepositsNormalized).multipliedBy(\n removeDecimals(cumulativeDepositsMultiplierX18),\n );\n}\n\n/**\n * Calculates utilization ratio = abs(total borrowed / total deposited)\n *\n * @param product Spot product\n */\nexport function calcUtilizationRatio(product: SpotProduct) {\n if (product.totalDeposited.eq(0) || product.totalBorrowed.eq(0)) {\n return toBigNumber(0);\n }\n return product.totalBorrowed.abs().div(product.totalDeposited);\n}\n\n/**\n * Calculates per-second borrow interest rate for a product. For example, a returned rate of 0.1 indicates 10% borrower\n * interest. The calculation for interest rate is as follows:\n *\n * If utilization ratio > inflection:\n * annual rate = (1 - utilization ratio) / (1 - inflection) * interestLargeCap + interestFloor + interestSmallCap\n *\n * If utilization ratio < inflection:\n * annual rate = utilization * interestSmallCap / inflection + utilization\n *\n * The returned rate is annual rate / 31536000 seconds per year.\n *\n * @param product Spot product\n */\nexport function calcBorrowRatePerSecond(product: SpotProduct) {\n const {\n interestFloor,\n interestInflectionUtil,\n interestSmallCap,\n interestLargeCap,\n } = product;\n const utilization = calcUtilizationRatio(product);\n if (utilization.eq(0)) {\n return toBigNumber(0);\n }\n const pastInflection = utilization.gt(interestInflectionUtil);\n\n let annualRate: BigNumber;\n if (pastInflection) {\n const utilizationTerm = interestLargeCap.times(\n toBigNumber(utilization)\n .minus(interestInflectionUtil)\n .div(BigNumbers.ONE.minus(interestInflectionUtil)),\n );\n annualRate = interestFloor.plus(interestSmallCap).plus(utilizationTerm);\n } else {\n const utilizationTerm = utilization\n .div(interestInflectionUtil)\n .times(interestSmallCap);\n annualRate = interestFloor.plus(utilizationTerm);\n }\n\n return annualRate.div(TimeInSeconds.YEAR);\n}\n\n/**\n * Calculates borrower interest rate compounded for a period of time.\n *\n * @param product Spot product\n * @param seconds Number of seconds for the time period\n */\nexport function calcBorrowRateForTimeRange(\n product: SpotProduct,\n seconds: BigNumberish,\n minDepositRate: BigNumberish,\n) {\n const borrowRatePerSecond = calcBorrowRatePerSecond(product);\n\n // Convert to number for this, with some loss of precision, but using `.pow()` causes us to hit browser resource limits\n const borrowRateForTime =\n borrowRatePerSecond.plus(1).toNumber() ** toBigNumber(seconds).toNumber() -\n 1;\n return toBigNumber(borrowRateForTime).plus(toBigNumber(minDepositRate));\n}\n\n/**\n * Calculate depositor interest rate compounded for a period of time.\n *\n * @param product Spot product\n * @param seconds Number of seconds for the time period\n * @param interestFeeFrac Fraction of paid borrower interest that is paid as a fee (0.2 = 20% fee)\n */\nexport function calcRealizedDepositRateForTimeRange(\n product: SpotProduct,\n seconds: BigNumberish,\n interestFeeFrac: BigNumberish,\n minDepositRate: BigNumberish,\n) {\n const utilization = calcUtilizationRatio(product);\n if (utilization.eq(0)) {\n return toBigNumber(0);\n }\n return utilization\n .times(calcBorrowRateForTimeRange(product, seconds, toBigNumber(0)))\n .times(BigNumbers.ONE.minus(toBigNumber(interestFeeFrac)))\n .plus(toBigNumber(minDepositRate));\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"interest.js","names":[],"sources":["../../src/utils/interest.ts"],"sourcesContent":["import BigNumber from 'bignumber.js';\nimport { SpotProduct } from '../types/productTypes';\nimport { BigNumberish, BigNumbers, removeDecimals, toBigNumber } from './math';\nimport { TimeInSeconds } from './time';\n\n/**\n * Calculate amount total borrowed for a product\n */\nexport function calcTotalBorrowed(\n totalBorrowsNormalized: BigNumberish,\n cumulativeBorrowsMultiplierX18: BigNumberish,\n): BigNumber {\n return toBigNumber(totalBorrowsNormalized).multipliedBy(\n removeDecimals(cumulativeBorrowsMultiplierX18),\n );\n}\n\n/**\n * Calculate amount total deposited for a product.\n */\nexport function calcTotalDeposited(\n totalDepositsNormalized: BigNumberish,\n cumulativeDepositsMultiplierX18: BigNumberish,\n): BigNumber {\n return toBigNumber(totalDepositsNormalized).multipliedBy(\n removeDecimals(cumulativeDepositsMultiplierX18),\n );\n}\n\n/**\n * Calculates utilization ratio = abs(total borrowed / total deposited)\n *\n * @param product Spot product\n */\nexport function calcUtilizationRatio(product: SpotProduct) {\n if (product.totalDeposited.eq(0) || product.totalBorrowed.eq(0)) {\n return toBigNumber(0);\n }\n return product.totalBorrowed.abs().div(product.totalDeposited);\n}\n\n/**\n * Calculates per-second borrow interest rate for a product. For example, a returned rate of 0.1 indicates 10% borrower\n * interest. The calculation for interest rate is as follows:\n *\n * If utilization ratio > inflection:\n * annual rate = (1 - utilization ratio) / (1 - inflection) * interestLargeCap + interestFloor + interestSmallCap\n *\n * If utilization ratio < inflection:\n * annual rate = utilization * interestSmallCap / inflection + utilization\n *\n * The returned rate is annual rate / 31536000 seconds per year.\n *\n * @param product Spot product\n */\nexport function calcBorrowRatePerSecond(product: SpotProduct) {\n const {\n interestFloor,\n interestInflectionUtil,\n interestSmallCap,\n interestLargeCap,\n } = product;\n const utilization = calcUtilizationRatio(product);\n if (utilization.eq(0)) {\n return toBigNumber(0);\n }\n const pastInflection = utilization.gt(interestInflectionUtil);\n\n let annualRate: BigNumber;\n if (pastInflection) {\n const utilizationTerm = interestLargeCap.times(\n toBigNumber(utilization)\n .minus(interestInflectionUtil)\n .div(BigNumbers.ONE.minus(interestInflectionUtil)),\n );\n annualRate = interestFloor.plus(interestSmallCap).plus(utilizationTerm);\n } else {\n const utilizationTerm = utilization\n .div(interestInflectionUtil)\n .times(interestSmallCap);\n annualRate = interestFloor.plus(utilizationTerm);\n }\n\n return annualRate.div(TimeInSeconds.YEAR);\n}\n\n/**\n * Calculates borrower interest rate compounded for a period of time.\n *\n * @param product Spot product\n * @param seconds Number of seconds for the time period\n */\nexport function calcBorrowRateForTimeRange(\n product: SpotProduct,\n seconds: BigNumberish,\n minDepositRate: BigNumberish,\n) {\n const borrowRatePerSecond = calcBorrowRatePerSecond(product);\n\n // Convert to number for this, with some loss of precision, but using `.pow()` causes us to hit browser resource limits\n const borrowRateForTime =\n borrowRatePerSecond.plus(1).toNumber() ** toBigNumber(seconds).toNumber() -\n 1;\n return toBigNumber(borrowRateForTime).plus(toBigNumber(minDepositRate));\n}\n\n/**\n * Calculate depositor interest rate compounded for a period of time.\n *\n * @param product Spot product\n * @param seconds Number of seconds for the time period\n * @param interestFeeFrac Fraction of paid borrower interest that is paid as a fee (0.2 = 20% fee)\n */\nexport function calcRealizedDepositRateForTimeRange(\n product: SpotProduct,\n seconds: BigNumberish,\n interestFeeFrac: BigNumberish,\n minDepositRate: BigNumberish,\n) {\n const utilization = calcUtilizationRatio(product);\n if (utilization.eq(0)) {\n return toBigNumber(0);\n }\n return utilization\n .times(calcBorrowRateForTimeRange(product, seconds, toBigNumber(0)))\n .times(BigNumbers.ONE.minus(toBigNumber(interestFeeFrac)))\n .plus(toBigNumber(minDepositRate));\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,kBACd,wBACA,gCACW;CACX,OAAO,YAAY,sBAAsB,EAAE,aACzC,eAAe,8BAA8B,CAC/C;AACF;;;;AAKA,SAAgB,mBACd,yBACA,iCACW;CACX,OAAO,YAAY,uBAAuB,EAAE,aAC1C,eAAe,+BAA+B,CAChD;AACF;;;;;;AAOA,SAAgB,qBAAqB,SAAsB;CACzD,IAAI,QAAQ,eAAe,GAAG,CAAC,KAAK,QAAQ,cAAc,GAAG,CAAC,GAC5D,OAAO,YAAY,CAAC;CAEtB,OAAO,QAAQ,cAAc,IAAI,EAAE,IAAI,QAAQ,cAAc;AAC/D;;;;;;;;;;;;;;;AAgBA,SAAgB,wBAAwB,SAAsB;CAC5D,MAAM,EACJ,eACA,wBACA,kBACA,qBACE;CACJ,MAAM,cAAc,qBAAqB,OAAO;CAChD,IAAI,YAAY,GAAG,CAAC,GAClB,OAAO,YAAY,CAAC;CAEtB,MAAM,iBAAiB,YAAY,GAAG,sBAAsB;CAE5D,IAAI;CACJ,IAAI,gBAAgB;EAClB,MAAM,kBAAkB,iBAAiB,MACvC,YAAY,WAAW,EACpB,MAAM,sBAAsB,EAC5B,IAAI,WAAW,IAAI,MAAM,sBAAsB,CAAC,CACrD;EACA,aAAa,cAAc,KAAK,gBAAgB,EAAE,KAAK,eAAe;CACxE,OAAO;EACL,MAAM,kBAAkB,YACrB,IAAI,sBAAsB,EAC1B,MAAM,gBAAgB;EACzB,aAAa,cAAc,KAAK,eAAe;CACjD;CAEA,OAAO,WAAW,IAAA,OAAsB;AAC1C;;;;;;;AAQA,SAAgB,2BACd,SACA,SACA,gBACA;CAOA,OAAO,YANqB,wBAAwB,OAIhC,EAAE,KAAK,CAAC,EAAE,SAAS,KAAK,YAAY,OAAO,EAAE,SAAS,IACxE,CACkC,EAAE,KAAK,YAAY,cAAc,CAAC;AACxE;;;;;;;;AASA,SAAgB,oCACd,SACA,SACA,iBACA,gBACA;CACA,MAAM,cAAc,qBAAqB,OAAO;CAChD,IAAI,YAAY,GAAG,CAAC,GAClB,OAAO,YAAY,CAAC;CAEtB,OAAO,YACJ,MAAM,2BAA2B,SAAS,SAAS,YAAY,CAAC,CAAC,CAAC,EAClE,MAAM,WAAW,IAAI,MAAM,YAAY,eAAe,CAAC,CAAC,EACxD,KAAK,YAAY,cAAc,CAAC;AACrC"}
|
|
@@ -1,33 +1,9 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/utils/isWriteableContract.ts
|
|
21
|
-
var isWriteableContract_exports = {};
|
|
22
|
-
__export(isWriteableContract_exports, {
|
|
23
|
-
isWriteableContract: () => isWriteableContract
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(isWriteableContract_exports);
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/utils/isWriteableContract.ts
|
|
26
3
|
function isWriteableContract(contract) {
|
|
27
|
-
|
|
4
|
+
return "write" in contract;
|
|
28
5
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
6
|
+
//#endregion
|
|
7
|
+
exports.isWriteableContract = isWriteableContract;
|
|
8
|
+
|
|
33
9
|
//# sourceMappingURL=isWriteableContract.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/isWriteableContract.ts"],"sourcesContent":["import { Abi } from 'viem';\nimport {\n ContractInstance,\n WriteableContractInstance,\n} from '../types/viemTypes';\n\nexport function isWriteableContract<TAbi extends Abi>(\n contract: ContractInstance<TAbi>,\n): contract is WriteableContractInstance<TAbi> {\n return 'write' in contract;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isWriteableContract.cjs","names":[],"sources":["../../src/utils/isWriteableContract.ts"],"sourcesContent":["import { Abi } from 'viem';\nimport {\n ContractInstance,\n WriteableContractInstance,\n} from '../types/viemTypes';\n\nexport function isWriteableContract<TAbi extends Abi>(\n contract: ContractInstance<TAbi>,\n): contract is WriteableContractInstance<TAbi> {\n return 'write' in contract;\n}\n"],"mappings":";;AAMA,SAAgB,oBACd,UAC6C;CAC7C,OAAO,WAAW;AACpB"}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare function isWriteableContract<TAbi extends Abi>(contract: ContractInstance<TAbi>): contract is WriteableContractInstance<TAbi>;
|
|
5
|
-
|
|
6
|
-
export { isWriteableContract };
|
|
1
|
+
import { t as isWriteableContract } from "../isWriteableContract-ZGxc9VmC.cjs";
|
|
2
|
+
export { isWriteableContract };
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare function isWriteableContract<TAbi extends Abi>(contract: ContractInstance<TAbi>): contract is WriteableContractInstance<TAbi>;
|
|
5
|
-
|
|
6
|
-
export { isWriteableContract };
|
|
1
|
+
import { t as isWriteableContract } from "../isWriteableContract-DcM3nqdX.js";
|
|
2
|
+
export { isWriteableContract };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// src/utils/isWriteableContract.ts
|
|
1
|
+
//#region src/utils/isWriteableContract.ts
|
|
4
2
|
function isWriteableContract(contract) {
|
|
5
|
-
|
|
3
|
+
return "write" in contract;
|
|
6
4
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
//#endregion
|
|
6
|
+
export { isWriteableContract };
|
|
7
|
+
|
|
10
8
|
//# sourceMappingURL=isWriteableContract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/isWriteableContract.ts"],"sourcesContent":["import { Abi } from 'viem';\nimport {\n ContractInstance,\n WriteableContractInstance,\n} from '../types/viemTypes';\n\nexport function isWriteableContract<TAbi extends Abi>(\n contract: ContractInstance<TAbi>,\n): contract is WriteableContractInstance<TAbi> {\n return 'write' in contract;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isWriteableContract.js","names":[],"sources":["../../src/utils/isWriteableContract.ts"],"sourcesContent":["import { Abi } from 'viem';\nimport {\n ContractInstance,\n WriteableContractInstance,\n} from '../types/viemTypes';\n\nexport function isWriteableContract<TAbi extends Abi>(\n contract: ContractInstance<TAbi>,\n): contract is WriteableContractInstance<TAbi> {\n return 'write' in contract;\n}\n"],"mappings":";AAMA,SAAgB,oBACd,UAC6C;CAC7C,OAAO,WAAW;AACpB"}
|
package/dist/utils/mapValues.cjs
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/utils/mapValues.ts
|
|
21
|
-
var mapValues_exports = {};
|
|
22
|
-
__export(mapValues_exports, {
|
|
23
|
-
mapValues: () => mapValues
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(mapValues_exports);
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/utils/mapValues.ts
|
|
26
3
|
function mapValues(obj, mapFn) {
|
|
27
|
-
|
|
28
|
-
Object.entries(obj).map(([key, value], index) => [
|
|
29
|
-
key,
|
|
30
|
-
mapFn(value, key, index)
|
|
31
|
-
])
|
|
32
|
-
);
|
|
4
|
+
return Object.fromEntries(Object.entries(obj).map(([key, value], index) => [key, mapFn(value, key, index)]));
|
|
33
5
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
6
|
+
//#endregion
|
|
7
|
+
exports.mapValues = mapValues;
|
|
8
|
+
|
|
38
9
|
//# sourceMappingURL=mapValues.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/mapValues.ts"],"sourcesContent":["/**\n * Map values of an object given mapFn. Avoids needing to pull in lodash\n */\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Record<TKey, TValue>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Record<TKey, TNewValue>;\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Partial<Record<TKey, TValue>>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Partial<Record<TKey, TNewValue>>;\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Record<TKey, TValue>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Record<TKey, TNewValue> {\n return Object.fromEntries(\n Object.entries(obj).map(([key, value], index) => [\n key,\n mapFn(value as TValue, key as TKey, index),\n ]),\n ) as Record<TKey, TNewValue>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mapValues.cjs","names":[],"sources":["../../src/utils/mapValues.ts"],"sourcesContent":["/**\n * Map values of an object given mapFn. Avoids needing to pull in lodash\n */\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Record<TKey, TValue>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Record<TKey, TNewValue>;\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Partial<Record<TKey, TValue>>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Partial<Record<TKey, TNewValue>>;\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Record<TKey, TValue>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Record<TKey, TNewValue> {\n return Object.fromEntries(\n Object.entries(obj).map(([key, value], index) => [\n key,\n mapFn(value as TValue, key as TKey, index),\n ]),\n ) as Record<TKey, TNewValue>;\n}\n"],"mappings":";;AAmBA,SAAgB,UAKd,KACA,OACyB;CACzB,OAAO,OAAO,YACZ,OAAO,QAAQ,GAAG,EAAE,KAAK,CAAC,KAAK,QAAQ,UAAU,CAC/C,KACA,MAAM,OAAiB,KAAa,KAAK,CAC3C,CAAC,CACH;AACF"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
declare function mapValues<TKey extends string | number | symbol, TValue, TNewValue>(obj: Record<TKey, TValue>, mapFn: (value: TValue, key: TKey, index: number) => TNewValue): Record<TKey, TNewValue>;
|
|
5
|
-
declare function mapValues<TKey extends string | number | symbol, TValue, TNewValue>(obj: Partial<Record<TKey, TValue>>, mapFn: (value: TValue, key: TKey, index: number) => TNewValue): Partial<Record<TKey, TNewValue>>;
|
|
6
|
-
|
|
7
|
-
export { mapValues };
|
|
1
|
+
import { t as mapValues } from "../mapValues-jlfbJybF.cjs";
|
|
2
|
+
export { mapValues };
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
declare function mapValues<TKey extends string | number | symbol, TValue, TNewValue>(obj: Record<TKey, TValue>, mapFn: (value: TValue, key: TKey, index: number) => TNewValue): Record<TKey, TNewValue>;
|
|
5
|
-
declare function mapValues<TKey extends string | number | symbol, TValue, TNewValue>(obj: Partial<Record<TKey, TValue>>, mapFn: (value: TValue, key: TKey, index: number) => TNewValue): Partial<Record<TKey, TNewValue>>;
|
|
6
|
-
|
|
7
|
-
export { mapValues };
|
|
1
|
+
import { t as mapValues } from "../mapValues-cO_NBiCx.js";
|
|
2
|
+
export { mapValues };
|
package/dist/utils/mapValues.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// src/utils/mapValues.ts
|
|
1
|
+
//#region src/utils/mapValues.ts
|
|
4
2
|
function mapValues(obj, mapFn) {
|
|
5
|
-
|
|
6
|
-
Object.entries(obj).map(([key, value], index) => [
|
|
7
|
-
key,
|
|
8
|
-
mapFn(value, key, index)
|
|
9
|
-
])
|
|
10
|
-
);
|
|
3
|
+
return Object.fromEntries(Object.entries(obj).map(([key, value], index) => [key, mapFn(value, key, index)]));
|
|
11
4
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
//#endregion
|
|
6
|
+
export { mapValues };
|
|
7
|
+
|
|
15
8
|
//# sourceMappingURL=mapValues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/mapValues.ts"],"sourcesContent":["/**\n * Map values of an object given mapFn. Avoids needing to pull in lodash\n */\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Record<TKey, TValue>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Record<TKey, TNewValue>;\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Partial<Record<TKey, TValue>>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Partial<Record<TKey, TNewValue>>;\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Record<TKey, TValue>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Record<TKey, TNewValue> {\n return Object.fromEntries(\n Object.entries(obj).map(([key, value], index) => [\n key,\n mapFn(value as TValue, key as TKey, index),\n ]),\n ) as Record<TKey, TNewValue>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mapValues.js","names":[],"sources":["../../src/utils/mapValues.ts"],"sourcesContent":["/**\n * Map values of an object given mapFn. Avoids needing to pull in lodash\n */\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Record<TKey, TValue>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Record<TKey, TNewValue>;\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Partial<Record<TKey, TValue>>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Partial<Record<TKey, TNewValue>>;\nexport function mapValues<\n TKey extends string | number | symbol,\n TValue,\n TNewValue,\n>(\n obj: Record<TKey, TValue>,\n mapFn: (value: TValue, key: TKey, index: number) => TNewValue,\n): Record<TKey, TNewValue> {\n return Object.fromEntries(\n Object.entries(obj).map(([key, value], index) => [\n key,\n mapFn(value as TValue, key as TKey, index),\n ]),\n ) as Record<TKey, TNewValue>;\n}\n"],"mappings":";AAmBA,SAAgB,UAKd,KACA,OACyB;CACzB,OAAO,OAAO,YACZ,OAAO,QAAQ,GAAG,EAAE,KAAK,CAAC,KAAK,QAAQ,UAAU,CAC/C,KACA,MAAM,OAAiB,KAAa,KAAK,CAC3C,CAAC,CACH;AACF"}
|
|
@@ -1,37 +1,13 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/utils/math/BigNumbers.ts
|
|
21
|
-
var BigNumbers_exports = {};
|
|
22
|
-
__export(BigNumbers_exports, {
|
|
23
|
-
BigNumbers: () => BigNumbers
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(BigNumbers_exports);
|
|
26
|
-
var import_bigNumber = require("./bigNumber.cjs");
|
|
27
|
-
var BigNumbers = Object.freeze({
|
|
28
|
-
ZERO: (0, import_bigNumber.toBigNumber)(0),
|
|
29
|
-
ONE: (0, import_bigNumber.toBigNumber)(1),
|
|
30
|
-
INF: (0, import_bigNumber.toBigNumber)(Infinity),
|
|
31
|
-
MAX_I128: (0, import_bigNumber.toBigNumber)("170141183460469231731687303715884105727")
|
|
32
|
-
});
|
|
33
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
-
0 && (module.exports = {
|
|
35
|
-
BigNumbers
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utils_math_bigNumber = require("./bigNumber.cjs");
|
|
3
|
+
//#region src/utils/math/BigNumbers.ts
|
|
4
|
+
const BigNumbers = Object.freeze({
|
|
5
|
+
ZERO: require_utils_math_bigNumber.toBigNumber(0),
|
|
6
|
+
ONE: require_utils_math_bigNumber.toBigNumber(1),
|
|
7
|
+
INF: require_utils_math_bigNumber.toBigNumber(Infinity),
|
|
8
|
+
MAX_I128: require_utils_math_bigNumber.toBigNumber("170141183460469231731687303715884105727")
|
|
36
9
|
});
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.BigNumbers = BigNumbers;
|
|
12
|
+
|
|
37
13
|
//# sourceMappingURL=BigNumbers.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/math/BigNumbers.ts"],"sourcesContent":["import { toBigNumber } from './bigNumber';\n\nexport const BigNumbers = Object.freeze({\n ZERO: toBigNumber(0),\n ONE: toBigNumber(1),\n INF: toBigNumber(Infinity),\n MAX_I128: toBigNumber('170141183460469231731687303715884105727'),\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BigNumbers.cjs","names":["toBigNumber"],"sources":["../../../src/utils/math/BigNumbers.ts"],"sourcesContent":["import { toBigNumber } from './bigNumber';\n\nexport const BigNumbers = Object.freeze({\n ZERO: toBigNumber(0),\n ONE: toBigNumber(1),\n INF: toBigNumber(Infinity),\n MAX_I128: toBigNumber('170141183460469231731687303715884105727'),\n});\n"],"mappings":";;;AAEA,MAAa,aAAa,OAAO,OAAO;CACtC,MAAMA,6BAAAA,YAAY,CAAC;CACnB,KAAKA,6BAAAA,YAAY,CAAC;CAClB,KAAKA,6BAAAA,YAAY,QAAQ;CACzB,UAAUA,6BAAAA,YAAY,yCAAyC;AACjE,CAAC"}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare const BigNumbers: Readonly<{
|
|
4
|
-
ZERO: BigNumber.BigNumber;
|
|
5
|
-
ONE: BigNumber.BigNumber;
|
|
6
|
-
INF: BigNumber.BigNumber;
|
|
7
|
-
MAX_I128: BigNumber.BigNumber;
|
|
8
|
-
}>;
|
|
9
|
-
|
|
10
|
-
export { BigNumbers };
|
|
1
|
+
import { t as BigNumbers } from "../../BigNumbers-CZl--in2.cjs";
|
|
2
|
+
export { BigNumbers };
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare const BigNumbers: Readonly<{
|
|
4
|
-
ZERO: BigNumber.BigNumber;
|
|
5
|
-
ONE: BigNumber.BigNumber;
|
|
6
|
-
INF: BigNumber.BigNumber;
|
|
7
|
-
MAX_I128: BigNumber.BigNumber;
|
|
8
|
-
}>;
|
|
9
|
-
|
|
10
|
-
export { BigNumbers };
|
|
1
|
+
import { t as BigNumbers } from "../../BigNumbers-CM-lXODL.js";
|
|
2
|
+
export { BigNumbers };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import "../../chunk-5WRI5ZAA.js";
|
|
2
|
-
|
|
3
|
-
// src/utils/math/BigNumbers.ts
|
|
4
1
|
import { toBigNumber } from "./bigNumber.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
//#region src/utils/math/BigNumbers.ts
|
|
3
|
+
const BigNumbers = Object.freeze({
|
|
4
|
+
ZERO: toBigNumber(0),
|
|
5
|
+
ONE: toBigNumber(1),
|
|
6
|
+
INF: toBigNumber(Infinity),
|
|
7
|
+
MAX_I128: toBigNumber("170141183460469231731687303715884105727")
|
|
10
8
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
//#endregion
|
|
10
|
+
export { BigNumbers };
|
|
11
|
+
|
|
14
12
|
//# sourceMappingURL=BigNumbers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/math/BigNumbers.ts"],"sourcesContent":["import { toBigNumber } from './bigNumber';\n\nexport const BigNumbers = Object.freeze({\n ZERO: toBigNumber(0),\n ONE: toBigNumber(1),\n INF: toBigNumber(Infinity),\n MAX_I128: toBigNumber('170141183460469231731687303715884105727'),\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BigNumbers.js","names":[],"sources":["../../../src/utils/math/BigNumbers.ts"],"sourcesContent":["import { toBigNumber } from './bigNumber';\n\nexport const BigNumbers = Object.freeze({\n ZERO: toBigNumber(0),\n ONE: toBigNumber(1),\n INF: toBigNumber(Infinity),\n MAX_I128: toBigNumber('170141183460469231731687303715884105727'),\n});\n"],"mappings":";;AAEA,MAAa,aAAa,OAAO,OAAO;CACtC,MAAM,YAAY,CAAC;CACnB,KAAK,YAAY,CAAC;CAClB,KAAK,YAAY,QAAQ;CACzB,UAAU,YAAY,yCAAyC;AACjE,CAAC"}
|
|
@@ -1,59 +1,27 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/utils/math/bigNumber.ts
|
|
31
|
-
var bigNumber_exports = {};
|
|
32
|
-
__export(bigNumber_exports, {
|
|
33
|
-
toBigNumber: () => toBigNumber
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(bigNumber_exports);
|
|
36
|
-
var import_bignumber = __toESM(require("bignumber.js"), 1);
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_chunk = require("../../chunk-CKQMccvm.cjs");
|
|
3
|
+
let bignumber_js = require("bignumber.js");
|
|
4
|
+
bignumber_js = require_chunk.__toESM(bignumber_js, 1);
|
|
5
|
+
//#region src/utils/math/bigNumber.ts
|
|
6
|
+
/**
|
|
7
|
+
* Converts a value to an instance of BigNumber
|
|
8
|
+
*
|
|
9
|
+
* @param val
|
|
10
|
+
*/
|
|
37
11
|
function toBigNumber(val) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
try {
|
|
50
|
-
return new import_bignumber.default(bnConstructorVal);
|
|
51
|
-
} catch {
|
|
52
|
-
return new import_bignumber.default(Number.NaN);
|
|
53
|
-
}
|
|
12
|
+
if (bignumber_js.default.isBigNumber(val)) return val;
|
|
13
|
+
const bnConstructorVal = (() => {
|
|
14
|
+
if (typeof val === "string" || typeof val === "number") return val;
|
|
15
|
+
else if (typeof val === "bigint") return val.toString();
|
|
16
|
+
return JSON.stringify(val);
|
|
17
|
+
})();
|
|
18
|
+
try {
|
|
19
|
+
return new bignumber_js.default(bnConstructorVal);
|
|
20
|
+
} catch {
|
|
21
|
+
return new bignumber_js.default(NaN);
|
|
22
|
+
}
|
|
54
23
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
});
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.toBigNumber = toBigNumber;
|
|
26
|
+
|
|
59
27
|
//# sourceMappingURL=bigNumber.cjs.map
|