@nadohq/shared 0.1.0-alpha.5 → 0.1.0-alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abis/index.cjs +12 -12
- package/dist/abis/index.cjs.map +1 -1
- package/dist/abis/index.d.cts +6 -6
- package/dist/abis/index.d.ts +6 -6
- package/dist/abis/index.js +6 -6
- package/dist/abis/index.js.map +1 -1
- package/dist/{chunk-TUJ4HQKF.js → chunk-2GPIH63F.js} +3 -3
- package/dist/chunk-2GPIH63F.js.map +1 -0
- package/dist/consts/chainEnvToChain.cjs +2 -2
- package/dist/consts/chainEnvToChain.cjs.map +1 -1
- package/dist/consts/chainEnvToChain.d.cts +345 -56
- package/dist/consts/chainEnvToChain.d.ts +345 -56
- package/dist/consts/chainEnvToChain.js +3 -3
- package/dist/consts/chainEnvToChain.js.map +1 -1
- package/dist/consts/index.d.cts +0 -1
- package/dist/consts/index.d.ts +0 -1
- package/dist/consts/productIds.cjs +1 -1
- package/dist/consts/productIds.cjs.map +1 -1
- package/dist/consts/productIds.d.cts +1 -1
- package/dist/consts/productIds.d.ts +1 -1
- package/dist/consts/productIds.js +1 -1
- package/dist/consts/productIds.js.map +1 -1
- package/dist/deployments/core/deployment.inkMainnet.json +13 -0
- package/dist/deployments/core/deployment.inkSepolia.json +13 -0
- package/dist/deployments/index.cjs +6 -6
- package/dist/deployments/index.cjs.map +1 -1
- package/dist/deployments/index.js +5 -5
- package/dist/deployments/index.js.map +1 -1
- package/dist/eip712/eip712ValueTypes.d.cts +1 -1
- package/dist/eip712/eip712ValueTypes.d.ts +1 -1
- package/dist/eip712/getNadoEIP712Domain.cjs.map +1 -1
- package/dist/eip712/getNadoEIP712Domain.js.map +1 -1
- package/dist/eip712/index.cjs +13 -13
- package/dist/eip712/index.cjs.map +1 -1
- package/dist/eip712/index.d.cts +9 -9
- package/dist/eip712/index.d.ts +9 -9
- package/dist/eip712/index.js +6 -6
- package/dist/eip712/index.js.map +1 -1
- package/dist/encoding/encoding.cjs +21 -0
- package/dist/encoding/encoding.cjs.map +1 -1
- package/dist/encoding/encoding.d.cts +27 -3
- package/dist/encoding/encoding.d.ts +27 -3
- package/dist/encoding/encoding.js +24 -1
- package/dist/encoding/encoding.js.map +1 -1
- package/dist/encoding/index.d.cts +2 -2
- package/dist/encoding/index.d.ts +2 -2
- package/dist/index.d.cts +35 -35
- package/dist/index.d.ts +35 -35
- package/dist/types/ChainEnv.cjs +1 -1
- package/dist/types/ChainEnv.cjs.map +1 -1
- package/dist/types/ChainEnv.d.cts +2 -2
- package/dist/types/ChainEnv.d.ts +2 -2
- package/dist/types/ChainEnv.js +1 -1
- package/dist/types/ChainEnv.js.map +1 -1
- package/dist/types/balanceTypes.d.cts +1 -1
- package/dist/types/balanceTypes.d.ts +1 -1
- package/dist/types/index.cjs +7 -7
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.js +3 -3
- package/dist/types/index.js.map +1 -1
- package/dist/types/orderAppendixTypes.cjs.map +1 -1
- package/dist/types/orderAppendixTypes.d.cts +25 -1
- package/dist/types/orderAppendixTypes.d.ts +25 -1
- package/dist/types/viemTypes.d.cts +1 -1
- package/dist/types/viemTypes.d.ts +1 -1
- package/dist/utils/balanceValue.d.cts +1 -1
- package/dist/utils/balanceValue.d.ts +1 -1
- package/dist/utils/bytes32.d.cts +1 -1
- package/dist/utils/bytes32.d.ts +1 -1
- package/dist/utils/bytes32.test.cjs +2 -2
- package/dist/utils/bytes32.test.cjs.map +1 -1
- package/dist/utils/bytes32.test.js +1 -1
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.cjs.map +1 -1
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.js.map +1 -1
- package/dist/utils/index.cjs +12 -12
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +21 -21
- package/dist/utils/index.d.ts +21 -21
- package/dist/utils/index.js +6 -6
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/math/bigDecimal.cjs +4 -3
- package/dist/utils/math/bigDecimal.cjs.map +1 -1
- package/dist/utils/math/bigDecimal.js +4 -3
- package/dist/utils/math/bigDecimal.js.map +1 -1
- package/dist/utils/math/index.cjs +8 -8
- package/dist/utils/math/index.cjs.map +1 -1
- package/dist/utils/math/index.d.cts +4 -4
- package/dist/utils/math/index.d.ts +4 -4
- package/dist/utils/math/index.js +4 -4
- package/dist/utils/math/index.js.map +1 -1
- package/dist/utils/orders/appendix/appendixIsolatedValue.cjs +50 -0
- package/dist/utils/orders/appendix/appendixIsolatedValue.cjs.map +1 -0
- package/dist/utils/orders/appendix/appendixIsolatedValue.d.cts +26 -0
- package/dist/utils/orders/appendix/appendixIsolatedValue.d.ts +26 -0
- package/dist/utils/orders/appendix/appendixIsolatedValue.js +31 -0
- package/dist/utils/orders/appendix/appendixIsolatedValue.js.map +1 -0
- package/dist/utils/orders/appendix/appendixTwapValue.cjs +3 -4
- package/dist/utils/orders/appendix/appendixTwapValue.cjs.map +1 -1
- package/dist/utils/orders/appendix/appendixTwapValue.d.cts +11 -13
- package/dist/utils/orders/appendix/appendixTwapValue.d.ts +11 -13
- package/dist/utils/orders/appendix/appendixTwapValue.js +3 -4
- package/dist/utils/orders/appendix/appendixTwapValue.js.map +1 -1
- package/dist/utils/orders/appendix/index.cjs +4 -4
- package/dist/utils/orders/appendix/index.cjs.map +1 -1
- package/dist/utils/orders/appendix/index.d.cts +2 -2
- package/dist/utils/orders/appendix/index.d.ts +2 -2
- package/dist/utils/orders/appendix/index.js +2 -2
- package/dist/utils/orders/appendix/index.js.map +1 -1
- package/dist/utils/orders/appendix/orderAppendix.test.cjs +67 -14
- package/dist/utils/orders/appendix/orderAppendix.test.cjs.map +1 -1
- package/dist/utils/orders/appendix/orderAppendix.test.js +66 -13
- package/dist/utils/orders/appendix/orderAppendix.test.js.map +1 -1
- package/dist/utils/orders/appendix/packOrderAppendix.cjs +9 -5
- package/dist/utils/orders/appendix/packOrderAppendix.cjs.map +1 -1
- package/dist/utils/orders/appendix/packOrderAppendix.js +9 -5
- package/dist/utils/orders/appendix/packOrderAppendix.js.map +1 -1
- package/dist/utils/orders/appendix/types.cjs.map +1 -1
- package/dist/utils/orders/appendix/types.d.cts +6 -4
- package/dist/utils/orders/appendix/types.d.ts +6 -4
- package/dist/utils/orders/appendix/unpackOrderAppendix.cjs +22 -5
- package/dist/utils/orders/appendix/unpackOrderAppendix.cjs.map +1 -1
- package/dist/utils/orders/appendix/unpackOrderAppendix.js +22 -5
- package/dist/utils/orders/appendix/unpackOrderAppendix.js.map +1 -1
- package/dist/utils/orders/index.cjs +3 -3
- package/dist/utils/orders/index.cjs.map +1 -1
- package/dist/utils/orders/index.d.cts +4 -4
- package/dist/utils/orders/index.d.ts +4 -4
- package/dist/utils/orders/index.js +1 -1
- package/dist/utils/orders/index.js.map +1 -1
- package/dist/utils/productTypeFilter.cjs.map +1 -1
- package/dist/utils/productTypeFilter.d.cts +2 -2
- package/dist/utils/productTypeFilter.d.ts +2 -2
- package/dist/utils/productTypeFilter.js.map +1 -1
- package/dist/utils/toPrintableObject.cjs +17 -9
- package/dist/utils/toPrintableObject.cjs.map +1 -1
- package/dist/utils/toPrintableObject.d.cts +7 -2
- package/dist/utils/toPrintableObject.d.ts +7 -2
- package/dist/utils/toPrintableObject.js +17 -9
- package/dist/utils/toPrintableObject.js.map +1 -1
- package/package.json +10 -3
- package/src/abis/index.ts +6 -6
- package/src/consts/chainEnvToChain.ts +2 -2
- package/src/consts/productIds.ts +1 -1
- package/src/deployments/core/deployment.inkMainnet.json +13 -0
- package/src/deployments/core/deployment.inkSepolia.json +13 -0
- package/src/deployments/index.ts +5 -5
- package/src/eip712/getNadoEIP712Domain.ts +1 -1
- package/src/eip712/index.ts +6 -6
- package/src/encoding/encoding.ts +43 -1
- package/src/types/ChainEnv.ts +1 -1
- package/src/types/index.ts +3 -3
- package/src/types/orderAppendixTypes.ts +25 -0
- package/src/utils/createDeterministicLinkedSignerPrivateKey.ts +1 -1
- package/src/utils/index.ts +6 -6
- package/src/utils/math/bigDecimal.ts +5 -3
- package/src/utils/math/index.ts +4 -4
- package/src/utils/orders/appendix/appendixIsolatedValue.ts +49 -0
- package/src/utils/orders/appendix/appendixTwapValue.ts +14 -19
- package/src/utils/orders/appendix/index.ts +2 -2
- package/src/utils/orders/appendix/orderAppendix.test.ts +68 -11
- package/src/utils/orders/appendix/packOrderAppendix.ts +10 -6
- package/src/utils/orders/appendix/types.ts +9 -7
- package/src/utils/orders/appendix/unpackOrderAppendix.ts +22 -5
- package/src/utils/orders/index.ts +1 -1
- package/src/utils/productTypeFilter.ts +2 -2
- package/src/utils/toPrintableObject.ts +30 -10
- package/dist/chunk-TUJ4HQKF.js.map +0 -1
- package/dist/deployments/core/deployment.InkSepolia.json +0 -13
- package/dist/deployments/core/deployment.arbitrumOne.json +0 -18
- package/src/deployments/core/deployment.InkSepolia.json +0 -13
- package/src/deployments/core/deployment.arbitrumOne.json +0 -18
|
@@ -34,15 +34,15 @@ __export(deployments_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(deployments_exports);
|
|
36
36
|
var import_getValidatedAddress = require("../utils/getValidatedAddress.cjs");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_deployment_inkMainnet = __toESM(require("./core/deployment.inkMainnet.json"), 1);
|
|
38
|
+
var import_deployment_inkSepolia = __toESM(require("./core/deployment.inkSepolia.json"), 1);
|
|
39
39
|
var import_deployment_localhost = __toESM(require("./core/deployment.localhost.json"), 1);
|
|
40
40
|
var NADO_DEPLOYMENTS = {
|
|
41
|
-
arbitrum: validateDeployment({
|
|
42
|
-
...import_deployment_arbitrumOne.default
|
|
43
|
-
}),
|
|
44
41
|
inkTestnet: validateDeployment({
|
|
45
|
-
...
|
|
42
|
+
...import_deployment_inkSepolia.default
|
|
43
|
+
}),
|
|
44
|
+
inkMainnet: validateDeployment({
|
|
45
|
+
...import_deployment_inkMainnet.default
|
|
46
46
|
}),
|
|
47
47
|
local: validateDeployment({
|
|
48
48
|
...import_deployment_localhost.default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/deployments/index.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { NadoContractName } from '../abis/nadoAbis';\n\nimport { ChainEnv } from '../types';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/deployments/index.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { NadoContractName } from '../abis/nadoAbis';\n\nimport { ChainEnv } from '../types';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\nimport InkMainnetCoreDeployment from './core/deployment.inkMainnet.json' with { type: 'json' };\nimport InkSepoliaCoreDeployment from './core/deployment.inkSepolia.json' with { type: 'json' };\nimport LocalCoreDeployment from './core/deployment.localhost.json' with { type: 'json' };\n\nexport type NadoDeploymentAddresses = {\n [name in NadoContractName]: Address;\n};\n\n/**\n * Known deployment addresses for the Nado contracts\n */\nexport const NADO_DEPLOYMENTS: Record<ChainEnv, NadoDeploymentAddresses> = {\n inkTestnet: validateDeployment({\n ...InkSepoliaCoreDeployment,\n }),\n inkMainnet: validateDeployment({\n ...InkMainnetCoreDeployment,\n }),\n local: validateDeployment({\n ...LocalCoreDeployment,\n }),\n};\n\nfunction validateDeployment(\n deployment: Record<NadoContractName, string>,\n): Record<NadoContractName, Address> {\n return {\n clearinghouse: getValidatedAddress(deployment.clearinghouse),\n endpoint: getValidatedAddress(deployment.endpoint),\n perpEngine: getValidatedAddress(deployment.perpEngine),\n querier: getValidatedAddress(deployment.querier),\n spotEngine: getValidatedAddress(deployment.spotEngine),\n withdrawPool: getValidatedAddress(deployment.withdrawPool),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,iCAAoC;AACpC,mCAAqC;AACrC,mCAAqC;AACrC,kCAAgC;AASzB,IAAM,mBAA8D;AAAA,EACzE,YAAY,mBAAmB;AAAA,IAC7B,GAAG,6BAAAA;AAAA,EACL,CAAC;AAAA,EACD,YAAY,mBAAmB;AAAA,IAC7B,GAAG,6BAAAC;AAAA,EACL,CAAC;AAAA,EACD,OAAO,mBAAmB;AAAA,IACxB,GAAG,4BAAAC;AAAA,EACL,CAAC;AACH;AAEA,SAAS,mBACP,YACmC;AACnC,SAAO;AAAA,IACL,mBAAe,gDAAoB,WAAW,aAAa;AAAA,IAC3D,cAAU,gDAAoB,WAAW,QAAQ;AAAA,IACjD,gBAAY,gDAAoB,WAAW,UAAU;AAAA,IACrD,aAAS,gDAAoB,WAAW,OAAO;AAAA,IAC/C,gBAAY,gDAAoB,WAAW,UAAU;AAAA,IACrD,kBAAc,gDAAoB,WAAW,YAAY;AAAA,EAC3D;AACF;","names":["InkSepoliaCoreDeployment","InkMainnetCoreDeployment","LocalCoreDeployment"]}
|
|
@@ -2,16 +2,16 @@ import "../chunk-5WRI5ZAA.js";
|
|
|
2
2
|
|
|
3
3
|
// src/deployments/index.ts
|
|
4
4
|
import { getValidatedAddress } from "../utils/getValidatedAddress.js";
|
|
5
|
-
import
|
|
6
|
-
import InkSepoliaCoreDeployment from "./core/deployment.
|
|
5
|
+
import InkMainnetCoreDeployment from "./core/deployment.inkMainnet.json" with { type: "json" };
|
|
6
|
+
import InkSepoliaCoreDeployment from "./core/deployment.inkSepolia.json" with { type: "json" };
|
|
7
7
|
import LocalCoreDeployment from "./core/deployment.localhost.json" with { type: "json" };
|
|
8
8
|
var NADO_DEPLOYMENTS = {
|
|
9
|
-
arbitrum: validateDeployment({
|
|
10
|
-
...ArbitrumOneCoreDeployment
|
|
11
|
-
}),
|
|
12
9
|
inkTestnet: validateDeployment({
|
|
13
10
|
...InkSepoliaCoreDeployment
|
|
14
11
|
}),
|
|
12
|
+
inkMainnet: validateDeployment({
|
|
13
|
+
...InkMainnetCoreDeployment
|
|
14
|
+
}),
|
|
15
15
|
local: validateDeployment({
|
|
16
16
|
...LocalCoreDeployment
|
|
17
17
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/deployments/index.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { NadoContractName } from '../abis/nadoAbis';\n\nimport { ChainEnv } from '../types';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/deployments/index.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { NadoContractName } from '../abis/nadoAbis';\n\nimport { ChainEnv } from '../types';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\nimport InkMainnetCoreDeployment from './core/deployment.inkMainnet.json' with { type: 'json' };\nimport InkSepoliaCoreDeployment from './core/deployment.inkSepolia.json' with { type: 'json' };\nimport LocalCoreDeployment from './core/deployment.localhost.json' with { type: 'json' };\n\nexport type NadoDeploymentAddresses = {\n [name in NadoContractName]: Address;\n};\n\n/**\n * Known deployment addresses for the Nado contracts\n */\nexport const NADO_DEPLOYMENTS: Record<ChainEnv, NadoDeploymentAddresses> = {\n inkTestnet: validateDeployment({\n ...InkSepoliaCoreDeployment,\n }),\n inkMainnet: validateDeployment({\n ...InkMainnetCoreDeployment,\n }),\n local: validateDeployment({\n ...LocalCoreDeployment,\n }),\n};\n\nfunction validateDeployment(\n deployment: Record<NadoContractName, string>,\n): Record<NadoContractName, Address> {\n return {\n clearinghouse: getValidatedAddress(deployment.clearinghouse),\n endpoint: getValidatedAddress(deployment.endpoint),\n perpEngine: getValidatedAddress(deployment.perpEngine),\n querier: getValidatedAddress(deployment.querier),\n spotEngine: getValidatedAddress(deployment.spotEngine),\n withdrawPool: getValidatedAddress(deployment.withdrawPool),\n };\n}\n"],"mappings":";;;AAIA,SAAS,2BAA2B;AACpC,OAAO,8BAA8B,oCAAoC,KAAK,EAAE,MAAM,OAAO;AAC7F,OAAO,8BAA8B,oCAAoC,KAAK,EAAE,MAAM,OAAO;AAC7F,OAAO,yBAAyB,mCAAmC,KAAK,EAAE,MAAM,OAAO;AAShF,IAAM,mBAA8D;AAAA,EACzE,YAAY,mBAAmB;AAAA,IAC7B,GAAG;AAAA,EACL,CAAC;AAAA,EACD,YAAY,mBAAmB;AAAA,IAC7B,GAAG;AAAA,EACL,CAAC;AAAA,EACD,OAAO,mBAAmB;AAAA,IACxB,GAAG;AAAA,EACL,CAAC;AACH;AAEA,SAAS,mBACP,YACmC;AACnC,SAAO;AAAA,IACL,eAAe,oBAAoB,WAAW,aAAa;AAAA,IAC3D,UAAU,oBAAoB,WAAW,QAAQ;AAAA,IACjD,YAAY,oBAAoB,WAAW,UAAU;AAAA,IACrD,SAAS,oBAAoB,WAAW,OAAO;AAAA,IAC/C,YAAY,oBAAoB,WAAW,UAAU;AAAA,IACrD,cAAc,oBAAoB,WAAW,YAAY;AAAA,EAC3D;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Hex } from 'viem';
|
|
2
2
|
import { BigDecimalish } from '../utils/math/bigDecimal.cjs';
|
|
3
|
-
import { EIP712BurnNlpParams,
|
|
3
|
+
import { EIP712BurnNlpParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712CancelOrdersParams, EIP712OrderParams, EIP712CancelProductOrdersParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams } from './signatureParamTypes.cjs';
|
|
4
4
|
import 'bignumber.js';
|
|
5
5
|
import '../types/subaccountTypes.cjs';
|
|
6
6
|
import '../types/bytes.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Hex } from 'viem';
|
|
2
2
|
import { BigDecimalish } from '../utils/math/bigDecimal.js';
|
|
3
|
-
import { EIP712BurnNlpParams,
|
|
3
|
+
import { EIP712BurnNlpParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712CancelOrdersParams, EIP712OrderParams, EIP712CancelProductOrdersParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams } from './signatureParamTypes.js';
|
|
4
4
|
import 'bignumber.js';
|
|
5
5
|
import '../types/subaccountTypes.js';
|
|
6
6
|
import '../types/bytes.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/eip712/getNadoEIP712Domain.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/eip712/getNadoEIP712Domain.ts"],"sourcesContent":["import { TypedDataDomain } from 'abitype';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\n\n/**\n * Gives the EIP712 data domain for order signing\n *\n * @param contractAddress usually the address of the orderbook (for orders) or sequencer (for other operations)\n * @param chainId\n */\nexport function getNadoEIP712Domain(\n contractAddress: string,\n chainId: number,\n): TypedDataDomain {\n return {\n name: 'Nado',\n version: '0.0.1',\n chainId,\n verifyingContract: getValidatedAddress(contractAddress),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iCAAoC;AAQ7B,SAAS,oBACd,iBACA,SACiB;AACjB,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT;AAAA,IACA,uBAAmB,gDAAoB,eAAe;AAAA,EACxD;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/eip712/getNadoEIP712Domain.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/eip712/getNadoEIP712Domain.ts"],"sourcesContent":["import { TypedDataDomain } from 'abitype';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\n\n/**\n * Gives the EIP712 data domain for order signing\n *\n * @param contractAddress usually the address of the orderbook (for orders) or sequencer (for other operations)\n * @param chainId\n */\nexport function getNadoEIP712Domain(\n contractAddress: string,\n chainId: number,\n): TypedDataDomain {\n return {\n name: 'Nado',\n version: '0.0.1',\n chainId,\n verifyingContract: getValidatedAddress(contractAddress),\n };\n}\n"],"mappings":";;;AACA,SAAS,2BAA2B;AAQ7B,SAAS,oBACd,iBACA,SACiB;AACjB,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT;AAAA,IACA,mBAAmB,oBAAoB,eAAe;AAAA,EACxD;AACF;","names":[]}
|
package/dist/eip712/index.cjs
CHANGED
|
@@ -17,27 +17,27 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
17
17
|
// src/eip712/index.ts
|
|
18
18
|
var eip712_exports = {};
|
|
19
19
|
module.exports = __toCommonJS(eip712_exports);
|
|
20
|
-
__reExport(eip712_exports, require("./
|
|
21
|
-
__reExport(eip712_exports, require("./getNadoEIP712Values.cjs"), module.exports);
|
|
22
|
-
__reExport(eip712_exports, require("./getNadoEIP712Types.cjs"), module.exports);
|
|
23
|
-
__reExport(eip712_exports, require("./getNadoEIP712PrimaryType.cjs"), module.exports);
|
|
20
|
+
__reExport(eip712_exports, require("./eip712ValueTypes.cjs"), module.exports);
|
|
24
21
|
__reExport(eip712_exports, require("./getNadoEIP712Domain.cjs"), module.exports);
|
|
22
|
+
__reExport(eip712_exports, require("./getNadoEIP712PrimaryType.cjs"), module.exports);
|
|
23
|
+
__reExport(eip712_exports, require("./getNadoEIP712Types.cjs"), module.exports);
|
|
24
|
+
__reExport(eip712_exports, require("./getNadoEIP712Values.cjs"), module.exports);
|
|
25
|
+
__reExport(eip712_exports, require("./getOrderVerifyingAddress.cjs"), module.exports);
|
|
26
|
+
__reExport(eip712_exports, require("./getSignedTransactionRequest.cjs"), module.exports);
|
|
25
27
|
__reExport(eip712_exports, require("./orderDigest.cjs"), module.exports);
|
|
26
28
|
__reExport(eip712_exports, require("./signableRequestType.cjs"), module.exports);
|
|
27
29
|
__reExport(eip712_exports, require("./signatureParamTypes.cjs"), module.exports);
|
|
28
|
-
__reExport(eip712_exports, require("./eip712ValueTypes.cjs"), module.exports);
|
|
29
|
-
__reExport(eip712_exports, require("./getOrderVerifyingAddress.cjs"), module.exports);
|
|
30
30
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31
31
|
0 && (module.exports = {
|
|
32
|
-
...require("./
|
|
33
|
-
...require("./getNadoEIP712Values.cjs"),
|
|
34
|
-
...require("./getNadoEIP712Types.cjs"),
|
|
35
|
-
...require("./getNadoEIP712PrimaryType.cjs"),
|
|
32
|
+
...require("./eip712ValueTypes.cjs"),
|
|
36
33
|
...require("./getNadoEIP712Domain.cjs"),
|
|
34
|
+
...require("./getNadoEIP712PrimaryType.cjs"),
|
|
35
|
+
...require("./getNadoEIP712Types.cjs"),
|
|
36
|
+
...require("./getNadoEIP712Values.cjs"),
|
|
37
|
+
...require("./getOrderVerifyingAddress.cjs"),
|
|
38
|
+
...require("./getSignedTransactionRequest.cjs"),
|
|
37
39
|
...require("./orderDigest.cjs"),
|
|
38
40
|
...require("./signableRequestType.cjs"),
|
|
39
|
-
...require("./signatureParamTypes.cjs")
|
|
40
|
-
...require("./eip712ValueTypes.cjs"),
|
|
41
|
-
...require("./getOrderVerifyingAddress.cjs")
|
|
41
|
+
...require("./signatureParamTypes.cjs")
|
|
42
42
|
});
|
|
43
43
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/eip712/index.ts"],"sourcesContent":["export * from './
|
|
1
|
+
{"version":3,"sources":["../../src/eip712/index.ts"],"sourcesContent":["export * from './eip712ValueTypes';\nexport * from './getNadoEIP712Domain';\nexport * from './getNadoEIP712PrimaryType';\nexport * from './getNadoEIP712Types';\nexport * from './getNadoEIP712Values';\nexport * from './getOrderVerifyingAddress';\nexport * from './getSignedTransactionRequest';\nexport * from './orderDigest';\nexport * from './signableRequestType';\nexport * from './signatureParamTypes';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAc,mCAAd;AACA,2BAAc,sCADd;AAEA,2BAAc,2CAFd;AAGA,2BAAc,qCAHd;AAIA,2BAAc,sCAJd;AAKA,2BAAc,2CALd;AAMA,2BAAc,8CANd;AAOA,2BAAc,8BAPd;AAQA,2BAAc,sCARd;AASA,2BAAc,sCATd;","names":[]}
|
package/dist/eip712/index.d.cts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { getNadoEIP712Values } from './getNadoEIP712Values.cjs';
|
|
3
|
-
export { getNadoEIP712Types } from './getNadoEIP712Types.cjs';
|
|
4
|
-
export { getNadoEIP712PrimaryType } from './getNadoEIP712PrimaryType.cjs';
|
|
1
|
+
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values } from './eip712ValueTypes.cjs';
|
|
5
2
|
export { getNadoEIP712Domain } from './getNadoEIP712Domain.cjs';
|
|
3
|
+
export { getNadoEIP712PrimaryType } from './getNadoEIP712PrimaryType.cjs';
|
|
4
|
+
export { getNadoEIP712Types } from './getNadoEIP712Types.cjs';
|
|
5
|
+
export { getNadoEIP712Values } from './getNadoEIP712Values.cjs';
|
|
6
|
+
export { getOrderVerifyingAddress } from './getOrderVerifyingAddress.cjs';
|
|
7
|
+
export { getSignedTransactionRequest } from './getSignedTransactionRequest.cjs';
|
|
6
8
|
export { getOrderDigest } from './orderDigest.cjs';
|
|
7
9
|
export { SignableRequestType, SignableRequestTypeToParams } from './signableRequestType.cjs';
|
|
8
10
|
export { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, SignedEIP712OrderParams, SignedTx } from './signatureParamTypes.cjs';
|
|
9
|
-
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values } from './eip712ValueTypes.cjs';
|
|
10
|
-
export { getOrderVerifyingAddress } from './getOrderVerifyingAddress.cjs';
|
|
11
|
-
import '../types/viemTypes.cjs';
|
|
12
11
|
import 'viem';
|
|
12
|
+
import '../utils/math/bigDecimal.cjs';
|
|
13
|
+
import 'bignumber.js';
|
|
13
14
|
import 'abitype';
|
|
15
|
+
import '../types/viemTypes.cjs';
|
|
14
16
|
import '../types/subaccountTypes.cjs';
|
|
15
17
|
import '../types/bytes.cjs';
|
|
16
|
-
import '../utils/math/bigDecimal.cjs';
|
|
17
|
-
import 'bignumber.js';
|
package/dist/eip712/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { getNadoEIP712Values } from './getNadoEIP712Values.js';
|
|
3
|
-
export { getNadoEIP712Types } from './getNadoEIP712Types.js';
|
|
4
|
-
export { getNadoEIP712PrimaryType } from './getNadoEIP712PrimaryType.js';
|
|
1
|
+
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values } from './eip712ValueTypes.js';
|
|
5
2
|
export { getNadoEIP712Domain } from './getNadoEIP712Domain.js';
|
|
3
|
+
export { getNadoEIP712PrimaryType } from './getNadoEIP712PrimaryType.js';
|
|
4
|
+
export { getNadoEIP712Types } from './getNadoEIP712Types.js';
|
|
5
|
+
export { getNadoEIP712Values } from './getNadoEIP712Values.js';
|
|
6
|
+
export { getOrderVerifyingAddress } from './getOrderVerifyingAddress.js';
|
|
7
|
+
export { getSignedTransactionRequest } from './getSignedTransactionRequest.js';
|
|
6
8
|
export { getOrderDigest } from './orderDigest.js';
|
|
7
9
|
export { SignableRequestType, SignableRequestTypeToParams } from './signableRequestType.js';
|
|
8
10
|
export { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, SignedEIP712OrderParams, SignedTx } from './signatureParamTypes.js';
|
|
9
|
-
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values } from './eip712ValueTypes.js';
|
|
10
|
-
export { getOrderVerifyingAddress } from './getOrderVerifyingAddress.js';
|
|
11
|
-
import '../types/viemTypes.js';
|
|
12
11
|
import 'viem';
|
|
12
|
+
import '../utils/math/bigDecimal.js';
|
|
13
|
+
import 'bignumber.js';
|
|
13
14
|
import 'abitype';
|
|
15
|
+
import '../types/viemTypes.js';
|
|
14
16
|
import '../types/subaccountTypes.js';
|
|
15
17
|
import '../types/bytes.js';
|
|
16
|
-
import '../utils/math/bigDecimal.js';
|
|
17
|
-
import 'bignumber.js';
|
package/dist/eip712/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// src/eip712/index.ts
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./getNadoEIP712Values.js";
|
|
4
|
-
export * from "./getNadoEIP712Types.js";
|
|
5
|
-
export * from "./getNadoEIP712PrimaryType.js";
|
|
2
|
+
export * from "./eip712ValueTypes.js";
|
|
6
3
|
export * from "./getNadoEIP712Domain.js";
|
|
4
|
+
export * from "./getNadoEIP712PrimaryType.js";
|
|
5
|
+
export * from "./getNadoEIP712Types.js";
|
|
6
|
+
export * from "./getNadoEIP712Values.js";
|
|
7
|
+
export * from "./getOrderVerifyingAddress.js";
|
|
8
|
+
export * from "./getSignedTransactionRequest.js";
|
|
7
9
|
export * from "./orderDigest.js";
|
|
8
10
|
export * from "./signableRequestType.js";
|
|
9
11
|
export * from "./signatureParamTypes.js";
|
|
10
|
-
export * from "./eip712ValueTypes.js";
|
|
11
|
-
export * from "./getOrderVerifyingAddress.js";
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/eip712/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/eip712/index.ts"],"sourcesContent":["export * from './
|
|
1
|
+
{"version":3,"sources":["../../src/eip712/index.ts"],"sourcesContent":["export * from './eip712ValueTypes';\nexport * from './getNadoEIP712Domain';\nexport * from './getNadoEIP712PrimaryType';\nexport * from './getNadoEIP712Types';\nexport * from './getNadoEIP712Values';\nexport * from './getOrderVerifyingAddress';\nexport * from './getSignedTransactionRequest';\nexport * from './orderDigest';\nexport * from './signableRequestType';\nexport * from './signatureParamTypes';\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -20,12 +20,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/encoding/encoding.ts
|
|
21
21
|
var encoding_exports = {};
|
|
22
22
|
__export(encoding_exports, {
|
|
23
|
+
SlowModeTxType: () => SlowModeTxType,
|
|
24
|
+
encodeClaimBuilderFeeTx: () => encodeClaimBuilderFeeTx,
|
|
23
25
|
encodeSignedOrder: () => encodeSignedOrder,
|
|
24
26
|
encodeSignedWithdrawCollateralTx: () => encodeSignedWithdrawCollateralTx
|
|
25
27
|
});
|
|
26
28
|
module.exports = __toCommonJS(encoding_exports);
|
|
27
29
|
var import_viem = require("viem");
|
|
28
30
|
var import_utils = require("../utils/index.cjs");
|
|
31
|
+
var SlowModeTxType = /* @__PURE__ */ ((SlowModeTxType2) => {
|
|
32
|
+
SlowModeTxType2[SlowModeTxType2["DepositCollateral"] = 1] = "DepositCollateral";
|
|
33
|
+
SlowModeTxType2[SlowModeTxType2["WithdrawCollateral"] = 2] = "WithdrawCollateral";
|
|
34
|
+
SlowModeTxType2[SlowModeTxType2["LinkSigner"] = 13] = "LinkSigner";
|
|
35
|
+
SlowModeTxType2[SlowModeTxType2["ClaimBuilderFee"] = 31] = "ClaimBuilderFee";
|
|
36
|
+
return SlowModeTxType2;
|
|
37
|
+
})(SlowModeTxType || {});
|
|
29
38
|
function encodeSignedWithdrawCollateralTx(signed) {
|
|
30
39
|
return (0, import_viem.encodeAbiParameters)(
|
|
31
40
|
(0, import_viem.parseAbiParameters)(
|
|
@@ -65,8 +74,20 @@ function encodeSignedOrder(signed) {
|
|
|
65
74
|
]
|
|
66
75
|
);
|
|
67
76
|
}
|
|
77
|
+
function encodeClaimBuilderFeeTx(params) {
|
|
78
|
+
const txBytes = (0, import_viem.encodeAbiParameters)(
|
|
79
|
+
(0, import_viem.parseAbiParameters)("bytes32 sender, uint32 builderId"),
|
|
80
|
+
[params.sender, params.builderId]
|
|
81
|
+
);
|
|
82
|
+
return (0, import_viem.encodePacked)(
|
|
83
|
+
["uint8", "bytes"],
|
|
84
|
+
[31 /* ClaimBuilderFee */, txBytes]
|
|
85
|
+
);
|
|
86
|
+
}
|
|
68
87
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
88
|
0 && (module.exports = {
|
|
89
|
+
SlowModeTxType,
|
|
90
|
+
encodeClaimBuilderFeeTx,
|
|
70
91
|
encodeSignedOrder,
|
|
71
92
|
encodeSignedWithdrawCollateralTx
|
|
72
93
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/encoding/encoding.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/encoding/encoding.ts"],"sourcesContent":["import {\n encodeAbiParameters,\n encodePacked,\n parseAbiParameters,\n type Hex,\n} from 'viem';\nimport {\n EIP712WithdrawCollateralParams,\n SignedEIP712OrderParams,\n SignedTx,\n} from '../eip712';\nimport { addDecimals, toBigInt } from '../utils';\n\n/**\n * Transaction type identifiers for slow mode transactions.\n */\nexport enum SlowModeTxType {\n DepositCollateral = 1,\n WithdrawCollateral = 2,\n LinkSigner = 13,\n ClaimBuilderFee = 31,\n}\n\nexport function encodeSignedWithdrawCollateralTx(\n signed: SignedTx<EIP712WithdrawCollateralParams>,\n) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(address sender, string subaccountName, uint32 productId, uint128 amount, uint64 nonce), bytes signature)',\n ),\n [\n [\n [\n signed.tx.subaccountOwner,\n signed.tx.subaccountName,\n signed.tx.productId,\n signed.tx.amount,\n signed.tx.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport function encodeSignedOrder(signed: SignedEIP712OrderParams) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(tuple(address sender, string subaccountName, int128 priceX18, int128 amount, uint64 expiration, uint64 nonce), bytes signature))',\n ),\n [\n [\n [\n signed.order.subaccountOwner,\n signed.order.subaccountName,\n toBigInt(addDecimals(signed.order.price)),\n signed.order.amount,\n signed.order.expiration,\n signed.order.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport interface ClaimBuilderFeeParams {\n /** The sender subaccount as bytes32 */\n sender: Hex;\n /** The builder ID to claim fees for */\n builderId: number;\n}\n\n/**\n * Encodes a ClaimBuilderFee slow mode transaction.\n *\n * Format: [tx_type_byte] + [abi_encoded_params]\n *\n * @param params - The claim builder fee parameters\n * @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction\n */\nexport function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex {\n const txBytes = encodeAbiParameters(\n parseAbiParameters('bytes32 sender, uint32 builderId'),\n [params.sender, params.builderId],\n );\n\n return encodePacked(\n ['uint8', 'bytes'],\n [SlowModeTxType.ClaimBuilderFee, txBytes],\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKO;AAMP,mBAAsC;AAK/B,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gCAAA,uBAAoB,KAApB;AACA,EAAAA,gCAAA,wBAAqB,KAArB;AACA,EAAAA,gCAAA,gBAAa,MAAb;AACA,EAAAA,gCAAA,qBAAkB,MAAlB;AAJU,SAAAA;AAAA,GAAA;AAOL,SAAS,iCACd,QACA;AACA,aAAO;AAAA,QACL;AAAA,MACE;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,QACE;AAAA,UACE,OAAO,GAAG;AAAA,UACV,OAAO,GAAG;AAAA,UACV,OAAO,GAAG;AAAA,UACV,OAAO,GAAG;AAAA,UACV,OAAO,GAAG;AAAA,QACZ;AAAA,QACA,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,kBAAkB,QAAiC;AACjE,aAAO;AAAA,QACL;AAAA,MACE;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,QACE;AAAA,UACE,OAAO,MAAM;AAAA,UACb,OAAO,MAAM;AAAA,cACb,2BAAS,0BAAY,OAAO,MAAM,KAAK,CAAC;AAAA,UACxC,OAAO,MAAM;AAAA,UACb,OAAO,MAAM;AAAA,UACb,OAAO,MAAM;AAAA,QACf;AAAA,QACA,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;AAiBO,SAAS,wBAAwB,QAAoC;AAC1E,QAAM,cAAU;AAAA,QACd,gCAAmB,kCAAkC;AAAA,IACrD,CAAC,OAAO,QAAQ,OAAO,SAAS;AAAA,EAClC;AAEA,aAAO;AAAA,IACL,CAAC,SAAS,OAAO;AAAA,IACjB,CAAC,0BAAgC,OAAO;AAAA,EAC1C;AACF;","names":["SlowModeTxType"]}
|
|
@@ -1,11 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
import { SignedEIP712OrderParams, SignedTx, EIP712WithdrawCollateralParams } from '../eip712/signatureParamTypes.cjs';
|
|
3
3
|
import '../types/subaccountTypes.cjs';
|
|
4
4
|
import '../types/bytes.cjs';
|
|
5
5
|
import '../utils/math/bigDecimal.cjs';
|
|
6
6
|
import 'bignumber.js';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Transaction type identifiers for slow mode transactions.
|
|
10
|
+
*/
|
|
11
|
+
declare enum SlowModeTxType {
|
|
12
|
+
DepositCollateral = 1,
|
|
13
|
+
WithdrawCollateral = 2,
|
|
14
|
+
LinkSigner = 13,
|
|
15
|
+
ClaimBuilderFee = 31
|
|
16
|
+
}
|
|
8
17
|
declare function encodeSignedWithdrawCollateralTx(signed: SignedTx<EIP712WithdrawCollateralParams>): `0x${string}`;
|
|
9
18
|
declare function encodeSignedOrder(signed: SignedEIP712OrderParams): `0x${string}`;
|
|
19
|
+
interface ClaimBuilderFeeParams {
|
|
20
|
+
/** The sender subaccount as bytes32 */
|
|
21
|
+
sender: Hex;
|
|
22
|
+
/** The builder ID to claim fees for */
|
|
23
|
+
builderId: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Encodes a ClaimBuilderFee slow mode transaction.
|
|
27
|
+
*
|
|
28
|
+
* Format: [tx_type_byte] + [abi_encoded_params]
|
|
29
|
+
*
|
|
30
|
+
* @param params - The claim builder fee parameters
|
|
31
|
+
* @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction
|
|
32
|
+
*/
|
|
33
|
+
declare function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex;
|
|
10
34
|
|
|
11
|
-
export { encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
35
|
+
export { type ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
@@ -1,11 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
import { SignedEIP712OrderParams, SignedTx, EIP712WithdrawCollateralParams } from '../eip712/signatureParamTypes.js';
|
|
3
3
|
import '../types/subaccountTypes.js';
|
|
4
4
|
import '../types/bytes.js';
|
|
5
5
|
import '../utils/math/bigDecimal.js';
|
|
6
6
|
import 'bignumber.js';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Transaction type identifiers for slow mode transactions.
|
|
10
|
+
*/
|
|
11
|
+
declare enum SlowModeTxType {
|
|
12
|
+
DepositCollateral = 1,
|
|
13
|
+
WithdrawCollateral = 2,
|
|
14
|
+
LinkSigner = 13,
|
|
15
|
+
ClaimBuilderFee = 31
|
|
16
|
+
}
|
|
8
17
|
declare function encodeSignedWithdrawCollateralTx(signed: SignedTx<EIP712WithdrawCollateralParams>): `0x${string}`;
|
|
9
18
|
declare function encodeSignedOrder(signed: SignedEIP712OrderParams): `0x${string}`;
|
|
19
|
+
interface ClaimBuilderFeeParams {
|
|
20
|
+
/** The sender subaccount as bytes32 */
|
|
21
|
+
sender: Hex;
|
|
22
|
+
/** The builder ID to claim fees for */
|
|
23
|
+
builderId: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Encodes a ClaimBuilderFee slow mode transaction.
|
|
27
|
+
*
|
|
28
|
+
* Format: [tx_type_byte] + [abi_encoded_params]
|
|
29
|
+
*
|
|
30
|
+
* @param params - The claim builder fee parameters
|
|
31
|
+
* @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction
|
|
32
|
+
*/
|
|
33
|
+
declare function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex;
|
|
10
34
|
|
|
11
|
-
export { encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
35
|
+
export { type ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import "../chunk-5WRI5ZAA.js";
|
|
2
2
|
|
|
3
3
|
// src/encoding/encoding.ts
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
encodeAbiParameters,
|
|
6
|
+
encodePacked,
|
|
7
|
+
parseAbiParameters
|
|
8
|
+
} from "viem";
|
|
5
9
|
import { addDecimals, toBigInt } from "../utils/index.js";
|
|
10
|
+
var SlowModeTxType = /* @__PURE__ */ ((SlowModeTxType2) => {
|
|
11
|
+
SlowModeTxType2[SlowModeTxType2["DepositCollateral"] = 1] = "DepositCollateral";
|
|
12
|
+
SlowModeTxType2[SlowModeTxType2["WithdrawCollateral"] = 2] = "WithdrawCollateral";
|
|
13
|
+
SlowModeTxType2[SlowModeTxType2["LinkSigner"] = 13] = "LinkSigner";
|
|
14
|
+
SlowModeTxType2[SlowModeTxType2["ClaimBuilderFee"] = 31] = "ClaimBuilderFee";
|
|
15
|
+
return SlowModeTxType2;
|
|
16
|
+
})(SlowModeTxType || {});
|
|
6
17
|
function encodeSignedWithdrawCollateralTx(signed) {
|
|
7
18
|
return encodeAbiParameters(
|
|
8
19
|
parseAbiParameters(
|
|
@@ -42,7 +53,19 @@ function encodeSignedOrder(signed) {
|
|
|
42
53
|
]
|
|
43
54
|
);
|
|
44
55
|
}
|
|
56
|
+
function encodeClaimBuilderFeeTx(params) {
|
|
57
|
+
const txBytes = encodeAbiParameters(
|
|
58
|
+
parseAbiParameters("bytes32 sender, uint32 builderId"),
|
|
59
|
+
[params.sender, params.builderId]
|
|
60
|
+
);
|
|
61
|
+
return encodePacked(
|
|
62
|
+
["uint8", "bytes"],
|
|
63
|
+
[31 /* ClaimBuilderFee */, txBytes]
|
|
64
|
+
);
|
|
65
|
+
}
|
|
45
66
|
export {
|
|
67
|
+
SlowModeTxType,
|
|
68
|
+
encodeClaimBuilderFeeTx,
|
|
46
69
|
encodeSignedOrder,
|
|
47
70
|
encodeSignedWithdrawCollateralTx
|
|
48
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/encoding/encoding.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/encoding/encoding.ts"],"sourcesContent":["import {\n encodeAbiParameters,\n encodePacked,\n parseAbiParameters,\n type Hex,\n} from 'viem';\nimport {\n EIP712WithdrawCollateralParams,\n SignedEIP712OrderParams,\n SignedTx,\n} from '../eip712';\nimport { addDecimals, toBigInt } from '../utils';\n\n/**\n * Transaction type identifiers for slow mode transactions.\n */\nexport enum SlowModeTxType {\n DepositCollateral = 1,\n WithdrawCollateral = 2,\n LinkSigner = 13,\n ClaimBuilderFee = 31,\n}\n\nexport function encodeSignedWithdrawCollateralTx(\n signed: SignedTx<EIP712WithdrawCollateralParams>,\n) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(address sender, string subaccountName, uint32 productId, uint128 amount, uint64 nonce), bytes signature)',\n ),\n [\n [\n [\n signed.tx.subaccountOwner,\n signed.tx.subaccountName,\n signed.tx.productId,\n signed.tx.amount,\n signed.tx.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport function encodeSignedOrder(signed: SignedEIP712OrderParams) {\n return encodeAbiParameters(\n parseAbiParameters(\n '(tuple(tuple(address sender, string subaccountName, int128 priceX18, int128 amount, uint64 expiration, uint64 nonce), bytes signature))',\n ),\n [\n [\n [\n signed.order.subaccountOwner,\n signed.order.subaccountName,\n toBigInt(addDecimals(signed.order.price)),\n signed.order.amount,\n signed.order.expiration,\n signed.order.nonce,\n ],\n signed.signature,\n ],\n ],\n );\n}\n\nexport interface ClaimBuilderFeeParams {\n /** The sender subaccount as bytes32 */\n sender: Hex;\n /** The builder ID to claim fees for */\n builderId: number;\n}\n\n/**\n * Encodes a ClaimBuilderFee slow mode transaction.\n *\n * Format: [tx_type_byte] + [abi_encoded_params]\n *\n * @param params - The claim builder fee parameters\n * @returns The encoded transaction bytes ready to submit via endpoint.submitSlowModeTransaction\n */\nexport function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex {\n const txBytes = encodeAbiParameters(\n parseAbiParameters('bytes32 sender, uint32 builderId'),\n [params.sender, params.builderId],\n );\n\n return encodePacked(\n ['uint8', 'bytes'],\n [SlowModeTxType.ClaimBuilderFee, txBytes],\n );\n}\n"],"mappings":";;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAMP,SAAS,aAAa,gBAAgB;AAK/B,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gCAAA,uBAAoB,KAApB;AACA,EAAAA,gCAAA,wBAAqB,KAArB;AACA,EAAAA,gCAAA,gBAAa,MAAb;AACA,EAAAA,gCAAA,qBAAkB,MAAlB;AAJU,SAAAA;AAAA,GAAA;AAOL,SAAS,iCACd,QACA;AACA,SAAO;AAAA,IACL;AAAA,MACE;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,QACE;AAAA,UACE,OAAO,GAAG;AAAA,UACV,OAAO,GAAG;AAAA,UACV,OAAO,GAAG;AAAA,UACV,OAAO,GAAG;AAAA,UACV,OAAO,GAAG;AAAA,QACZ;AAAA,QACA,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,kBAAkB,QAAiC;AACjE,SAAO;AAAA,IACL;AAAA,MACE;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,QACE;AAAA,UACE,OAAO,MAAM;AAAA,UACb,OAAO,MAAM;AAAA,UACb,SAAS,YAAY,OAAO,MAAM,KAAK,CAAC;AAAA,UACxC,OAAO,MAAM;AAAA,UACb,OAAO,MAAM;AAAA,UACb,OAAO,MAAM;AAAA,QACf;AAAA,QACA,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;AAiBO,SAAS,wBAAwB,QAAoC;AAC1E,QAAM,UAAU;AAAA,IACd,mBAAmB,kCAAkC;AAAA,IACrD,CAAC,OAAO,QAAQ,OAAO,SAAS;AAAA,EAClC;AAEA,SAAO;AAAA,IACL,CAAC,SAAS,OAAO;AAAA,IACjB,CAAC,0BAAgC,OAAO;AAAA,EAC1C;AACF;","names":["SlowModeTxType"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { encodeSignedOrder, encodeSignedWithdrawCollateralTx } from './encoding.cjs';
|
|
2
|
-
import '../eip712/signatureParamTypes.cjs';
|
|
1
|
+
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx } from './encoding.cjs';
|
|
3
2
|
import 'viem';
|
|
3
|
+
import '../eip712/signatureParamTypes.cjs';
|
|
4
4
|
import '../types/subaccountTypes.cjs';
|
|
5
5
|
import '../types/bytes.cjs';
|
|
6
6
|
import '../utils/math/bigDecimal.cjs';
|
package/dist/encoding/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { encodeSignedOrder, encodeSignedWithdrawCollateralTx } from './encoding.js';
|
|
2
|
-
import '../eip712/signatureParamTypes.js';
|
|
1
|
+
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx } from './encoding.js';
|
|
3
2
|
import 'viem';
|
|
3
|
+
import '../eip712/signatureParamTypes.js';
|
|
4
4
|
import '../types/subaccountTypes.js';
|
|
5
5
|
import '../types/bytes.js';
|
|
6
6
|
import '../utils/math/bigDecimal.js';
|
package/dist/index.d.cts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
+
export { CLEARINGHOUSE_ABI } from './abis/Clearinghouse.cjs';
|
|
2
|
+
export { ENDPOINT_ABI } from './abis/Endpoint.cjs';
|
|
1
3
|
export { ERC20_ABI } from './abis/ERC20.cjs';
|
|
2
4
|
export { MOCK_ERC20_ABI } from './abis/MockERC20.cjs';
|
|
3
|
-
export { WITHDRAW_POOL_ABI } from './abis/WithdrawPool.cjs';
|
|
4
|
-
export { SPOT_ENGINE_ABI } from './abis/SpotEngine.cjs';
|
|
5
|
-
export { QUERIER_ABI } from './abis/Querier.cjs';
|
|
6
|
-
export { PERP_ENGINE_ABI } from './abis/PerpEngine.cjs';
|
|
7
|
-
export { ENDPOINT_ABI } from './abis/Endpoint.cjs';
|
|
8
|
-
export { CLEARINGHOUSE_ABI } from './abis/Clearinghouse.cjs';
|
|
9
5
|
export { NADO_ABIS, NadoAbis, NadoContractName } from './abis/nadoAbis.cjs';
|
|
6
|
+
export { PERP_ENGINE_ABI } from './abis/PerpEngine.cjs';
|
|
7
|
+
export { QUERIER_ABI } from './abis/Querier.cjs';
|
|
8
|
+
export { SPOT_ENGINE_ABI } from './abis/SpotEngine.cjs';
|
|
9
|
+
export { WITHDRAW_POOL_ABI } from './abis/WithdrawPool.cjs';
|
|
10
10
|
export { CHAIN_ENV_TO_CHAIN, CHAIN_ID_TO_CHAIN_ENV } from './consts/chainEnvToChain.cjs';
|
|
11
11
|
export { NLP_PRODUCT_ID, QUOTE_PRODUCT_ID } from './consts/productIds.cjs';
|
|
12
12
|
export { NADO_DEPLOYMENTS, NadoDeploymentAddresses } from './deployments/index.cjs';
|
|
13
|
-
export {
|
|
14
|
-
export { getNadoEIP712Values } from './eip712/getNadoEIP712Values.cjs';
|
|
15
|
-
export { getNadoEIP712Types } from './eip712/getNadoEIP712Types.cjs';
|
|
16
|
-
export { getNadoEIP712PrimaryType } from './eip712/getNadoEIP712PrimaryType.cjs';
|
|
13
|
+
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values } from './eip712/eip712ValueTypes.cjs';
|
|
17
14
|
export { getNadoEIP712Domain } from './eip712/getNadoEIP712Domain.cjs';
|
|
15
|
+
export { getNadoEIP712PrimaryType } from './eip712/getNadoEIP712PrimaryType.cjs';
|
|
16
|
+
export { getNadoEIP712Types } from './eip712/getNadoEIP712Types.cjs';
|
|
17
|
+
export { getNadoEIP712Values } from './eip712/getNadoEIP712Values.cjs';
|
|
18
|
+
export { getOrderVerifyingAddress } from './eip712/getOrderVerifyingAddress.cjs';
|
|
19
|
+
export { getSignedTransactionRequest } from './eip712/getSignedTransactionRequest.cjs';
|
|
18
20
|
export { getOrderDigest } from './eip712/orderDigest.cjs';
|
|
19
21
|
export { SignableRequestType, SignableRequestTypeToParams } from './eip712/signableRequestType.cjs';
|
|
20
22
|
export { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, SignedEIP712OrderParams, SignedTx } from './eip712/signatureParamTypes.cjs';
|
|
21
|
-
export {
|
|
22
|
-
export { getOrderVerifyingAddress } from './eip712/getOrderVerifyingAddress.cjs';
|
|
23
|
-
export { encodeSignedOrder, encodeSignedWithdrawCollateralTx } from './encoding/encoding.cjs';
|
|
23
|
+
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx } from './encoding/encoding.cjs';
|
|
24
24
|
export { ApproveDepositAllowanceParams, approveDepositAllowance } from './execute/approveDepositAllowance.cjs';
|
|
25
25
|
export { DepositCollateralParams, depositCollateral } from './execute/depositCollateral.cjs';
|
|
26
26
|
export { Balance, BalanceHealthContributions, BalanceSide, BalanceWithProduct, PerpBalance, PerpBalanceWithProduct, SpotBalance, SpotBalanceWithProduct } from './types/balanceTypes.cjs';
|
|
@@ -28,40 +28,40 @@ export { Bytes } from './types/bytes.cjs';
|
|
|
28
28
|
export { ALL_CHAIN_ENVS, ChainEnv, LOCAL_CHAIN_ENVS, MAINNET_CHAIN_ENVS, TESTNET_CHAIN_ENVS } from './types/ChainEnv.cjs';
|
|
29
29
|
export { HealthGroup, HealthStatus, HealthStatusByType, HealthType } from './types/healthTypes.cjs';
|
|
30
30
|
export { Market, MarketWithProduct, PerpMarket, SpotMarket } from './types/marketTypes.cjs';
|
|
31
|
+
export { NadoContracts, WithContract, WithContracts } from './types/nadoContractTypes.cjs';
|
|
32
|
+
export { OrderAppendix, OrderAppendixBuilderFields, OrderAppendixIsolatedFields, OrderAppendixTriggerType, OrderAppendixTwapFields } from './types/orderAppendixTypes.cjs';
|
|
33
|
+
export { OrderExecutionType } from './types/OrderExecutionType.cjs';
|
|
31
34
|
export { PerpProduct, Product, ProductEngineType, SpotProduct, toProductEngineType } from './types/productTypes.cjs';
|
|
32
35
|
export { Subaccount, SubaccountBytes32, SubaccountNameBytes12 } from './types/subaccountTypes.cjs';
|
|
33
|
-
export { NadoContracts, WithContract, WithContracts } from './types/nadoContractTypes.cjs';
|
|
34
36
|
export { AccountWithPrivateKey, ContractInstance, WalletClientWithAccount, WriteableContractInstance } from './types/viemTypes.cjs';
|
|
35
|
-
export {
|
|
36
|
-
export { OrderAppendix, OrderAppendixIsolatedFields, OrderAppendixTriggerType, OrderAppendixTwapFields } from './types/orderAppendixTypes.cjs';
|
|
37
|
-
export { getOrderNonce, getRecvTimeFromOrderNonce } from './utils/orders/orderNonce.cjs';
|
|
38
|
-
export { getDefaultRecvTime } from './utils/orders/recvTime.cjs';
|
|
39
|
-
export { packTwapOrderAppendixValue, unpackTwapOrderAppendixValue } from './utils/orders/appendix/appendixTwapValue.cjs';
|
|
40
|
-
export { unpackOrderAppendix } from './utils/orders/appendix/unpackOrderAppendix.cjs';
|
|
41
|
-
export { packOrderAppendix } from './utils/orders/appendix/packOrderAppendix.cjs';
|
|
42
|
-
export { PackedOrderAppendixBits } from './utils/orders/appendix/types.cjs';
|
|
43
|
-
export { bitMaskValue } from './utils/orders/appendix/bitMaskValue.cjs';
|
|
44
|
-
export { calcBorrowRateForTimeRange, calcBorrowRatePerSecond, calcRealizedDepositRateForTimeRange, calcTotalBorrowed, calcTotalDeposited, calcUtilizationRatio } from './utils/interest.cjs';
|
|
45
|
-
export { isPerpBalance, isPerpProduct, isSpotBalance, isSpotProduct } from './utils/productTypeFilter.cjs';
|
|
37
|
+
export { AsyncResult, asyncResult } from './utils/asyncResult.cjs';
|
|
46
38
|
export { calcPerpBalanceNotionalValue, calcPerpBalanceValue, calcSpotBalanceValue } from './utils/balanceValue.cjs';
|
|
47
39
|
export { subaccountFromBytes32, subaccountFromHex, subaccountNameBytesToStr, subaccountNameToBytes12, subaccountToBytes32, subaccountToHex } from './utils/bytes32.cjs';
|
|
48
40
|
export { createDeterministicLinkedSignerPrivateKey } from './utils/createDeterministicLinkedSignerPrivateKey.cjs';
|
|
49
|
-
export { isWriteableContract } from './utils/isWriteableContract.cjs';
|
|
50
41
|
export { WalletNotProvidedError } from './utils/errors/WalletNotProvidedError.cjs';
|
|
51
|
-
export { BigDecimalish, toBigDecimal } from './utils/math/bigDecimal.cjs';
|
|
52
|
-
export { toIntegerString } from './utils/math/toIntegerString.cjs';
|
|
53
|
-
export { toBigInt } from './utils/math/toBigInt.cjs';
|
|
54
|
-
export { clampBigDecimal } from './utils/math/clamp.cjs';
|
|
55
|
-
export { sumBigDecimalBy } from './utils/math/sumBigDecimalBy.cjs';
|
|
56
|
-
export { NADO_PRODUCT_DECIMALS, addDecimals, removeDecimals } from './utils/math/decimalAdjustment.cjs';
|
|
57
|
-
export { BigDecimals } from './utils/math/BigDecimals.cjs';
|
|
58
|
-
export { AsyncResult, asyncResult } from './utils/asyncResult.cjs';
|
|
59
42
|
export { getValidatedAddress } from './utils/getValidatedAddress.cjs';
|
|
60
43
|
export { getValidatedHex } from './utils/getValidatedHex.cjs';
|
|
44
|
+
export { calcBorrowRateForTimeRange, calcBorrowRatePerSecond, calcRealizedDepositRateForTimeRange, calcTotalBorrowed, calcTotalDeposited, calcUtilizationRatio } from './utils/interest.cjs';
|
|
45
|
+
export { isWriteableContract } from './utils/isWriteableContract.cjs';
|
|
61
46
|
export { mapValues } from './utils/mapValues.cjs';
|
|
47
|
+
export { BigDecimalish, toBigDecimal } from './utils/math/bigDecimal.cjs';
|
|
48
|
+
export { BigDecimals } from './utils/math/BigDecimals.cjs';
|
|
49
|
+
export { clampBigDecimal } from './utils/math/clamp.cjs';
|
|
50
|
+
export { NADO_PRODUCT_DECIMALS, addDecimals, removeDecimals } from './utils/math/decimalAdjustment.cjs';
|
|
51
|
+
export { sumBigDecimalBy } from './utils/math/sumBigDecimalBy.cjs';
|
|
52
|
+
export { toBigInt } from './utils/math/toBigInt.cjs';
|
|
53
|
+
export { toIntegerString } from './utils/math/toIntegerString.cjs';
|
|
54
|
+
export { packTwapOrderAppendixValue, unpackTwapOrderAppendixValue } from './utils/orders/appendix/appendixTwapValue.cjs';
|
|
55
|
+
export { bitMaskValue } from './utils/orders/appendix/bitMaskValue.cjs';
|
|
56
|
+
export { packOrderAppendix } from './utils/orders/appendix/packOrderAppendix.cjs';
|
|
57
|
+
export { PackedOrderAppendixBits } from './utils/orders/appendix/types.cjs';
|
|
58
|
+
export { unpackOrderAppendix } from './utils/orders/appendix/unpackOrderAppendix.cjs';
|
|
59
|
+
export { getOrderNonce, getRecvTimeFromOrderNonce } from './utils/orders/orderNonce.cjs';
|
|
60
|
+
export { getDefaultRecvTime } from './utils/orders/recvTime.cjs';
|
|
61
|
+
export { isPerpBalance, isPerpProduct, isSpotBalance, isSpotProduct } from './utils/productTypeFilter.cjs';
|
|
62
62
|
export { TimeInSeconds, millisToSeconds, nowInSeconds } from './utils/time.cjs';
|
|
63
63
|
export { toPrintableObject } from './utils/toPrintableObject.cjs';
|
|
64
64
|
export { default as BigDecimal } from 'bignumber.js';
|
|
65
|
-
import 'abitype';
|
|
66
65
|
import 'viem/chains';
|
|
67
66
|
import 'viem';
|
|
67
|
+
import 'abitype';
|