@dzapio/sdk 2.0.4 → 2.0.6
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 +3 -2
- package/dist/chains/definitions/stable.d.ts +36 -0
- package/dist/chains/index.d.ts +36 -0
- package/dist/constants/address.d.ts +1 -0
- package/dist/constants/chains.d.ts +13 -0
- package/dist/dZapClient/index.d.ts +3 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/transactionHandlers/zap.d.ts +3 -3
- package/dist/types/chains.d.ts +2 -1
- package/dist/types/index.d.ts +7 -0
- package/dist/types/zap/step.d.ts +11 -3
- package/dist/zap/constants/urls.d.ts +1 -0
- package/package.json +1 -1
package/dist/api/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CancelToken } from 'axios';
|
|
2
|
-
import { BroadcastTxParams, CalculatePointsRequest, GaslessExecuteTxParams, TradeBuildTxnRequest, TradeQuotesRequest } from '../types';
|
|
2
|
+
import { BroadcastTxParams, BroadcastTxResponse, CalculatePointsRequest, GaslessExecuteTxParams, TradeBuildTxnRequest, TradeQuotesRequest } from '../types';
|
|
3
3
|
import { ZapBuildTxnRequest, ZapPoolDetailsRequest, ZapPoolsRequest, ZapPositionsRequest, ZapQuoteRequest, ZapStatusRequest } from '../types/zap';
|
|
4
4
|
export declare const fetchTradeQuotes: (request: TradeQuotesRequest) => Promise<any>;
|
|
5
5
|
export declare const fetchTradeBuildTxnData: (request: TradeBuildTxnRequest) => Promise<any>;
|
|
6
6
|
export declare const executeGaslessTxnData: (request: GaslessExecuteTxParams) => Promise<any>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const broadcastTradeTx: (request: BroadcastTxParams) => Promise<BroadcastTxResponse>;
|
|
8
|
+
export declare const broadcastZapTx: (request: BroadcastTxParams) => Promise<BroadcastTxResponse>;
|
|
8
9
|
export declare const fetchZapBuildTxnData: (request: ZapBuildTxnRequest, cancelToken?: CancelToken) => Promise<any>;
|
|
9
10
|
export declare const fetchZapQuote: (request: ZapQuoteRequest, cancelToken?: CancelToken) => Promise<any>;
|
|
10
11
|
export declare const fetchZapTxnStatus: (request: ZapStatusRequest) => Promise<any>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const stableChain: {
|
|
2
|
+
blockExplorers: {
|
|
3
|
+
readonly default: {
|
|
4
|
+
readonly name: "Stablescan";
|
|
5
|
+
readonly url: "https://stablescan.xyz";
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
blockTime?: number | undefined | undefined;
|
|
9
|
+
contracts: {
|
|
10
|
+
readonly multicall3: {
|
|
11
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
12
|
+
readonly blockCreated: 2423647;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
ensTlds?: readonly string[] | undefined;
|
|
16
|
+
id: 988;
|
|
17
|
+
name: "Stable";
|
|
18
|
+
nativeCurrency: {
|
|
19
|
+
readonly name: "GUSDT";
|
|
20
|
+
readonly symbol: "gUSDT";
|
|
21
|
+
readonly decimals: 18;
|
|
22
|
+
};
|
|
23
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
24
|
+
rpcUrls: {
|
|
25
|
+
readonly default: {
|
|
26
|
+
readonly http: readonly ["https://rpc.stable.xyz"];
|
|
27
|
+
readonly webSocket: readonly ["wss://rpc.stable.xyz"];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
sourceId?: number | undefined | undefined;
|
|
31
|
+
testnet?: boolean | undefined | undefined;
|
|
32
|
+
custom?: Record<string, unknown> | undefined;
|
|
33
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
34
|
+
formatters?: undefined;
|
|
35
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
36
|
+
};
|
package/dist/chains/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { arthera } from './definitions/arthera';
|
|
|
3
3
|
export { fiveIre } from './definitions/fiveIre';
|
|
4
4
|
export { hyperEvm } from './definitions/hyperEvm';
|
|
5
5
|
export { hyperliquid } from './definitions/hyperliquid';
|
|
6
|
+
export { stableChain } from './definitions/stable';
|
|
6
7
|
export declare const customViemChains: ({
|
|
7
8
|
blockExplorers: {
|
|
8
9
|
readonly default: {
|
|
@@ -139,5 +140,40 @@ export declare const customViemChains: ({
|
|
|
139
140
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
140
141
|
formatters?: undefined;
|
|
141
142
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
143
|
+
} | {
|
|
144
|
+
blockExplorers: {
|
|
145
|
+
readonly default: {
|
|
146
|
+
readonly name: "Stablescan";
|
|
147
|
+
readonly url: "https://stablescan.xyz";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
blockTime?: number | undefined | undefined;
|
|
151
|
+
contracts: {
|
|
152
|
+
readonly multicall3: {
|
|
153
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
154
|
+
readonly blockCreated: 2423647;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
ensTlds?: readonly string[] | undefined;
|
|
158
|
+
id: 988;
|
|
159
|
+
name: "Stable";
|
|
160
|
+
nativeCurrency: {
|
|
161
|
+
readonly name: "GUSDT";
|
|
162
|
+
readonly symbol: "gUSDT";
|
|
163
|
+
readonly decimals: 18;
|
|
164
|
+
};
|
|
165
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
166
|
+
rpcUrls: {
|
|
167
|
+
readonly default: {
|
|
168
|
+
readonly http: readonly ["https://rpc.stable.xyz"];
|
|
169
|
+
readonly webSocket: readonly ["wss://rpc.stable.xyz"];
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
sourceId?: number | undefined | undefined;
|
|
173
|
+
testnet?: boolean | undefined | undefined;
|
|
174
|
+
custom?: Record<string, unknown> | undefined;
|
|
175
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
176
|
+
formatters?: undefined;
|
|
177
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
142
178
|
})[];
|
|
143
179
|
export declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
@@ -9,4 +9,5 @@ export declare const tonNativeToken = "EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
|
9
9
|
export declare const artheraNativeToken = "0x000000000000000000000000000000000000aA09";
|
|
10
10
|
export declare const suiNativeToken = "0x2::sui::SUI";
|
|
11
11
|
export declare const aptosNativeToken = "0x1::aptos_coin::AptosCoin";
|
|
12
|
+
export declare const stableChainNativeToken = "0x0000000000000000000000000000000000001000";
|
|
12
13
|
export declare const nativeTokens: string[];
|
|
@@ -16,3 +16,16 @@ export declare const exclusiveChainIds: {
|
|
|
16
16
|
citreaTestnet: number;
|
|
17
17
|
hyperLiquid: number;
|
|
18
18
|
};
|
|
19
|
+
export declare const chainTypes: {
|
|
20
|
+
readonly evm: "evm";
|
|
21
|
+
readonly bvm: "bvm";
|
|
22
|
+
readonly svm: "svm";
|
|
23
|
+
readonly aptosvm: "aptosvm";
|
|
24
|
+
readonly cosmos: "cosmos";
|
|
25
|
+
readonly nearvm: "nearvm";
|
|
26
|
+
readonly starknetvm: "starknetvm";
|
|
27
|
+
readonly stellarvm: "stellarvm";
|
|
28
|
+
readonly suivm: "suivm";
|
|
29
|
+
readonly tonvm: "tonvm";
|
|
30
|
+
readonly tronvm: "tronvm";
|
|
31
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Signer } from 'ethers';
|
|
2
2
|
import { Prettify, TransactionReceipt, WalletClient } from 'viem';
|
|
3
3
|
import { ContractVersion, StatusCodes, TxnStatus } from '../enums';
|
|
4
|
-
import { ApprovalMode, AvailableDZapServices, CalculatePointsRequest, ChainData, EvmTxData, GaslessTradeBuildTxnResponse, GasSignatureParams, HexString, OtherAvailableAbis, PermitMode, SignPermitResponse, TokenInfo, TokenResponse, TradeBuildTxnRequest, TradeBuildTxnResponse, TradeQuotesRequest, TradeQuotesResponse, TradeStatusResponse } from '../types';
|
|
4
|
+
import { ApprovalMode, AvailableDZapServices, BroadcastTxParams, BroadcastTxResponse, CalculatePointsRequest, ChainData, EvmTxData, GaslessTradeBuildTxnResponse, GasSignatureParams, HexString, OtherAvailableAbis, PermitMode, SignPermitResponse, TokenInfo, TokenResponse, TradeBuildTxnRequest, TradeBuildTxnResponse, TradeQuotesRequest, TradeQuotesResponse, TradeStatusResponse } from '../types';
|
|
5
5
|
import { ZapBuildTxnRequest, ZapBuildTxnResponse, ZapChains, ZapPoolDetails, ZapPoolDetailsRequest, ZapPoolsRequest, ZapPoolsResponse, ZapPositionsRequest, ZapPositionsResponse, ZapProviders, ZapQuoteRequest, ZapQuoteResponse, ZapStatusRequest, ZapStatusResponse, ZapTransactionStep } from '../types/zap';
|
|
6
6
|
import { BatchCallParams } from '../utils/eip-5792';
|
|
7
7
|
declare class DZapClient {
|
|
@@ -1009,5 +1009,7 @@ declare class DZapClient {
|
|
|
1009
1009
|
getZapPoolDetails(request: ZapPoolDetailsRequest): Promise<ZapPoolDetails>;
|
|
1010
1010
|
getZapChains(): Promise<ZapChains>;
|
|
1011
1011
|
getZapProviders(): Promise<ZapProviders>;
|
|
1012
|
+
broadcastTradeTx(request: BroadcastTxParams): Promise<BroadcastTxResponse>;
|
|
1013
|
+
broadcastZapTx(request: BroadcastTxParams): Promise<BroadcastTxResponse>;
|
|
1012
1014
|
}
|
|
1013
1015
|
export default DZapClient;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { broadcastTx } from './api';
|
|
2
1
|
import { OtherAbis, QuoteFilters, Services, STATUS } from './constants';
|
|
3
2
|
import { ApprovalModes } from './constants/approval';
|
|
4
3
|
import { erc20Functions } from './constants/erc20';
|
|
@@ -15,4 +14,4 @@ import { checkEIP2612PermitSupport } from './utils/eip-2612/eip2612Permit';
|
|
|
15
14
|
import { formatToken } from './utils/tokens';
|
|
16
15
|
export * from './types/zap';
|
|
17
16
|
export * from './zap/constants';
|
|
18
|
-
export { ApiRpcResponse, ApprovalMode, ApprovalModes, BatchPermitCallbackParams,
|
|
17
|
+
export { ApiRpcResponse, ApprovalMode, ApprovalModes, BatchPermitCallbackParams, BtcTxData, Chain, ChainData, checkEIP2612PermitSupport, contractErrorActions, ContractErrorResponse, DZapClient, DZapPermitMode, DZapTransactionResponse, erc20Functions, EvmTxData, Fee, FeeDetails, formatToken, GaslessTradeBuildTxnResponse, getTokensPairKey, HexString, OtherAbis, ParamQuotes, PermitMode, PermitTypes, ProviderDetails, PsbtInput, PsbtOutput, QuoteFilter, QuoteFilters, Services, SignatureCallbackParams, SignatureExpiryInSecs, SignPermitResponse, SinglePermitCallbackParams, STATUS, StatusCodes, SvmTxData, SwapInfo, SwapInputDataDecoder, Token, TokenInfo, TokenPermitData, TokenResponse, TradeBuildTxnRequest, TradeBuildTxnRequestData, TradeBuildTxnResponse, TradeGasBuildTxnResponse, TradePath, TradeQuotesRequest, TradeQuotesRequestData, TradeQuotesResponse, TradeStatusResponse, TradeStep, TxnStatus, ZapIntegratorConfig, ZapStatusResponse, };
|