@0xkey-io/gas-station 0.1.0

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.
Files changed (51) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +655 -0
  3. package/dist/abi/gas-station.d.ts +500 -0
  4. package/dist/abi/gas-station.d.ts.map +1 -0
  5. package/dist/abi/gas-station.js +252 -0
  6. package/dist/abi/gas-station.js.map +1 -0
  7. package/dist/abi/gas-station.mjs +250 -0
  8. package/dist/abi/gas-station.mjs.map +1 -0
  9. package/dist/abi/reimbursable-gas-station.d.ts +756 -0
  10. package/dist/abi/reimbursable-gas-station.d.ts.map +1 -0
  11. package/dist/abi/reimbursable-gas-station.js +625 -0
  12. package/dist/abi/reimbursable-gas-station.js.map +1 -0
  13. package/dist/abi/reimbursable-gas-station.mjs +623 -0
  14. package/dist/abi/reimbursable-gas-station.mjs.map +1 -0
  15. package/dist/config.d.ts +57 -0
  16. package/dist/config.d.ts.map +1 -0
  17. package/dist/config.js +59 -0
  18. package/dist/config.js.map +1 -0
  19. package/dist/config.mjs +52 -0
  20. package/dist/config.mjs.map +1 -0
  21. package/dist/gasStationClient.d.ts +110 -0
  22. package/dist/gasStationClient.d.ts.map +1 -0
  23. package/dist/gasStationClient.js +415 -0
  24. package/dist/gasStationClient.js.map +1 -0
  25. package/dist/gasStationClient.mjs +413 -0
  26. package/dist/gasStationClient.mjs.map +1 -0
  27. package/dist/gasStationUtils.d.ts +7250 -0
  28. package/dist/gasStationUtils.d.ts.map +1 -0
  29. package/dist/gasStationUtils.js +147 -0
  30. package/dist/gasStationUtils.js.map +1 -0
  31. package/dist/gasStationUtils.mjs +137 -0
  32. package/dist/gasStationUtils.mjs.map +1 -0
  33. package/dist/index.d.ts +10 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +36 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/index.mjs +8 -0
  38. package/dist/index.mjs.map +1 -0
  39. package/dist/intentBuilder.d.ts +75 -0
  40. package/dist/intentBuilder.d.ts.map +1 -0
  41. package/dist/intentBuilder.js +259 -0
  42. package/dist/intentBuilder.js.map +1 -0
  43. package/dist/intentBuilder.mjs +257 -0
  44. package/dist/intentBuilder.mjs.map +1 -0
  45. package/dist/policyUtils.d.ts +271 -0
  46. package/dist/policyUtils.d.ts.map +1 -0
  47. package/dist/policyUtils.js +386 -0
  48. package/dist/policyUtils.js.map +1 -0
  49. package/dist/policyUtils.mjs +380 -0
  50. package/dist/policyUtils.mjs.map +1 -0
  51. package/package.json +61 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gasStationUtils.d.ts","sourceRoot":"","sources":["../src/gasStationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAGd,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAExD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA8EvE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,CAEjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,IAAI,GACL,EAAE;IACD,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC;CACX,GAAG,GAAG,CAON;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,KAAK,EACL,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,GAAG,CAMN"}
@@ -0,0 +1,147 @@
1
+ 'use strict';
2
+
3
+ var viem = require('viem');
4
+
5
+ function createPublicClientForChain(chain, rpcUrl) {
6
+ return viem.createPublicClient({
7
+ chain,
8
+ transport: viem.http(rpcUrl),
9
+ });
10
+ }
11
+ // ERC20 ABI for token transfers
12
+ const ERC20_ABI = [
13
+ {
14
+ type: "function",
15
+ name: "transfer",
16
+ stateMutability: "nonpayable",
17
+ inputs: [
18
+ { name: "to", type: "address" },
19
+ { name: "amount", type: "uint256" },
20
+ ],
21
+ outputs: [{ name: "success", type: "bool" }],
22
+ },
23
+ {
24
+ type: "function",
25
+ name: "balanceOf",
26
+ stateMutability: "view",
27
+ inputs: [{ name: "account", type: "address" }],
28
+ outputs: [{ name: "balance", type: "uint256" }],
29
+ },
30
+ {
31
+ type: "function",
32
+ name: "approve",
33
+ stateMutability: "nonpayable",
34
+ inputs: [
35
+ { name: "spender", type: "address" },
36
+ { name: "amount", type: "uint256" },
37
+ ],
38
+ outputs: [{ name: "success", type: "bool" }],
39
+ },
40
+ ];
41
+ /**
42
+ * Build parameters for an ERC20 token transfer
43
+ */
44
+ function buildTokenTransfer(token, to, amount) {
45
+ return {
46
+ outputContract: token,
47
+ callData: viem.encodeFunctionData({
48
+ abi: ERC20_ABI,
49
+ functionName: "transfer",
50
+ args: [to, amount],
51
+ }),
52
+ value: 0n,
53
+ };
54
+ }
55
+ /**
56
+ * Build parameters for a native ETH transfer
57
+ */
58
+ function buildETHTransfer(to, amount) {
59
+ return {
60
+ outputContract: to,
61
+ callData: "0x",
62
+ value: amount,
63
+ };
64
+ }
65
+ /**
66
+ * Build parameters for an ERC20 token approval
67
+ */
68
+ function buildTokenApproval(token, spender, amount) {
69
+ return {
70
+ outputContract: token,
71
+ callData: viem.encodeFunctionData({
72
+ abi: ERC20_ABI,
73
+ functionName: "approve",
74
+ args: [spender, amount],
75
+ }),
76
+ value: 0n,
77
+ };
78
+ }
79
+ /**
80
+ * Build parameters for a generic contract call
81
+ */
82
+ function buildContractCall(params) {
83
+ return {
84
+ outputContract: params.contract,
85
+ callData: viem.encodeFunctionData({
86
+ abi: params.abi,
87
+ functionName: params.functionName,
88
+ args: params.args,
89
+ }),
90
+ value: params.value ?? 0n,
91
+ };
92
+ }
93
+ /**
94
+ * Convenience: Build ETH transfer with ether string parsing
95
+ */
96
+ function buildETHTransferFromEther(to, etherAmount) {
97
+ return buildETHTransfer(to, viem.parseEther(etherAmount));
98
+ }
99
+ /**
100
+ * Packs execution data for the gas station delegate contract.
101
+ * Packs signature, nonce, deadline, and calldata args.
102
+ * The output contract address and ETH amount are explicit parameters
103
+ * in the execute() function signature, not part of the packed bytes.
104
+ *
105
+ * Packed data format:
106
+ * Layout: [signature(65)][nonce(16)][deadline(4)][arguments(variable)]
107
+ * - signature: bytes 0-64 (65 bytes)
108
+ * - nonce: bytes 65-80 (16 bytes, uint128)
109
+ * - deadline: bytes 81-84 (4 bytes, uint32)
110
+ * - arguments: bytes 85 onwards (variable length)
111
+ */
112
+ function packExecutionData({ signature, nonce, deadline, args, }) {
113
+ return viem.concat([
114
+ signature, // 65 bytes
115
+ viem.pad(viem.toHex(nonce), { size: 16 }), // 16 bytes (uint128)
116
+ viem.pad(viem.toHex(deadline), { size: 4 }), // 4 bytes (uint32)
117
+ args, // variable length
118
+ ]);
119
+ }
120
+ /**
121
+ * Packs session signature data for the reimbursable gas station.
122
+ * Used to authorize USDC transfers for gas payment.
123
+ *
124
+ * Packed data format:
125
+ * Layout: [signature(65)][nonce(16)][deadline(4)]
126
+ * - signature: bytes 0-64 (65 bytes)
127
+ * - nonce: bytes 65-80 (16 bytes, uint128)
128
+ * - deadline: bytes 81-84 (4 bytes, uint32)
129
+ */
130
+ function packSessionSignature({ signature, nonce, deadline, }) {
131
+ return viem.concat([
132
+ signature, // 65 bytes
133
+ viem.pad(viem.toHex(nonce), { size: 16 }), // 16 bytes (uint128)
134
+ viem.pad(viem.toHex(deadline), { size: 4 }), // 4 bytes (uint32)
135
+ ]);
136
+ }
137
+
138
+ exports.ERC20_ABI = ERC20_ABI;
139
+ exports.buildContractCall = buildContractCall;
140
+ exports.buildETHTransfer = buildETHTransfer;
141
+ exports.buildETHTransferFromEther = buildETHTransferFromEther;
142
+ exports.buildTokenApproval = buildTokenApproval;
143
+ exports.buildTokenTransfer = buildTokenTransfer;
144
+ exports.createPublicClientForChain = createPublicClientForChain;
145
+ exports.packExecutionData = packExecutionData;
146
+ exports.packSessionSignature = packSessionSignature;
147
+ //# sourceMappingURL=gasStationUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gasStationUtils.js","sources":["../src/gasStationUtils.ts"],"sourcesContent":[null],"names":["createPublicClient","http","encodeFunctionData","parseEther","concat","pad","toHex"],"mappings":";;;;AAkBM,SAAU,0BAA0B,CAAC,KAAY,EAAE,MAAc,EAAA;AACrE,IAAA,OAAOA,uBAAkB,CAAC;QACxB,KAAK;AACL,QAAA,SAAS,EAAEC,SAAI,CAAC,MAAM,CAAC;AACxB,KAAA,CAAC;AACJ;AAEA;AACO,MAAM,SAAS,GAAG;AACvB,IAAA;AACE,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,eAAe,EAAE,YAAY;AAC7B,QAAA,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I,EAAE,CAAC,EAAE,CAAC;AACjC,QAAA,IAAI;AACL,KAAA,CAAC;AACJ;AAEA;;;;;;;;;AASG;AACG,SAAU,oBAAoB,CAAC,EACnC,SAAS,EACT,KAAK,EACL,QAAQ,GAKT,EAAA;AACC,IAAA,OAAOF,WAAM,CAAC;AACZ,QAAA,SAAS;AACT,QAAAC,QAAG,CAACC,UAAK,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AAC/B,QAAAD,QAAG,CAACC,UAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAClC,KAAA,CAAC;AACJ;;;;;;;;;;;;"}
@@ -0,0 +1,137 @@
1
+ import { encodeFunctionData, parseEther, concat, pad, toHex, createPublicClient, http } from 'viem';
2
+
3
+ function createPublicClientForChain(chain, rpcUrl) {
4
+ return createPublicClient({
5
+ chain,
6
+ transport: http(rpcUrl),
7
+ });
8
+ }
9
+ // ERC20 ABI for token transfers
10
+ const ERC20_ABI = [
11
+ {
12
+ type: "function",
13
+ name: "transfer",
14
+ stateMutability: "nonpayable",
15
+ inputs: [
16
+ { name: "to", type: "address" },
17
+ { name: "amount", type: "uint256" },
18
+ ],
19
+ outputs: [{ name: "success", type: "bool" }],
20
+ },
21
+ {
22
+ type: "function",
23
+ name: "balanceOf",
24
+ stateMutability: "view",
25
+ inputs: [{ name: "account", type: "address" }],
26
+ outputs: [{ name: "balance", type: "uint256" }],
27
+ },
28
+ {
29
+ type: "function",
30
+ name: "approve",
31
+ stateMutability: "nonpayable",
32
+ inputs: [
33
+ { name: "spender", type: "address" },
34
+ { name: "amount", type: "uint256" },
35
+ ],
36
+ outputs: [{ name: "success", type: "bool" }],
37
+ },
38
+ ];
39
+ /**
40
+ * Build parameters for an ERC20 token transfer
41
+ */
42
+ function buildTokenTransfer(token, to, amount) {
43
+ return {
44
+ outputContract: token,
45
+ callData: encodeFunctionData({
46
+ abi: ERC20_ABI,
47
+ functionName: "transfer",
48
+ args: [to, amount],
49
+ }),
50
+ value: 0n,
51
+ };
52
+ }
53
+ /**
54
+ * Build parameters for a native ETH transfer
55
+ */
56
+ function buildETHTransfer(to, amount) {
57
+ return {
58
+ outputContract: to,
59
+ callData: "0x",
60
+ value: amount,
61
+ };
62
+ }
63
+ /**
64
+ * Build parameters for an ERC20 token approval
65
+ */
66
+ function buildTokenApproval(token, spender, amount) {
67
+ return {
68
+ outputContract: token,
69
+ callData: encodeFunctionData({
70
+ abi: ERC20_ABI,
71
+ functionName: "approve",
72
+ args: [spender, amount],
73
+ }),
74
+ value: 0n,
75
+ };
76
+ }
77
+ /**
78
+ * Build parameters for a generic contract call
79
+ */
80
+ function buildContractCall(params) {
81
+ return {
82
+ outputContract: params.contract,
83
+ callData: encodeFunctionData({
84
+ abi: params.abi,
85
+ functionName: params.functionName,
86
+ args: params.args,
87
+ }),
88
+ value: params.value ?? 0n,
89
+ };
90
+ }
91
+ /**
92
+ * Convenience: Build ETH transfer with ether string parsing
93
+ */
94
+ function buildETHTransferFromEther(to, etherAmount) {
95
+ return buildETHTransfer(to, parseEther(etherAmount));
96
+ }
97
+ /**
98
+ * Packs execution data for the gas station delegate contract.
99
+ * Packs signature, nonce, deadline, and calldata args.
100
+ * The output contract address and ETH amount are explicit parameters
101
+ * in the execute() function signature, not part of the packed bytes.
102
+ *
103
+ * Packed data format:
104
+ * Layout: [signature(65)][nonce(16)][deadline(4)][arguments(variable)]
105
+ * - signature: bytes 0-64 (65 bytes)
106
+ * - nonce: bytes 65-80 (16 bytes, uint128)
107
+ * - deadline: bytes 81-84 (4 bytes, uint32)
108
+ * - arguments: bytes 85 onwards (variable length)
109
+ */
110
+ function packExecutionData({ signature, nonce, deadline, args, }) {
111
+ return concat([
112
+ signature, // 65 bytes
113
+ pad(toHex(nonce), { size: 16 }), // 16 bytes (uint128)
114
+ pad(toHex(deadline), { size: 4 }), // 4 bytes (uint32)
115
+ args, // variable length
116
+ ]);
117
+ }
118
+ /**
119
+ * Packs session signature data for the reimbursable gas station.
120
+ * Used to authorize USDC transfers for gas payment.
121
+ *
122
+ * Packed data format:
123
+ * Layout: [signature(65)][nonce(16)][deadline(4)]
124
+ * - signature: bytes 0-64 (65 bytes)
125
+ * - nonce: bytes 65-80 (16 bytes, uint128)
126
+ * - deadline: bytes 81-84 (4 bytes, uint32)
127
+ */
128
+ function packSessionSignature({ signature, nonce, deadline, }) {
129
+ return concat([
130
+ signature, // 65 bytes
131
+ pad(toHex(nonce), { size: 16 }), // 16 bytes (uint128)
132
+ pad(toHex(deadline), { size: 4 }), // 4 bytes (uint32)
133
+ ]);
134
+ }
135
+
136
+ export { ERC20_ABI, buildContractCall, buildETHTransfer, buildETHTransferFromEther, buildTokenApproval, buildTokenTransfer, createPublicClientForChain, packExecutionData, packSessionSignature };
137
+ //# sourceMappingURL=gasStationUtils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gasStationUtils.mjs","sources":["../src/gasStationUtils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAkBM,SAAU,0BAA0B,CAAC,KAAY,EAAE,MAAc,EAAA;AACrE,IAAA,OAAO,kBAAkB,CAAC;QACxB,KAAK;AACL,QAAA,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;AACxB,KAAA,CAAC;AACJ;AAEA;AACO,MAAM,SAAS,GAAG;AACvB,IAAA;AACE,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,eAAe,EAAE,YAAY;AAC7B,QAAA,MAAM,EAAE;AACN,YAAA,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;AAC/B,YAAA,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;AACpC,SAAA;QACD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC7C,KAAA;AACD,IAAA;AACE,QAAA,IAAI,E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AAC;AAC/B,QAAA,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAClC,KAAA,CAAC;AACJ;;;;"}
@@ -0,0 +1,10 @@
1
+ export { GasStationClient } from "./gasStationClient";
2
+ export { IntentBuilder } from "./intentBuilder";
3
+ export { buildTokenTransfer, buildETHTransfer, buildTokenApproval, buildETHTransferFromEther, buildContractCall, packExecutionData, packSessionSignature, ERC20_ABI, } from "./gasStationUtils";
4
+ export type { ExecutionParams } from "./gasStationUtils";
5
+ export { CHAIN_PRESETS, getPreset, createCustomPreset, DEFAULT_EXECUTION_CONTRACT, DEFAULT_DELEGATE_CONTRACT, DEFAULT_REIMBURSABLE_USDC_CONTRACT, } from "./config";
6
+ export { buildIntentSigningPolicy, buildPaymasterExecutionPolicy, ensureGasStationInterface, uploadGasStationInterface, getSmartContractInterface, } from "./policyUtils";
7
+ export type { GasStationConfig, ChainPreset, ContractCallParams, ExecutionIntent, ApprovalExecutionIntent, ReimbursableExecutionIntent, } from "./config";
8
+ export { gasStationAbi } from "./abi/gas-station";
9
+ export { reimbursableGasStationAbi } from "./abi/reimbursable-gas-station";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,GACV,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EACL,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ var gasStationClient = require('./gasStationClient.js');
4
+ var intentBuilder = require('./intentBuilder.js');
5
+ var gasStationUtils = require('./gasStationUtils.js');
6
+ var config = require('./config.js');
7
+ var policyUtils = require('./policyUtils.js');
8
+ var gasStation = require('./abi/gas-station.js');
9
+ var reimbursableGasStation = require('./abi/reimbursable-gas-station.js');
10
+
11
+
12
+
13
+ exports.GasStationClient = gasStationClient.GasStationClient;
14
+ exports.IntentBuilder = intentBuilder.IntentBuilder;
15
+ exports.ERC20_ABI = gasStationUtils.ERC20_ABI;
16
+ exports.buildContractCall = gasStationUtils.buildContractCall;
17
+ exports.buildETHTransfer = gasStationUtils.buildETHTransfer;
18
+ exports.buildETHTransferFromEther = gasStationUtils.buildETHTransferFromEther;
19
+ exports.buildTokenApproval = gasStationUtils.buildTokenApproval;
20
+ exports.buildTokenTransfer = gasStationUtils.buildTokenTransfer;
21
+ exports.packExecutionData = gasStationUtils.packExecutionData;
22
+ exports.packSessionSignature = gasStationUtils.packSessionSignature;
23
+ exports.CHAIN_PRESETS = config.CHAIN_PRESETS;
24
+ exports.DEFAULT_DELEGATE_CONTRACT = config.DEFAULT_DELEGATE_CONTRACT;
25
+ exports.DEFAULT_EXECUTION_CONTRACT = config.DEFAULT_EXECUTION_CONTRACT;
26
+ exports.DEFAULT_REIMBURSABLE_USDC_CONTRACT = config.DEFAULT_REIMBURSABLE_USDC_CONTRACT;
27
+ exports.createCustomPreset = config.createCustomPreset;
28
+ exports.getPreset = config.getPreset;
29
+ exports.buildIntentSigningPolicy = policyUtils.buildIntentSigningPolicy;
30
+ exports.buildPaymasterExecutionPolicy = policyUtils.buildPaymasterExecutionPolicy;
31
+ exports.ensureGasStationInterface = policyUtils.ensureGasStationInterface;
32
+ exports.getSmartContractInterface = policyUtils.getSmartContractInterface;
33
+ exports.uploadGasStationInterface = policyUtils.uploadGasStationInterface;
34
+ exports.gasStationAbi = gasStation.gasStationAbi;
35
+ exports.reimbursableGasStationAbi = reimbursableGasStation.reimbursableGasStationAbi;
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.mjs ADDED
@@ -0,0 +1,8 @@
1
+ export { GasStationClient } from './gasStationClient.mjs';
2
+ export { IntentBuilder } from './intentBuilder.mjs';
3
+ export { ERC20_ABI, buildContractCall, buildETHTransfer, buildETHTransferFromEther, buildTokenApproval, buildTokenTransfer, packExecutionData, packSessionSignature } from './gasStationUtils.mjs';
4
+ export { CHAIN_PRESETS, DEFAULT_DELEGATE_CONTRACT, DEFAULT_EXECUTION_CONTRACT, DEFAULT_REIMBURSABLE_USDC_CONTRACT, createCustomPreset, getPreset } from './config.mjs';
5
+ export { buildIntentSigningPolicy, buildPaymasterExecutionPolicy, ensureGasStationInterface, getSmartContractInterface, uploadGasStationInterface } from './policyUtils.mjs';
6
+ export { gasStationAbi } from './abi/gas-station.mjs';
7
+ export { reimbursableGasStationAbi } from './abi/reimbursable-gas-station.mjs';
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,75 @@
1
+ import { type WalletClient, type Account, type Chain, type Transport, type Hex } from "viem";
2
+ import type { ContractCallParams, ExecutionIntent, ApprovalExecutionIntent } from "./config";
3
+ interface IntentBuilderConfig {
4
+ eoaWalletClient: WalletClient<Transport, Chain, Account>;
5
+ chainId: number;
6
+ eoaAddress: Hex;
7
+ }
8
+ export declare class IntentBuilder {
9
+ private config;
10
+ private outputContract?;
11
+ private callData;
12
+ private ethAmount;
13
+ private nonce?;
14
+ private deadline?;
15
+ constructor(config: IntentBuilderConfig);
16
+ /**
17
+ * Set the target contract for this intent execution
18
+ */
19
+ setTarget(contract: Hex): this;
20
+ /**
21
+ * Set the ETH value to send with this intent
22
+ */
23
+ withValue(value: bigint): this;
24
+ /**
25
+ * Set a specific nonce (otherwise will be auto-fetched)
26
+ */
27
+ withNonce(nonce: bigint): this;
28
+ /**
29
+ * Set an expiration deadline (unix timestamp in seconds)
30
+ * If not set, defaults to 1 hour from now
31
+ */
32
+ withDeadline(deadline: number): this;
33
+ /**
34
+ * Set the call data directly (for pre-encoded function calls)
35
+ */
36
+ withCallData(callData: Hex): this;
37
+ /**
38
+ * Add a contract call to this intent
39
+ */
40
+ callContract(params: ContractCallParams): this;
41
+ /**
42
+ * Convenience method for ERC20 transfers
43
+ */
44
+ transferToken(token: Hex, to: Hex, amount: bigint): this;
45
+ /**
46
+ * Convenience method for ERC20 approvals
47
+ */
48
+ approveToken(token: Hex, spender: Hex, amount: bigint): this;
49
+ /**
50
+ * Convenience method for native ETH transfers
51
+ */
52
+ transferETH(to: Hex, amount: bigint): this;
53
+ /**
54
+ * Signs the execution intent using EIP-712
55
+ * Returns a complete ExecutionIntent ready for execution
56
+ */
57
+ sign(currentNonce: bigint): Promise<ExecutionIntent>;
58
+ /**
59
+ * Signs an approval then execution intent using EIP-712
60
+ * This allows atomic approval of an ERC20 token followed by execution
61
+ * Returns a complete ApprovalExecutionIntent ready for execution
62
+ */
63
+ signApprovalExecution(currentNonce: bigint, erc20Address: Hex, spender: Hex, approveAmount: bigint): Promise<ApprovalExecutionIntent>;
64
+ /**
65
+ * Signs a session signature for USDC transfer authorization in the reimbursable gas station.
66
+ * This authorizes the reimbursable contract to interact with the USDC contract on behalf of the EOA.
67
+ * The session signature does NOT commit to a specific amount - amounts are specified at execution time.
68
+ * This allows the same session signature to be cached and reused for multiple transactions.
69
+ * Returns an 85-byte packed signature that can be passed to executeWithReimbursement().
70
+ */
71
+ signSessionForUSDCTransfer(currentNonce: bigint, usdcAddress: Hex, reimbursableContract: Hex, sessionDeadline?: number): Promise<Hex>;
72
+ static create(config: IntentBuilderConfig): IntentBuilder;
73
+ }
74
+ export {};
75
+ //# sourceMappingURL=intentBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intentBuilder.d.ts","sourceRoot":"","sources":["../src/intentBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,GAAG,EACT,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAGlB,UAAU,mBAAmB;IAC3B,eAAe,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,GAAG,CAAC;CACjB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,cAAc,CAAC,CAAM;IAC7B,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAC,CAAS;gBAEd,MAAM,EAAE,mBAAmB;IAIvC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAK9B;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,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