@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,701 @@
|
|
|
1
|
+
declare const SPOT_ENGINE_ABI: readonly [{
|
|
2
|
+
readonly anonymous: false;
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly indexed: false;
|
|
5
|
+
readonly internalType: "uint32";
|
|
6
|
+
readonly name: "productId";
|
|
7
|
+
readonly type: "uint32";
|
|
8
|
+
}];
|
|
9
|
+
readonly name: "AddProduct";
|
|
10
|
+
readonly type: "event";
|
|
11
|
+
}, {
|
|
12
|
+
readonly anonymous: false;
|
|
13
|
+
readonly inputs: readonly [{
|
|
14
|
+
readonly indexed: false;
|
|
15
|
+
readonly internalType: "uint32";
|
|
16
|
+
readonly name: "productId";
|
|
17
|
+
readonly type: "uint32";
|
|
18
|
+
}, {
|
|
19
|
+
readonly indexed: false;
|
|
20
|
+
readonly internalType: "bytes32";
|
|
21
|
+
readonly name: "subaccount";
|
|
22
|
+
readonly type: "bytes32";
|
|
23
|
+
}];
|
|
24
|
+
readonly name: "BalanceUpdate";
|
|
25
|
+
readonly type: "event";
|
|
26
|
+
}, {
|
|
27
|
+
readonly anonymous: false;
|
|
28
|
+
readonly inputs: readonly [{
|
|
29
|
+
readonly indexed: false;
|
|
30
|
+
readonly internalType: "uint8";
|
|
31
|
+
readonly name: "version";
|
|
32
|
+
readonly type: "uint8";
|
|
33
|
+
}];
|
|
34
|
+
readonly name: "Initialized";
|
|
35
|
+
readonly type: "event";
|
|
36
|
+
}, {
|
|
37
|
+
readonly anonymous: false;
|
|
38
|
+
readonly inputs: readonly [{
|
|
39
|
+
readonly indexed: false;
|
|
40
|
+
readonly internalType: "uint32";
|
|
41
|
+
readonly name: "productId";
|
|
42
|
+
readonly type: "uint32";
|
|
43
|
+
}, {
|
|
44
|
+
readonly indexed: false;
|
|
45
|
+
readonly internalType: "uint128";
|
|
46
|
+
readonly name: "dt";
|
|
47
|
+
readonly type: "uint128";
|
|
48
|
+
}, {
|
|
49
|
+
readonly indexed: false;
|
|
50
|
+
readonly internalType: "int128";
|
|
51
|
+
readonly name: "depositRateMultiplierX18";
|
|
52
|
+
readonly type: "int128";
|
|
53
|
+
}, {
|
|
54
|
+
readonly indexed: false;
|
|
55
|
+
readonly internalType: "int128";
|
|
56
|
+
readonly name: "borrowRateMultiplierX18";
|
|
57
|
+
readonly type: "int128";
|
|
58
|
+
}, {
|
|
59
|
+
readonly indexed: false;
|
|
60
|
+
readonly internalType: "int128";
|
|
61
|
+
readonly name: "feeAmount";
|
|
62
|
+
readonly type: "int128";
|
|
63
|
+
}];
|
|
64
|
+
readonly name: "InterestPayment";
|
|
65
|
+
readonly type: "event";
|
|
66
|
+
}, {
|
|
67
|
+
readonly anonymous: false;
|
|
68
|
+
readonly inputs: readonly [{
|
|
69
|
+
readonly indexed: true;
|
|
70
|
+
readonly internalType: "address";
|
|
71
|
+
readonly name: "previousOwner";
|
|
72
|
+
readonly type: "address";
|
|
73
|
+
}, {
|
|
74
|
+
readonly indexed: true;
|
|
75
|
+
readonly internalType: "address";
|
|
76
|
+
readonly name: "newOwner";
|
|
77
|
+
readonly type: "address";
|
|
78
|
+
}];
|
|
79
|
+
readonly name: "OwnershipTransferred";
|
|
80
|
+
readonly type: "event";
|
|
81
|
+
}, {
|
|
82
|
+
readonly anonymous: false;
|
|
83
|
+
readonly inputs: readonly [{
|
|
84
|
+
readonly indexed: false;
|
|
85
|
+
readonly internalType: "uint32";
|
|
86
|
+
readonly name: "productId";
|
|
87
|
+
readonly type: "uint32";
|
|
88
|
+
}];
|
|
89
|
+
readonly name: "ProductUpdate";
|
|
90
|
+
readonly type: "event";
|
|
91
|
+
}, {
|
|
92
|
+
readonly anonymous: false;
|
|
93
|
+
readonly inputs: readonly [{
|
|
94
|
+
readonly indexed: true;
|
|
95
|
+
readonly internalType: "bytes32";
|
|
96
|
+
readonly name: "subaccount";
|
|
97
|
+
readonly type: "bytes32";
|
|
98
|
+
}, {
|
|
99
|
+
readonly indexed: true;
|
|
100
|
+
readonly internalType: "uint32";
|
|
101
|
+
readonly name: "productId";
|
|
102
|
+
readonly type: "uint32";
|
|
103
|
+
}, {
|
|
104
|
+
readonly indexed: false;
|
|
105
|
+
readonly internalType: "int128";
|
|
106
|
+
readonly name: "amount";
|
|
107
|
+
readonly type: "int128";
|
|
108
|
+
}, {
|
|
109
|
+
readonly indexed: false;
|
|
110
|
+
readonly internalType: "int128";
|
|
111
|
+
readonly name: "lastCumulativeMultiplierX18";
|
|
112
|
+
readonly type: "int128";
|
|
113
|
+
}];
|
|
114
|
+
readonly name: "SpotBalance";
|
|
115
|
+
readonly type: "event";
|
|
116
|
+
}, {
|
|
117
|
+
readonly inputs: readonly [{
|
|
118
|
+
readonly internalType: "uint32";
|
|
119
|
+
readonly name: "productId";
|
|
120
|
+
readonly type: "uint32";
|
|
121
|
+
}, {
|
|
122
|
+
readonly internalType: "uint32";
|
|
123
|
+
readonly name: "quoteId";
|
|
124
|
+
readonly type: "uint32";
|
|
125
|
+
}, {
|
|
126
|
+
readonly internalType: "int128";
|
|
127
|
+
readonly name: "sizeIncrement";
|
|
128
|
+
readonly type: "int128";
|
|
129
|
+
}, {
|
|
130
|
+
readonly internalType: "int128";
|
|
131
|
+
readonly name: "minSize";
|
|
132
|
+
readonly type: "int128";
|
|
133
|
+
}, {
|
|
134
|
+
readonly components: readonly [{
|
|
135
|
+
readonly internalType: "address";
|
|
136
|
+
readonly name: "token";
|
|
137
|
+
readonly type: "address";
|
|
138
|
+
}, {
|
|
139
|
+
readonly internalType: "int128";
|
|
140
|
+
readonly name: "interestInflectionUtilX18";
|
|
141
|
+
readonly type: "int128";
|
|
142
|
+
}, {
|
|
143
|
+
readonly internalType: "int128";
|
|
144
|
+
readonly name: "interestFloorX18";
|
|
145
|
+
readonly type: "int128";
|
|
146
|
+
}, {
|
|
147
|
+
readonly internalType: "int128";
|
|
148
|
+
readonly name: "interestSmallCapX18";
|
|
149
|
+
readonly type: "int128";
|
|
150
|
+
}, {
|
|
151
|
+
readonly internalType: "int128";
|
|
152
|
+
readonly name: "interestLargeCapX18";
|
|
153
|
+
readonly type: "int128";
|
|
154
|
+
}, {
|
|
155
|
+
readonly internalType: "int128";
|
|
156
|
+
readonly name: "withdrawFeeX18";
|
|
157
|
+
readonly type: "int128";
|
|
158
|
+
}, {
|
|
159
|
+
readonly internalType: "int128";
|
|
160
|
+
readonly name: "minDepositRateX18";
|
|
161
|
+
readonly type: "int128";
|
|
162
|
+
}];
|
|
163
|
+
readonly internalType: "struct ISpotEngine.Config";
|
|
164
|
+
readonly name: "config";
|
|
165
|
+
readonly type: "tuple";
|
|
166
|
+
}, {
|
|
167
|
+
readonly components: readonly [{
|
|
168
|
+
readonly internalType: "int32";
|
|
169
|
+
readonly name: "longWeightInitial";
|
|
170
|
+
readonly type: "int32";
|
|
171
|
+
}, {
|
|
172
|
+
readonly internalType: "int32";
|
|
173
|
+
readonly name: "shortWeightInitial";
|
|
174
|
+
readonly type: "int32";
|
|
175
|
+
}, {
|
|
176
|
+
readonly internalType: "int32";
|
|
177
|
+
readonly name: "longWeightMaintenance";
|
|
178
|
+
readonly type: "int32";
|
|
179
|
+
}, {
|
|
180
|
+
readonly internalType: "int32";
|
|
181
|
+
readonly name: "shortWeightMaintenance";
|
|
182
|
+
readonly type: "int32";
|
|
183
|
+
}, {
|
|
184
|
+
readonly internalType: "int128";
|
|
185
|
+
readonly name: "priceX18";
|
|
186
|
+
readonly type: "int128";
|
|
187
|
+
}];
|
|
188
|
+
readonly internalType: "struct RiskHelper.RiskStore";
|
|
189
|
+
readonly name: "riskStore";
|
|
190
|
+
readonly type: "tuple";
|
|
191
|
+
}];
|
|
192
|
+
readonly name: "addProduct";
|
|
193
|
+
readonly outputs: readonly [];
|
|
194
|
+
readonly stateMutability: "nonpayable";
|
|
195
|
+
readonly type: "function";
|
|
196
|
+
}, {
|
|
197
|
+
readonly inputs: readonly [{
|
|
198
|
+
readonly internalType: "uint32";
|
|
199
|
+
readonly name: "productId";
|
|
200
|
+
readonly type: "uint32";
|
|
201
|
+
}];
|
|
202
|
+
readonly name: "assertUtilization";
|
|
203
|
+
readonly outputs: readonly [];
|
|
204
|
+
readonly stateMutability: "view";
|
|
205
|
+
readonly type: "function";
|
|
206
|
+
}, {
|
|
207
|
+
readonly inputs: readonly [{
|
|
208
|
+
readonly internalType: "uint32";
|
|
209
|
+
readonly name: "productId";
|
|
210
|
+
readonly type: "uint32";
|
|
211
|
+
}, {
|
|
212
|
+
readonly internalType: "bytes32";
|
|
213
|
+
readonly name: "subaccount";
|
|
214
|
+
readonly type: "bytes32";
|
|
215
|
+
}];
|
|
216
|
+
readonly name: "getBalance";
|
|
217
|
+
readonly outputs: readonly [{
|
|
218
|
+
readonly components: readonly [{
|
|
219
|
+
readonly internalType: "int128";
|
|
220
|
+
readonly name: "amount";
|
|
221
|
+
readonly type: "int128";
|
|
222
|
+
}];
|
|
223
|
+
readonly internalType: "struct ISpotEngine.Balance";
|
|
224
|
+
readonly name: "";
|
|
225
|
+
readonly type: "tuple";
|
|
226
|
+
}];
|
|
227
|
+
readonly stateMutability: "view";
|
|
228
|
+
readonly type: "function";
|
|
229
|
+
}, {
|
|
230
|
+
readonly inputs: readonly [];
|
|
231
|
+
readonly name: "getClearinghouse";
|
|
232
|
+
readonly outputs: readonly [{
|
|
233
|
+
readonly internalType: "address";
|
|
234
|
+
readonly name: "";
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
}];
|
|
237
|
+
readonly stateMutability: "view";
|
|
238
|
+
readonly type: "function";
|
|
239
|
+
}, {
|
|
240
|
+
readonly inputs: readonly [{
|
|
241
|
+
readonly internalType: "uint32";
|
|
242
|
+
readonly name: "productId";
|
|
243
|
+
readonly type: "uint32";
|
|
244
|
+
}];
|
|
245
|
+
readonly name: "getConfig";
|
|
246
|
+
readonly outputs: readonly [{
|
|
247
|
+
readonly components: readonly [{
|
|
248
|
+
readonly internalType: "address";
|
|
249
|
+
readonly name: "token";
|
|
250
|
+
readonly type: "address";
|
|
251
|
+
}, {
|
|
252
|
+
readonly internalType: "int128";
|
|
253
|
+
readonly name: "interestInflectionUtilX18";
|
|
254
|
+
readonly type: "int128";
|
|
255
|
+
}, {
|
|
256
|
+
readonly internalType: "int128";
|
|
257
|
+
readonly name: "interestFloorX18";
|
|
258
|
+
readonly type: "int128";
|
|
259
|
+
}, {
|
|
260
|
+
readonly internalType: "int128";
|
|
261
|
+
readonly name: "interestSmallCapX18";
|
|
262
|
+
readonly type: "int128";
|
|
263
|
+
}, {
|
|
264
|
+
readonly internalType: "int128";
|
|
265
|
+
readonly name: "interestLargeCapX18";
|
|
266
|
+
readonly type: "int128";
|
|
267
|
+
}, {
|
|
268
|
+
readonly internalType: "int128";
|
|
269
|
+
readonly name: "withdrawFeeX18";
|
|
270
|
+
readonly type: "int128";
|
|
271
|
+
}, {
|
|
272
|
+
readonly internalType: "int128";
|
|
273
|
+
readonly name: "minDepositRateX18";
|
|
274
|
+
readonly type: "int128";
|
|
275
|
+
}];
|
|
276
|
+
readonly internalType: "struct ISpotEngine.Config";
|
|
277
|
+
readonly name: "";
|
|
278
|
+
readonly type: "tuple";
|
|
279
|
+
}];
|
|
280
|
+
readonly stateMutability: "view";
|
|
281
|
+
readonly type: "function";
|
|
282
|
+
}, {
|
|
283
|
+
readonly inputs: readonly [{
|
|
284
|
+
readonly internalType: "bytes32";
|
|
285
|
+
readonly name: "subaccount";
|
|
286
|
+
readonly type: "bytes32";
|
|
287
|
+
}, {
|
|
288
|
+
readonly internalType: "uint32";
|
|
289
|
+
readonly name: "productId";
|
|
290
|
+
readonly type: "uint32";
|
|
291
|
+
}, {
|
|
292
|
+
readonly internalType: "enum IProductEngine.HealthType";
|
|
293
|
+
readonly name: "healthType";
|
|
294
|
+
readonly type: "uint8";
|
|
295
|
+
}];
|
|
296
|
+
readonly name: "getCoreRisk";
|
|
297
|
+
readonly outputs: readonly [{
|
|
298
|
+
readonly components: readonly [{
|
|
299
|
+
readonly internalType: "int128";
|
|
300
|
+
readonly name: "amount";
|
|
301
|
+
readonly type: "int128";
|
|
302
|
+
}, {
|
|
303
|
+
readonly internalType: "int128";
|
|
304
|
+
readonly name: "price";
|
|
305
|
+
readonly type: "int128";
|
|
306
|
+
}, {
|
|
307
|
+
readonly internalType: "int128";
|
|
308
|
+
readonly name: "longWeight";
|
|
309
|
+
readonly type: "int128";
|
|
310
|
+
}];
|
|
311
|
+
readonly internalType: "struct IProductEngine.CoreRisk";
|
|
312
|
+
readonly name: "";
|
|
313
|
+
readonly type: "tuple";
|
|
314
|
+
}];
|
|
315
|
+
readonly stateMutability: "view";
|
|
316
|
+
readonly type: "function";
|
|
317
|
+
}, {
|
|
318
|
+
readonly inputs: readonly [];
|
|
319
|
+
readonly name: "getEndpoint";
|
|
320
|
+
readonly outputs: readonly [{
|
|
321
|
+
readonly internalType: "address";
|
|
322
|
+
readonly name: "";
|
|
323
|
+
readonly type: "address";
|
|
324
|
+
}];
|
|
325
|
+
readonly stateMutability: "view";
|
|
326
|
+
readonly type: "function";
|
|
327
|
+
}, {
|
|
328
|
+
readonly inputs: readonly [];
|
|
329
|
+
readonly name: "getEngineType";
|
|
330
|
+
readonly outputs: readonly [{
|
|
331
|
+
readonly internalType: "enum IProductEngine.EngineType";
|
|
332
|
+
readonly name: "";
|
|
333
|
+
readonly type: "uint8";
|
|
334
|
+
}];
|
|
335
|
+
readonly stateMutability: "pure";
|
|
336
|
+
readonly type: "function";
|
|
337
|
+
}, {
|
|
338
|
+
readonly inputs: readonly [{
|
|
339
|
+
readonly internalType: "bytes32";
|
|
340
|
+
readonly name: "subaccount";
|
|
341
|
+
readonly type: "bytes32";
|
|
342
|
+
}, {
|
|
343
|
+
readonly internalType: "enum IProductEngine.HealthType";
|
|
344
|
+
readonly name: "healthType";
|
|
345
|
+
readonly type: "uint8";
|
|
346
|
+
}];
|
|
347
|
+
readonly name: "getHealthContribution";
|
|
348
|
+
readonly outputs: readonly [{
|
|
349
|
+
readonly internalType: "int128";
|
|
350
|
+
readonly name: "health";
|
|
351
|
+
readonly type: "int128";
|
|
352
|
+
}];
|
|
353
|
+
readonly stateMutability: "view";
|
|
354
|
+
readonly type: "function";
|
|
355
|
+
}, {
|
|
356
|
+
readonly inputs: readonly [{
|
|
357
|
+
readonly internalType: "bytes32";
|
|
358
|
+
readonly name: "subaccount";
|
|
359
|
+
readonly type: "bytes32";
|
|
360
|
+
}];
|
|
361
|
+
readonly name: "getNlpUnlockedBalance";
|
|
362
|
+
readonly outputs: readonly [{
|
|
363
|
+
readonly components: readonly [{
|
|
364
|
+
readonly internalType: "int128";
|
|
365
|
+
readonly name: "amount";
|
|
366
|
+
readonly type: "int128";
|
|
367
|
+
}];
|
|
368
|
+
readonly internalType: "struct ISpotEngine.Balance";
|
|
369
|
+
readonly name: "";
|
|
370
|
+
readonly type: "tuple";
|
|
371
|
+
}];
|
|
372
|
+
readonly stateMutability: "nonpayable";
|
|
373
|
+
readonly type: "function";
|
|
374
|
+
}, {
|
|
375
|
+
readonly inputs: readonly [];
|
|
376
|
+
readonly name: "getProductIds";
|
|
377
|
+
readonly outputs: readonly [{
|
|
378
|
+
readonly internalType: "uint32[]";
|
|
379
|
+
readonly name: "";
|
|
380
|
+
readonly type: "uint32[]";
|
|
381
|
+
}];
|
|
382
|
+
readonly stateMutability: "view";
|
|
383
|
+
readonly type: "function";
|
|
384
|
+
}, {
|
|
385
|
+
readonly inputs: readonly [{
|
|
386
|
+
readonly internalType: "uint32";
|
|
387
|
+
readonly name: "productId";
|
|
388
|
+
readonly type: "uint32";
|
|
389
|
+
}];
|
|
390
|
+
readonly name: "getRisk";
|
|
391
|
+
readonly outputs: readonly [{
|
|
392
|
+
readonly components: readonly [{
|
|
393
|
+
readonly internalType: "int128";
|
|
394
|
+
readonly name: "longWeightInitialX18";
|
|
395
|
+
readonly type: "int128";
|
|
396
|
+
}, {
|
|
397
|
+
readonly internalType: "int128";
|
|
398
|
+
readonly name: "shortWeightInitialX18";
|
|
399
|
+
readonly type: "int128";
|
|
400
|
+
}, {
|
|
401
|
+
readonly internalType: "int128";
|
|
402
|
+
readonly name: "longWeightMaintenanceX18";
|
|
403
|
+
readonly type: "int128";
|
|
404
|
+
}, {
|
|
405
|
+
readonly internalType: "int128";
|
|
406
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
407
|
+
readonly type: "int128";
|
|
408
|
+
}, {
|
|
409
|
+
readonly internalType: "int128";
|
|
410
|
+
readonly name: "priceX18";
|
|
411
|
+
readonly type: "int128";
|
|
412
|
+
}];
|
|
413
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
414
|
+
readonly name: "";
|
|
415
|
+
readonly type: "tuple";
|
|
416
|
+
}];
|
|
417
|
+
readonly stateMutability: "view";
|
|
418
|
+
readonly type: "function";
|
|
419
|
+
}, {
|
|
420
|
+
readonly inputs: readonly [{
|
|
421
|
+
readonly internalType: "uint32";
|
|
422
|
+
readonly name: "productId";
|
|
423
|
+
readonly type: "uint32";
|
|
424
|
+
}, {
|
|
425
|
+
readonly internalType: "bytes32";
|
|
426
|
+
readonly name: "subaccount";
|
|
427
|
+
readonly type: "bytes32";
|
|
428
|
+
}];
|
|
429
|
+
readonly name: "getStateAndBalance";
|
|
430
|
+
readonly outputs: readonly [{
|
|
431
|
+
readonly components: readonly [{
|
|
432
|
+
readonly internalType: "int128";
|
|
433
|
+
readonly name: "cumulativeDepositsMultiplierX18";
|
|
434
|
+
readonly type: "int128";
|
|
435
|
+
}, {
|
|
436
|
+
readonly internalType: "int128";
|
|
437
|
+
readonly name: "cumulativeBorrowsMultiplierX18";
|
|
438
|
+
readonly type: "int128";
|
|
439
|
+
}, {
|
|
440
|
+
readonly internalType: "int128";
|
|
441
|
+
readonly name: "totalDepositsNormalized";
|
|
442
|
+
readonly type: "int128";
|
|
443
|
+
}, {
|
|
444
|
+
readonly internalType: "int128";
|
|
445
|
+
readonly name: "totalBorrowsNormalized";
|
|
446
|
+
readonly type: "int128";
|
|
447
|
+
}];
|
|
448
|
+
readonly internalType: "struct ISpotEngine.State";
|
|
449
|
+
readonly name: "";
|
|
450
|
+
readonly type: "tuple";
|
|
451
|
+
}, {
|
|
452
|
+
readonly components: readonly [{
|
|
453
|
+
readonly internalType: "int128";
|
|
454
|
+
readonly name: "amount";
|
|
455
|
+
readonly type: "int128";
|
|
456
|
+
}];
|
|
457
|
+
readonly internalType: "struct ISpotEngine.Balance";
|
|
458
|
+
readonly name: "";
|
|
459
|
+
readonly type: "tuple";
|
|
460
|
+
}];
|
|
461
|
+
readonly stateMutability: "view";
|
|
462
|
+
readonly type: "function";
|
|
463
|
+
}, {
|
|
464
|
+
readonly inputs: readonly [{
|
|
465
|
+
readonly internalType: "uint32";
|
|
466
|
+
readonly name: "productId";
|
|
467
|
+
readonly type: "uint32";
|
|
468
|
+
}];
|
|
469
|
+
readonly name: "getToken";
|
|
470
|
+
readonly outputs: readonly [{
|
|
471
|
+
readonly internalType: "address";
|
|
472
|
+
readonly name: "";
|
|
473
|
+
readonly type: "address";
|
|
474
|
+
}];
|
|
475
|
+
readonly stateMutability: "view";
|
|
476
|
+
readonly type: "function";
|
|
477
|
+
}, {
|
|
478
|
+
readonly inputs: readonly [{
|
|
479
|
+
readonly internalType: "address";
|
|
480
|
+
readonly name: "_clearinghouse";
|
|
481
|
+
readonly type: "address";
|
|
482
|
+
}, {
|
|
483
|
+
readonly internalType: "address";
|
|
484
|
+
readonly name: "_offchainExchange";
|
|
485
|
+
readonly type: "address";
|
|
486
|
+
}, {
|
|
487
|
+
readonly internalType: "address";
|
|
488
|
+
readonly name: "_quote";
|
|
489
|
+
readonly type: "address";
|
|
490
|
+
}, {
|
|
491
|
+
readonly internalType: "address";
|
|
492
|
+
readonly name: "_endpoint";
|
|
493
|
+
readonly type: "address";
|
|
494
|
+
}, {
|
|
495
|
+
readonly internalType: "address";
|
|
496
|
+
readonly name: "_admin";
|
|
497
|
+
readonly type: "address";
|
|
498
|
+
}];
|
|
499
|
+
readonly name: "initialize";
|
|
500
|
+
readonly outputs: readonly [];
|
|
501
|
+
readonly stateMutability: "nonpayable";
|
|
502
|
+
readonly type: "function";
|
|
503
|
+
}, {
|
|
504
|
+
readonly inputs: readonly [{
|
|
505
|
+
readonly internalType: "int128[]";
|
|
506
|
+
readonly name: "totalDeposits";
|
|
507
|
+
readonly type: "int128[]";
|
|
508
|
+
}, {
|
|
509
|
+
readonly internalType: "int128[]";
|
|
510
|
+
readonly name: "totalBorrows";
|
|
511
|
+
readonly type: "int128[]";
|
|
512
|
+
}];
|
|
513
|
+
readonly name: "manualAssert";
|
|
514
|
+
readonly outputs: readonly [];
|
|
515
|
+
readonly stateMutability: "view";
|
|
516
|
+
readonly type: "function";
|
|
517
|
+
}, {
|
|
518
|
+
readonly inputs: readonly [];
|
|
519
|
+
readonly name: "owner";
|
|
520
|
+
readonly outputs: readonly [{
|
|
521
|
+
readonly internalType: "address";
|
|
522
|
+
readonly name: "";
|
|
523
|
+
readonly type: "address";
|
|
524
|
+
}];
|
|
525
|
+
readonly stateMutability: "view";
|
|
526
|
+
readonly type: "function";
|
|
527
|
+
}, {
|
|
528
|
+
readonly inputs: readonly [];
|
|
529
|
+
readonly name: "renounceOwnership";
|
|
530
|
+
readonly outputs: readonly [];
|
|
531
|
+
readonly stateMutability: "nonpayable";
|
|
532
|
+
readonly type: "function";
|
|
533
|
+
}, {
|
|
534
|
+
readonly inputs: readonly [{
|
|
535
|
+
readonly internalType: "bytes32";
|
|
536
|
+
readonly name: "subaccount";
|
|
537
|
+
readonly type: "bytes32";
|
|
538
|
+
}];
|
|
539
|
+
readonly name: "socializeSubaccount";
|
|
540
|
+
readonly outputs: readonly [];
|
|
541
|
+
readonly stateMutability: "nonpayable";
|
|
542
|
+
readonly type: "function";
|
|
543
|
+
}, {
|
|
544
|
+
readonly inputs: readonly [{
|
|
545
|
+
readonly internalType: "address";
|
|
546
|
+
readonly name: "newOwner";
|
|
547
|
+
readonly type: "address";
|
|
548
|
+
}];
|
|
549
|
+
readonly name: "transferOwnership";
|
|
550
|
+
readonly outputs: readonly [];
|
|
551
|
+
readonly stateMutability: "nonpayable";
|
|
552
|
+
readonly type: "function";
|
|
553
|
+
}, {
|
|
554
|
+
readonly inputs: readonly [{
|
|
555
|
+
readonly internalType: "bytes32";
|
|
556
|
+
readonly name: "subaccount";
|
|
557
|
+
readonly type: "bytes32";
|
|
558
|
+
}];
|
|
559
|
+
readonly name: "tryUnlockNlpBalance";
|
|
560
|
+
readonly outputs: readonly [{
|
|
561
|
+
readonly components: readonly [{
|
|
562
|
+
readonly internalType: "int128";
|
|
563
|
+
readonly name: "amount";
|
|
564
|
+
readonly type: "int128";
|
|
565
|
+
}];
|
|
566
|
+
readonly internalType: "struct ISpotEngine.Balance";
|
|
567
|
+
readonly name: "";
|
|
568
|
+
readonly type: "tuple";
|
|
569
|
+
}];
|
|
570
|
+
readonly stateMutability: "nonpayable";
|
|
571
|
+
readonly type: "function";
|
|
572
|
+
}, {
|
|
573
|
+
readonly inputs: readonly [{
|
|
574
|
+
readonly internalType: "uint32";
|
|
575
|
+
readonly name: "productId";
|
|
576
|
+
readonly type: "uint32";
|
|
577
|
+
}, {
|
|
578
|
+
readonly internalType: "bytes32";
|
|
579
|
+
readonly name: "subaccount";
|
|
580
|
+
readonly type: "bytes32";
|
|
581
|
+
}, {
|
|
582
|
+
readonly internalType: "int128";
|
|
583
|
+
readonly name: "amountDelta";
|
|
584
|
+
readonly type: "int128";
|
|
585
|
+
}];
|
|
586
|
+
readonly name: "updateBalance";
|
|
587
|
+
readonly outputs: readonly [];
|
|
588
|
+
readonly stateMutability: "nonpayable";
|
|
589
|
+
readonly type: "function";
|
|
590
|
+
}, {
|
|
591
|
+
readonly inputs: readonly [{
|
|
592
|
+
readonly internalType: "uint32";
|
|
593
|
+
readonly name: "productId";
|
|
594
|
+
readonly type: "uint32";
|
|
595
|
+
}, {
|
|
596
|
+
readonly internalType: "bytes32";
|
|
597
|
+
readonly name: "subaccount";
|
|
598
|
+
readonly type: "bytes32";
|
|
599
|
+
}, {
|
|
600
|
+
readonly internalType: "int128";
|
|
601
|
+
readonly name: "amountDelta";
|
|
602
|
+
readonly type: "int128";
|
|
603
|
+
}, {
|
|
604
|
+
readonly internalType: "int128";
|
|
605
|
+
readonly name: "quoteDelta";
|
|
606
|
+
readonly type: "int128";
|
|
607
|
+
}];
|
|
608
|
+
readonly name: "updateBalance";
|
|
609
|
+
readonly outputs: readonly [];
|
|
610
|
+
readonly stateMutability: "nonpayable";
|
|
611
|
+
readonly type: "function";
|
|
612
|
+
}, {
|
|
613
|
+
readonly inputs: readonly [{
|
|
614
|
+
readonly internalType: "uint32";
|
|
615
|
+
readonly name: "productId";
|
|
616
|
+
readonly type: "uint32";
|
|
617
|
+
}, {
|
|
618
|
+
readonly internalType: "int128";
|
|
619
|
+
readonly name: "priceX18";
|
|
620
|
+
readonly type: "int128";
|
|
621
|
+
}];
|
|
622
|
+
readonly name: "updatePrice";
|
|
623
|
+
readonly outputs: readonly [];
|
|
624
|
+
readonly stateMutability: "nonpayable";
|
|
625
|
+
readonly type: "function";
|
|
626
|
+
}, {
|
|
627
|
+
readonly inputs: readonly [{
|
|
628
|
+
readonly internalType: "bytes";
|
|
629
|
+
readonly name: "rawTxn";
|
|
630
|
+
readonly type: "bytes";
|
|
631
|
+
}];
|
|
632
|
+
readonly name: "updateProduct";
|
|
633
|
+
readonly outputs: readonly [];
|
|
634
|
+
readonly stateMutability: "nonpayable";
|
|
635
|
+
readonly type: "function";
|
|
636
|
+
}, {
|
|
637
|
+
readonly inputs: readonly [{
|
|
638
|
+
readonly internalType: "bytes32";
|
|
639
|
+
readonly name: "subaccount";
|
|
640
|
+
readonly type: "bytes32";
|
|
641
|
+
}, {
|
|
642
|
+
readonly internalType: "int128";
|
|
643
|
+
readonly name: "insurance";
|
|
644
|
+
readonly type: "int128";
|
|
645
|
+
}];
|
|
646
|
+
readonly name: "updateQuoteFromInsurance";
|
|
647
|
+
readonly outputs: readonly [{
|
|
648
|
+
readonly internalType: "int128";
|
|
649
|
+
readonly name: "";
|
|
650
|
+
readonly type: "int128";
|
|
651
|
+
}];
|
|
652
|
+
readonly stateMutability: "nonpayable";
|
|
653
|
+
readonly type: "function";
|
|
654
|
+
}, {
|
|
655
|
+
readonly inputs: readonly [{
|
|
656
|
+
readonly internalType: "uint32";
|
|
657
|
+
readonly name: "productId";
|
|
658
|
+
readonly type: "uint32";
|
|
659
|
+
}, {
|
|
660
|
+
readonly components: readonly [{
|
|
661
|
+
readonly internalType: "int32";
|
|
662
|
+
readonly name: "longWeightInitial";
|
|
663
|
+
readonly type: "int32";
|
|
664
|
+
}, {
|
|
665
|
+
readonly internalType: "int32";
|
|
666
|
+
readonly name: "shortWeightInitial";
|
|
667
|
+
readonly type: "int32";
|
|
668
|
+
}, {
|
|
669
|
+
readonly internalType: "int32";
|
|
670
|
+
readonly name: "longWeightMaintenance";
|
|
671
|
+
readonly type: "int32";
|
|
672
|
+
}, {
|
|
673
|
+
readonly internalType: "int32";
|
|
674
|
+
readonly name: "shortWeightMaintenance";
|
|
675
|
+
readonly type: "int32";
|
|
676
|
+
}, {
|
|
677
|
+
readonly internalType: "int128";
|
|
678
|
+
readonly name: "priceX18";
|
|
679
|
+
readonly type: "int128";
|
|
680
|
+
}];
|
|
681
|
+
readonly internalType: "struct RiskHelper.RiskStore";
|
|
682
|
+
readonly name: "riskStore";
|
|
683
|
+
readonly type: "tuple";
|
|
684
|
+
}];
|
|
685
|
+
readonly name: "updateRisk";
|
|
686
|
+
readonly outputs: readonly [];
|
|
687
|
+
readonly stateMutability: "nonpayable";
|
|
688
|
+
readonly type: "function";
|
|
689
|
+
}, {
|
|
690
|
+
readonly inputs: readonly [{
|
|
691
|
+
readonly internalType: "uint128";
|
|
692
|
+
readonly name: "dt";
|
|
693
|
+
readonly type: "uint128";
|
|
694
|
+
}];
|
|
695
|
+
readonly name: "updateStates";
|
|
696
|
+
readonly outputs: readonly [];
|
|
697
|
+
readonly stateMutability: "nonpayable";
|
|
698
|
+
readonly type: "function";
|
|
699
|
+
}];
|
|
700
|
+
|
|
701
|
+
export { SPOT_ENGINE_ABI };
|