@nadohq/shared 0.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/abis/Clearinghouse.cjs +891 -0
- package/dist/abis/Clearinghouse.cjs.map +1 -0
- package/dist/abis/Clearinghouse.d.cts +669 -0
- package/dist/abis/Clearinghouse.d.ts +669 -0
- package/dist/abis/Clearinghouse.js +868 -0
- package/dist/abis/Clearinghouse.js.map +1 -0
- package/dist/abis/ERC20.cjs +215 -0
- package/dist/abis/ERC20.cjs.map +1 -0
- package/dist/abis/ERC20.d.cts +143 -0
- package/dist/abis/ERC20.d.ts +143 -0
- package/dist/abis/ERC20.js +192 -0
- package/dist/abis/ERC20.js.map +1 -0
- package/dist/abis/Endpoint.cjs +589 -0
- package/dist/abis/Endpoint.cjs.map +1 -0
- package/dist/abis/Endpoint.d.cts +433 -0
- package/dist/abis/Endpoint.d.ts +433 -0
- package/dist/abis/Endpoint.js +566 -0
- package/dist/abis/Endpoint.js.map +1 -0
- package/dist/abis/MockERC20.cjs +341 -0
- package/dist/abis/MockERC20.cjs.map +1 -0
- package/dist/abis/MockERC20.d.cts +239 -0
- package/dist/abis/MockERC20.d.ts +239 -0
- package/dist/abis/MockERC20.js +318 -0
- package/dist/abis/MockERC20.js.map +1 -0
- package/dist/abis/PerpEngine.cjs +886 -0
- package/dist/abis/PerpEngine.cjs.map +1 -0
- package/dist/abis/PerpEngine.d.cts +661 -0
- package/dist/abis/PerpEngine.d.ts +661 -0
- package/dist/abis/PerpEngine.js +863 -0
- package/dist/abis/PerpEngine.js.map +1 -0
- package/dist/abis/Querier.cjs +1522 -0
- package/dist/abis/Querier.cjs.map +1 -0
- package/dist/abis/Querier.d.cts +1149 -0
- package/dist/abis/Querier.d.ts +1149 -0
- package/dist/abis/Querier.js +1499 -0
- package/dist/abis/Querier.js.map +1 -0
- package/dist/abis/SpotEngine.cjs +937 -0
- package/dist/abis/SpotEngine.cjs.map +1 -0
- package/dist/abis/SpotEngine.d.cts +701 -0
- package/dist/abis/SpotEngine.d.ts +701 -0
- package/dist/abis/SpotEngine.js +914 -0
- package/dist/abis/SpotEngine.js.map +1 -0
- package/dist/abis/WithdrawPool.cjs +307 -0
- package/dist/abis/WithdrawPool.cjs.map +1 -0
- package/dist/abis/WithdrawPool.d.cts +214 -0
- package/dist/abis/WithdrawPool.d.ts +214 -0
- package/dist/abis/WithdrawPool.js +284 -0
- package/dist/abis/WithdrawPool.js.map +1 -0
- package/dist/abis/index.cjs +41 -0
- package/dist/abis/index.cjs.map +1 -0
- package/dist/abis/index.d.cts +9 -0
- package/dist/abis/index.d.ts +9 -0
- package/dist/abis/index.js +11 -0
- package/dist/abis/index.js.map +1 -0
- package/dist/abis/nadoAbis.cjs +44 -0
- package/dist/abis/nadoAbis.cjs.map +1 -0
- package/dist/abis/nadoAbis.d.cts +3821 -0
- package/dist/abis/nadoAbis.d.ts +3821 -0
- package/dist/abis/nadoAbis.js +21 -0
- package/dist/abis/nadoAbis.js.map +1 -0
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/chunk-5WRI5ZAA.js.map +1 -0
- package/dist/chunk-TUJ4HQKF.js +33 -0
- package/dist/chunk-TUJ4HQKF.js.map +1 -0
- package/dist/consts/chainEnvToChain.cjs +44 -0
- package/dist/consts/chainEnvToChain.cjs.map +1 -0
- package/dist/consts/chainEnvToChain.d.cts +388 -0
- package/dist/consts/chainEnvToChain.d.ts +388 -0
- package/dist/consts/chainEnvToChain.js +20 -0
- package/dist/consts/chainEnvToChain.js.map +1 -0
- package/dist/consts/index.cjs +27 -0
- package/dist/consts/index.cjs.map +1 -0
- package/dist/consts/index.d.cts +6 -0
- package/dist/consts/index.d.ts +6 -0
- package/dist/consts/index.js +4 -0
- package/dist/consts/index.js.map +1 -0
- package/dist/consts/productIds.cjs +34 -0
- package/dist/consts/productIds.cjs.map +1 -0
- package/dist/consts/productIds.d.cts +4 -0
- package/dist/consts/productIds.d.ts +4 -0
- package/dist/consts/productIds.js +10 -0
- package/dist/consts/productIds.js.map +1 -0
- package/dist/deployments/core/deployment.InkSepolia.json +13 -0
- package/dist/deployments/core/deployment.arbitrumOne.json +18 -0
- package/dist/deployments/core/deployment.localhost.json +18 -0
- package/dist/deployments/index.cjs +65 -0
- package/dist/deployments/index.cjs.map +1 -0
- package/dist/deployments/index.d.cts +13 -0
- package/dist/deployments/index.d.ts +13 -0
- package/dist/deployments/index.js +32 -0
- package/dist/deployments/index.js.map +1 -0
- package/dist/eip712/eip712ValueTypes.cjs +19 -0
- package/dist/eip712/eip712ValueTypes.cjs.map +1 -0
- package/dist/eip712/eip712ValueTypes.d.cts +48 -0
- package/dist/eip712/eip712ValueTypes.d.ts +48 -0
- package/dist/eip712/eip712ValueTypes.js +1 -0
- package/dist/eip712/eip712ValueTypes.js.map +1 -0
- package/dist/eip712/getNadoEIP712Domain.cjs +39 -0
- package/dist/eip712/getNadoEIP712Domain.cjs.map +1 -0
- package/dist/eip712/getNadoEIP712Domain.d.cts +11 -0
- package/dist/eip712/getNadoEIP712Domain.d.ts +11 -0
- package/dist/eip712/getNadoEIP712Domain.js +16 -0
- package/dist/eip712/getNadoEIP712Domain.js.map +1 -0
- package/dist/eip712/getNadoEIP712PrimaryType.cjs +35 -0
- package/dist/eip712/getNadoEIP712PrimaryType.cjs.map +1 -0
- package/dist/eip712/getNadoEIP712PrimaryType.d.cts +16 -0
- package/dist/eip712/getNadoEIP712PrimaryType.d.ts +16 -0
- package/dist/eip712/getNadoEIP712PrimaryType.js +12 -0
- package/dist/eip712/getNadoEIP712PrimaryType.js.map +1 -0
- package/dist/eip712/getNadoEIP712Types.cjs +129 -0
- package/dist/eip712/getNadoEIP712Types.cjs.map +1 -0
- package/dist/eip712/getNadoEIP712Types.d.cts +20 -0
- package/dist/eip712/getNadoEIP712Types.d.ts +20 -0
- package/dist/eip712/getNadoEIP712Types.js +106 -0
- package/dist/eip712/getNadoEIP712Types.js.map +1 -0
- package/dist/eip712/getNadoEIP712Values.cjs +206 -0
- package/dist/eip712/getNadoEIP712Values.cjs.map +1 -0
- package/dist/eip712/getNadoEIP712Values.d.cts +20 -0
- package/dist/eip712/getNadoEIP712Values.d.ts +20 -0
- package/dist/eip712/getNadoEIP712Values.js +183 -0
- package/dist/eip712/getNadoEIP712Values.js.map +1 -0
- package/dist/eip712/getOrderVerifyingAddress.cjs +34 -0
- package/dist/eip712/getOrderVerifyingAddress.cjs.map +1 -0
- package/dist/eip712/getOrderVerifyingAddress.d.cts +9 -0
- package/dist/eip712/getOrderVerifyingAddress.d.ts +9 -0
- package/dist/eip712/getOrderVerifyingAddress.js +11 -0
- package/dist/eip712/getOrderVerifyingAddress.js.map +1 -0
- package/dist/eip712/getSignedTransactionRequest.cjs +42 -0
- package/dist/eip712/getSignedTransactionRequest.cjs.map +1 -0
- package/dist/eip712/getSignedTransactionRequest.d.cts +19 -0
- package/dist/eip712/getSignedTransactionRequest.d.ts +19 -0
- package/dist/eip712/getSignedTransactionRequest.js +19 -0
- package/dist/eip712/getSignedTransactionRequest.js.map +1 -0
- package/dist/eip712/index.cjs +43 -0
- package/dist/eip712/index.cjs.map +1 -0
- package/dist/eip712/index.d.cts +17 -0
- package/dist/eip712/index.d.ts +17 -0
- package/dist/eip712/index.js +12 -0
- package/dist/eip712/index.js.map +1 -0
- package/dist/eip712/orderDigest.cjs +45 -0
- package/dist/eip712/orderDigest.cjs.map +1 -0
- package/dist/eip712/orderDigest.d.cts +20 -0
- package/dist/eip712/orderDigest.d.ts +20 -0
- package/dist/eip712/orderDigest.js +22 -0
- package/dist/eip712/orderDigest.js.map +1 -0
- package/dist/eip712/signableRequestType.cjs +19 -0
- package/dist/eip712/signableRequestType.cjs.map +1 -0
- package/dist/eip712/signableRequestType.d.cts +26 -0
- package/dist/eip712/signableRequestType.d.ts +26 -0
- package/dist/eip712/signableRequestType.js +1 -0
- package/dist/eip712/signableRequestType.js.map +1 -0
- package/dist/eip712/signatureParamTypes.cjs +19 -0
- package/dist/eip712/signatureParamTypes.cjs.map +1 -0
- package/dist/eip712/signatureParamTypes.d.cts +68 -0
- package/dist/eip712/signatureParamTypes.d.ts +68 -0
- package/dist/eip712/signatureParamTypes.js +1 -0
- package/dist/eip712/signatureParamTypes.js.map +1 -0
- package/dist/encoding/encoding.cjs +73 -0
- package/dist/encoding/encoding.cjs.map +1 -0
- package/dist/encoding/encoding.d.cts +11 -0
- package/dist/encoding/encoding.d.ts +11 -0
- package/dist/encoding/encoding.js +49 -0
- package/dist/encoding/encoding.js.map +1 -0
- package/dist/encoding/index.cjs +25 -0
- package/dist/encoding/index.cjs.map +1 -0
- package/dist/encoding/index.d.cts +7 -0
- package/dist/encoding/index.d.ts +7 -0
- package/dist/encoding/index.js +3 -0
- package/dist/encoding/index.js.map +1 -0
- package/dist/execute/approveDepositAllowance.cjs +38 -0
- package/dist/execute/approveDepositAllowance.cjs.map +1 -0
- package/dist/execute/approveDepositAllowance.d.cts +18 -0
- package/dist/execute/approveDepositAllowance.d.ts +18 -0
- package/dist/execute/approveDepositAllowance.js +15 -0
- package/dist/execute/approveDepositAllowance.js.map +1 -0
- package/dist/execute/depositCollateral.cjs +59 -0
- package/dist/execute/depositCollateral.cjs.map +1 -0
- package/dist/execute/depositCollateral.d.cts +21 -0
- package/dist/execute/depositCollateral.d.ts +21 -0
- package/dist/execute/depositCollateral.js +36 -0
- package/dist/execute/depositCollateral.js.map +1 -0
- package/dist/execute/index.cjs +27 -0
- package/dist/execute/index.cjs.map +1 -0
- package/dist/execute/index.d.cts +9 -0
- package/dist/execute/index.d.ts +9 -0
- package/dist/execute/index.js +4 -0
- package/dist/execute/index.js.map +1 -0
- package/dist/index.cjs +39 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +67 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/types/ChainEnv.cjs +44 -0
- package/dist/types/ChainEnv.cjs.map +1 -0
- package/dist/types/ChainEnv.d.cts +7 -0
- package/dist/types/ChainEnv.d.ts +7 -0
- package/dist/types/ChainEnv.js +18 -0
- package/dist/types/ChainEnv.js.map +1 -0
- package/dist/types/OrderExecutionType.cjs +19 -0
- package/dist/types/OrderExecutionType.cjs.map +1 -0
- package/dist/types/OrderExecutionType.d.cts +10 -0
- package/dist/types/OrderExecutionType.d.ts +10 -0
- package/dist/types/OrderExecutionType.js +1 -0
- package/dist/types/OrderExecutionType.js.map +1 -0
- package/dist/types/balanceTypes.cjs +19 -0
- package/dist/types/balanceTypes.cjs.map +1 -0
- package/dist/types/balanceTypes.d.cts +38 -0
- package/dist/types/balanceTypes.d.ts +38 -0
- package/dist/types/balanceTypes.js +1 -0
- package/dist/types/balanceTypes.js.map +1 -0
- package/dist/types/bytes.cjs +19 -0
- package/dist/types/bytes.cjs.map +1 -0
- package/dist/types/bytes.d.cts +3 -0
- package/dist/types/bytes.d.ts +3 -0
- package/dist/types/bytes.js +1 -0
- package/dist/types/bytes.js.map +1 -0
- package/dist/types/healthTypes.cjs +19 -0
- package/dist/types/healthTypes.cjs.map +1 -0
- package/dist/types/healthTypes.d.cts +15 -0
- package/dist/types/healthTypes.d.ts +15 -0
- package/dist/types/healthTypes.js +1 -0
- package/dist/types/healthTypes.js.map +1 -0
- package/dist/types/index.cjs +45 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +15 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +13 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/marketTypes.cjs +19 -0
- package/dist/types/marketTypes.cjs.map +1 -0
- package/dist/types/marketTypes.d.cts +31 -0
- package/dist/types/marketTypes.d.ts +31 -0
- package/dist/types/marketTypes.js +1 -0
- package/dist/types/marketTypes.js.map +1 -0
- package/dist/types/nadoContractTypes.cjs +19 -0
- package/dist/types/nadoContractTypes.cjs.map +1 -0
- package/dist/types/nadoContractTypes.d.cts +14 -0
- package/dist/types/nadoContractTypes.d.ts +14 -0
- package/dist/types/nadoContractTypes.js +1 -0
- package/dist/types/nadoContractTypes.js.map +1 -0
- package/dist/types/orderAppendixTypes.cjs +19 -0
- package/dist/types/orderAppendixTypes.cjs.map +1 -0
- package/dist/types/orderAppendixTypes.d.cts +54 -0
- package/dist/types/orderAppendixTypes.d.ts +54 -0
- package/dist/types/orderAppendixTypes.js +1 -0
- package/dist/types/orderAppendixTypes.js.map +1 -0
- package/dist/types/productTypes.cjs +47 -0
- package/dist/types/productTypes.cjs.map +1 -0
- package/dist/types/productTypes.d.cts +55 -0
- package/dist/types/productTypes.d.ts +55 -0
- package/dist/types/productTypes.js +23 -0
- package/dist/types/productTypes.js.map +1 -0
- package/dist/types/subaccountTypes.cjs +19 -0
- package/dist/types/subaccountTypes.cjs.map +1 -0
- package/dist/types/subaccountTypes.d.cts +13 -0
- package/dist/types/subaccountTypes.d.ts +13 -0
- package/dist/types/subaccountTypes.js +1 -0
- package/dist/types/subaccountTypes.js.map +1 -0
- package/dist/types/viemTypes.cjs +19 -0
- package/dist/types/viemTypes.cjs.map +1 -0
- package/dist/types/viemTypes.d.cts +23 -0
- package/dist/types/viemTypes.d.ts +23 -0
- package/dist/types/viemTypes.js +1 -0
- package/dist/types/viemTypes.js.map +1 -0
- package/dist/utils/asyncResult.cjs +36 -0
- package/dist/utils/asyncResult.cjs.map +1 -0
- package/dist/utils/asyncResult.d.cts +4 -0
- package/dist/utils/asyncResult.d.ts +4 -0
- package/dist/utils/asyncResult.js +13 -0
- package/dist/utils/asyncResult.js.map +1 -0
- package/dist/utils/balanceValue.cjs +43 -0
- package/dist/utils/balanceValue.cjs.map +1 -0
- package/dist/utils/balanceValue.d.cts +25 -0
- package/dist/utils/balanceValue.d.ts +25 -0
- package/dist/utils/balanceValue.js +18 -0
- package/dist/utils/balanceValue.js.map +1 -0
- package/dist/utils/bytes32.cjs +92 -0
- package/dist/utils/bytes32.cjs.map +1 -0
- package/dist/utils/bytes32.d.cts +47 -0
- package/dist/utils/bytes32.d.ts +47 -0
- package/dist/utils/bytes32.js +64 -0
- package/dist/utils/bytes32.js.map +1 -0
- package/dist/utils/bytes32.test.cjs +203 -0
- package/dist/utils/bytes32.test.cjs.map +1 -0
- package/dist/utils/bytes32.test.d.cts +2 -0
- package/dist/utils/bytes32.test.d.ts +2 -0
- package/dist/utils/bytes32.test.js +165 -0
- package/dist/utils/bytes32.test.js.map +1 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.cjs +56 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.cjs.map +1 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.d.cts +20 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.d.ts +20 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.js +33 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.js.map +1 -0
- package/dist/utils/errors/WalletNotProvidedError.cjs +36 -0
- package/dist/utils/errors/WalletNotProvidedError.cjs.map +1 -0
- package/dist/utils/errors/WalletNotProvidedError.d.cts +5 -0
- package/dist/utils/errors/WalletNotProvidedError.d.ts +5 -0
- package/dist/utils/errors/WalletNotProvidedError.js +13 -0
- package/dist/utils/errors/WalletNotProvidedError.js.map +1 -0
- package/dist/utils/errors/index.cjs +25 -0
- package/dist/utils/errors/index.cjs.map +1 -0
- package/dist/utils/errors/index.d.cts +1 -0
- package/dist/utils/errors/index.d.ts +1 -0
- package/dist/utils/errors/index.js +3 -0
- package/dist/utils/errors/index.js.map +1 -0
- package/dist/utils/getValidatedAddress.cjs +37 -0
- package/dist/utils/getValidatedAddress.cjs.map +1 -0
- package/dist/utils/getValidatedAddress.d.cts +9 -0
- package/dist/utils/getValidatedAddress.d.ts +9 -0
- package/dist/utils/getValidatedAddress.js +14 -0
- package/dist/utils/getValidatedAddress.js.map +1 -0
- package/dist/utils/getValidatedHex.cjs +37 -0
- package/dist/utils/getValidatedHex.cjs.map +1 -0
- package/dist/utils/getValidatedHex.d.cts +9 -0
- package/dist/utils/getValidatedHex.d.ts +9 -0
- package/dist/utils/getValidatedHex.js +14 -0
- package/dist/utils/getValidatedHex.js.map +1 -0
- package/dist/utils/index.cjs +53 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +37 -0
- package/dist/utils/index.d.ts +37 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/interest.cjs +94 -0
- package/dist/utils/interest.cjs.map +1 -0
- package/dist/utils/interest.d.cts +50 -0
- package/dist/utils/interest.d.ts +50 -0
- package/dist/utils/interest.js +70 -0
- package/dist/utils/interest.js.map +1 -0
- package/dist/utils/isWriteableContract.cjs +33 -0
- package/dist/utils/isWriteableContract.cjs.map +1 -0
- package/dist/utils/isWriteableContract.d.cts +6 -0
- package/dist/utils/isWriteableContract.d.ts +6 -0
- package/dist/utils/isWriteableContract.js +10 -0
- package/dist/utils/isWriteableContract.js.map +1 -0
- package/dist/utils/mapValues.cjs +38 -0
- package/dist/utils/mapValues.cjs.map +1 -0
- package/dist/utils/mapValues.d.cts +6 -0
- package/dist/utils/mapValues.d.ts +6 -0
- package/dist/utils/mapValues.js +15 -0
- package/dist/utils/mapValues.js.map +1 -0
- package/dist/utils/math/BigDecimals.cjs +37 -0
- package/dist/utils/math/BigDecimals.cjs.map +1 -0
- package/dist/utils/math/BigDecimals.d.cts +8 -0
- package/dist/utils/math/BigDecimals.d.ts +8 -0
- package/dist/utils/math/BigDecimals.js +14 -0
- package/dist/utils/math/BigDecimals.js.map +1 -0
- package/dist/utils/math/bigDecimal.cjs +57 -0
- package/dist/utils/math/bigDecimal.cjs.map +1 -0
- package/dist/utils/math/bigDecimal.d.cts +18 -0
- package/dist/utils/math/bigDecimal.d.ts +18 -0
- package/dist/utils/math/bigDecimal.js +23 -0
- package/dist/utils/math/bigDecimal.js.map +1 -0
- package/dist/utils/math/clamp.cjs +38 -0
- package/dist/utils/math/clamp.cjs.map +1 -0
- package/dist/utils/math/clamp.d.cts +15 -0
- package/dist/utils/math/clamp.d.ts +15 -0
- package/dist/utils/math/clamp.js +15 -0
- package/dist/utils/math/clamp.js.map +1 -0
- package/dist/utils/math/decimalAdjustment.cjs +60 -0
- package/dist/utils/math/decimalAdjustment.cjs.map +1 -0
- package/dist/utils/math/decimalAdjustment.d.cts +31 -0
- package/dist/utils/math/decimalAdjustment.d.ts +31 -0
- package/dist/utils/math/decimalAdjustment.js +35 -0
- package/dist/utils/math/decimalAdjustment.js.map +1 -0
- package/dist/utils/math/index.cjs +37 -0
- package/dist/utils/math/index.cjs.map +1 -0
- package/dist/utils/math/index.d.cts +8 -0
- package/dist/utils/math/index.d.ts +8 -0
- package/dist/utils/math/index.js +9 -0
- package/dist/utils/math/index.js.map +1 -0
- package/dist/utils/math/sumBigDecimalBy.cjs +36 -0
- package/dist/utils/math/sumBigDecimalBy.cjs.map +1 -0
- package/dist/utils/math/sumBigDecimalBy.d.cts +10 -0
- package/dist/utils/math/sumBigDecimalBy.d.ts +10 -0
- package/dist/utils/math/sumBigDecimalBy.js +13 -0
- package/dist/utils/math/sumBigDecimalBy.js.map +1 -0
- package/dist/utils/math/toBigInt.cjs +34 -0
- package/dist/utils/math/toBigInt.cjs.map +1 -0
- package/dist/utils/math/toBigInt.d.cts +11 -0
- package/dist/utils/math/toBigInt.d.ts +11 -0
- package/dist/utils/math/toBigInt.js +11 -0
- package/dist/utils/math/toBigInt.js.map +1 -0
- package/dist/utils/math/toIntegerString.cjs +34 -0
- package/dist/utils/math/toIntegerString.cjs.map +1 -0
- package/dist/utils/math/toIntegerString.d.cts +11 -0
- package/dist/utils/math/toIntegerString.d.ts +11 -0
- package/dist/utils/math/toIntegerString.js +11 -0
- package/dist/utils/math/toIntegerString.js.map +1 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.cjs +50 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.cjs.map +1 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.d.cts +31 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.d.ts +31 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.js +26 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.js.map +1 -0
- package/dist/utils/orders/appendix/bitMaskValue.cjs +34 -0
- package/dist/utils/orders/appendix/bitMaskValue.cjs.map +1 -0
- package/dist/utils/orders/appendix/bitMaskValue.d.cts +10 -0
- package/dist/utils/orders/appendix/bitMaskValue.d.ts +10 -0
- package/dist/utils/orders/appendix/bitMaskValue.js +11 -0
- package/dist/utils/orders/appendix/bitMaskValue.js.map +1 -0
- package/dist/utils/orders/appendix/index.cjs +33 -0
- package/dist/utils/orders/appendix/index.cjs.map +1 -0
- package/dist/utils/orders/appendix/index.d.cts +9 -0
- package/dist/utils/orders/appendix/index.d.ts +9 -0
- package/dist/utils/orders/appendix/index.js +7 -0
- package/dist/utils/orders/appendix/index.js.map +1 -0
- package/dist/utils/orders/appendix/orderAppendix.test.cjs +165 -0
- package/dist/utils/orders/appendix/orderAppendix.test.cjs.map +1 -0
- package/dist/utils/orders/appendix/orderAppendix.test.d.cts +2 -0
- package/dist/utils/orders/appendix/orderAppendix.test.d.ts +2 -0
- package/dist/utils/orders/appendix/orderAppendix.test.js +120 -0
- package/dist/utils/orders/appendix/orderAppendix.test.js.map +1 -0
- package/dist/utils/orders/appendix/packOrderAppendix.cjs +88 -0
- package/dist/utils/orders/appendix/packOrderAppendix.cjs.map +1 -0
- package/dist/utils/orders/appendix/packOrderAppendix.d.cts +12 -0
- package/dist/utils/orders/appendix/packOrderAppendix.d.ts +12 -0
- package/dist/utils/orders/appendix/packOrderAppendix.js +65 -0
- package/dist/utils/orders/appendix/packOrderAppendix.js.map +1 -0
- package/dist/utils/orders/appendix/types.cjs +19 -0
- package/dist/utils/orders/appendix/types.cjs.map +1 -0
- package/dist/utils/orders/appendix/types.d.cts +19 -0
- package/dist/utils/orders/appendix/types.d.ts +19 -0
- package/dist/utils/orders/appendix/types.js +1 -0
- package/dist/utils/orders/appendix/types.js.map +1 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.cjs +106 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.cjs.map +1 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.d.cts +12 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.d.ts +12 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.js +83 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.js.map +1 -0
- package/dist/utils/orders/index.cjs +29 -0
- package/dist/utils/orders/index.cjs.map +1 -0
- package/dist/utils/orders/index.d.cts +11 -0
- package/dist/utils/orders/index.d.ts +11 -0
- package/dist/utils/orders/index.js +5 -0
- package/dist/utils/orders/index.js.map +1 -0
- package/dist/utils/orders/orderNonce.cjs +44 -0
- package/dist/utils/orders/orderNonce.cjs.map +1 -0
- package/dist/utils/orders/orderNonce.d.cts +14 -0
- package/dist/utils/orders/orderNonce.d.ts +14 -0
- package/dist/utils/orders/orderNonce.js +20 -0
- package/dist/utils/orders/orderNonce.js.map +1 -0
- package/dist/utils/orders/recvTime.cjs +33 -0
- package/dist/utils/orders/recvTime.cjs.map +1 -0
- package/dist/utils/orders/recvTime.d.cts +9 -0
- package/dist/utils/orders/recvTime.d.ts +9 -0
- package/dist/utils/orders/recvTime.js +10 -0
- package/dist/utils/orders/recvTime.js.map +1 -0
- package/dist/utils/productTypeFilter.cjs +49 -0
- package/dist/utils/productTypeFilter.cjs.map +1 -0
- package/dist/utils/productTypeFilter.d.cts +11 -0
- package/dist/utils/productTypeFilter.d.ts +11 -0
- package/dist/utils/productTypeFilter.js +25 -0
- package/dist/utils/productTypeFilter.js.map +1 -0
- package/dist/utils/time.cjs +47 -0
- package/dist/utils/time.cjs.map +1 -0
- package/dist/utils/time.d.cts +17 -0
- package/dist/utils/time.d.ts +17 -0
- package/dist/utils/time.js +22 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/toPrintableObject.cjs +51 -0
- package/dist/utils/toPrintableObject.cjs.map +1 -0
- package/dist/utils/toPrintableObject.d.cts +6 -0
- package/dist/utils/toPrintableObject.d.ts +6 -0
- package/dist/utils/toPrintableObject.js +28 -0
- package/dist/utils/toPrintableObject.js.map +1 -0
- package/package.json +49 -0
- package/src/abis/Clearinghouse.ts +861 -0
- package/src/abis/ERC20.ts +185 -0
- package/src/abis/Endpoint.ts +559 -0
- package/src/abis/MockERC20.ts +311 -0
- package/src/abis/PerpEngine.ts +856 -0
- package/src/abis/Querier.ts +1492 -0
- package/src/abis/SpotEngine.ts +907 -0
- package/src/abis/WithdrawPool.ts +277 -0
- package/src/abis/index.ts +9 -0
- package/src/abis/nadoAbis.ts +19 -0
- package/src/consts/chainEnvToChain.ts +16 -0
- package/src/consts/index.ts +2 -0
- package/src/consts/productIds.ts +3 -0
- package/src/deployments/core/deployment.InkSepolia.json +13 -0
- package/src/deployments/core/deployment.arbitrumOne.json +18 -0
- package/src/deployments/core/deployment.localhost.json +18 -0
- package/src/deployments/index.ts +40 -0
- package/src/eip712/eip712ValueTypes.ts +83 -0
- package/src/eip712/getNadoEIP712Domain.ts +20 -0
- package/src/eip712/getNadoEIP712PrimaryType.ts +13 -0
- package/src/eip712/getNadoEIP712Types.ts +113 -0
- package/src/eip712/getNadoEIP712Values.ts +248 -0
- package/src/eip712/getOrderVerifyingAddress.ts +9 -0
- package/src/eip712/getSignedTransactionRequest.ts +30 -0
- package/src/eip712/index.ts +10 -0
- package/src/eip712/orderDigest.ts +28 -0
- package/src/eip712/signableRequestType.ts +32 -0
- package/src/eip712/signatureParamTypes.ts +84 -0
- package/src/encoding/encoding.ts +50 -0
- package/src/encoding/index.ts +1 -0
- package/src/execute/approveDepositAllowance.ts +20 -0
- package/src/execute/depositCollateral.ts +43 -0
- package/src/execute/index.ts +2 -0
- package/src/index.ts +8 -0
- package/src/types/ChainEnv.ts +13 -0
- package/src/types/OrderExecutionType.ts +8 -0
- package/src/types/balanceTypes.ts +47 -0
- package/src/types/bytes.ts +1 -0
- package/src/types/healthTypes.ts +17 -0
- package/src/types/index.ts +11 -0
- package/src/types/marketTypes.ts +40 -0
- package/src/types/nadoContractTypes.ts +14 -0
- package/src/types/orderAppendixTypes.ts +58 -0
- package/src/types/productTypes.ts +76 -0
- package/src/types/subaccountTypes.ts +13 -0
- package/src/types/viemTypes.ts +42 -0
- package/src/utils/asyncResult.ts +12 -0
- package/src/utils/balanceValue.ts +42 -0
- package/src/utils/bytes32.test.ts +117 -0
- package/src/utils/bytes32.ts +110 -0
- package/src/utils/createDeterministicLinkedSignerPrivateKey.ts +46 -0
- package/src/utils/errors/WalletNotProvidedError.ts +6 -0
- package/src/utils/errors/index.ts +1 -0
- package/src/utils/getValidatedAddress.ts +13 -0
- package/src/utils/getValidatedHex.ts +13 -0
- package/src/utils/index.ts +15 -0
- package/src/utils/interest.ts +133 -0
- package/src/utils/isWriteableContract.ts +11 -0
- package/src/utils/mapValues.ts +18 -0
- package/src/utils/math/BigDecimals.ts +8 -0
- package/src/utils/math/bigDecimal.ts +32 -0
- package/src/utils/math/clamp.ts +26 -0
- package/src/utils/math/decimalAdjustment.ts +65 -0
- package/src/utils/math/index.ts +7 -0
- package/src/utils/math/sumBigDecimalBy.ts +18 -0
- package/src/utils/math/toBigInt.ts +11 -0
- package/src/utils/math/toIntegerString.ts +11 -0
- package/src/utils/orders/appendix/appendixTWAPValue.ts +51 -0
- package/src/utils/orders/appendix/bitMaskValue.ts +11 -0
- package/src/utils/orders/appendix/index.ts +5 -0
- package/src/utils/orders/appendix/orderAppendix.test.ts +121 -0
- package/src/utils/orders/appendix/packOrderAppendix.ts +71 -0
- package/src/utils/orders/appendix/types.ts +17 -0
- package/src/utils/orders/appendix/unpackOrderAppendix.ts +90 -0
- package/src/utils/orders/index.ts +3 -0
- package/src/utils/orders/orderNonce.ts +32 -0
- package/src/utils/orders/recvTime.ts +9 -0
- package/src/utils/productTypeFilter.ts +23 -0
- package/src/utils/time.ts +21 -0
- package/src/utils/toPrintableObject.ts +25 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "../chunk-5WRI5ZAA.js";
|
|
2
|
+
|
|
3
|
+
// src/abis/nadoAbis.ts
|
|
4
|
+
import { CLEARINGHOUSE_ABI } from "./Clearinghouse.js";
|
|
5
|
+
import { ENDPOINT_ABI } from "./Endpoint.js";
|
|
6
|
+
import { PERP_ENGINE_ABI } from "./PerpEngine.js";
|
|
7
|
+
import { QUERIER_ABI } from "./Querier.js";
|
|
8
|
+
import { SPOT_ENGINE_ABI } from "./SpotEngine.js";
|
|
9
|
+
import { WITHDRAW_POOL_ABI } from "./WithdrawPool.js";
|
|
10
|
+
var NADO_ABIS = {
|
|
11
|
+
querier: QUERIER_ABI,
|
|
12
|
+
endpoint: ENDPOINT_ABI,
|
|
13
|
+
clearinghouse: CLEARINGHOUSE_ABI,
|
|
14
|
+
spotEngine: SPOT_ENGINE_ABI,
|
|
15
|
+
perpEngine: PERP_ENGINE_ABI,
|
|
16
|
+
withdrawPool: WITHDRAW_POOL_ABI
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
NADO_ABIS
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=nadoAbis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/abis/nadoAbis.ts"],"sourcesContent":["import { CLEARINGHOUSE_ABI } from './Clearinghouse';\nimport { ENDPOINT_ABI } from './Endpoint';\nimport { PERP_ENGINE_ABI } from './PerpEngine';\nimport { QUERIER_ABI } from './Querier';\nimport { SPOT_ENGINE_ABI } from './SpotEngine';\nimport { WITHDRAW_POOL_ABI } from './WithdrawPool';\n\nexport const NADO_ABIS = {\n querier: QUERIER_ABI,\n endpoint: ENDPOINT_ABI,\n clearinghouse: CLEARINGHOUSE_ABI,\n spotEngine: SPOT_ENGINE_ABI,\n perpEngine: PERP_ENGINE_ABI,\n withdrawPool: WITHDRAW_POOL_ABI,\n} as const;\n\nexport type NadoAbis = typeof NADO_ABIS;\n\nexport type NadoContractName = keyof NadoAbis;\n"],"mappings":";;;AAAA,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAE3B,IAAM,YAAY;AAAA,EACvB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,cAAc;AAChB;","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
__commonJS,
|
|
29
|
+
__toESM
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-5WRI5ZAA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__commonJS
|
|
3
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
4
|
+
|
|
5
|
+
// ../../node_modules/@jest/globals/build/index.js
|
|
6
|
+
var require_build = __commonJS({
|
|
7
|
+
"../../node_modules/@jest/globals/build/index.js"(exports, module) {
|
|
8
|
+
"use strict";
|
|
9
|
+
(() => {
|
|
10
|
+
"use strict";
|
|
11
|
+
var __webpack_exports__ = {};
|
|
12
|
+
throw new Error("Do not import `@jest/globals` outside of the Jest test environment");
|
|
13
|
+
module.exports = __webpack_exports__;
|
|
14
|
+
})();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
require_build
|
|
20
|
+
};
|
|
21
|
+
/*! Bundled license information:
|
|
22
|
+
|
|
23
|
+
@jest/globals/build/index.js:
|
|
24
|
+
(*!
|
|
25
|
+
* /**
|
|
26
|
+
* * Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27
|
+
* *
|
|
28
|
+
* * This source code is licensed under the MIT license found in the
|
|
29
|
+
* * LICENSE file in the root directory of this source tree.
|
|
30
|
+
* * /
|
|
31
|
+
*)
|
|
32
|
+
*/
|
|
33
|
+
//# sourceMappingURL=chunk-TUJ4HQKF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/@jest/globals/build/index.js"],"sourcesContent":["/*!\n * /**\n * * Copyright (c) Meta Platforms, Inc. and affiliates.\n * *\n * * This source code is licensed under the MIT license found in the\n * * LICENSE file in the root directory of this source tree.\n * * /\n */\n/******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\nvar __webpack_exports__ = {};\n\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\n\nthrow new Error('Do not import `@jest/globals` outside of the Jest test environment');\nmodule.exports = __webpack_exports__;\n/******/ })()\n;"],"mappings":";;;;;AAAA;AAAA;AAAA;AAQS,KAAC,MAAM;AACN;AACV,UAAI,sBAAsB,CAAC;AAY3B,YAAM,IAAI,MAAM,oEAAoE;AACpF,aAAO,UAAU;AAAA,IACR,GAAG;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
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/consts/chainEnvToChain.ts
|
|
21
|
+
var chainEnvToChain_exports = {};
|
|
22
|
+
__export(chainEnvToChain_exports, {
|
|
23
|
+
CHAIN_ENV_TO_CHAIN: () => CHAIN_ENV_TO_CHAIN,
|
|
24
|
+
CHAIN_ID_TO_CHAIN_ENV: () => CHAIN_ID_TO_CHAIN_ENV
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(chainEnvToChain_exports);
|
|
27
|
+
var import_chains = require("viem/chains");
|
|
28
|
+
var CHAIN_ENV_TO_CHAIN = {
|
|
29
|
+
local: import_chains.localhost,
|
|
30
|
+
arbitrum: import_chains.arbitrum,
|
|
31
|
+
inkTestnet: import_chains.inkSepolia
|
|
32
|
+
};
|
|
33
|
+
var CHAIN_ID_TO_CHAIN_ENV = Object.fromEntries(
|
|
34
|
+
Object.entries(CHAIN_ENV_TO_CHAIN).map(([chainEnv, chain]) => [
|
|
35
|
+
chain.id,
|
|
36
|
+
chainEnv
|
|
37
|
+
])
|
|
38
|
+
);
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
CHAIN_ENV_TO_CHAIN,
|
|
42
|
+
CHAIN_ID_TO_CHAIN_ENV
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=chainEnvToChain.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/consts/chainEnvToChain.ts"],"sourcesContent":["import { Chain } from 'viem';\nimport { arbitrum, inkSepolia, localhost } from 'viem/chains';\nimport { ChainEnv } from '../types';\n\nexport const CHAIN_ENV_TO_CHAIN = {\n local: localhost,\n arbitrum: arbitrum,\n inkTestnet: inkSepolia,\n} as const satisfies Record<ChainEnv, Chain>;\n\nexport const CHAIN_ID_TO_CHAIN_ENV = Object.fromEntries(\n Object.entries(CHAIN_ENV_TO_CHAIN).map(([chainEnv, chain]) => [\n chain.id,\n chainEnv,\n ]),\n) as Record<number, ChainEnv>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAgD;AAGzC,IAAM,qBAAqB;AAAA,EAChC,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AACd;AAEO,IAAM,wBAAwB,OAAO;AAAA,EAC1C,OAAO,QAAQ,kBAAkB,EAAE,IAAI,CAAC,CAAC,UAAU,KAAK,MAAM;AAAA,IAC5D,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import * as abitype from 'abitype';
|
|
2
|
+
import * as viem_chains from 'viem/chains';
|
|
3
|
+
import * as viem from 'viem';
|
|
4
|
+
import { ChainEnv } from '../types/ChainEnv.cjs';
|
|
5
|
+
|
|
6
|
+
declare const CHAIN_ENV_TO_CHAIN: {
|
|
7
|
+
readonly local: {
|
|
8
|
+
blockExplorers?: {
|
|
9
|
+
[key: string]: {
|
|
10
|
+
name: string;
|
|
11
|
+
url: string;
|
|
12
|
+
apiUrl?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
default: {
|
|
15
|
+
name: string;
|
|
16
|
+
url: string;
|
|
17
|
+
apiUrl?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
} | undefined | undefined;
|
|
20
|
+
blockTime?: number | undefined | undefined;
|
|
21
|
+
contracts?: {
|
|
22
|
+
[x: string]: viem.ChainContract | {
|
|
23
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
26
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
27
|
+
multicall3?: viem.ChainContract | undefined;
|
|
28
|
+
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
ensTlds?: readonly string[] | undefined;
|
|
31
|
+
id: 1337;
|
|
32
|
+
name: "Localhost";
|
|
33
|
+
nativeCurrency: {
|
|
34
|
+
readonly decimals: 18;
|
|
35
|
+
readonly name: "Ether";
|
|
36
|
+
readonly symbol: "ETH";
|
|
37
|
+
};
|
|
38
|
+
rpcUrls: {
|
|
39
|
+
readonly default: {
|
|
40
|
+
readonly http: readonly ["http://127.0.0.1:8545"];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
sourceId?: number | undefined | undefined;
|
|
44
|
+
testnet?: boolean | undefined | undefined;
|
|
45
|
+
custom?: Record<string, unknown> | undefined;
|
|
46
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
47
|
+
formatters?: undefined;
|
|
48
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
49
|
+
};
|
|
50
|
+
readonly arbitrum: {
|
|
51
|
+
blockExplorers: {
|
|
52
|
+
readonly default: {
|
|
53
|
+
readonly name: "Arbiscan";
|
|
54
|
+
readonly url: "https://arbiscan.io";
|
|
55
|
+
readonly apiUrl: "https://api.arbiscan.io/api";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
blockTime?: number | undefined | undefined;
|
|
59
|
+
contracts: {
|
|
60
|
+
readonly multicall3: {
|
|
61
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
62
|
+
readonly blockCreated: 7654707;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
ensTlds?: readonly string[] | undefined;
|
|
66
|
+
id: 42161;
|
|
67
|
+
name: "Arbitrum One";
|
|
68
|
+
nativeCurrency: {
|
|
69
|
+
readonly name: "Ether";
|
|
70
|
+
readonly symbol: "ETH";
|
|
71
|
+
readonly decimals: 18;
|
|
72
|
+
};
|
|
73
|
+
rpcUrls: {
|
|
74
|
+
readonly default: {
|
|
75
|
+
readonly http: readonly ["https://arb1.arbitrum.io/rpc"];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
sourceId?: number | undefined | undefined;
|
|
79
|
+
testnet?: boolean | undefined | undefined;
|
|
80
|
+
custom?: Record<string, unknown> | undefined;
|
|
81
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
82
|
+
formatters?: undefined;
|
|
83
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
84
|
+
};
|
|
85
|
+
readonly inkTestnet: {
|
|
86
|
+
blockExplorers: {
|
|
87
|
+
readonly default: {
|
|
88
|
+
readonly name: "Blockscout";
|
|
89
|
+
readonly url: "https://explorer-sepolia.inkonchain.com/";
|
|
90
|
+
readonly apiUrl: "https://explorer-sepolia.inkonchain.com/api/v2";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
blockTime: 2000;
|
|
94
|
+
contracts: {
|
|
95
|
+
readonly multicall3: {
|
|
96
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
97
|
+
readonly blockCreated: 0;
|
|
98
|
+
};
|
|
99
|
+
readonly disputeGameFactory: {
|
|
100
|
+
readonly 11155111: {
|
|
101
|
+
readonly address: "0x860e626c700af381133d9f4af31412a2d1db3d5d";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly portal: {
|
|
105
|
+
readonly 11155111: {
|
|
106
|
+
readonly address: "0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7";
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
readonly l1StandardBridge: {
|
|
110
|
+
readonly 11155111: {
|
|
111
|
+
readonly address: "0x33f60714bbd74d62b66d79213c348614de51901c";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly gasPriceOracle: {
|
|
115
|
+
readonly address: "0x420000000000000000000000000000000000000F";
|
|
116
|
+
};
|
|
117
|
+
readonly l1Block: {
|
|
118
|
+
readonly address: "0x4200000000000000000000000000000000000015";
|
|
119
|
+
};
|
|
120
|
+
readonly l2CrossDomainMessenger: {
|
|
121
|
+
readonly address: "0x4200000000000000000000000000000000000007";
|
|
122
|
+
};
|
|
123
|
+
readonly l2Erc721Bridge: {
|
|
124
|
+
readonly address: "0x4200000000000000000000000000000000000014";
|
|
125
|
+
};
|
|
126
|
+
readonly l2StandardBridge: {
|
|
127
|
+
readonly address: "0x4200000000000000000000000000000000000010";
|
|
128
|
+
};
|
|
129
|
+
readonly l2ToL1MessagePasser: {
|
|
130
|
+
readonly address: "0x4200000000000000000000000000000000000016";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
ensTlds?: readonly string[] | undefined;
|
|
134
|
+
id: 763373;
|
|
135
|
+
name: "Ink Sepolia";
|
|
136
|
+
nativeCurrency: {
|
|
137
|
+
readonly name: "Sepolia Ether";
|
|
138
|
+
readonly symbol: "ETH";
|
|
139
|
+
readonly decimals: 18;
|
|
140
|
+
};
|
|
141
|
+
rpcUrls: {
|
|
142
|
+
readonly default: {
|
|
143
|
+
readonly http: readonly ["https://rpc-gel-sepolia.inkonchain.com"];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
sourceId: 11155111;
|
|
147
|
+
testnet: true;
|
|
148
|
+
custom?: Record<string, unknown> | undefined;
|
|
149
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
150
|
+
formatters: {
|
|
151
|
+
readonly block: {
|
|
152
|
+
exclude: [] | undefined;
|
|
153
|
+
format: (args: viem_chains.OpStackRpcBlock) => {
|
|
154
|
+
baseFeePerGas: bigint | null;
|
|
155
|
+
blobGasUsed: bigint;
|
|
156
|
+
difficulty: bigint;
|
|
157
|
+
excessBlobGas: bigint;
|
|
158
|
+
extraData: viem.Hex;
|
|
159
|
+
gasLimit: bigint;
|
|
160
|
+
gasUsed: bigint;
|
|
161
|
+
hash: `0x${string}` | null;
|
|
162
|
+
logsBloom: `0x${string}` | null;
|
|
163
|
+
miner: abitype.Address;
|
|
164
|
+
mixHash: viem.Hash;
|
|
165
|
+
nonce: `0x${string}` | null;
|
|
166
|
+
number: bigint | null;
|
|
167
|
+
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
168
|
+
parentHash: viem.Hash;
|
|
169
|
+
receiptsRoot: viem.Hex;
|
|
170
|
+
sealFields: viem.Hex[];
|
|
171
|
+
sha3Uncles: viem.Hash;
|
|
172
|
+
size: bigint;
|
|
173
|
+
stateRoot: viem.Hash;
|
|
174
|
+
timestamp: bigint;
|
|
175
|
+
totalDifficulty: bigint | null;
|
|
176
|
+
transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
|
|
177
|
+
transactionsRoot: viem.Hash;
|
|
178
|
+
uncles: viem.Hash[];
|
|
179
|
+
withdrawals?: viem.Withdrawal[] | undefined | undefined;
|
|
180
|
+
withdrawalsRoot?: `0x${string}` | undefined;
|
|
181
|
+
} & {};
|
|
182
|
+
type: "block";
|
|
183
|
+
};
|
|
184
|
+
readonly transaction: {
|
|
185
|
+
exclude: [] | undefined;
|
|
186
|
+
format: (args: viem_chains.OpStackRpcTransaction) => ({
|
|
187
|
+
blockHash: `0x${string}` | null;
|
|
188
|
+
blockNumber: bigint | null;
|
|
189
|
+
from: abitype.Address;
|
|
190
|
+
gas: bigint;
|
|
191
|
+
hash: viem.Hash;
|
|
192
|
+
input: viem.Hex;
|
|
193
|
+
nonce: number;
|
|
194
|
+
r: viem.Hex;
|
|
195
|
+
s: viem.Hex;
|
|
196
|
+
to: abitype.Address | null;
|
|
197
|
+
transactionIndex: number | null;
|
|
198
|
+
typeHex: viem.Hex | null;
|
|
199
|
+
v: bigint;
|
|
200
|
+
value: bigint;
|
|
201
|
+
yParity: number;
|
|
202
|
+
gasPrice?: undefined | undefined;
|
|
203
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
204
|
+
maxFeePerGas: bigint;
|
|
205
|
+
maxPriorityFeePerGas: bigint;
|
|
206
|
+
isSystemTx?: boolean;
|
|
207
|
+
mint?: bigint | undefined | undefined;
|
|
208
|
+
sourceHash: viem.Hex;
|
|
209
|
+
type: "deposit";
|
|
210
|
+
} | {
|
|
211
|
+
r: viem.Hex;
|
|
212
|
+
s: viem.Hex;
|
|
213
|
+
v: bigint;
|
|
214
|
+
to: abitype.Address | null;
|
|
215
|
+
from: abitype.Address;
|
|
216
|
+
gas: bigint;
|
|
217
|
+
nonce: number;
|
|
218
|
+
value: bigint;
|
|
219
|
+
blockHash: `0x${string}` | null;
|
|
220
|
+
blockNumber: bigint | null;
|
|
221
|
+
hash: viem.Hash;
|
|
222
|
+
input: viem.Hex;
|
|
223
|
+
transactionIndex: number | null;
|
|
224
|
+
typeHex: viem.Hex | null;
|
|
225
|
+
accessList?: undefined | undefined;
|
|
226
|
+
authorizationList?: undefined | undefined;
|
|
227
|
+
blobVersionedHashes?: undefined | undefined;
|
|
228
|
+
chainId?: number | undefined;
|
|
229
|
+
yParity?: undefined | undefined;
|
|
230
|
+
type: "legacy";
|
|
231
|
+
gasPrice: bigint;
|
|
232
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
233
|
+
maxFeePerGas?: undefined | undefined;
|
|
234
|
+
maxPriorityFeePerGas?: undefined | undefined;
|
|
235
|
+
isSystemTx?: undefined | undefined;
|
|
236
|
+
mint?: undefined | undefined;
|
|
237
|
+
sourceHash?: undefined | undefined;
|
|
238
|
+
} | {
|
|
239
|
+
blockHash: `0x${string}` | null;
|
|
240
|
+
blockNumber: bigint | null;
|
|
241
|
+
from: abitype.Address;
|
|
242
|
+
gas: bigint;
|
|
243
|
+
hash: viem.Hash;
|
|
244
|
+
input: viem.Hex;
|
|
245
|
+
nonce: number;
|
|
246
|
+
r: viem.Hex;
|
|
247
|
+
s: viem.Hex;
|
|
248
|
+
to: abitype.Address | null;
|
|
249
|
+
transactionIndex: number | null;
|
|
250
|
+
typeHex: viem.Hex | null;
|
|
251
|
+
v: bigint;
|
|
252
|
+
value: bigint;
|
|
253
|
+
yParity: number;
|
|
254
|
+
accessList: viem.AccessList;
|
|
255
|
+
authorizationList?: undefined | undefined;
|
|
256
|
+
blobVersionedHashes?: undefined | undefined;
|
|
257
|
+
chainId: number;
|
|
258
|
+
type: "eip2930";
|
|
259
|
+
gasPrice: bigint;
|
|
260
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
261
|
+
maxFeePerGas?: undefined | undefined;
|
|
262
|
+
maxPriorityFeePerGas?: undefined | undefined;
|
|
263
|
+
isSystemTx?: undefined | undefined;
|
|
264
|
+
mint?: undefined | undefined;
|
|
265
|
+
sourceHash?: undefined | undefined;
|
|
266
|
+
} | {
|
|
267
|
+
blockHash: `0x${string}` | null;
|
|
268
|
+
blockNumber: bigint | null;
|
|
269
|
+
from: abitype.Address;
|
|
270
|
+
gas: bigint;
|
|
271
|
+
hash: viem.Hash;
|
|
272
|
+
input: viem.Hex;
|
|
273
|
+
nonce: number;
|
|
274
|
+
r: viem.Hex;
|
|
275
|
+
s: viem.Hex;
|
|
276
|
+
to: abitype.Address | null;
|
|
277
|
+
transactionIndex: number | null;
|
|
278
|
+
typeHex: viem.Hex | null;
|
|
279
|
+
v: bigint;
|
|
280
|
+
value: bigint;
|
|
281
|
+
yParity: number;
|
|
282
|
+
accessList: viem.AccessList;
|
|
283
|
+
authorizationList?: undefined | undefined;
|
|
284
|
+
blobVersionedHashes?: undefined | undefined;
|
|
285
|
+
chainId: number;
|
|
286
|
+
type: "eip1559";
|
|
287
|
+
gasPrice?: undefined | undefined;
|
|
288
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
289
|
+
maxFeePerGas: bigint;
|
|
290
|
+
maxPriorityFeePerGas: bigint;
|
|
291
|
+
isSystemTx?: undefined | undefined;
|
|
292
|
+
mint?: undefined | undefined;
|
|
293
|
+
sourceHash?: undefined | undefined;
|
|
294
|
+
} | {
|
|
295
|
+
blockHash: `0x${string}` | null;
|
|
296
|
+
blockNumber: bigint | null;
|
|
297
|
+
from: abitype.Address;
|
|
298
|
+
gas: bigint;
|
|
299
|
+
hash: viem.Hash;
|
|
300
|
+
input: viem.Hex;
|
|
301
|
+
nonce: number;
|
|
302
|
+
r: viem.Hex;
|
|
303
|
+
s: viem.Hex;
|
|
304
|
+
to: abitype.Address | null;
|
|
305
|
+
transactionIndex: number | null;
|
|
306
|
+
typeHex: viem.Hex | null;
|
|
307
|
+
v: bigint;
|
|
308
|
+
value: bigint;
|
|
309
|
+
yParity: number;
|
|
310
|
+
accessList: viem.AccessList;
|
|
311
|
+
authorizationList?: undefined | undefined;
|
|
312
|
+
blobVersionedHashes: readonly viem.Hex[];
|
|
313
|
+
chainId: number;
|
|
314
|
+
type: "eip4844";
|
|
315
|
+
gasPrice?: undefined | undefined;
|
|
316
|
+
maxFeePerBlobGas: bigint;
|
|
317
|
+
maxFeePerGas: bigint;
|
|
318
|
+
maxPriorityFeePerGas: bigint;
|
|
319
|
+
isSystemTx?: undefined | undefined;
|
|
320
|
+
mint?: undefined | undefined;
|
|
321
|
+
sourceHash?: undefined | undefined;
|
|
322
|
+
} | {
|
|
323
|
+
blockHash: `0x${string}` | null;
|
|
324
|
+
blockNumber: bigint | null;
|
|
325
|
+
from: abitype.Address;
|
|
326
|
+
gas: bigint;
|
|
327
|
+
hash: viem.Hash;
|
|
328
|
+
input: viem.Hex;
|
|
329
|
+
nonce: number;
|
|
330
|
+
r: viem.Hex;
|
|
331
|
+
s: viem.Hex;
|
|
332
|
+
to: abitype.Address | null;
|
|
333
|
+
transactionIndex: number | null;
|
|
334
|
+
typeHex: viem.Hex | null;
|
|
335
|
+
v: bigint;
|
|
336
|
+
value: bigint;
|
|
337
|
+
yParity: number;
|
|
338
|
+
accessList: viem.AccessList;
|
|
339
|
+
authorizationList: viem.SignedAuthorizationList;
|
|
340
|
+
blobVersionedHashes?: undefined | undefined;
|
|
341
|
+
chainId: number;
|
|
342
|
+
type: "eip7702";
|
|
343
|
+
gasPrice?: undefined | undefined;
|
|
344
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
345
|
+
maxFeePerGas: bigint;
|
|
346
|
+
maxPriorityFeePerGas: bigint;
|
|
347
|
+
isSystemTx?: undefined | undefined;
|
|
348
|
+
mint?: undefined | undefined;
|
|
349
|
+
sourceHash?: undefined | undefined;
|
|
350
|
+
}) & {};
|
|
351
|
+
type: "transaction";
|
|
352
|
+
};
|
|
353
|
+
readonly transactionReceipt: {
|
|
354
|
+
exclude: [] | undefined;
|
|
355
|
+
format: (args: viem_chains.OpStackRpcTransactionReceipt) => {
|
|
356
|
+
blobGasPrice?: bigint | undefined;
|
|
357
|
+
blobGasUsed?: bigint | undefined;
|
|
358
|
+
blockHash: viem.Hash;
|
|
359
|
+
blockNumber: bigint;
|
|
360
|
+
contractAddress: abitype.Address | null | undefined;
|
|
361
|
+
cumulativeGasUsed: bigint;
|
|
362
|
+
effectiveGasPrice: bigint;
|
|
363
|
+
from: abitype.Address;
|
|
364
|
+
gasUsed: bigint;
|
|
365
|
+
logs: viem.Log<bigint, number, false>[];
|
|
366
|
+
logsBloom: viem.Hex;
|
|
367
|
+
root?: `0x${string}` | undefined;
|
|
368
|
+
status: "success" | "reverted";
|
|
369
|
+
to: abitype.Address | null;
|
|
370
|
+
transactionHash: viem.Hash;
|
|
371
|
+
transactionIndex: number;
|
|
372
|
+
type: viem.TransactionType;
|
|
373
|
+
l1GasPrice: bigint | null;
|
|
374
|
+
l1GasUsed: bigint | null;
|
|
375
|
+
l1Fee: bigint | null;
|
|
376
|
+
l1FeeScalar: number | null;
|
|
377
|
+
} & {};
|
|
378
|
+
type: "transactionReceipt";
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
serializers: {
|
|
382
|
+
readonly transaction: typeof viem_chains.serializeTransactionOpStack;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
declare const CHAIN_ID_TO_CHAIN_ENV: Record<number, ChainEnv>;
|
|
387
|
+
|
|
388
|
+
export { CHAIN_ENV_TO_CHAIN, CHAIN_ID_TO_CHAIN_ENV };
|