@rhinestone/sdk 0.3.0 → 0.4.1

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 (103) hide show
  1. package/dist/{accounts → src/accounts}/index.d.ts +67 -67
  2. package/dist/{accounts → src/accounts}/index.d.ts.map +1 -1
  3. package/dist/{accounts → src/accounts}/index.js +44 -40
  4. package/dist/{accounts → src/accounts}/nexus.d.ts +93 -93
  5. package/dist/{accounts → src/accounts}/nexus.d.ts.map +1 -1
  6. package/dist/{accounts → src/accounts}/nexus.js +7 -7
  7. package/dist/src/accounts/safe.d.ts +15524 -0
  8. package/dist/src/accounts/safe.d.ts.map +1 -0
  9. package/dist/{accounts → src/accounts}/safe.js +84 -9
  10. package/dist/{accounts → src/accounts}/utils.d.ts +1 -1
  11. package/dist/src/accounts/utils.d.ts.map +1 -0
  12. package/dist/{execution → src/execution}/index.d.ts +1 -1
  13. package/dist/src/execution/index.d.ts.map +1 -0
  14. package/dist/{execution → src/execution}/index.js +7 -8
  15. package/dist/{execution → src/execution}/smart-session.d.ts +2 -3
  16. package/dist/src/execution/smart-session.d.ts.map +1 -0
  17. package/dist/{execution → src/execution}/smart-session.js +4 -6
  18. package/dist/{index.d.ts → src/index.d.ts} +10 -3
  19. package/dist/src/index.d.ts.map +1 -0
  20. package/dist/{index.js → src/index.js} +21 -1
  21. package/dist/src/modules/abi/smart-sessions.d.ts.map +1 -0
  22. package/dist/src/modules/common.d.ts.map +1 -0
  23. package/dist/{modules → src/modules}/index.d.ts +1 -1
  24. package/dist/src/modules/index.d.ts.map +1 -0
  25. package/dist/{modules → src/modules}/index.js +16 -2
  26. package/dist/src/modules/omni-account.d.ts.map +1 -0
  27. package/dist/src/modules/validators/core.d.ts +23 -0
  28. package/dist/src/modules/validators/core.d.ts.map +1 -0
  29. package/dist/src/modules/validators/core.js +112 -0
  30. package/dist/src/modules/validators/index.d.ts +4 -0
  31. package/dist/src/modules/validators/index.d.ts.map +1 -0
  32. package/dist/src/modules/validators/index.js +3 -0
  33. package/dist/{modules/validators.d.ts → src/modules/validators/smart-sessions.d.ts} +4 -6
  34. package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -0
  35. package/dist/{modules/validators.js → src/modules/validators/smart-sessions.js} +11 -116
  36. package/dist/{orchestrator → src/orchestrator}/client.d.ts +2 -1
  37. package/dist/src/orchestrator/client.d.ts.map +1 -0
  38. package/dist/{orchestrator → src/orchestrator}/client.js +19 -2
  39. package/dist/src/orchestrator/consts.d.ts.map +1 -0
  40. package/dist/src/orchestrator/error.d.ts.map +1 -0
  41. package/dist/src/orchestrator/index.d.ts +11 -0
  42. package/dist/src/orchestrator/index.d.ts.map +1 -0
  43. package/dist/src/orchestrator/index.js +10 -0
  44. package/dist/src/orchestrator/registry.d.ts.map +1 -0
  45. package/dist/{orchestrator → src/orchestrator}/registry.js +1 -1
  46. package/dist/{orchestrator → src/orchestrator}/types.d.ts +50 -2
  47. package/dist/src/orchestrator/types.d.ts.map +1 -0
  48. package/dist/{orchestrator → src/orchestrator}/utils.d.ts +6 -2
  49. package/dist/src/orchestrator/utils.d.ts.map +1 -0
  50. package/dist/{orchestrator → src/orchestrator}/utils.js +76 -2
  51. package/dist/{types.d.ts → src/types.d.ts} +7 -6
  52. package/dist/src/types.d.ts.map +1 -0
  53. package/dist/test/modules/validators/smart-sessions.test.d.ts +2 -0
  54. package/dist/test/modules/validators/smart-sessions.test.d.ts.map +1 -0
  55. package/dist/test/modules/validators/smart-sessions.test.js +20 -0
  56. package/package.json +2 -2
  57. package/dist/accounts/safe.d.ts +0 -15
  58. package/dist/accounts/safe.d.ts.map +0 -1
  59. package/dist/accounts/utils.d.ts.map +0 -1
  60. package/dist/examples/abi/weth.d.ts +0 -214
  61. package/dist/examples/abi/weth.d.ts.map +0 -1
  62. package/dist/examples/abi/weth.js +0 -279
  63. package/dist/examples/cross-chain-ss.d.ts +0 -1
  64. package/dist/examples/cross-chain-ss.d.ts.map +0 -1
  65. package/dist/examples/cross-chain-ss.js +0 -171
  66. package/dist/examples/omni-account.d.ts +0 -1
  67. package/dist/examples/omni-account.d.ts.map +0 -1
  68. package/dist/examples/omni-account.js +0 -169
  69. package/dist/examples/smart-sessions.d.ts +0 -1
  70. package/dist/examples/smart-sessions.d.ts.map +0 -1
  71. package/dist/examples/smart-sessions.js +0 -216
  72. package/dist/execution/index.d.ts.map +0 -1
  73. package/dist/execution/smart-session.d.ts.map +0 -1
  74. package/dist/index.d.ts.map +0 -1
  75. package/dist/modules/abi/smart-sessions.d.ts.map +0 -1
  76. package/dist/modules/common.d.ts.map +0 -1
  77. package/dist/modules/index.d.ts.map +0 -1
  78. package/dist/modules/omni-account.d.ts.map +0 -1
  79. package/dist/modules/validators.d.ts.map +0 -1
  80. package/dist/orchestrator/client.d.ts.map +0 -1
  81. package/dist/orchestrator/consts.d.ts.map +0 -1
  82. package/dist/orchestrator/error.d.ts.map +0 -1
  83. package/dist/orchestrator/index.d.ts +0 -9
  84. package/dist/orchestrator/index.d.ts.map +0 -1
  85. package/dist/orchestrator/index.js +0 -10
  86. package/dist/orchestrator/registry.d.ts.map +0 -1
  87. package/dist/orchestrator/types.d.ts.map +0 -1
  88. package/dist/orchestrator/utils.d.ts.map +0 -1
  89. package/dist/types.d.ts.map +0 -1
  90. package/dist/{accounts → src/accounts}/utils.js +1 -1
  91. /package/dist/{modules → src/modules}/abi/smart-sessions.d.ts +0 -0
  92. /package/dist/{modules → src/modules}/abi/smart-sessions.js +0 -0
  93. /package/dist/{modules → src/modules}/common.d.ts +0 -0
  94. /package/dist/{modules → src/modules}/common.js +0 -0
  95. /package/dist/{modules → src/modules}/omni-account.d.ts +0 -0
  96. /package/dist/{modules → src/modules}/omni-account.js +0 -0
  97. /package/dist/{orchestrator → src/orchestrator}/consts.d.ts +0 -0
  98. /package/dist/{orchestrator → src/orchestrator}/consts.js +0 -0
  99. /package/dist/{orchestrator → src/orchestrator}/error.d.ts +0 -0
  100. /package/dist/{orchestrator → src/orchestrator}/error.js +0 -0
  101. /package/dist/{orchestrator → src/orchestrator}/registry.d.ts +0 -0
  102. /package/dist/{orchestrator → src/orchestrator}/types.js +0 -0
  103. /package/dist/{types.js → src/types.js} +0 -0
@@ -1,214 +0,0 @@
1
- export declare const abi: readonly [{
2
- readonly constant: true;
3
- readonly inputs: readonly [];
4
- readonly name: "name";
5
- readonly outputs: readonly [{
6
- readonly name: "";
7
- readonly type: "string";
8
- }];
9
- readonly payable: false;
10
- readonly stateMutability: "view";
11
- readonly type: "function";
12
- }, {
13
- readonly constant: false;
14
- readonly inputs: readonly [{
15
- readonly name: "guy";
16
- readonly type: "address";
17
- }, {
18
- readonly name: "wad";
19
- readonly type: "uint256";
20
- }];
21
- readonly name: "approve";
22
- readonly outputs: readonly [{
23
- readonly name: "";
24
- readonly type: "bool";
25
- }];
26
- readonly payable: false;
27
- readonly stateMutability: "nonpayable";
28
- readonly type: "function";
29
- }, {
30
- readonly constant: true;
31
- readonly inputs: readonly [];
32
- readonly name: "totalSupply";
33
- readonly outputs: readonly [{
34
- readonly name: "";
35
- readonly type: "uint256";
36
- }];
37
- readonly payable: false;
38
- readonly stateMutability: "view";
39
- readonly type: "function";
40
- }, {
41
- readonly constant: false;
42
- readonly inputs: readonly [{
43
- readonly name: "src";
44
- readonly type: "address";
45
- }, {
46
- readonly name: "dst";
47
- readonly type: "address";
48
- }, {
49
- readonly name: "wad";
50
- readonly type: "uint256";
51
- }];
52
- readonly name: "transferFrom";
53
- readonly outputs: readonly [{
54
- readonly name: "";
55
- readonly type: "bool";
56
- }];
57
- readonly payable: false;
58
- readonly stateMutability: "nonpayable";
59
- readonly type: "function";
60
- }, {
61
- readonly constant: false;
62
- readonly inputs: readonly [{
63
- readonly name: "wad";
64
- readonly type: "uint256";
65
- }];
66
- readonly name: "withdraw";
67
- readonly outputs: readonly [];
68
- readonly payable: false;
69
- readonly stateMutability: "nonpayable";
70
- readonly type: "function";
71
- }, {
72
- readonly constant: true;
73
- readonly inputs: readonly [];
74
- readonly name: "decimals";
75
- readonly outputs: readonly [{
76
- readonly name: "";
77
- readonly type: "uint8";
78
- }];
79
- readonly payable: false;
80
- readonly stateMutability: "view";
81
- readonly type: "function";
82
- }, {
83
- readonly constant: true;
84
- readonly inputs: readonly [{
85
- readonly name: "";
86
- readonly type: "address";
87
- }];
88
- readonly name: "balanceOf";
89
- readonly outputs: readonly [{
90
- readonly name: "";
91
- readonly type: "uint256";
92
- }];
93
- readonly payable: false;
94
- readonly stateMutability: "view";
95
- readonly type: "function";
96
- }, {
97
- readonly constant: true;
98
- readonly inputs: readonly [];
99
- readonly name: "symbol";
100
- readonly outputs: readonly [{
101
- readonly name: "";
102
- readonly type: "string";
103
- }];
104
- readonly payable: false;
105
- readonly stateMutability: "view";
106
- readonly type: "function";
107
- }, {
108
- readonly constant: false;
109
- readonly inputs: readonly [{
110
- readonly name: "dst";
111
- readonly type: "address";
112
- }, {
113
- readonly name: "wad";
114
- readonly type: "uint256";
115
- }];
116
- readonly name: "transfer";
117
- readonly outputs: readonly [{
118
- readonly name: "";
119
- readonly type: "bool";
120
- }];
121
- readonly payable: false;
122
- readonly stateMutability: "nonpayable";
123
- readonly type: "function";
124
- }, {
125
- readonly constant: false;
126
- readonly inputs: readonly [];
127
- readonly name: "deposit";
128
- readonly outputs: readonly [];
129
- readonly payable: true;
130
- readonly stateMutability: "payable";
131
- readonly type: "function";
132
- }, {
133
- readonly constant: true;
134
- readonly inputs: readonly [{
135
- readonly name: "";
136
- readonly type: "address";
137
- }, {
138
- readonly name: "";
139
- readonly type: "address";
140
- }];
141
- readonly name: "allowance";
142
- readonly outputs: readonly [{
143
- readonly name: "";
144
- readonly type: "uint256";
145
- }];
146
- readonly payable: false;
147
- readonly stateMutability: "view";
148
- readonly type: "function";
149
- }, {
150
- readonly payable: true;
151
- readonly stateMutability: "payable";
152
- readonly type: "fallback";
153
- }, {
154
- readonly anonymous: false;
155
- readonly inputs: readonly [{
156
- readonly indexed: true;
157
- readonly name: "src";
158
- readonly type: "address";
159
- }, {
160
- readonly indexed: true;
161
- readonly name: "guy";
162
- readonly type: "address";
163
- }, {
164
- readonly indexed: false;
165
- readonly name: "wad";
166
- readonly type: "uint256";
167
- }];
168
- readonly name: "Approval";
169
- readonly type: "event";
170
- }, {
171
- readonly anonymous: false;
172
- readonly inputs: readonly [{
173
- readonly indexed: true;
174
- readonly name: "src";
175
- readonly type: "address";
176
- }, {
177
- readonly indexed: true;
178
- readonly name: "dst";
179
- readonly type: "address";
180
- }, {
181
- readonly indexed: false;
182
- readonly name: "wad";
183
- readonly type: "uint256";
184
- }];
185
- readonly name: "Transfer";
186
- readonly type: "event";
187
- }, {
188
- readonly anonymous: false;
189
- readonly inputs: readonly [{
190
- readonly indexed: true;
191
- readonly name: "dst";
192
- readonly type: "address";
193
- }, {
194
- readonly indexed: false;
195
- readonly name: "wad";
196
- readonly type: "uint256";
197
- }];
198
- readonly name: "Deposit";
199
- readonly type: "event";
200
- }, {
201
- readonly anonymous: false;
202
- readonly inputs: readonly [{
203
- readonly indexed: true;
204
- readonly name: "src";
205
- readonly type: "address";
206
- }, {
207
- readonly indexed: false;
208
- readonly name: "wad";
209
- readonly type: "uint256";
210
- }];
211
- readonly name: "Withdrawal";
212
- readonly type: "event";
213
- }];
214
- //# sourceMappingURL=weth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"weth.d.ts","sourceRoot":"","sources":["../../../examples/abi/weth.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsRN,CAAA"}
@@ -1,279 +0,0 @@
1
- export const abi = [
2
- {
3
- constant: true,
4
- inputs: [],
5
- name: 'name',
6
- outputs: [
7
- {
8
- name: '',
9
- type: 'string',
10
- },
11
- ],
12
- payable: false,
13
- stateMutability: 'view',
14
- type: 'function',
15
- },
16
- {
17
- constant: false,
18
- inputs: [
19
- {
20
- name: 'guy',
21
- type: 'address',
22
- },
23
- {
24
- name: 'wad',
25
- type: 'uint256',
26
- },
27
- ],
28
- name: 'approve',
29
- outputs: [
30
- {
31
- name: '',
32
- type: 'bool',
33
- },
34
- ],
35
- payable: false,
36
- stateMutability: 'nonpayable',
37
- type: 'function',
38
- },
39
- {
40
- constant: true,
41
- inputs: [],
42
- name: 'totalSupply',
43
- outputs: [
44
- {
45
- name: '',
46
- type: 'uint256',
47
- },
48
- ],
49
- payable: false,
50
- stateMutability: 'view',
51
- type: 'function',
52
- },
53
- {
54
- constant: false,
55
- inputs: [
56
- {
57
- name: 'src',
58
- type: 'address',
59
- },
60
- {
61
- name: 'dst',
62
- type: 'address',
63
- },
64
- {
65
- name: 'wad',
66
- type: 'uint256',
67
- },
68
- ],
69
- name: 'transferFrom',
70
- outputs: [
71
- {
72
- name: '',
73
- type: 'bool',
74
- },
75
- ],
76
- payable: false,
77
- stateMutability: 'nonpayable',
78
- type: 'function',
79
- },
80
- {
81
- constant: false,
82
- inputs: [
83
- {
84
- name: 'wad',
85
- type: 'uint256',
86
- },
87
- ],
88
- name: 'withdraw',
89
- outputs: [],
90
- payable: false,
91
- stateMutability: 'nonpayable',
92
- type: 'function',
93
- },
94
- {
95
- constant: true,
96
- inputs: [],
97
- name: 'decimals',
98
- outputs: [
99
- {
100
- name: '',
101
- type: 'uint8',
102
- },
103
- ],
104
- payable: false,
105
- stateMutability: 'view',
106
- type: 'function',
107
- },
108
- {
109
- constant: true,
110
- inputs: [
111
- {
112
- name: '',
113
- type: 'address',
114
- },
115
- ],
116
- name: 'balanceOf',
117
- outputs: [
118
- {
119
- name: '',
120
- type: 'uint256',
121
- },
122
- ],
123
- payable: false,
124
- stateMutability: 'view',
125
- type: 'function',
126
- },
127
- {
128
- constant: true,
129
- inputs: [],
130
- name: 'symbol',
131
- outputs: [
132
- {
133
- name: '',
134
- type: 'string',
135
- },
136
- ],
137
- payable: false,
138
- stateMutability: 'view',
139
- type: 'function',
140
- },
141
- {
142
- constant: false,
143
- inputs: [
144
- {
145
- name: 'dst',
146
- type: 'address',
147
- },
148
- {
149
- name: 'wad',
150
- type: 'uint256',
151
- },
152
- ],
153
- name: 'transfer',
154
- outputs: [
155
- {
156
- name: '',
157
- type: 'bool',
158
- },
159
- ],
160
- payable: false,
161
- stateMutability: 'nonpayable',
162
- type: 'function',
163
- },
164
- {
165
- constant: false,
166
- inputs: [],
167
- name: 'deposit',
168
- outputs: [],
169
- payable: true,
170
- stateMutability: 'payable',
171
- type: 'function',
172
- },
173
- {
174
- constant: true,
175
- inputs: [
176
- {
177
- name: '',
178
- type: 'address',
179
- },
180
- {
181
- name: '',
182
- type: 'address',
183
- },
184
- ],
185
- name: 'allowance',
186
- outputs: [
187
- {
188
- name: '',
189
- type: 'uint256',
190
- },
191
- ],
192
- payable: false,
193
- stateMutability: 'view',
194
- type: 'function',
195
- },
196
- {
197
- payable: true,
198
- stateMutability: 'payable',
199
- type: 'fallback',
200
- },
201
- {
202
- anonymous: false,
203
- inputs: [
204
- {
205
- indexed: true,
206
- name: 'src',
207
- type: 'address',
208
- },
209
- {
210
- indexed: true,
211
- name: 'guy',
212
- type: 'address',
213
- },
214
- {
215
- indexed: false,
216
- name: 'wad',
217
- type: 'uint256',
218
- },
219
- ],
220
- name: 'Approval',
221
- type: 'event',
222
- },
223
- {
224
- anonymous: false,
225
- inputs: [
226
- {
227
- indexed: true,
228
- name: 'src',
229
- type: 'address',
230
- },
231
- {
232
- indexed: true,
233
- name: 'dst',
234
- type: 'address',
235
- },
236
- {
237
- indexed: false,
238
- name: 'wad',
239
- type: 'uint256',
240
- },
241
- ],
242
- name: 'Transfer',
243
- type: 'event',
244
- },
245
- {
246
- anonymous: false,
247
- inputs: [
248
- {
249
- indexed: true,
250
- name: 'dst',
251
- type: 'address',
252
- },
253
- {
254
- indexed: false,
255
- name: 'wad',
256
- type: 'uint256',
257
- },
258
- ],
259
- name: 'Deposit',
260
- type: 'event',
261
- },
262
- {
263
- anonymous: false,
264
- inputs: [
265
- {
266
- indexed: true,
267
- name: 'src',
268
- type: 'address',
269
- },
270
- {
271
- indexed: false,
272
- name: 'wad',
273
- type: 'uint256',
274
- },
275
- ],
276
- name: 'Withdrawal',
277
- type: 'event',
278
- },
279
- ];
@@ -1 +0,0 @@
1
- //# sourceMappingURL=cross-chain-ss.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cross-chain-ss.d.ts","sourceRoot":"","sources":["../../examples/cross-chain-ss.ts"],"names":[],"mappings":""}
@@ -1,171 +0,0 @@
1
- "use strict";
2
- // import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'
3
- // import {
4
- // baseSepolia,
5
- // arbitrumSepolia,
6
- // optimismSepolia,
7
- // sepolia,
8
- // optimism,
9
- // base,
10
- // arbitrum,
11
- // } from 'viem/chains'
12
- // import {
13
- // Chain,
14
- // createPublicClient,
15
- // createWalletClient,
16
- // encodeFunctionData,
17
- // erc20Abi,
18
- // getAbiItem,
19
- // Hex,
20
- // http,
21
- // parseEther,
22
- // toFunctionSelector,
23
- // } from 'viem'
24
- // import { createRhinestoneAccount } from '../index'
25
- // import { Session } from '../types'
26
- // const fundingPrivateKey = process.env.FUNDING_PRIVATE_KEY
27
- // if (!fundingPrivateKey) {
28
- // throw new Error('FUNDING_PRIVATE_KEY is not set')
29
- // }
30
- // const rhinestoneApiKey = process.env.RHINESTONE_API_KEY
31
- // if (!rhinestoneApiKey) {
32
- // throw new Error('RHINESTONE_API_KEY is not set')
33
- // }
34
- // const pimlicoApiKey = process.env.PIMLICO_API_KEY
35
- // if (!pimlicoApiKey) {
36
- // throw new Error('PIMLICO_API_KEY is not set')
37
- // }
38
- // const sourceChain = baseSepolia
39
- // const targetChain = optimismSepolia
40
- // const usdcTarget = getTokenAddress(targetChain)
41
- // const usdcAmount = 1n
42
- // const fundingAccount = privateKeyToAccount(fundingPrivateKey as Hex)
43
- // const publicClient = createPublicClient({
44
- // chain: sourceChain,
45
- // transport: getTransport(sourceChain),
46
- // })
47
- // const fundingClient = createWalletClient({
48
- // account: fundingAccount,
49
- // chain: sourceChain,
50
- // transport: getTransport(sourceChain),
51
- // })
52
- // const useNewKeys = true
53
- // if (!useNewKeys) {
54
- // console.log('new pks', [
55
- // generatePrivateKey(),
56
- // generatePrivateKey(),
57
- // generatePrivateKey(),
58
- // ])
59
- // }
60
- // const privateKeyA = useNewKeys
61
- // ? generatePrivateKey()
62
- // : '0x2abb7571751edee246e21179db22388dda1fd623e1aad66552f4a3838920eb3d'
63
- // const accountA = privateKeyToAccount(privateKeyA)
64
- // const privateKeyB = useNewKeys
65
- // ? generatePrivateKey()
66
- // : '0xd30440894e60fbc1d17d5967c476ab9128c19e186077c042c6d1de592075a0d9'
67
- // const accountB = privateKeyToAccount(privateKeyB)
68
- // const privateKeyC = useNewKeys
69
- // ? generatePrivateKey()
70
- // : '0xb63c74af219a3949cf95f5e3a3d20b0137425de053bb03e5cc0f46fe0d19f22f'
71
- // const accountC = privateKeyToAccount(privateKeyC)
72
- // const session: Session = {
73
- // owners: {
74
- // type: 'ecdsa',
75
- // accounts: [accountA],
76
- // },
77
- // // actions: [],
78
- // actions: [
79
- // {
80
- // target: usdcTarget,
81
- // selector: toFunctionSelector(
82
- // getAbiItem({
83
- // abi: erc20Abi,
84
- // name: 'transfer',
85
- // }),
86
- // ),
87
- // },
88
- // ],
89
- // }
90
- // const rhinestoneAccount = await createRhinestoneAccount({
91
- // account: {
92
- // type: 'nexus',
93
- // },
94
- // owners: {
95
- // type: 'ecdsa',
96
- // accounts: [accountA, accountB, accountC],
97
- // threshold: 2,
98
- // },
99
- // sessions: [session],
100
- // rhinestoneApiKey,
101
- // deployerAccount: fundingAccount,
102
- // bundler: {
103
- // type: 'pimlico',
104
- // apiKey: pimlicoApiKey,
105
- // },
106
- // })
107
- // const address = await rhinestoneAccount.getAddress()
108
- // console.log(address)
109
- // // prefund
110
- // const ethBalance = await publicClient.getBalance({
111
- // address,
112
- // })
113
- // if (ethBalance < parseEther('0.001')) {
114
- // const txHash = await fundingClient.sendTransaction({
115
- // to: address,
116
- // value: parseEther('0.001'),
117
- // })
118
- // await publicClient.waitForTransactionReceipt({ hash: txHash })
119
- // }
120
- // const transactionResult = await rhinestoneAccount.sendTransactions({
121
- // sourceChain,
122
- // targetChain,
123
- // calls: [
124
- // {
125
- // to: usdcTarget,
126
- // data: encodeFunctionData({
127
- // abi: erc20Abi,
128
- // functionName: 'transfer',
129
- // args: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045', usdcAmount],
130
- // }),
131
- // },
132
- // ],
133
- // tokenRequests: [
134
- // {
135
- // address: usdcTarget,
136
- // amount: usdcAmount,
137
- // },
138
- // ],
139
- // signers: {
140
- // type: 'session',
141
- // session,
142
- // },
143
- // })
144
- // const result = await rhinestoneAccount.waitForExecution(transactionResult)
145
- // console.log('status', result)
146
- // function getTokenAddress(chain: Chain) {
147
- // switch (chain.id) {
148
- // case sepolia.id:
149
- // return '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
150
- // case baseSepolia.id:
151
- // return '0x036cbd53842c5426634e7929541ec2318f3dcf7e'
152
- // case arbitrumSepolia.id:
153
- // return '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d'
154
- // case optimismSepolia.id:
155
- // return '0x5fd84259d66Cd46123540766Be93DFE6D43130D7'
156
- // case base.id:
157
- // return '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
158
- // case arbitrum.id:
159
- // return '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
160
- // case optimism.id:
161
- // return '0x0b2c639c533813f4aa9d7837caf62653d097ff85'
162
- // default:
163
- // throw new Error('Unsupported chain')
164
- // }
165
- // }
166
- // function getTransport(chain: Chain) {
167
- // if (chain.id === sepolia.id) {
168
- // return http('https://ethereum-sepolia-rpc.publicnode.com')
169
- // }
170
- // return http()
171
- // }
@@ -1 +0,0 @@
1
- //# sourceMappingURL=omni-account.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"omni-account.d.ts","sourceRoot":"","sources":["../../examples/omni-account.ts"],"names":[],"mappings":""}