@dzapio/sdk 2.0.14 → 2.0.16

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.
Files changed (108) hide show
  1. package/dist/{dZapClient/index.d.ts → index.d.mts} +912 -12
  2. package/dist/index.d.ts +1919 -17
  3. package/dist/index.js +16305 -2
  4. package/dist/index.mjs +16261 -0
  5. package/package.json +13 -31
  6. package/dist/api/index.d.ts +0 -31
  7. package/dist/artifacts/ERC20Permit.d.ts +0 -374
  8. package/dist/artifacts/Permit2.d.ts +0 -700
  9. package/dist/artifacts/Permit2Proxy.d.ts +0 -416
  10. package/dist/artifacts/default/DZapCoreAbi.d.ts +0 -2
  11. package/dist/artifacts/default/DZapCoreV2Abi.d.ts +0 -2
  12. package/dist/artifacts/default/DZapDcaAbi.d.ts +0 -2
  13. package/dist/artifacts/default/Permit2Abi.d.ts +0 -700
  14. package/dist/artifacts/default/erc20Abi.d.ts +0 -165
  15. package/dist/artifacts/default/index.d.ts +0 -6
  16. package/dist/artifacts/index.d.ts +0 -2
  17. package/dist/artifacts/staging/DZapCoreSwapAbi.d.ts +0 -2
  18. package/dist/artifacts/staging/index.d.ts +0 -2
  19. package/dist/axios/baseClient.d.ts +0 -2
  20. package/dist/axios/index.d.ts +0 -8
  21. package/dist/chains/definitions/arthera.d.ts +0 -35
  22. package/dist/chains/definitions/fiveIre.d.ts +0 -35
  23. package/dist/chains/definitions/hyperEvm.d.ts +0 -35
  24. package/dist/chains/definitions/hyperliquid.d.ts +0 -35
  25. package/dist/chains/definitions/pushTestnet.d.ts +0 -35
  26. package/dist/chains/definitions/stable.d.ts +0 -36
  27. package/dist/chains/index.d.ts +0 -179
  28. package/dist/config/index.d.ts +0 -36
  29. package/dist/constants/address.d.ts +0 -13
  30. package/dist/constants/approval.d.ts +0 -7
  31. package/dist/constants/axios.d.ts +0 -2
  32. package/dist/constants/chains.d.ts +0 -32
  33. package/dist/constants/contract.d.ts +0 -6
  34. package/dist/constants/erc20.d.ts +0 -25
  35. package/dist/constants/httpMethods.d.ts +0 -2
  36. package/dist/constants/index.d.ts +0 -48
  37. package/dist/constants/permit.d.ts +0 -29
  38. package/dist/constants/permit2.d.ts +0 -2
  39. package/dist/constants/rpc.d.ts +0 -2
  40. package/dist/constants/urlConstants.d.ts +0 -16
  41. package/dist/enums/index.d.ts +0 -47
  42. package/dist/index.js.map +0 -1
  43. package/dist/index.m.js +0 -2
  44. package/dist/index.m.js.map +0 -1
  45. package/dist/index.umd.js +0 -2
  46. package/dist/index.umd.js.map +0 -1
  47. package/dist/service/cache/cacheProvider.d.ts +0 -10
  48. package/dist/service/cache/constant.d.ts +0 -2
  49. package/dist/service/price/index.d.ts +0 -16
  50. package/dist/service/price/provider/coingecko/config.d.ts +0 -6
  51. package/dist/service/price/provider/coingecko/index.d.ts +0 -9
  52. package/dist/service/price/provider/defiLlama/config.d.ts +0 -3
  53. package/dist/service/price/provider/defiLlama/index.d.ts +0 -9
  54. package/dist/service/price/provider/defiLlama/types.d.ts +0 -11
  55. package/dist/service/price/provider/dzap/index.d.ts +0 -6
  56. package/dist/service/price/types/IPriceProvider.d.ts +0 -14
  57. package/dist/transactionHandlers/generic.d.ts +0 -24
  58. package/dist/transactionHandlers/permit.d.ts +0 -61
  59. package/dist/transactionHandlers/trade.d.ts +0 -26
  60. package/dist/transactionHandlers/zap.d.ts +0 -37
  61. package/dist/types/axiosClient.d.ts +0 -6
  62. package/dist/types/btc.d.ts +0 -45
  63. package/dist/types/chains.d.ts +0 -3
  64. package/dist/types/contract.d.ts +0 -14
  65. package/dist/types/eip-2612.d.ts +0 -24
  66. package/dist/types/index.d.ts +0 -497
  67. package/dist/types/permit.d.ts +0 -191
  68. package/dist/types/wallet.d.ts +0 -2
  69. package/dist/types/zap/broadcast.d.ts +0 -15
  70. package/dist/types/zap/build.d.ts +0 -44
  71. package/dist/types/zap/index.d.ts +0 -34
  72. package/dist/types/zap/path.d.ts +0 -33
  73. package/dist/types/zap/pool.d.ts +0 -39
  74. package/dist/types/zap/position.d.ts +0 -27
  75. package/dist/types/zap/quote.d.ts +0 -7
  76. package/dist/types/zap/status.d.ts +0 -28
  77. package/dist/types/zap/step.d.ts +0 -30
  78. package/dist/utils/amount.d.ts +0 -82
  79. package/dist/utils/axios.d.ts +0 -13
  80. package/dist/utils/date.d.ts +0 -1
  81. package/dist/utils/decoder/swap/abis.d.ts +0 -643
  82. package/dist/utils/decoder/swap/inputDataDecoder.d.ts +0 -14
  83. package/dist/utils/eip-2612/eip2612Permit.d.ts +0 -23
  84. package/dist/utils/eip-5792/batchApproveTokens.d.ts +0 -21
  85. package/dist/utils/eip-5792/index.d.ts +0 -3
  86. package/dist/utils/eip-5792/isBatchTxnSupportedByWallet.d.ts +0 -6
  87. package/dist/utils/eip-5792/sendBatchCalls.d.ts +0 -10
  88. package/dist/utils/eip-5792/waitForBatchTransactionReceipt.d.ts +0 -4
  89. package/dist/utils/encodeApproveCall.d.ts +0 -6
  90. package/dist/utils/erc20.d.ts +0 -65
  91. package/dist/utils/errors.d.ts +0 -17
  92. package/dist/utils/index.d.ts +0 -4566
  93. package/dist/utils/multicall.d.ts +0 -14
  94. package/dist/utils/permit2/domain.d.ts +0 -2
  95. package/dist/utils/permit2/index.d.ts +0 -4
  96. package/dist/utils/permit2/nonce.d.ts +0 -15
  97. package/dist/utils/permit2/permitData.d.ts +0 -23
  98. package/dist/utils/permit2/values.d.ts +0 -54
  99. package/dist/utils/permit2/witnessData.d.ts +0 -4
  100. package/dist/utils/signIntent/custom.d.ts +0 -11
  101. package/dist/utils/signIntent/gasless.d.ts +0 -12
  102. package/dist/utils/signTypedData.d.ts +0 -11
  103. package/dist/utils/tokens.d.ts +0 -8
  104. package/dist/utils/updateQuotes.d.ts +0 -3
  105. package/dist/zap/constants/index.d.ts +0 -2
  106. package/dist/zap/constants/path.d.ts +0 -8
  107. package/dist/zap/constants/step.d.ts +0 -3
  108. package/dist/zap/constants/urls.d.ts +0 -13
@@ -1,32 +0,0 @@
1
- export declare const exclusiveChainIds: {
2
- zkSync: number;
3
- arthera: number;
4
- gnosis: number;
5
- kaia: number;
6
- bounceBit: number;
7
- biFrost: number;
8
- flare: number;
9
- iotaEvm: number;
10
- opbnb: number;
11
- zkFair: number;
12
- bahamut: number;
13
- immutableZkevm: number;
14
- abstract: number;
15
- lens: number;
16
- citreaTestnet: number;
17
- hyperLiquid: number;
18
- pushTestnet: number;
19
- };
20
- export declare const chainTypes: {
21
- readonly evm: "evm";
22
- readonly bvm: "bvm";
23
- readonly svm: "svm";
24
- readonly aptosvm: "aptosvm";
25
- readonly cosmos: "cosmos";
26
- readonly nearvm: "nearvm";
27
- readonly starknetvm: "starknetvm";
28
- readonly stellarvm: "stellarvm";
29
- readonly suivm: "suivm";
30
- readonly tonvm: "tonvm";
31
- readonly tronvm: "tronvm";
32
- };
@@ -1,6 +0,0 @@
1
- import { HexString } from '../types';
2
- import { ExclusiveChainIds } from '../types/chains';
3
- export declare const exclusivePermit2Addresses: {
4
- [key: ExclusiveChainIds]: HexString;
5
- };
6
- export declare const DEFAULT_PERMIT2_ADDRESS = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
@@ -1,25 +0,0 @@
1
- export declare const erc20PermitFunctions: {
2
- readonly nonces: "nonces";
3
- readonly version: "version";
4
- readonly PERMIT_TYPEHASH: "PERMIT_TYPEHASH";
5
- readonly allowance: "allowance";
6
- };
7
- export declare const erc20Functions: {
8
- readonly name: "name";
9
- readonly allowance: "allowance";
10
- readonly approve: "approve";
11
- readonly transfer: "transfer";
12
- readonly transferFrom: "transferFrom";
13
- readonly balanceOf: "balanceOf";
14
- readonly decimals: "decimals";
15
- readonly symbol: "symbol";
16
- readonly version: "version";
17
- readonly nonces: "nonces";
18
- readonly domainSeparator: "DOMAIN_SEPARATOR";
19
- };
20
- export declare const eip2612PermitFunctions: {
21
- readonly permit: "permit";
22
- readonly nonces: "nonces";
23
- readonly DOMAIN_SEPARATOR: "DOMAIN_SEPARATOR";
24
- readonly version: "version";
25
- };
@@ -1,2 +0,0 @@
1
- export declare const GET = "get";
2
- export declare const POST = "post";
@@ -1,48 +0,0 @@
1
- export declare const STATUS: {
2
- pending: string;
3
- inProgress: string;
4
- success: string;
5
- rejected: string;
6
- error: string;
7
- };
8
- export declare const ERRORS: {
9
- NOT_FOUND: string;
10
- };
11
- export declare const DZapAbis: {
12
- readonly dZapCoreAbi: "dZapCoreAbi";
13
- readonly dZapCoreV2Abi: "dZapCoreV2Abi";
14
- readonly dZapDcaAbi: "dZapDcaAbi";
15
- };
16
- export declare const OtherAbis: {
17
- readonly permit2: "permit2";
18
- readonly erc20: "erc20";
19
- };
20
- export declare const Services: {
21
- readonly trade: "trade";
22
- readonly dca: "dca";
23
- readonly zap: "zap";
24
- };
25
- export declare const GaslessTxType: {
26
- readonly swap: "swap";
27
- readonly bridge: "bridge";
28
- };
29
- export declare const QuoteFilters: {
30
- readonly fastest: "fastest";
31
- readonly best: "best";
32
- readonly all: "all";
33
- };
34
- export declare const HISTORICAL_BLOCK = 10;
35
- export declare const NATIVE_TOKEN_DECIMAL = 18;
36
- export declare const NATIVE_TOKEN_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
37
- export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
38
- export declare const dZapNativeTokenFormat = "0x0000000000000000000000000000000000000000";
39
- export declare const PERMIT_TYPEHASH_CONST = "0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9";
40
- export declare const DEFAULT_PERMIT_DATA: `0x${string}`;
41
- export declare const DEFAULT_PERMIT2_DATA: `0x${string}`;
42
- export declare const STATUS_RESPONSE: {
43
- readonly COMPLETED: "COMPLETED";
44
- readonly FAILED: "FAILED";
45
- readonly PENDING: "PENDING";
46
- readonly PARTIAL: "PARTIAL";
47
- readonly REFUNDED: "REFUNDED";
48
- };
@@ -1,29 +0,0 @@
1
- import { DZapPermitMode } from '../enums';
2
- export declare const eip2612GaslessDomain: {
3
- name: string;
4
- version: string;
5
- salt: `0x${string}`;
6
- };
7
- export declare const dZapIntentPrimaryType: {
8
- SignedGasLessSwapData: string;
9
- SignedGasLessSwapBridgeData: string;
10
- SignedGasLessBridgeData: string;
11
- };
12
- export declare const permit2PrimaryType: {
13
- readonly PermitSingle: "PermitSingle";
14
- readonly PermitWitnessTransferFrom: "PermitWitnessTransferFrom";
15
- readonly PermitBatchWitnessTransferFrom: "PermitBatchWitnessTransferFrom";
16
- };
17
- export declare const PermitTypes: {
18
- readonly PermitSingle: "PermitSingle";
19
- readonly PermitWitnessTransferFrom: "PermitWitnessTransferFrom";
20
- readonly PermitBatchWitnessTransferFrom: "PermitBatchWitnessTransferFrom";
21
- readonly EIP2612Permit: "EIP2612Permit";
22
- readonly AutoPermit: "AutoPermit";
23
- };
24
- export declare const PermitToDZapPermitMode: {
25
- readonly EIP2612Permit: DZapPermitMode.PERMIT;
26
- readonly PermitSingle: DZapPermitMode.PERMIT2_APPROVE;
27
- readonly PermitWitnessTransferFrom: DZapPermitMode.PERMIT2_WITNESS_TRANSFER;
28
- readonly PermitBatchWitnessTransferFrom: DZapPermitMode.BATCH_PERMIT2_WITNESS_TRANSFER;
29
- };
@@ -1,2 +0,0 @@
1
- export declare const SignatureExpiryInSecs = 1800;
2
- export declare const DEFAULT_PERMIT_VERSION = "1";
@@ -1,2 +0,0 @@
1
- export declare const RPC_RETRY_DELAY = 500;
2
- export declare const RPC_BATCHING_WAIT_TIME = 1000;
@@ -1,16 +0,0 @@
1
- export declare const BATCH_SWAP_QUOTE_URL = "swap/quote";
2
- export declare const BATCH_SWAP_BUILD_TX_URL = "swap/buildTx";
3
- export declare const BRIDGE_QUOTE_URL = "bridge/quote";
4
- export declare const BRIDGE_BUILD_TX_URL = "bridge/buildTx";
5
- export declare const QUOTES_URL = "/quotes";
6
- export declare const BUILD_TX_URL = "/buildTx";
7
- export declare const GASLESS_EXECUTE_TX_URL = "/gasless/executeTx";
8
- export declare const BROADCAST_TX = "/broadcast";
9
- export declare const GET_ALL_CHAINS_URL = "chains";
10
- export declare const GET_ALL_TOKENS_URL = "token/tokens";
11
- export declare const GET_TOKEN_DETAILS_URL = "token/details";
12
- export declare const GET_TOKEN_PRICE = "token/price";
13
- export declare const GET_STATUS = "/status";
14
- export declare const GET_MULTI_STATUS = "/status/multi";
15
- export declare const GET_BALANCES = "token/balance-of";
16
- export declare const CALCULATE_POINTS_URL = "user/calculatePoints";
@@ -1,47 +0,0 @@
1
- export declare enum AppEnv {
2
- 'production' = "production",
3
- 'development' = "development"
4
- }
5
- export declare enum ZapPermitType {
6
- PERMIT = 0,
7
- PERMIT2 = 1
8
- }
9
- export declare enum DZapPermitMode {
10
- PERMIT = 0,
11
- PERMIT2_APPROVE = 1,
12
- PERMIT2_WITNESS_TRANSFER = 2,
13
- BATCH_PERMIT2_WITNESS_TRANSFER = 3
14
- }
15
- export declare enum DZapV1PermitMode {
16
- PERMIT = 0,
17
- PERMIT2_TRANSFER_FROM = 1,
18
- PERMIT2_APPROVE = 2
19
- }
20
- export declare enum ContractVersion {
21
- v1 = "v1",
22
- v2 = "v2"
23
- }
24
- export declare enum TxnStatus {
25
- mining = "mining",
26
- success = "success",
27
- rejected = "rejected",
28
- error = "error",
29
- reverted = "reverted",
30
- pendingWalletConfirmation = "pendingWalletConfirmation",
31
- partialSuccess = "partialSuccess",
32
- waitingForExecution = "waitingForExecution"
33
- }
34
- export declare enum Versions {
35
- V1 = "v1",
36
- V1_2 = "v1.2",
37
- V2 = "v2"
38
- }
39
- export declare enum StatusCodes {
40
- UserRejectedRequest = 4001,
41
- Success = 200,
42
- FunctionNotFound = 32771,
43
- Error = 500,
44
- WalletRPCFailure = 429,
45
- SimulationFailure = 417,
46
- ContractExecutionError = -500
47
- }
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}