@dzapio/sdk 2.0.53 → 2.0.54
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 +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -175,6 +175,13 @@ declare const zapPreExecutionStepType: {
|
|
|
175
175
|
readonly sign: "sign";
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
+
type TransactionError = {
|
|
179
|
+
status: Exclude<TxnStatus, TxnStatus.success>;
|
|
180
|
+
error: any;
|
|
181
|
+
errorMsg: string;
|
|
182
|
+
code: StatusCodes;
|
|
183
|
+
};
|
|
184
|
+
|
|
178
185
|
type StepAction = keyof typeof zapStepAction;
|
|
179
186
|
type ZapPreExecutionStepType = keyof typeof zapPreExecutionStepType;
|
|
180
187
|
type ZapEvmTxnDetails = {
|
|
@@ -220,11 +227,11 @@ type ZapSignPreExecutionStepData = {
|
|
|
220
227
|
signature: HexString;
|
|
221
228
|
message: Record<string, unknown>;
|
|
222
229
|
};
|
|
223
|
-
type ZapPreExecutionResult = {
|
|
230
|
+
type ZapPreExecutionResult = Prettify<{
|
|
224
231
|
status: TxnStatus.success;
|
|
225
232
|
code: StatusCodes | number;
|
|
226
233
|
preExecutionStepsData: ZapPreExecutionStepData[];
|
|
227
|
-
} |
|
|
234
|
+
} | TransactionError>;
|
|
228
235
|
type ZapPreExecutionStepData = ZapSignPreExecutionStepData;
|
|
229
236
|
type ZapTransactionStep<T extends ZapTxnDetails = ZapTxnDetails> = {
|
|
230
237
|
action: StepAction;
|
|
@@ -2017,12 +2024,7 @@ declare class DZapClient {
|
|
|
2017
2024
|
chainId: number;
|
|
2018
2025
|
signer: Signer | WalletClient;
|
|
2019
2026
|
txnData: EvmTxData;
|
|
2020
|
-
}): Promise<{
|
|
2021
|
-
status: TxnStatus;
|
|
2022
|
-
error: any;
|
|
2023
|
-
errorMsg: any;
|
|
2024
|
-
code: StatusCodes;
|
|
2025
|
-
} | {
|
|
2027
|
+
}): Promise<TransactionError | {
|
|
2026
2028
|
status: TxnStatus;
|
|
2027
2029
|
code: StatusCodes;
|
|
2028
2030
|
txnHash: HexString;
|
package/dist/index.d.ts
CHANGED
|
@@ -175,6 +175,13 @@ declare const zapPreExecutionStepType: {
|
|
|
175
175
|
readonly sign: "sign";
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
+
type TransactionError = {
|
|
179
|
+
status: Exclude<TxnStatus, TxnStatus.success>;
|
|
180
|
+
error: any;
|
|
181
|
+
errorMsg: string;
|
|
182
|
+
code: StatusCodes;
|
|
183
|
+
};
|
|
184
|
+
|
|
178
185
|
type StepAction = keyof typeof zapStepAction;
|
|
179
186
|
type ZapPreExecutionStepType = keyof typeof zapPreExecutionStepType;
|
|
180
187
|
type ZapEvmTxnDetails = {
|
|
@@ -220,11 +227,11 @@ type ZapSignPreExecutionStepData = {
|
|
|
220
227
|
signature: HexString;
|
|
221
228
|
message: Record<string, unknown>;
|
|
222
229
|
};
|
|
223
|
-
type ZapPreExecutionResult = {
|
|
230
|
+
type ZapPreExecutionResult = Prettify<{
|
|
224
231
|
status: TxnStatus.success;
|
|
225
232
|
code: StatusCodes | number;
|
|
226
233
|
preExecutionStepsData: ZapPreExecutionStepData[];
|
|
227
|
-
} |
|
|
234
|
+
} | TransactionError>;
|
|
228
235
|
type ZapPreExecutionStepData = ZapSignPreExecutionStepData;
|
|
229
236
|
type ZapTransactionStep<T extends ZapTxnDetails = ZapTxnDetails> = {
|
|
230
237
|
action: StepAction;
|
|
@@ -2017,12 +2024,7 @@ declare class DZapClient {
|
|
|
2017
2024
|
chainId: number;
|
|
2018
2025
|
signer: Signer | WalletClient;
|
|
2019
2026
|
txnData: EvmTxData;
|
|
2020
|
-
}): Promise<{
|
|
2021
|
-
status: TxnStatus;
|
|
2022
|
-
error: any;
|
|
2023
|
-
errorMsg: any;
|
|
2024
|
-
code: StatusCodes;
|
|
2025
|
-
} | {
|
|
2027
|
+
}): Promise<TransactionError | {
|
|
2026
2028
|
status: TxnStatus;
|
|
2027
2029
|
code: StatusCodes;
|
|
2028
2030
|
txnHash: HexString;
|
package/dist/index.js
CHANGED
|
@@ -14162,7 +14162,7 @@ _ZapPreExecutionStepHandler.handleSignStep = async ({ step, signer, account }) =
|
|
|
14162
14162
|
message,
|
|
14163
14163
|
primaryType
|
|
14164
14164
|
});
|
|
14165
|
-
if (result.status !== "success" /* success */
|
|
14165
|
+
if (result.status !== "success" /* success */) {
|
|
14166
14166
|
return result;
|
|
14167
14167
|
}
|
|
14168
14168
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -14137,7 +14137,7 @@ _ZapPreExecutionStepHandler.handleSignStep = async ({ step, signer, account }) =
|
|
|
14137
14137
|
message,
|
|
14138
14138
|
primaryType
|
|
14139
14139
|
});
|
|
14140
|
-
if (result.status !== "success" /* success */
|
|
14140
|
+
if (result.status !== "success" /* success */) {
|
|
14141
14141
|
return result;
|
|
14142
14142
|
}
|
|
14143
14143
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dzapio/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.54",
|
|
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",
|