@gelatocloud/gasless 0.0.1 → 0.0.4
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/LICENSE +21 -0
- package/README.md +417 -0
- package/_dist/account/actions/sendTransactionSync.d.ts +2 -2
- package/_dist/account/actions/sendTransactionSync.d.ts.map +1 -1
- package/_dist/account/actions/sendTransactionSync.js.map +1 -1
- package/_dist/account/index.d.ts +3 -3
- package/_dist/account/index.d.ts.map +1 -1
- package/_dist/account/index.js +1 -0
- package/_dist/account/index.js.map +1 -1
- package/_dist/relayer/evm/actions/getGelatoStatus.d.ts +22 -0
- package/_dist/relayer/evm/actions/getGelatoStatus.d.ts.map +1 -1
- package/_dist/relayer/evm/actions/getGelatoStatus.js +1 -0
- package/_dist/relayer/evm/actions/getGelatoStatus.js.map +1 -1
- package/_dist/relayer/evm/actions/getStatus.d.ts +77 -0
- package/_dist/relayer/evm/actions/getStatus.d.ts.map +1 -1
- package/_dist/relayer/evm/actions/getStatus.js +7 -1
- package/_dist/relayer/evm/actions/getStatus.js.map +1 -1
- package/_dist/relayer/evm/actions/handleTerminalStatus.d.ts +3 -0
- package/_dist/relayer/evm/actions/handleTerminalStatus.d.ts.map +1 -0
- package/_dist/relayer/evm/actions/handleTerminalStatus.js +29 -0
- package/_dist/relayer/evm/actions/handleTerminalStatus.js.map +1 -0
- package/_dist/relayer/evm/actions/index.d.ts +1 -0
- package/_dist/relayer/evm/actions/index.d.ts.map +1 -1
- package/_dist/relayer/evm/actions/index.js +1 -0
- package/_dist/relayer/evm/actions/index.js.map +1 -1
- package/_dist/relayer/evm/actions/sendTransactionSync.d.ts +2 -2
- package/_dist/relayer/evm/actions/sendTransactionSync.d.ts.map +1 -1
- package/_dist/relayer/evm/actions/sendTransactionSync.js +3 -1
- package/_dist/relayer/evm/actions/sendTransactionSync.js.map +1 -1
- package/_dist/relayer/evm/actions/waitForInclusion.d.ts +4 -0
- package/_dist/relayer/evm/actions/waitForInclusion.d.ts.map +1 -0
- package/_dist/relayer/evm/actions/waitForInclusion.js +11 -0
- package/_dist/relayer/evm/actions/waitForInclusion.js.map +1 -0
- package/_dist/relayer/evm/errors/index.d.ts +36 -0
- package/_dist/relayer/evm/errors/index.d.ts.map +1 -0
- package/_dist/relayer/evm/errors/index.js +62 -0
- package/_dist/relayer/evm/errors/index.js.map +1 -0
- package/_dist/relayer/evm/index.d.ts +3 -2
- package/_dist/relayer/evm/index.d.ts.map +1 -1
- package/_dist/relayer/evm/index.js +1 -0
- package/_dist/relayer/evm/index.js.map +1 -1
- package/_dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -1
- package/CHANGELOG.md +0 -9
- package/account/actions/getFeeQuote.ts +0 -34
- package/account/actions/index.ts +0 -3
- package/account/actions/sendTransaction.ts +0 -61
- package/account/actions/sendTransactionSync.ts +0 -51
- package/account/adapters/gelato/abi.ts +0 -13
- package/account/adapters/gelato/constants.ts +0 -13
- package/account/adapters/gelato/index.ts +0 -216
- package/account/adapters/index.ts +0 -1
- package/account/adapters/types/index.ts +0 -36
- package/account/index.ts +0 -60
- package/account/utils/delegation.ts +0 -9
- package/account/utils/estimation.ts +0 -29
- package/account/utils/index.ts +0 -2
- package/bundler/actions/estimateUserOperationGas.ts +0 -63
- package/bundler/actions/getUserOperationGasPrice.ts +0 -25
- package/bundler/actions/getUserOperationQuote.ts +0 -83
- package/bundler/actions/index.ts +0 -6
- package/bundler/actions/prepareUserOperation.ts +0 -437
- package/bundler/actions/sendUserOperation.ts +0 -64
- package/bundler/actions/sendUserOperationSync.ts +0 -71
- package/bundler/index.ts +0 -98
- package/constants/index.ts +0 -2
- package/index.ts +0 -4
- package/relayer/evm/actions/getCapabilities.ts +0 -22
- package/relayer/evm/actions/getFeeData.ts +0 -36
- package/relayer/evm/actions/getFeeQuote.ts +0 -39
- package/relayer/evm/actions/getGelatoStatus.ts +0 -99
- package/relayer/evm/actions/getStatus.ts +0 -92
- package/relayer/evm/actions/index.ts +0 -9
- package/relayer/evm/actions/sendTransaction.ts +0 -33
- package/relayer/evm/actions/sendTransactionSync.ts +0 -30
- package/relayer/evm/actions/waitForGelatoStatus.ts +0 -28
- package/relayer/evm/actions/waitForStatus.ts +0 -24
- package/relayer/evm/index.ts +0 -77
- package/relayer/index.ts +0 -1
- package/tsconfig.build.json +0 -19
- package/tsconfig.json +0 -8
- package/types/error.ts +0 -38
- package/types/index.ts +0 -3
- package/types/payment.ts +0 -23
- package/types/schema.ts +0 -28
- package/utils/index.ts +0 -2
- package/utils/payment.ts +0 -20
- package/utils/serialize.ts +0 -91
|
@@ -7,6 +7,17 @@ export declare enum StatusCode {
|
|
|
7
7
|
Rejected = 400,
|
|
8
8
|
Reverted = 500
|
|
9
9
|
}
|
|
10
|
+
declare const receiptSchema: z.ZodObject<{
|
|
11
|
+
blockHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
12
|
+
blockNumber: z.ZodCoercedBigInt<unknown>;
|
|
13
|
+
gasUsed: z.ZodCoercedBigInt<unknown>;
|
|
14
|
+
logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
16
|
+
data: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
17
|
+
topics: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
18
|
+
}, z.core.$strip>>>;
|
|
19
|
+
transactionHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
10
21
|
export declare const terminalStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
11
22
|
chainId: z.ZodCoercedNumber<unknown>;
|
|
12
23
|
createdAt: z.ZodNumber;
|
|
@@ -33,7 +44,60 @@ export declare const terminalStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
33
44
|
createdAt: z.ZodNumber;
|
|
34
45
|
data: z.ZodString;
|
|
35
46
|
message: z.ZodOptional<z.ZodString>;
|
|
47
|
+
receipt: z.ZodObject<{
|
|
48
|
+
blockHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
49
|
+
blockNumber: z.ZodCoercedBigInt<unknown>;
|
|
50
|
+
gasUsed: z.ZodCoercedBigInt<unknown>;
|
|
51
|
+
logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
53
|
+
data: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
54
|
+
topics: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
55
|
+
}, z.core.$strip>>>;
|
|
56
|
+
transactionHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
status: z.ZodLiteral<StatusCode.Reverted>;
|
|
59
|
+
}, z.core.$strip>], "status">;
|
|
60
|
+
export declare const terminalStatusSchemaWithId: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
|
+
chainId: z.ZodCoercedNumber<unknown>;
|
|
62
|
+
createdAt: z.ZodNumber;
|
|
63
|
+
receipt: z.ZodObject<{
|
|
64
|
+
blockHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
65
|
+
blockNumber: z.ZodCoercedBigInt<unknown>;
|
|
66
|
+
gasUsed: z.ZodCoercedBigInt<unknown>;
|
|
67
|
+
logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
68
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
69
|
+
data: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
70
|
+
topics: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
transactionHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
status: z.ZodLiteral<StatusCode.Included>;
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
chainId: z.ZodCoercedNumber<unknown>;
|
|
78
|
+
createdAt: z.ZodNumber;
|
|
79
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
80
|
+
message: z.ZodString;
|
|
81
|
+
status: z.ZodLiteral<StatusCode.Rejected>;
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
chainId: z.ZodCoercedNumber<unknown>;
|
|
85
|
+
createdAt: z.ZodNumber;
|
|
86
|
+
data: z.ZodString;
|
|
87
|
+
message: z.ZodOptional<z.ZodString>;
|
|
88
|
+
receipt: z.ZodObject<{
|
|
89
|
+
blockHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
90
|
+
blockNumber: z.ZodCoercedBigInt<unknown>;
|
|
91
|
+
gasUsed: z.ZodCoercedBigInt<unknown>;
|
|
92
|
+
logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
93
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
94
|
+
data: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
95
|
+
topics: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
96
|
+
}, z.core.$strip>>>;
|
|
97
|
+
transactionHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
98
|
+
}, z.core.$strip>;
|
|
36
99
|
status: z.ZodLiteral<StatusCode.Reverted>;
|
|
100
|
+
id: z.ZodString;
|
|
37
101
|
}, z.core.$strip>], "status">;
|
|
38
102
|
export declare const statusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39
103
|
chainId: z.ZodCoercedNumber<unknown>;
|
|
@@ -70,12 +134,25 @@ export declare const statusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
70
134
|
createdAt: z.ZodNumber;
|
|
71
135
|
data: z.ZodString;
|
|
72
136
|
message: z.ZodOptional<z.ZodString>;
|
|
137
|
+
receipt: z.ZodObject<{
|
|
138
|
+
blockHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
139
|
+
blockNumber: z.ZodCoercedBigInt<unknown>;
|
|
140
|
+
gasUsed: z.ZodCoercedBigInt<unknown>;
|
|
141
|
+
logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
143
|
+
data: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
144
|
+
topics: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
145
|
+
}, z.core.$strip>>>;
|
|
146
|
+
transactionHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
147
|
+
}, z.core.$strip>;
|
|
73
148
|
status: z.ZodLiteral<StatusCode.Reverted>;
|
|
74
149
|
}, z.core.$strip>], "status">;
|
|
75
150
|
export type TerminalStatus = z.infer<typeof terminalStatusSchema>;
|
|
76
151
|
export type Status = z.infer<typeof statusSchema>;
|
|
152
|
+
export type TransactionReceipt = z.infer<typeof receiptSchema>;
|
|
77
153
|
export type GetStatusParameters = {
|
|
78
154
|
id: string;
|
|
79
155
|
};
|
|
80
156
|
export declare const getStatus: (client: ReturnType<Transport>, parameters: GetStatusParameters) => Promise<Status>;
|
|
157
|
+
export {};
|
|
81
158
|
//# sourceMappingURL=getStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStatus.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/actions/getStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,oBAAY,UAAU;IACpB,OAAO,MAAM;IACb,SAAS,MAAM;IACf,QAAQ,MAAM;IACd,QAAQ,MAAM;IACd,QAAQ,MAAM;CACf;
|
|
1
|
+
{"version":3,"file":"getStatus.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/actions/getStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,oBAAY,UAAU;IACpB,OAAO,MAAM;IACb,SAAS,MAAM;IACf,QAAQ,MAAM;IACd,QAAQ,MAAM;IACd,QAAQ,MAAM;CACf;AAQD,QAAA,MAAM,aAAa;;;;;;;;;;iBAMjB,CAAC;AAkCH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAI/B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAIrC,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAMvB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,QAAQ,UAAU,CAAC,SAAS,CAAC,EAC7B,YAAY,mBAAmB,KAC9B,OAAO,CAAC,MAAM,CAShB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getStatus = exports.statusSchema = exports.terminalStatusSchema = exports.StatusCode = void 0;
|
|
3
|
+
exports.getStatus = exports.statusSchema = exports.terminalStatusSchemaWithId = exports.terminalStatusSchema = exports.StatusCode = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const index_js_1 = require("../../../types/index.js");
|
|
6
6
|
var StatusCode;
|
|
@@ -46,6 +46,7 @@ const rejectedStatusSchema = baseStatusSchema.extend({
|
|
|
46
46
|
const revertedStatusSchema = baseStatusSchema.extend({
|
|
47
47
|
data: zod_1.z.string(),
|
|
48
48
|
message: zod_1.z.string().optional(),
|
|
49
|
+
receipt: receiptSchema,
|
|
49
50
|
status: zod_1.z.literal(StatusCode.Reverted)
|
|
50
51
|
});
|
|
51
52
|
exports.terminalStatusSchema = zod_1.z.discriminatedUnion('status', [
|
|
@@ -53,6 +54,11 @@ exports.terminalStatusSchema = zod_1.z.discriminatedUnion('status', [
|
|
|
53
54
|
rejectedStatusSchema,
|
|
54
55
|
revertedStatusSchema
|
|
55
56
|
]);
|
|
57
|
+
exports.terminalStatusSchemaWithId = zod_1.z.discriminatedUnion('status', [
|
|
58
|
+
includedStatusSchema.extend({ id: zod_1.z.string() }),
|
|
59
|
+
rejectedStatusSchema.extend({ id: zod_1.z.string() }),
|
|
60
|
+
revertedStatusSchema.extend({ id: zod_1.z.string() })
|
|
61
|
+
]);
|
|
56
62
|
exports.statusSchema = zod_1.z.discriminatedUnion('status', [
|
|
57
63
|
pendingStatusSchema,
|
|
58
64
|
submittedStatusSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStatus.js","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BAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC,CAAC;AAZW,QAAA,SAAS,aAYpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleTerminalStatus.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/actions/handleTerminalStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE1F,eAAO,MAAM,oBAAoB,GAAI,IAAI,MAAM,EAAE,QAAQ,cAAc,KAAG,kBAuBzE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleTerminalStatus = void 0;
|
|
4
|
+
const index_js_1 = require("../errors/index.js");
|
|
5
|
+
const getStatus_js_1 = require("./getStatus.js");
|
|
6
|
+
const handleTerminalStatus = (id, status) => {
|
|
7
|
+
if (status.status === getStatus_js_1.StatusCode.Included) {
|
|
8
|
+
return status.receipt;
|
|
9
|
+
}
|
|
10
|
+
if (status.status === getStatus_js_1.StatusCode.Reverted) {
|
|
11
|
+
throw new index_js_1.TransactionRevertedError({
|
|
12
|
+
chainId: status.chainId,
|
|
13
|
+
createdAt: status.createdAt,
|
|
14
|
+
errorData: status.data,
|
|
15
|
+
errorMessage: status.message,
|
|
16
|
+
id,
|
|
17
|
+
receipt: status.receipt
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
throw new index_js_1.TransactionRejectedError({
|
|
21
|
+
chainId: status.chainId,
|
|
22
|
+
createdAt: status.createdAt,
|
|
23
|
+
errorData: status.data,
|
|
24
|
+
errorMessage: status.message,
|
|
25
|
+
id
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
exports.handleTerminalStatus = handleTerminalStatus;
|
|
29
|
+
//# sourceMappingURL=handleTerminalStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleTerminalStatus.js","sourceRoot":"","sources":["../../../../relayer/evm/actions/handleTerminalStatus.ts"],"names":[],"mappings":";;;AAAA,iDAAwF;AACxF,iDAA0F;AAEnF,MAAM,oBAAoB,GAAG,CAAC,EAAU,EAAE,MAAsB,EAAsB,EAAE;IAC7F,IAAI,MAAM,CAAC,MAAM,KAAK,yBAAU,CAAC,QAAQ,EAAE,CAAC;QAC1C,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,yBAAU,CAAC,QAAQ,EAAE,CAAC;QAC1C,MAAM,IAAI,mCAAwB,CAAC;YACjC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,SAAS,EAAE,MAAM,CAAC,IAAI;YACtB,YAAY,EAAE,MAAM,CAAC,OAAO;YAC5B,EAAE;YACF,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,IAAI,mCAAwB,CAAC;QACjC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,SAAS,EAAE,MAAM,CAAC,IAAI;QACtB,YAAY,EAAE,MAAM,CAAC,OAAO;QAC5B,EAAE;KACH,CAAC,CAAC;AACL,CAAC,CAAC;AAvBW,QAAA,oBAAoB,wBAuB/B"}
|
|
@@ -6,5 +6,6 @@ export * from './getStatus.js';
|
|
|
6
6
|
export * from './sendTransaction.js';
|
|
7
7
|
export * from './sendTransactionSync.js';
|
|
8
8
|
export * from './waitForGelatoStatus.js';
|
|
9
|
+
export * from './waitForInclusion.js';
|
|
9
10
|
export * from './waitForStatus.js';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
|
@@ -22,5 +22,6 @@ __exportStar(require("./getStatus.js"), exports);
|
|
|
22
22
|
__exportStar(require("./sendTransaction.js"), exports);
|
|
23
23
|
__exportStar(require("./sendTransactionSync.js"), exports);
|
|
24
24
|
__exportStar(require("./waitForGelatoStatus.js"), exports);
|
|
25
|
+
__exportStar(require("./waitForInclusion.js"), exports);
|
|
25
26
|
__exportStar(require("./waitForStatus.js"), exports);
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../relayer/evm/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,uDAAqC;AACrC,iDAA+B;AAC/B,uDAAqC;AACrC,2DAAyC;AACzC,2DAAyC;AACzC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../relayer/evm/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,uDAAqC;AACrC,iDAA+B;AAC/B,uDAAqC;AACrC,2DAAyC;AACzC,2DAAyC;AACzC,wDAAsC;AACtC,qDAAmC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Transport } from 'viem';
|
|
2
|
-
import { type
|
|
2
|
+
import { type TransactionReceipt } from './getStatus.js';
|
|
3
3
|
import type { SendTransactionParameters } from './sendTransaction.js';
|
|
4
4
|
export type SendTransactionSyncParameters = SendTransactionParameters & {
|
|
5
5
|
timeout?: number;
|
|
6
6
|
};
|
|
7
|
-
export declare const sendTransactionSync: (client: ReturnType<Transport>, parameters: SendTransactionSyncParameters) => Promise<
|
|
7
|
+
export declare const sendTransactionSync: (client: ReturnType<Transport>, parameters: SendTransactionSyncParameters) => Promise<TransactionReceipt>;
|
|
8
8
|
//# sourceMappingURL=sendTransactionSync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendTransactionSync.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/actions/sendTransactionSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEtC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"sendTransactionSync.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/actions/sendTransactionSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEtC,OAAO,EAAE,KAAK,kBAAkB,EAA8B,MAAM,gBAAgB,CAAC;AAErF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,GAAG;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,UAAU,CAAC,SAAS,CAAC,EAC7B,YAAY,6BAA6B,KACxC,OAAO,CAAC,kBAAkB,CAmB5B,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sendTransactionSync = void 0;
|
|
4
4
|
const index_js_1 = require("../../../utils/index.js");
|
|
5
5
|
const getStatus_js_1 = require("./getStatus.js");
|
|
6
|
+
const handleTerminalStatus_js_1 = require("./handleTerminalStatus.js");
|
|
6
7
|
const sendTransactionSync = async (client, parameters) => {
|
|
7
8
|
const { chainId, data, to, payment, context, authorizationList, timeout } = parameters;
|
|
8
9
|
const result = await client.request({
|
|
@@ -17,7 +18,8 @@ const sendTransactionSync = async (client, parameters) => {
|
|
|
17
18
|
to
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
+
const output = getStatus_js_1.terminalStatusSchemaWithId.parse(result);
|
|
22
|
+
return (0, handleTerminalStatus_js_1.handleTerminalStatus)(output.id, output);
|
|
21
23
|
};
|
|
22
24
|
exports.sendTransactionSync = sendTransactionSync;
|
|
23
25
|
//# sourceMappingURL=sendTransactionSync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendTransactionSync.js","sourceRoot":"","sources":["../../../../relayer/evm/actions/sendTransactionSync.ts"],"names":[],"mappings":";;;AACA,sDAA8D;AAC9D,
|
|
1
|
+
{"version":3,"file":"sendTransactionSync.js","sourceRoot":"","sources":["../../../../relayer/evm/actions/sendTransactionSync.ts"],"names":[],"mappings":";;;AACA,sDAA8D;AAC9D,iDAAqF;AACrF,uEAAiE;AAO1D,MAAM,mBAAmB,GAAG,KAAK,EACtC,MAA6B,EAC7B,UAAyC,EACZ,EAAE;IAC/B,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;IAEvF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,MAAM,EAAE,6BAA6B;QACrC,MAAM,EAAE;YACN,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,8BAAmB,CAAC,CAAC,CAAC,CAAC,SAAS;YAC7F,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;YAC3B,OAAO;YACP,IAAI;YACJ,OAAO;YACP,OAAO;YACP,EAAE;SACH;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,yCAA0B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAExD,OAAO,IAAA,8CAAoB,EAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC,CAAC;AAtBW,QAAA,mBAAmB,uBAsB9B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Transport } from 'viem';
|
|
2
|
+
import type { GetStatusParameters, TransactionReceipt } from './getStatus.js';
|
|
3
|
+
export declare const waitForInclusion: (client: ReturnType<Transport>, parameters: GetStatusParameters) => Promise<TransactionReceipt>;
|
|
4
|
+
//# sourceMappingURL=waitForInclusion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitForInclusion.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/actions/waitForInclusion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAI9E,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,UAAU,CAAC,SAAS,CAAC,EAC7B,YAAY,mBAAmB,KAC9B,OAAO,CAAC,kBAAkB,CAI5B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.waitForInclusion = void 0;
|
|
4
|
+
const handleTerminalStatus_js_1 = require("./handleTerminalStatus.js");
|
|
5
|
+
const waitForStatus_js_1 = require("./waitForStatus.js");
|
|
6
|
+
const waitForInclusion = async (client, parameters) => {
|
|
7
|
+
const result = await (0, waitForStatus_js_1.waitForStatus)(client, parameters);
|
|
8
|
+
return (0, handleTerminalStatus_js_1.handleTerminalStatus)(parameters.id, result);
|
|
9
|
+
};
|
|
10
|
+
exports.waitForInclusion = waitForInclusion;
|
|
11
|
+
//# sourceMappingURL=waitForInclusion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitForInclusion.js","sourceRoot":"","sources":["../../../../relayer/evm/actions/waitForInclusion.ts"],"names":[],"mappings":";;;AAGA,uEAAiE;AACjE,yDAAmD;AAE5C,MAAM,gBAAgB,GAAG,KAAK,EACnC,MAA6B,EAC7B,UAA+B,EACF,EAAE;IAC/B,MAAM,MAAM,GAAG,MAAM,IAAA,gCAAa,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAEvD,OAAO,IAAA,8CAAoB,EAAC,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BaseError } from 'viem';
|
|
2
|
+
import type { TransactionReceipt } from '../actions/getStatus.js';
|
|
3
|
+
export declare class TransactionRejectedError extends BaseError {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly chainId: number;
|
|
6
|
+
readonly createdAt: number;
|
|
7
|
+
readonly errorData?: unknown;
|
|
8
|
+
readonly errorMessage?: string;
|
|
9
|
+
constructor({ id, chainId, createdAt, errorMessage, errorData }: {
|
|
10
|
+
id: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
createdAt: number;
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
errorData?: unknown;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Thrown when a transaction receipt is reverted.
|
|
19
|
+
*/
|
|
20
|
+
export declare class TransactionRevertedError extends BaseError {
|
|
21
|
+
readonly receipt: TransactionReceipt;
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly chainId: number;
|
|
24
|
+
readonly createdAt: number;
|
|
25
|
+
readonly errorData?: unknown;
|
|
26
|
+
readonly errorMessage?: string;
|
|
27
|
+
constructor({ id, chainId, createdAt, errorData, receipt, errorMessage }: {
|
|
28
|
+
id: string;
|
|
29
|
+
chainId: number;
|
|
30
|
+
createdAt: number;
|
|
31
|
+
errorData?: unknown;
|
|
32
|
+
receipt: TransactionReceipt;
|
|
33
|
+
errorMessage?: string;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../relayer/evm/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,qBAAa,wBAAyB,SAAQ,SAAS;IACrD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEnB,EACV,EAAE,EACF,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EACV,EAAE;QACD,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;CAkBF;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,SAAS;IACrD,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEnB,EACV,EAAE,EACF,OAAO,EACP,SAAS,EACT,SAAS,EACT,OAAO,EACP,YAAY,EACb,EAAE;QACD,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,OAAO,EAAE,kBAAkB,CAAC;QAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB;CAoBF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionRevertedError = exports.TransactionRejectedError = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
class TransactionRejectedError extends viem_1.BaseError {
|
|
6
|
+
id;
|
|
7
|
+
chainId;
|
|
8
|
+
createdAt;
|
|
9
|
+
errorData;
|
|
10
|
+
errorMessage;
|
|
11
|
+
constructor({ id, chainId, createdAt, errorMessage, errorData }) {
|
|
12
|
+
super(`Transaction with id "${id}" rejected with message: ${errorMessage}.`, {
|
|
13
|
+
metaMessages: [
|
|
14
|
+
'The transaction was rejected by the relayer. This could mean that the transaction was invalid, simulation failed, payment was insufficient or that the relayer did not approve it for some other reason.',
|
|
15
|
+
' ',
|
|
16
|
+
'You can attempt to retry or get the status of the transaction by:',
|
|
17
|
+
'- calling the `sendTransaction` or `sendTransactionSync` Action with the same parameters',
|
|
18
|
+
'- calling the `getStatus` Action with the `id`',
|
|
19
|
+
'- checking the `errorData` and `errorMessage` properties of the error object'
|
|
20
|
+
],
|
|
21
|
+
name: 'TransactionRejectedError'
|
|
22
|
+
});
|
|
23
|
+
this.id = id;
|
|
24
|
+
this.chainId = chainId;
|
|
25
|
+
this.createdAt = createdAt;
|
|
26
|
+
this.errorData = errorData;
|
|
27
|
+
this.errorMessage = errorMessage;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.TransactionRejectedError = TransactionRejectedError;
|
|
31
|
+
/**
|
|
32
|
+
* Thrown when a transaction receipt is reverted.
|
|
33
|
+
*/
|
|
34
|
+
class TransactionRevertedError extends viem_1.BaseError {
|
|
35
|
+
receipt;
|
|
36
|
+
id;
|
|
37
|
+
chainId;
|
|
38
|
+
createdAt;
|
|
39
|
+
errorData;
|
|
40
|
+
errorMessage;
|
|
41
|
+
constructor({ id, chainId, createdAt, errorData, receipt, errorMessage }) {
|
|
42
|
+
super(`Transaction with hash "${receipt.transactionHash}" reverted.`, {
|
|
43
|
+
metaMessages: [
|
|
44
|
+
'The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.',
|
|
45
|
+
' ',
|
|
46
|
+
'You can attempt to extract the revert reason by:',
|
|
47
|
+
'- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract',
|
|
48
|
+
'- using the `call` Action with raw `data`',
|
|
49
|
+
'- checking the `errorData` and `errorMessage` properties of the error object'
|
|
50
|
+
],
|
|
51
|
+
name: 'TransactionRevertedError'
|
|
52
|
+
});
|
|
53
|
+
this.receipt = receipt;
|
|
54
|
+
this.id = id;
|
|
55
|
+
this.chainId = chainId;
|
|
56
|
+
this.createdAt = createdAt;
|
|
57
|
+
this.errorData = errorData;
|
|
58
|
+
this.errorMessage = errorMessage;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.TransactionRevertedError = TransactionRevertedError;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../relayer/evm/errors/index.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AAGjC,MAAa,wBAAyB,SAAQ,gBAAS;IAC5C,EAAE,CAAS;IACX,OAAO,CAAS;IAChB,SAAS,CAAS;IAClB,SAAS,CAAW;IACpB,YAAY,CAAU;IAE/B,YAAY,EACV,EAAE,EACF,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EAOV;QACC,KAAK,CAAC,wBAAwB,EAAE,4BAA4B,YAAY,GAAG,EAAE;YAC3E,YAAY,EAAE;gBACZ,0MAA0M;gBAC1M,GAAG;gBACH,mEAAmE;gBACnE,0FAA0F;gBAC1F,gDAAgD;gBAChD,8EAA8E;aAC/E;YACD,IAAI,EAAE,0BAA0B;SACjC,CAAC,CAAC;QACH,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AArCD,4DAqCC;AAED;;GAEG;AACH,MAAa,wBAAyB,SAAQ,gBAAS;IAC5C,OAAO,CAAqB;IAC5B,EAAE,CAAS;IACX,OAAO,CAAS;IAChB,SAAS,CAAS;IAClB,SAAS,CAAW;IACpB,YAAY,CAAU;IAE/B,YAAY,EACV,EAAE,EACF,OAAO,EACP,SAAS,EACT,SAAS,EACT,OAAO,EACP,YAAY,EAQb;QACC,KAAK,CAAC,0BAA0B,OAAO,CAAC,eAAe,aAAa,EAAE;YACpE,YAAY,EAAE;gBACZ,4IAA4I;gBAC5I,GAAG;gBACH,kDAAkD;gBAClD,8GAA8G;gBAC9G,2CAA2C;gBAC3C,8EAA8E;aAC/E;YACD,IAAI,EAAE,0BAA0B;SACjC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AA1CD,4DA0CC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Hex } from 'viem';
|
|
2
|
-
import { type Capabilities, type FeeData, type FeeQuote, type GelatoStatus, type GelatoTerminalStatus, type GetFeeDataParameters, type GetFeeQuoteParameters, type GetGelatoStatusParameters, type GetStatusParameters, type SendTransactionParameters, type SendTransactionSyncParameters, type Status, type TerminalStatus } from './actions/index.js';
|
|
2
|
+
import { type Capabilities, type FeeData, type FeeQuote, type GelatoStatus, type GelatoTerminalStatus, type GetFeeDataParameters, type GetFeeQuoteParameters, type GetGelatoStatusParameters, type GetStatusParameters, type SendTransactionParameters, type SendTransactionSyncParameters, type Status, type TerminalStatus, type TransactionReceipt } from './actions/index.js';
|
|
3
3
|
export * from './actions/index.js';
|
|
4
4
|
export type GelatoEvmRelayerClient = {
|
|
5
5
|
getCapabilities: () => Promise<Capabilities>;
|
|
@@ -8,9 +8,10 @@ export type GelatoEvmRelayerClient = {
|
|
|
8
8
|
getGelatoStatus: (parameters: GetGelatoStatusParameters) => Promise<GelatoStatus>;
|
|
9
9
|
getStatus: (parameters: GetStatusParameters) => Promise<Status>;
|
|
10
10
|
waitForGelatoStatus: (parameters: GetGelatoStatusParameters) => Promise<GelatoTerminalStatus>;
|
|
11
|
+
waitForInclusion: (parameters: GetStatusParameters) => Promise<TransactionReceipt>;
|
|
11
12
|
waitForStatus: (parameters: GetStatusParameters) => Promise<TerminalStatus>;
|
|
12
13
|
sendTransaction: (parameters: SendTransactionParameters) => Promise<Hex>;
|
|
13
|
-
sendTransactionSync: (parameters: SendTransactionSyncParameters) => Promise<
|
|
14
|
+
sendTransactionSync: (parameters: SendTransactionSyncParameters) => Promise<TransactionReceipt>;
|
|
14
15
|
};
|
|
15
16
|
export type GelatoEvmRelayerClientConfig = {
|
|
16
17
|
apiKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../relayer/evm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAkC,MAAM,MAAM,CAAC;AAEhE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAMxB,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,MAAM,EAGX,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../relayer/evm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAkC,MAAM,MAAM,CAAC;AAEhE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAMxB,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,MAAM,EAGX,KAAK,cAAc,EACnB,KAAK,kBAAkB,EAIxB,MAAM,oBAAoB,CAAC;AAE5B,cAAc,oBAAoB,CAAC;AAEnC,MAAM,MAAM,sBAAsB,GAAG;IACnC,eAAe,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7C,UAAU,EAAE,CAAC,UAAU,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,WAAW,EAAE,CAAC,UAAU,EAAE,qBAAqB,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACtE,eAAe,EAAE,CAAC,UAAU,EAAE,yBAAyB,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAClF,SAAS,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChE,mBAAmB,EAAE,CAAC,UAAU,EAAE,yBAAyB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9F,gBAAgB,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACnF,aAAa,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5E,eAAe,EAAE,CAAC,UAAU,EAAE,yBAAyB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACzE,mBAAmB,EAAE,CAAC,UAAU,EAAE,6BAA6B,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACjG,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAGF,eAAO,MAAM,4BAA4B,GACvC,YAAY,4BAA4B,KACvC,sBA4BF,CAAC"}
|
|
@@ -41,6 +41,7 @@ const createGelatoEvmRelayerClient = (parameters) => {
|
|
|
41
41
|
sendTransaction: (parameters) => (0, index_js_2.sendTransaction)(client, parameters),
|
|
42
42
|
sendTransactionSync: (parameters) => (0, index_js_2.sendTransactionSync)(client, parameters),
|
|
43
43
|
waitForGelatoStatus: (parameters) => (0, index_js_2.waitForGelatoStatus)(client, parameters),
|
|
44
|
+
waitForInclusion: (parameters) => (0, index_js_2.waitForInclusion)(client, parameters),
|
|
44
45
|
waitForStatus: (parameters) => (0, index_js_2.waitForStatus)(client, parameters)
|
|
45
46
|
};
|
|
46
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../relayer/evm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+BAAgE;AAChE,uDAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../relayer/evm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+BAAgE;AAChE,uDAA+E;AAC/E,iDAyB4B;AAE5B,qDAAmC;AAoBnC,wEAAwE;AACjE,MAAM,4BAA4B,GAAG,CAC1C,UAAwC,EAChB,EAAE;IAC1B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;IAEvC,MAAM,MAAM,GAAwB;QAClC,YAAY,EAAE;YACZ,OAAO,EAAE;gBACP,WAAW,EAAE,MAAM;aACpB;SACF;KACF,CAAC;IAEF,iDAAiD;IACjD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,6BAAkB,CAAC,CAAC,CAAC,0BAAe,CAAC;IAE5D,MAAM,MAAM,GAAG,IAAA,WAAI,EAAC,GAAG,IAAI,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IAE/C,OAAO;QACL,eAAe,EAAE,GAAG,EAAE,CAAC,IAAA,0BAAe,EAAC,MAAM,CAAC;QAC9C,UAAU,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,EAAE,UAAU,CAAC;QAC1D,WAAW,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,IAAA,sBAAW,EAAC,MAAM,EAAE,UAAU,CAAC;QAC5D,eAAe,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,IAAA,0BAAe,EAAC,MAAM,EAAE,UAAU,CAAC;QACpE,SAAS,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,IAAA,oBAAS,EAAC,MAAM,EAAE,UAAU,CAAC;QACxD,eAAe,EAAE,CAAC,UAAU,EA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