@gardenfi/core 2.4.3-beta.5 → 2.4.3-beta.7
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/{ccip-pXCeAfmp.js → ccip-ZkIgcVu1.js} +1 -1
- package/dist/{ccip-Etc0FLIo.cjs → ccip-zRBTY1vL.cjs} +1 -1
- package/dist/{index-DFY2Tld-.js → index-BcHwWFv2.js} +3992 -4720
- package/dist/{index-DkssHOBr.cjs → index-DpRp0W1D.cjs} +42 -42
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/src/lib/constants.d.ts +2 -8
- package/dist/src/lib/garden/garden.types.d.ts +1 -4
- package/dist/src/lib/solana/relayer/solanaRelay.d.ts +10 -59
- package/package.json +3 -4
- package/dist/src/lib/solana/idl/spl/solana_spl_swaps.d.ts +0 -637
- package/dist/src/lib/solana/idl/spl/solana_spl_swaps.json.d.ts +0 -633
- /package/dist/src/lib/solana/idl/{native/solana_native_swaps.d.ts → solana_native_swaps.d.ts} +0 -0
- /package/dist/src/lib/solana/idl/{native/solana_native_swaps.json.d.ts → solana_native_swaps.json.d.ts} +0 -0
|
@@ -1,637 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
3
|
-
*
|
|
4
|
-
* Note that this is only a type helper and is not the actual IDL. The original
|
|
5
|
-
* IDL can be found at `target/idl/solana_spl_swaps.json`.
|
|
6
|
-
*/
|
|
7
|
-
export type SolanaSplSwaps = {
|
|
8
|
-
"address": "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC";
|
|
9
|
-
"metadata": {
|
|
10
|
-
"name": "solanaSplSwaps";
|
|
11
|
-
"version": "0.4.0";
|
|
12
|
-
"spec": "0.1.0";
|
|
13
|
-
"description": "Created with Anchor";
|
|
14
|
-
};
|
|
15
|
-
"instructions": [
|
|
16
|
-
{
|
|
17
|
-
"name": "initiate";
|
|
18
|
-
"docs": [
|
|
19
|
-
"Initiates the atomic swap. Funds are transferred from the initiator to the token vault.",
|
|
20
|
-
"As such, the initiator's signature is required for this instruction.",
|
|
21
|
-
"A sponsor may be involved, who pays PDA rent and transaction fees in SOL, allowing for the",
|
|
22
|
-
"initiator to participate without holding SOL. As such, the sponsor must also sign this transaction.",
|
|
23
|
-
"`swap_amount` represents the quantity of tokens to be transferred through this atomic swap",
|
|
24
|
-
"in base units of the token mint.",
|
|
25
|
-
"E.g: A quantity of $1 represented by the token \"USDC\" with \"6\" decimals",
|
|
26
|
-
"must be provided as 1,000,000.",
|
|
27
|
-
"`expires_in_slots` represents the number of slots after which (non-instant) refunds are allowed.",
|
|
28
|
-
"`destination_data` can hold optional information regarding the destination chain",
|
|
29
|
-
"in the atomic swap, to be emitted in the logs as-is."
|
|
30
|
-
];
|
|
31
|
-
"discriminator": [
|
|
32
|
-
5,
|
|
33
|
-
63,
|
|
34
|
-
123,
|
|
35
|
-
113,
|
|
36
|
-
153,
|
|
37
|
-
75,
|
|
38
|
-
148,
|
|
39
|
-
14
|
|
40
|
-
];
|
|
41
|
-
"accounts": [
|
|
42
|
-
{
|
|
43
|
-
"name": "identityPda";
|
|
44
|
-
"docs": [
|
|
45
|
-
"the token transfers of the `token_vault` PDA.",
|
|
46
|
-
"This PDA will be created during the first most invocation of the `initiate()` function",
|
|
47
|
-
"using the `init_if_needed` attribute, and be reused for all succeeding instructions."
|
|
48
|
-
];
|
|
49
|
-
"writable": true;
|
|
50
|
-
"pda": {
|
|
51
|
-
"seeds": [];
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "swapData";
|
|
56
|
-
"docs": [
|
|
57
|
-
"A PDA that maintains the on-chain state of the atomic swap throughout its lifecycle.",
|
|
58
|
-
"The choice of seeds ensure that any swap with equal `initiator` and",
|
|
59
|
-
"`secret_hash` wont be created until an existing one completes.",
|
|
60
|
-
"This PDA will be deleted upon completion of the swap."
|
|
61
|
-
];
|
|
62
|
-
"writable": true;
|
|
63
|
-
"pda": {
|
|
64
|
-
"seeds": [
|
|
65
|
-
{
|
|
66
|
-
"kind": "account";
|
|
67
|
-
"path": "initiator";
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"kind": "arg";
|
|
71
|
-
"path": "secretHash";
|
|
72
|
-
}
|
|
73
|
-
];
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"name": "tokenVault";
|
|
78
|
-
"docs": [
|
|
79
|
-
"A permanent PDA that is controlled by the program through the `identity_pda`, as implied",
|
|
80
|
-
"by the value of the `authority` field below. As such, it serves as the \"vault\" by escrowing tokens",
|
|
81
|
-
"of type `mint` for the atomic swap.",
|
|
82
|
-
"It is intended to be reused for all swaps involving the same mint.",
|
|
83
|
-
"Just like `identity_pda`, it will be created during the first most invocation of `initiate()`",
|
|
84
|
-
"of every distinct mint using the `init_if_needed` attribute."
|
|
85
|
-
];
|
|
86
|
-
"writable": true;
|
|
87
|
-
"pda": {
|
|
88
|
-
"seeds": [
|
|
89
|
-
{
|
|
90
|
-
"kind": "account";
|
|
91
|
-
"path": "mint";
|
|
92
|
-
}
|
|
93
|
-
];
|
|
94
|
-
};
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"name": "initiator";
|
|
98
|
-
"docs": [
|
|
99
|
-
"The initiator of the atomic swap. They must sign this transaction."
|
|
100
|
-
];
|
|
101
|
-
"signer": true;
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"name": "initiatorTokenAccount";
|
|
105
|
-
"docs": [
|
|
106
|
-
"The token account of the initiator"
|
|
107
|
-
];
|
|
108
|
-
"writable": true;
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"name": "mint";
|
|
112
|
-
"docs": [
|
|
113
|
-
"The mint of the tokens involved in this swap. As this is a parameter, this program can thus be reused",
|
|
114
|
-
"for atomic swaps with different mints."
|
|
115
|
-
];
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"name": "sponsor";
|
|
119
|
-
"docs": [
|
|
120
|
-
"Any entity that pays the PDA rent.",
|
|
121
|
-
"Upon completion of the swap, the PDA rent refund resulting from the",
|
|
122
|
-
"deletion of `swap_data` will be refunded to this address."
|
|
123
|
-
];
|
|
124
|
-
"writable": true;
|
|
125
|
-
"signer": true;
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"name": "tokenProgram";
|
|
129
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"name": "systemProgram";
|
|
133
|
-
"address": "11111111111111111111111111111111";
|
|
134
|
-
}
|
|
135
|
-
];
|
|
136
|
-
"args": [
|
|
137
|
-
{
|
|
138
|
-
"name": "expiresInSlots";
|
|
139
|
-
"type": "u64";
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"name": "redeemer";
|
|
143
|
-
"type": "pubkey";
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"name": "secretHash";
|
|
147
|
-
"type": {
|
|
148
|
-
"array": [
|
|
149
|
-
"u8",
|
|
150
|
-
32
|
|
151
|
-
];
|
|
152
|
-
};
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"name": "swapAmount";
|
|
156
|
-
"type": "u64";
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"name": "destinationData";
|
|
160
|
-
"type": {
|
|
161
|
-
"option": "bytes";
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
];
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"name": "instantRefund";
|
|
168
|
-
"docs": [
|
|
169
|
-
"Funds are returned to the initiator, with the redeemer's consent.",
|
|
170
|
-
"As such, the redeemer's signature is required for this instruction.",
|
|
171
|
-
"This allows for refunds before the expiry slot."
|
|
172
|
-
];
|
|
173
|
-
"discriminator": [
|
|
174
|
-
211,
|
|
175
|
-
202,
|
|
176
|
-
103,
|
|
177
|
-
41,
|
|
178
|
-
183,
|
|
179
|
-
147,
|
|
180
|
-
59,
|
|
181
|
-
251
|
|
182
|
-
];
|
|
183
|
-
"accounts": [
|
|
184
|
-
{
|
|
185
|
-
"name": "identityPda";
|
|
186
|
-
"pda": {
|
|
187
|
-
"seeds": [];
|
|
188
|
-
};
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"name": "swapData";
|
|
192
|
-
"docs": [
|
|
193
|
-
"The PDA holding the state information of the atomic swap. Will be closed upon successful execution",
|
|
194
|
-
"and the resulting rent refund will be sent to the sponsor."
|
|
195
|
-
];
|
|
196
|
-
"writable": true;
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"name": "tokenVault";
|
|
200
|
-
"docs": [
|
|
201
|
-
"A token account controlled by the program, escrowing the tokens for this atomic swap"
|
|
202
|
-
];
|
|
203
|
-
"writable": true;
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
"name": "initiatorTokenAccount";
|
|
207
|
-
"writable": true;
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"name": "redeemer";
|
|
211
|
-
"docs": [
|
|
212
|
-
"The redeemer of the atomic swap. They must sign this transaction."
|
|
213
|
-
];
|
|
214
|
-
"writable": true;
|
|
215
|
-
"signer": true;
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"name": "sponsor";
|
|
219
|
-
"writable": true;
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
"name": "tokenProgram";
|
|
223
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
224
|
-
}
|
|
225
|
-
];
|
|
226
|
-
"args": [];
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
"name": "redeem";
|
|
230
|
-
"docs": [
|
|
231
|
-
"Funds are transferred to the redeemer. This instruction does not require any signatures."
|
|
232
|
-
];
|
|
233
|
-
"discriminator": [
|
|
234
|
-
184,
|
|
235
|
-
12,
|
|
236
|
-
86,
|
|
237
|
-
149,
|
|
238
|
-
70,
|
|
239
|
-
196,
|
|
240
|
-
97,
|
|
241
|
-
225
|
|
242
|
-
];
|
|
243
|
-
"accounts": [
|
|
244
|
-
{
|
|
245
|
-
"name": "identityPda";
|
|
246
|
-
"pda": {
|
|
247
|
-
"seeds": [];
|
|
248
|
-
};
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
"name": "swapData";
|
|
252
|
-
"docs": [
|
|
253
|
-
"The PDA holding the state information of the atomic swap. Will be closed upon successful execution",
|
|
254
|
-
"and the resulting rent refund will be sent to the sponsor."
|
|
255
|
-
];
|
|
256
|
-
"writable": true;
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"name": "tokenVault";
|
|
260
|
-
"docs": [
|
|
261
|
-
"A token account controlled by the program, escrowing the tokens for this atomic swap"
|
|
262
|
-
];
|
|
263
|
-
"writable": true;
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"name": "redeemerTokenAccount";
|
|
267
|
-
"writable": true;
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"name": "sponsor";
|
|
271
|
-
"writable": true;
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"name": "tokenProgram";
|
|
275
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
276
|
-
}
|
|
277
|
-
];
|
|
278
|
-
"args": [
|
|
279
|
-
{
|
|
280
|
-
"name": "secret";
|
|
281
|
-
"type": {
|
|
282
|
-
"array": [
|
|
283
|
-
"u8",
|
|
284
|
-
32
|
|
285
|
-
];
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
];
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
"name": "refund";
|
|
292
|
-
"docs": [
|
|
293
|
-
"Funds are returned to the initiator, given that no redeems have occured",
|
|
294
|
-
"and the expiry slot has been reached.",
|
|
295
|
-
"This instruction does not require any signatures."
|
|
296
|
-
];
|
|
297
|
-
"discriminator": [
|
|
298
|
-
2,
|
|
299
|
-
96,
|
|
300
|
-
183,
|
|
301
|
-
251,
|
|
302
|
-
63,
|
|
303
|
-
208,
|
|
304
|
-
46,
|
|
305
|
-
46
|
|
306
|
-
];
|
|
307
|
-
"accounts": [
|
|
308
|
-
{
|
|
309
|
-
"name": "identityPda";
|
|
310
|
-
"pda": {
|
|
311
|
-
"seeds": [];
|
|
312
|
-
};
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
"name": "swapData";
|
|
316
|
-
"docs": [
|
|
317
|
-
"The PDA holding the state information of the atomic swap. Will be closed upon successful execution",
|
|
318
|
-
"and the resulting rent refund will be sent to the sponsor."
|
|
319
|
-
];
|
|
320
|
-
"writable": true;
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
"name": "tokenVault";
|
|
324
|
-
"docs": [
|
|
325
|
-
"A token account controlled by the program, escrowing the tokens for this atomic swap"
|
|
326
|
-
];
|
|
327
|
-
"writable": true;
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"name": "initiatorTokenAccount";
|
|
331
|
-
"writable": true;
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
"name": "sponsor";
|
|
335
|
-
"writable": true;
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
"name": "tokenProgram";
|
|
339
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
340
|
-
}
|
|
341
|
-
];
|
|
342
|
-
"args": [];
|
|
343
|
-
}
|
|
344
|
-
];
|
|
345
|
-
"accounts": [
|
|
346
|
-
{
|
|
347
|
-
"name": "swapAccount";
|
|
348
|
-
"discriminator": [
|
|
349
|
-
53,
|
|
350
|
-
126,
|
|
351
|
-
9,
|
|
352
|
-
14,
|
|
353
|
-
14,
|
|
354
|
-
197,
|
|
355
|
-
105,
|
|
356
|
-
182
|
|
357
|
-
];
|
|
358
|
-
}
|
|
359
|
-
];
|
|
360
|
-
"events": [
|
|
361
|
-
{
|
|
362
|
-
"name": "initiated";
|
|
363
|
-
"discriminator": [
|
|
364
|
-
6,
|
|
365
|
-
108,
|
|
366
|
-
212,
|
|
367
|
-
91,
|
|
368
|
-
67,
|
|
369
|
-
60,
|
|
370
|
-
207,
|
|
371
|
-
221
|
|
372
|
-
];
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
"name": "instantRefunded";
|
|
376
|
-
"discriminator": [
|
|
377
|
-
220,
|
|
378
|
-
50,
|
|
379
|
-
18,
|
|
380
|
-
207,
|
|
381
|
-
183,
|
|
382
|
-
232,
|
|
383
|
-
218,
|
|
384
|
-
25
|
|
385
|
-
];
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
"name": "redeemed";
|
|
389
|
-
"discriminator": [
|
|
390
|
-
14,
|
|
391
|
-
29,
|
|
392
|
-
183,
|
|
393
|
-
71,
|
|
394
|
-
31,
|
|
395
|
-
165,
|
|
396
|
-
107,
|
|
397
|
-
38
|
|
398
|
-
];
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
"name": "refunded";
|
|
402
|
-
"discriminator": [
|
|
403
|
-
35,
|
|
404
|
-
103,
|
|
405
|
-
149,
|
|
406
|
-
246,
|
|
407
|
-
196,
|
|
408
|
-
123,
|
|
409
|
-
221,
|
|
410
|
-
99
|
|
411
|
-
];
|
|
412
|
-
}
|
|
413
|
-
];
|
|
414
|
-
"errors": [
|
|
415
|
-
{
|
|
416
|
-
"code": 6000;
|
|
417
|
-
"name": "invalidRedeemer";
|
|
418
|
-
"msg": "The provider redeemer is not the original redeemer of this swap";
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
"code": 6001;
|
|
422
|
-
"name": "invalidSecret";
|
|
423
|
-
"msg": "The provided secret does not correspond to the secret hash of this swap";
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"code": 6002;
|
|
427
|
-
"name": "invalidSponsor";
|
|
428
|
-
"msg": "The provided sponsor is not the original sponsor of this swap";
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
"code": 6003;
|
|
432
|
-
"name": "refundBeforeExpiry";
|
|
433
|
-
"msg": "Attempt to perform a refund before expiry time";
|
|
434
|
-
}
|
|
435
|
-
];
|
|
436
|
-
"types": [
|
|
437
|
-
{
|
|
438
|
-
"name": "initiated";
|
|
439
|
-
"docs": [
|
|
440
|
-
"Represents the initiated state of the swap where the initiator has deposited funds into the vault"
|
|
441
|
-
];
|
|
442
|
-
"type": {
|
|
443
|
-
"kind": "struct";
|
|
444
|
-
"fields": [
|
|
445
|
-
{
|
|
446
|
-
"name": "swapAmount";
|
|
447
|
-
"docs": [
|
|
448
|
-
"The quantity of tokens transferred through this atomic swap in base units of the token mint.",
|
|
449
|
-
"E.g: A quantity of $1 represented by the token \"USDC\" with \"6\" decimals will be represented as 1,000,000."
|
|
450
|
-
];
|
|
451
|
-
"type": "u64";
|
|
452
|
-
},
|
|
453
|
-
{
|
|
454
|
-
"name": "expiresInSlots";
|
|
455
|
-
"docs": [
|
|
456
|
-
"`expires_in_slots` represents the number of slots after which (non-instant) refunds are allowed"
|
|
457
|
-
];
|
|
458
|
-
"type": "u64";
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"name": "initiator";
|
|
462
|
-
"type": "pubkey";
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
"name": "mint";
|
|
466
|
-
"type": "pubkey";
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
"name": "redeemer";
|
|
470
|
-
"type": "pubkey";
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
"name": "secretHash";
|
|
474
|
-
"type": {
|
|
475
|
-
"array": [
|
|
476
|
-
"u8",
|
|
477
|
-
32
|
|
478
|
-
];
|
|
479
|
-
};
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"name": "destinationData";
|
|
483
|
-
"docs": [
|
|
484
|
-
"Information regarding the destination chain in the atomic swap"
|
|
485
|
-
];
|
|
486
|
-
"type": {
|
|
487
|
-
"option": "bytes";
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
];
|
|
491
|
-
};
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
"name": "instantRefunded";
|
|
495
|
-
"docs": [
|
|
496
|
-
"Represents the instant refund state of the swap, where the initiator has withdrawn funds the vault",
|
|
497
|
-
"with the redeemer's consent"
|
|
498
|
-
];
|
|
499
|
-
"type": {
|
|
500
|
-
"kind": "struct";
|
|
501
|
-
"fields": [
|
|
502
|
-
{
|
|
503
|
-
"name": "initiator";
|
|
504
|
-
"type": "pubkey";
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"name": "secretHash";
|
|
508
|
-
"type": {
|
|
509
|
-
"array": [
|
|
510
|
-
"u8",
|
|
511
|
-
32
|
|
512
|
-
];
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
];
|
|
516
|
-
};
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"name": "redeemed";
|
|
520
|
-
"docs": [
|
|
521
|
-
"Represents the redeemed state of the swap, where the redeemer has withdrawn funds from the vault"
|
|
522
|
-
];
|
|
523
|
-
"type": {
|
|
524
|
-
"kind": "struct";
|
|
525
|
-
"fields": [
|
|
526
|
-
{
|
|
527
|
-
"name": "initiator";
|
|
528
|
-
"type": "pubkey";
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
"name": "secret";
|
|
532
|
-
"type": {
|
|
533
|
-
"array": [
|
|
534
|
-
"u8",
|
|
535
|
-
32
|
|
536
|
-
];
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
];
|
|
540
|
-
};
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
"name": "refunded";
|
|
544
|
-
"docs": [
|
|
545
|
-
"Represents the refund state of the swap, where the initiator has withdrawn funds from the vault past expiry"
|
|
546
|
-
];
|
|
547
|
-
"type": {
|
|
548
|
-
"kind": "struct";
|
|
549
|
-
"fields": [
|
|
550
|
-
{
|
|
551
|
-
"name": "initiator";
|
|
552
|
-
"type": "pubkey";
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"name": "secretHash";
|
|
556
|
-
"type": {
|
|
557
|
-
"array": [
|
|
558
|
-
"u8",
|
|
559
|
-
32
|
|
560
|
-
];
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
];
|
|
564
|
-
};
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
"name": "swapAccount";
|
|
568
|
-
"docs": [
|
|
569
|
-
"Stores the state information of the atomic swap on-chain"
|
|
570
|
-
];
|
|
571
|
-
"type": {
|
|
572
|
-
"kind": "struct";
|
|
573
|
-
"fields": [
|
|
574
|
-
{
|
|
575
|
-
"name": "expirySlot";
|
|
576
|
-
"docs": [
|
|
577
|
-
"The exact slot after which (non-instant) refunds are allowed"
|
|
578
|
-
];
|
|
579
|
-
"type": "u64";
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
"name": "initiator";
|
|
583
|
-
"docs": [
|
|
584
|
-
"The initiator of the atomic swap"
|
|
585
|
-
];
|
|
586
|
-
"type": "pubkey";
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"name": "redeemer";
|
|
590
|
-
"docs": [
|
|
591
|
-
"The redeemer of the atomic swap"
|
|
592
|
-
];
|
|
593
|
-
"type": "pubkey";
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
"name": "secretHash";
|
|
597
|
-
"docs": [
|
|
598
|
-
"The secret hash associated with the atomic swap"
|
|
599
|
-
];
|
|
600
|
-
"type": {
|
|
601
|
-
"array": [
|
|
602
|
-
"u8",
|
|
603
|
-
32
|
|
604
|
-
];
|
|
605
|
-
};
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
"name": "swapAmount";
|
|
609
|
-
"docs": [
|
|
610
|
-
"The quantity tokens to be transferred through this atomic swap",
|
|
611
|
-
"in base units of the token mint.",
|
|
612
|
-
"E.g: A quantity of $1 represented by the token \"USDC\" with \"6\" decimals",
|
|
613
|
-
"must be provided as 1,000,000."
|
|
614
|
-
];
|
|
615
|
-
"type": "u64";
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"name": "identityPdaBump";
|
|
619
|
-
"docs": [
|
|
620
|
-
"The bump associated with the identity pda.",
|
|
621
|
-
"This is needed by the program to authorize token transfers via the token vault."
|
|
622
|
-
];
|
|
623
|
-
"type": "u8";
|
|
624
|
-
},
|
|
625
|
-
{
|
|
626
|
-
"name": "sponsor";
|
|
627
|
-
"docs": [
|
|
628
|
-
"The entity that paid the rent fees for the creation of this PDA.",
|
|
629
|
-
"This will be referenced during the refund of the same upon closing this PDA."
|
|
630
|
-
];
|
|
631
|
-
"type": "pubkey";
|
|
632
|
-
}
|
|
633
|
-
];
|
|
634
|
-
};
|
|
635
|
-
}
|
|
636
|
-
];
|
|
637
|
-
};
|