@dzapio/sdk 2.0.9 → 2.0.11
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/api/index.d.ts +7 -4
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/urlConstants.d.ts +1 -0
- package/dist/dZapClient/index.d.ts +9 -6
- package/dist/index.js +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/index.d.ts +31 -29
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Signer } from 'ethers';
|
|
2
2
|
import { Prettify, TypedDataDomain, WalletClient } from 'viem';
|
|
3
|
-
import { DZapAbis, GaslessTxType, OtherAbis, QuoteFilters,
|
|
3
|
+
import { DZapAbis, GaslessTxType, OtherAbis, QuoteFilters, STATUS, STATUS_RESPONSE, Services } from './../constants';
|
|
4
4
|
import { ApprovalModes } from './../constants/approval';
|
|
5
5
|
import { PermitTypes } from './../constants/permit';
|
|
6
6
|
import { AppEnv, ContractVersion, StatusCodes, TxnStatus } from './../enums';
|
|
7
7
|
import { PsbtInput, PsbtOutput } from './btc';
|
|
8
8
|
import { GaslessBridgeParams, GaslessSwapParams } from './permit';
|
|
9
9
|
export type HexString = `0x${string}`;
|
|
10
|
+
export type StatusResponse = keyof typeof STATUS_RESPONSE;
|
|
10
11
|
export type ChainData = {
|
|
11
12
|
[key in number]: Chain;
|
|
12
13
|
};
|
|
@@ -360,39 +361,40 @@ export type SwapInfo = {
|
|
|
360
361
|
toToken: string;
|
|
361
362
|
returnToAmount: bigint;
|
|
362
363
|
};
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
refundToken?: string;
|
|
371
|
-
refundAmount?: string;
|
|
372
|
-
refundAmountUSD?: string;
|
|
373
|
-
refundTimeStamp?: string;
|
|
364
|
+
type StatusAsset = {
|
|
365
|
+
contract: string;
|
|
366
|
+
chainId: number;
|
|
367
|
+
name?: string;
|
|
368
|
+
symbol?: string;
|
|
369
|
+
decimals?: number;
|
|
370
|
+
logo?: string | undefined;
|
|
374
371
|
};
|
|
375
|
-
export type
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
srcTxHash: string;
|
|
381
|
-
destChainId: number;
|
|
382
|
-
destToken: string;
|
|
383
|
-
destAmount: string;
|
|
384
|
-
destAmountUSD: string;
|
|
385
|
-
destTxHash: string;
|
|
372
|
+
export type TransactionInfo = {
|
|
373
|
+
asset: StatusAsset;
|
|
374
|
+
amount: string;
|
|
375
|
+
amountUSD: number;
|
|
376
|
+
txHash: string;
|
|
386
377
|
account: string;
|
|
387
|
-
|
|
388
|
-
|
|
378
|
+
};
|
|
379
|
+
export type TxStatusForPair = {
|
|
380
|
+
source: TransactionInfo;
|
|
381
|
+
destination: TransactionInfo & {
|
|
382
|
+
timestamp?: number;
|
|
383
|
+
};
|
|
384
|
+
expected?: Omit<TransactionInfo, 'txHash' | 'status'>;
|
|
385
|
+
status: StatusResponse;
|
|
386
|
+
provider: ProviderDetails;
|
|
389
387
|
allowUserTxOnDestChain: boolean;
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
refundTxHash?: string;
|
|
388
|
+
message?: string;
|
|
389
|
+
protocolExplorerLink?: string;
|
|
393
390
|
};
|
|
394
391
|
export type TradeStatusResponse = {
|
|
395
|
-
|
|
392
|
+
status: StatusResponse;
|
|
393
|
+
gasless: boolean;
|
|
394
|
+
txHash: string;
|
|
395
|
+
chainId: number;
|
|
396
|
+
timestamp: number;
|
|
397
|
+
transactions: TxStatusForPair[];
|
|
396
398
|
};
|
|
397
399
|
export type EIP2612GaslessExecuteTxParams = {
|
|
398
400
|
permitData: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dzapio/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"description": "A TypeScript/JavaScript SDK for interacting with the DZap protocol, providing utilities for DeFi operations including Swaps, Bridges, and Zaps.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"source": "src/index.ts",
|