@dzapio/sdk 2.0.10 → 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 +27 -12
- 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,26 +361,40 @@ export type SwapInfo = {
|
|
|
360
361
|
toToken: string;
|
|
361
362
|
returnToAmount: bigint;
|
|
362
363
|
};
|
|
363
|
-
|
|
364
|
-
|
|
364
|
+
type StatusAsset = {
|
|
365
|
+
contract: string;
|
|
366
|
+
chainId: number;
|
|
367
|
+
name?: string;
|
|
368
|
+
symbol?: string;
|
|
369
|
+
decimals?: number;
|
|
370
|
+
logo?: string | undefined;
|
|
371
|
+
};
|
|
372
|
+
export type TransactionInfo = {
|
|
373
|
+
asset: StatusAsset;
|
|
365
374
|
amount: string;
|
|
366
|
-
amountUSD:
|
|
367
|
-
status: keyof typeof STATUS_RESPONSE;
|
|
375
|
+
amountUSD: number;
|
|
368
376
|
txHash: string;
|
|
369
377
|
account: string;
|
|
370
|
-
timestamp: number;
|
|
371
378
|
};
|
|
372
|
-
export type
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
379
|
+
export type TxStatusForPair = {
|
|
380
|
+
source: TransactionInfo;
|
|
381
|
+
destination: TransactionInfo & {
|
|
382
|
+
timestamp?: number;
|
|
383
|
+
};
|
|
384
|
+
expected?: Omit<TransactionInfo, 'txHash' | 'status'>;
|
|
385
|
+
status: StatusResponse;
|
|
376
386
|
provider: ProviderDetails;
|
|
377
387
|
allowUserTxOnDestChain: boolean;
|
|
378
388
|
message?: string;
|
|
379
|
-
|
|
389
|
+
protocolExplorerLink?: string;
|
|
380
390
|
};
|
|
381
391
|
export type TradeStatusResponse = {
|
|
382
|
-
|
|
392
|
+
status: StatusResponse;
|
|
393
|
+
gasless: boolean;
|
|
394
|
+
txHash: string;
|
|
395
|
+
chainId: number;
|
|
396
|
+
timestamp: number;
|
|
397
|
+
transactions: TxStatusForPair[];
|
|
383
398
|
};
|
|
384
399
|
export type EIP2612GaslessExecuteTxParams = {
|
|
385
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",
|