@dzapio/sdk 2.0.44 → 2.0.46
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/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -164,6 +164,14 @@ declare const zapPathAction: {
|
|
|
164
164
|
readonly harvest: "harvest";
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
+
type ZapFee = {
|
|
168
|
+
amount: string;
|
|
169
|
+
amountUSD: string;
|
|
170
|
+
asset: ZapPathAsset;
|
|
171
|
+
included: boolean;
|
|
172
|
+
refundable: boolean;
|
|
173
|
+
};
|
|
174
|
+
|
|
167
175
|
type ZapPathAction = keyof typeof zapPathAction;
|
|
168
176
|
type ZapPathAsset = {
|
|
169
177
|
chainId: number;
|
|
@@ -423,12 +431,6 @@ type ZapChains = {
|
|
|
423
431
|
supportedProviders: string[];
|
|
424
432
|
};
|
|
425
433
|
};
|
|
426
|
-
type ZapFee = {
|
|
427
|
-
amount: string;
|
|
428
|
-
amountUSD: string;
|
|
429
|
-
asset: ZapPathAsset;
|
|
430
|
-
included: boolean;
|
|
431
|
-
};
|
|
432
434
|
type ZapUnderlyingToken = {
|
|
433
435
|
chainId: number;
|
|
434
436
|
address: HexString;
|
|
@@ -716,9 +718,7 @@ type Token = {
|
|
|
716
718
|
type TokenPermitData = {
|
|
717
719
|
eip2612: {
|
|
718
720
|
supported: boolean;
|
|
719
|
-
|
|
720
|
-
domain?: TypedDataDomain;
|
|
721
|
-
};
|
|
721
|
+
domain?: TypedDataDomain;
|
|
722
722
|
};
|
|
723
723
|
permit2: {
|
|
724
724
|
supported: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -164,6 +164,14 @@ declare const zapPathAction: {
|
|
|
164
164
|
readonly harvest: "harvest";
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
+
type ZapFee = {
|
|
168
|
+
amount: string;
|
|
169
|
+
amountUSD: string;
|
|
170
|
+
asset: ZapPathAsset;
|
|
171
|
+
included: boolean;
|
|
172
|
+
refundable: boolean;
|
|
173
|
+
};
|
|
174
|
+
|
|
167
175
|
type ZapPathAction = keyof typeof zapPathAction;
|
|
168
176
|
type ZapPathAsset = {
|
|
169
177
|
chainId: number;
|
|
@@ -423,12 +431,6 @@ type ZapChains = {
|
|
|
423
431
|
supportedProviders: string[];
|
|
424
432
|
};
|
|
425
433
|
};
|
|
426
|
-
type ZapFee = {
|
|
427
|
-
amount: string;
|
|
428
|
-
amountUSD: string;
|
|
429
|
-
asset: ZapPathAsset;
|
|
430
|
-
included: boolean;
|
|
431
|
-
};
|
|
432
434
|
type ZapUnderlyingToken = {
|
|
433
435
|
chainId: number;
|
|
434
436
|
address: HexString;
|
|
@@ -716,9 +718,7 @@ type Token = {
|
|
|
716
718
|
type TokenPermitData = {
|
|
717
719
|
eip2612: {
|
|
718
720
|
supported: boolean;
|
|
719
|
-
|
|
720
|
-
domain?: TypedDataDomain;
|
|
721
|
-
};
|
|
721
|
+
domain?: TypedDataDomain;
|
|
722
722
|
};
|
|
723
723
|
permit2: {
|
|
724
724
|
supported: boolean;
|
package/dist/index.js
CHANGED
|
@@ -12833,7 +12833,7 @@ var checkEIP2612PermitSupport = async ({
|
|
|
12833
12833
|
};
|
|
12834
12834
|
};
|
|
12835
12835
|
var getEIP2612PermitSignature = async (params) => {
|
|
12836
|
-
var _a, _b, _c
|
|
12836
|
+
var _a, _b, _c;
|
|
12837
12837
|
try {
|
|
12838
12838
|
const {
|
|
12839
12839
|
chainId,
|
|
@@ -12850,7 +12850,7 @@ var getEIP2612PermitSignature = async (params) => {
|
|
|
12850
12850
|
} = params;
|
|
12851
12851
|
const { address } = token;
|
|
12852
12852
|
const amount = token.amount ? BigInt(token.amount) : viem.maxUint256;
|
|
12853
|
-
const domain = ((
|
|
12853
|
+
const domain = ((_b = (_a = token.permit) == null ? void 0 : _a.eip2612) == null ? void 0 : _b.domain) ?? {
|
|
12854
12854
|
name,
|
|
12855
12855
|
version,
|
|
12856
12856
|
chainId,
|
|
@@ -12885,7 +12885,7 @@ var getEIP2612PermitSignature = async (params) => {
|
|
|
12885
12885
|
};
|
|
12886
12886
|
} catch (error) {
|
|
12887
12887
|
console.log("Error generating permit signature:", error);
|
|
12888
|
-
if (((
|
|
12888
|
+
if (((_c = error == null ? void 0 : error.cause) == null ? void 0 : _c.code) === 4001 /* UserRejectedRequest */ || (error == null ? void 0 : error.code) === 4001 /* UserRejectedRequest */) {
|
|
12889
12889
|
return { status: "rejected" /* rejected */, code: 4001 /* UserRejectedRequest */ };
|
|
12890
12890
|
}
|
|
12891
12891
|
return { status: "error" /* error */, code: 500 /* Error */ };
|
package/dist/index.mjs
CHANGED
|
@@ -12807,7 +12807,7 @@ var checkEIP2612PermitSupport = async ({
|
|
|
12807
12807
|
};
|
|
12808
12808
|
};
|
|
12809
12809
|
var getEIP2612PermitSignature = async (params) => {
|
|
12810
|
-
var _a, _b, _c
|
|
12810
|
+
var _a, _b, _c;
|
|
12811
12811
|
try {
|
|
12812
12812
|
const {
|
|
12813
12813
|
chainId,
|
|
@@ -12824,7 +12824,7 @@ var getEIP2612PermitSignature = async (params) => {
|
|
|
12824
12824
|
} = params;
|
|
12825
12825
|
const { address } = token;
|
|
12826
12826
|
const amount = token.amount ? BigInt(token.amount) : maxUint256;
|
|
12827
|
-
const domain = ((
|
|
12827
|
+
const domain = ((_b = (_a = token.permit) == null ? void 0 : _a.eip2612) == null ? void 0 : _b.domain) ?? {
|
|
12828
12828
|
name,
|
|
12829
12829
|
version,
|
|
12830
12830
|
chainId,
|
|
@@ -12859,7 +12859,7 @@ var getEIP2612PermitSignature = async (params) => {
|
|
|
12859
12859
|
};
|
|
12860
12860
|
} catch (error) {
|
|
12861
12861
|
console.log("Error generating permit signature:", error);
|
|
12862
|
-
if (((
|
|
12862
|
+
if (((_c = error == null ? void 0 : error.cause) == null ? void 0 : _c.code) === 4001 /* UserRejectedRequest */ || (error == null ? void 0 : error.code) === 4001 /* UserRejectedRequest */) {
|
|
12863
12863
|
return { status: "rejected" /* rejected */, code: 4001 /* UserRejectedRequest */ };
|
|
12864
12864
|
}
|
|
12865
12865
|
return { status: "error" /* error */, code: 500 /* Error */ };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dzapio/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.46",
|
|
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",
|