@liquid-af/sdk 0.8.2 → 0.9.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 (54) hide show
  1. package/dist/client.d.ts +0 -5
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +1 -5
  4. package/dist/client.js.map +1 -1
  5. package/dist/helpers/ata.d.ts +28 -0
  6. package/dist/helpers/ata.d.ts.map +1 -0
  7. package/dist/helpers/ata.js +29 -0
  8. package/dist/helpers/ata.js.map +1 -0
  9. package/dist/helpers/index.d.ts +1 -0
  10. package/dist/helpers/index.d.ts.map +1 -1
  11. package/dist/helpers/index.js +1 -0
  12. package/dist/helpers/index.js.map +1 -1
  13. package/dist/idl/liquid.d.ts +27 -663
  14. package/dist/idl/liquid.d.ts.map +1 -1
  15. package/dist/idl/liquid.json +37 -673
  16. package/dist/idl/liquid_fees.d.ts +0 -86
  17. package/dist/idl/liquid_fees.d.ts.map +1 -1
  18. package/dist/idl/liquid_fees.json +1 -87
  19. package/dist/idl/liquid_state.d.ts +18 -5
  20. package/dist/idl/liquid_state.d.ts.map +1 -1
  21. package/dist/idl/liquid_state.json +18 -5
  22. package/dist/instructions/index.d.ts +2 -2
  23. package/dist/instructions/index.d.ts.map +1 -1
  24. package/dist/instructions/index.js +1 -1
  25. package/dist/instructions/index.js.map +1 -1
  26. package/dist/instructions/liquid-fees.d.ts +1 -0
  27. package/dist/instructions/liquid-fees.d.ts.map +1 -1
  28. package/dist/instructions/liquid-fees.js +4 -1
  29. package/dist/instructions/liquid-fees.js.map +1 -1
  30. package/dist/instructions/liquid-state.d.ts +0 -13
  31. package/dist/instructions/liquid-state.d.ts.map +1 -1
  32. package/dist/instructions/liquid-state.js +0 -15
  33. package/dist/instructions/liquid-state.js.map +1 -1
  34. package/dist/instructions/liquid.d.ts +12 -0
  35. package/dist/instructions/liquid.d.ts.map +1 -1
  36. package/dist/instructions/liquid.js +45 -9
  37. package/dist/instructions/liquid.js.map +1 -1
  38. package/dist/types.d.ts +6 -3
  39. package/dist/types.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/client.ts +0 -8
  42. package/src/helpers/ata.ts +44 -0
  43. package/src/helpers/index.ts +1 -0
  44. package/src/idl/liquid.json +37 -673
  45. package/src/idl/liquid.ts +37 -673
  46. package/src/idl/liquid_fees.json +1 -87
  47. package/src/idl/liquid_fees.ts +1 -87
  48. package/src/idl/liquid_state.json +18 -5
  49. package/src/idl/liquid_state.ts +18 -5
  50. package/src/instructions/index.ts +0 -2
  51. package/src/instructions/liquid-fees.ts +8 -1
  52. package/src/instructions/liquid-state.ts +0 -25
  53. package/src/instructions/liquid.ts +81 -0
  54. package/src/types.ts +6 -3
package/src/idl/liquid.ts CHANGED
@@ -373,60 +373,7 @@ export type Liquid = {
373
373
  "docs": [
374
374
  "User's token account to receive bought tokens."
375
375
  ],
376
- "writable": true,
377
- "pda": {
378
- "seeds": [
379
- {
380
- "kind": "account",
381
- "path": "user"
382
- },
383
- {
384
- "kind": "account",
385
- "path": "tokenProgram"
386
- },
387
- {
388
- "kind": "account",
389
- "path": "mint"
390
- }
391
- ],
392
- "program": {
393
- "kind": "const",
394
- "value": [
395
- 140,
396
- 151,
397
- 37,
398
- 143,
399
- 78,
400
- 36,
401
- 137,
402
- 241,
403
- 187,
404
- 61,
405
- 16,
406
- 41,
407
- 20,
408
- 142,
409
- 13,
410
- 131,
411
- 11,
412
- 90,
413
- 19,
414
- 153,
415
- 218,
416
- 255,
417
- 16,
418
- 132,
419
- 4,
420
- 142,
421
- 123,
422
- 216,
423
- 219,
424
- 233,
425
- 248,
426
- 89
427
- ]
428
- }
429
- }
376
+ "writable": true
430
377
  },
431
378
  {
432
379
  "name": "feeVault",
@@ -1361,120 +1308,14 @@ export type Liquid = {
1361
1308
  "docs": [
1362
1309
  "User's base token account to receive bought tokens."
1363
1310
  ],
1364
- "writable": true,
1365
- "pda": {
1366
- "seeds": [
1367
- {
1368
- "kind": "account",
1369
- "path": "user"
1370
- },
1371
- {
1372
- "kind": "account",
1373
- "path": "tokenProgram2022"
1374
- },
1375
- {
1376
- "kind": "account",
1377
- "path": "mint"
1378
- }
1379
- ],
1380
- "program": {
1381
- "kind": "const",
1382
- "value": [
1383
- 140,
1384
- 151,
1385
- 37,
1386
- 143,
1387
- 78,
1388
- 36,
1389
- 137,
1390
- 241,
1391
- 187,
1392
- 61,
1393
- 16,
1394
- 41,
1395
- 20,
1396
- 142,
1397
- 13,
1398
- 131,
1399
- 11,
1400
- 90,
1401
- 19,
1402
- 153,
1403
- 218,
1404
- 255,
1405
- 16,
1406
- 132,
1407
- 4,
1408
- 142,
1409
- 123,
1410
- 216,
1411
- 219,
1412
- 233,
1413
- 248,
1414
- 89
1415
- ]
1416
- }
1417
- }
1311
+ "writable": true
1418
1312
  },
1419
1313
  {
1420
1314
  "name": "userQuoteAccount",
1421
1315
  "docs": [
1422
1316
  "User's quote token account (e.g., USDC) to pay from."
1423
1317
  ],
1424
- "writable": true,
1425
- "pda": {
1426
- "seeds": [
1427
- {
1428
- "kind": "account",
1429
- "path": "user"
1430
- },
1431
- {
1432
- "kind": "account",
1433
- "path": "tokenProgram"
1434
- },
1435
- {
1436
- "kind": "account",
1437
- "path": "quoteMint"
1438
- }
1439
- ],
1440
- "program": {
1441
- "kind": "const",
1442
- "value": [
1443
- 140,
1444
- 151,
1445
- 37,
1446
- 143,
1447
- 78,
1448
- 36,
1449
- 137,
1450
- 241,
1451
- 187,
1452
- 61,
1453
- 16,
1454
- 41,
1455
- 20,
1456
- 142,
1457
- 13,
1458
- 131,
1459
- 11,
1460
- 90,
1461
- 19,
1462
- 153,
1463
- 218,
1464
- 255,
1465
- 16,
1466
- 132,
1467
- 4,
1468
- 142,
1469
- 123,
1470
- 216,
1471
- 219,
1472
- 233,
1473
- 248,
1474
- 89
1475
- ]
1476
- }
1477
- }
1318
+ "writable": true
1478
1319
  },
1479
1320
  {
1480
1321
  "name": "feeVault",
@@ -2462,60 +2303,7 @@ export type Liquid = {
2462
2303
  "docs": [
2463
2304
  "User's token account to receive bought tokens."
2464
2305
  ],
2465
- "writable": true,
2466
- "pda": {
2467
- "seeds": [
2468
- {
2469
- "kind": "account",
2470
- "path": "user"
2471
- },
2472
- {
2473
- "kind": "account",
2474
- "path": "tokenProgram"
2475
- },
2476
- {
2477
- "kind": "account",
2478
- "path": "mint"
2479
- }
2480
- ],
2481
- "program": {
2482
- "kind": "const",
2483
- "value": [
2484
- 140,
2485
- 151,
2486
- 37,
2487
- 143,
2488
- 78,
2489
- 36,
2490
- 137,
2491
- 241,
2492
- 187,
2493
- 61,
2494
- 16,
2495
- 41,
2496
- 20,
2497
- 142,
2498
- 13,
2499
- 131,
2500
- 11,
2501
- 90,
2502
- 19,
2503
- 153,
2504
- 218,
2505
- 255,
2506
- 16,
2507
- 132,
2508
- 4,
2509
- 142,
2510
- 123,
2511
- 216,
2512
- 219,
2513
- 233,
2514
- 248,
2515
- 89
2516
- ]
2517
- }
2518
- }
2306
+ "writable": true
2519
2307
  },
2520
2308
  {
2521
2309
  "name": "feeVault",
@@ -3450,146 +3238,40 @@ export type Liquid = {
3450
3238
  "docs": [
3451
3239
  "User's base token account to receive bought tokens."
3452
3240
  ],
3241
+ "writable": true
3242
+ },
3243
+ {
3244
+ "name": "userQuoteAccount",
3245
+ "docs": [
3246
+ "User's quote token account (e.g., USDC) to pay from."
3247
+ ],
3248
+ "writable": true
3249
+ },
3250
+ {
3251
+ "name": "feeVault",
3252
+ "docs": [
3253
+ "The fee vault (for Direct/Recipients mode, from liquid-fees)."
3254
+ ],
3453
3255
  "writable": true,
3454
3256
  "pda": {
3455
3257
  "seeds": [
3456
3258
  {
3457
- "kind": "account",
3458
- "path": "user"
3459
- },
3460
- {
3461
- "kind": "account",
3462
- "path": "tokenProgram2022"
3259
+ "kind": "const",
3260
+ "value": [
3261
+ 102,
3262
+ 101,
3263
+ 101,
3264
+ 95,
3265
+ 118,
3266
+ 97,
3267
+ 117,
3268
+ 108,
3269
+ 116
3270
+ ]
3463
3271
  },
3464
3272
  {
3465
3273
  "kind": "account",
3466
- "path": "mint"
3467
- }
3468
- ],
3469
- "program": {
3470
- "kind": "const",
3471
- "value": [
3472
- 140,
3473
- 151,
3474
- 37,
3475
- 143,
3476
- 78,
3477
- 36,
3478
- 137,
3479
- 241,
3480
- 187,
3481
- 61,
3482
- 16,
3483
- 41,
3484
- 20,
3485
- 142,
3486
- 13,
3487
- 131,
3488
- 11,
3489
- 90,
3490
- 19,
3491
- 153,
3492
- 218,
3493
- 255,
3494
- 16,
3495
- 132,
3496
- 4,
3497
- 142,
3498
- 123,
3499
- 216,
3500
- 219,
3501
- 233,
3502
- 248,
3503
- 89
3504
- ]
3505
- }
3506
- }
3507
- },
3508
- {
3509
- "name": "userQuoteAccount",
3510
- "docs": [
3511
- "User's quote token account (e.g., USDC) to pay from."
3512
- ],
3513
- "writable": true,
3514
- "pda": {
3515
- "seeds": [
3516
- {
3517
- "kind": "account",
3518
- "path": "user"
3519
- },
3520
- {
3521
- "kind": "account",
3522
- "path": "tokenProgram"
3523
- },
3524
- {
3525
- "kind": "account",
3526
- "path": "quoteMint"
3527
- }
3528
- ],
3529
- "program": {
3530
- "kind": "const",
3531
- "value": [
3532
- 140,
3533
- 151,
3534
- 37,
3535
- 143,
3536
- 78,
3537
- 36,
3538
- 137,
3539
- 241,
3540
- 187,
3541
- 61,
3542
- 16,
3543
- 41,
3544
- 20,
3545
- 142,
3546
- 13,
3547
- 131,
3548
- 11,
3549
- 90,
3550
- 19,
3551
- 153,
3552
- 218,
3553
- 255,
3554
- 16,
3555
- 132,
3556
- 4,
3557
- 142,
3558
- 123,
3559
- 216,
3560
- 219,
3561
- 233,
3562
- 248,
3563
- 89
3564
- ]
3565
- }
3566
- }
3567
- },
3568
- {
3569
- "name": "feeVault",
3570
- "docs": [
3571
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
3572
- ],
3573
- "writable": true,
3574
- "pda": {
3575
- "seeds": [
3576
- {
3577
- "kind": "const",
3578
- "value": [
3579
- 102,
3580
- 101,
3581
- 101,
3582
- 95,
3583
- 118,
3584
- 97,
3585
- 117,
3586
- 108,
3587
- 116
3588
- ]
3589
- },
3590
- {
3591
- "kind": "account",
3592
- "path": "feeConfig"
3274
+ "path": "feeConfig"
3593
3275
  }
3594
3276
  ],
3595
3277
  "program": {
@@ -8838,60 +8520,7 @@ export type Liquid = {
8838
8520
  "docs": [
8839
8521
  "User's token account to send sold tokens from."
8840
8522
  ],
8841
- "writable": true,
8842
- "pda": {
8843
- "seeds": [
8844
- {
8845
- "kind": "account",
8846
- "path": "user"
8847
- },
8848
- {
8849
- "kind": "account",
8850
- "path": "tokenProgram"
8851
- },
8852
- {
8853
- "kind": "account",
8854
- "path": "mint"
8855
- }
8856
- ],
8857
- "program": {
8858
- "kind": "const",
8859
- "value": [
8860
- 140,
8861
- 151,
8862
- 37,
8863
- 143,
8864
- 78,
8865
- 36,
8866
- 137,
8867
- 241,
8868
- 187,
8869
- 61,
8870
- 16,
8871
- 41,
8872
- 20,
8873
- 142,
8874
- 13,
8875
- 131,
8876
- 11,
8877
- 90,
8878
- 19,
8879
- 153,
8880
- 218,
8881
- 255,
8882
- 16,
8883
- 132,
8884
- 4,
8885
- 142,
8886
- 123,
8887
- 216,
8888
- 219,
8889
- 233,
8890
- 248,
8891
- 89
8892
- ]
8893
- }
8894
- }
8523
+ "writable": true
8895
8524
  },
8896
8525
  {
8897
8526
  "name": "feeVault",
@@ -9826,120 +9455,14 @@ export type Liquid = {
9826
9455
  "docs": [
9827
9456
  "User's base token account to send sold tokens from."
9828
9457
  ],
9829
- "writable": true,
9830
- "pda": {
9831
- "seeds": [
9832
- {
9833
- "kind": "account",
9834
- "path": "user"
9835
- },
9836
- {
9837
- "kind": "account",
9838
- "path": "tokenProgram2022"
9839
- },
9840
- {
9841
- "kind": "account",
9842
- "path": "mint"
9843
- }
9844
- ],
9845
- "program": {
9846
- "kind": "const",
9847
- "value": [
9848
- 140,
9849
- 151,
9850
- 37,
9851
- 143,
9852
- 78,
9853
- 36,
9854
- 137,
9855
- 241,
9856
- 187,
9857
- 61,
9858
- 16,
9859
- 41,
9860
- 20,
9861
- 142,
9862
- 13,
9863
- 131,
9864
- 11,
9865
- 90,
9866
- 19,
9867
- 153,
9868
- 218,
9869
- 255,
9870
- 16,
9871
- 132,
9872
- 4,
9873
- 142,
9874
- 123,
9875
- 216,
9876
- 219,
9877
- 233,
9878
- 248,
9879
- 89
9880
- ]
9881
- }
9882
- }
9458
+ "writable": true
9883
9459
  },
9884
9460
  {
9885
9461
  "name": "userQuoteAccount",
9886
9462
  "docs": [
9887
9463
  "User's quote token account (e.g., USDC) to receive payment."
9888
9464
  ],
9889
- "writable": true,
9890
- "pda": {
9891
- "seeds": [
9892
- {
9893
- "kind": "account",
9894
- "path": "user"
9895
- },
9896
- {
9897
- "kind": "account",
9898
- "path": "tokenProgram"
9899
- },
9900
- {
9901
- "kind": "account",
9902
- "path": "quoteMint"
9903
- }
9904
- ],
9905
- "program": {
9906
- "kind": "const",
9907
- "value": [
9908
- 140,
9909
- 151,
9910
- 37,
9911
- 143,
9912
- 78,
9913
- 36,
9914
- 137,
9915
- 241,
9916
- 187,
9917
- 61,
9918
- 16,
9919
- 41,
9920
- 20,
9921
- 142,
9922
- 13,
9923
- 131,
9924
- 11,
9925
- 90,
9926
- 19,
9927
- 153,
9928
- 218,
9929
- 255,
9930
- 16,
9931
- 132,
9932
- 4,
9933
- 142,
9934
- 123,
9935
- 216,
9936
- 219,
9937
- 233,
9938
- 248,
9939
- 89
9940
- ]
9941
- }
9942
- }
9465
+ "writable": true
9943
9466
  },
9944
9467
  {
9945
9468
  "name": "feeVault",
@@ -10927,60 +10450,7 @@ export type Liquid = {
10927
10450
  "docs": [
10928
10451
  "User's token account to send sold tokens from."
10929
10452
  ],
10930
- "writable": true,
10931
- "pda": {
10932
- "seeds": [
10933
- {
10934
- "kind": "account",
10935
- "path": "user"
10936
- },
10937
- {
10938
- "kind": "account",
10939
- "path": "tokenProgram"
10940
- },
10941
- {
10942
- "kind": "account",
10943
- "path": "mint"
10944
- }
10945
- ],
10946
- "program": {
10947
- "kind": "const",
10948
- "value": [
10949
- 140,
10950
- 151,
10951
- 37,
10952
- 143,
10953
- 78,
10954
- 36,
10955
- 137,
10956
- 241,
10957
- 187,
10958
- 61,
10959
- 16,
10960
- 41,
10961
- 20,
10962
- 142,
10963
- 13,
10964
- 131,
10965
- 11,
10966
- 90,
10967
- 19,
10968
- 153,
10969
- 218,
10970
- 255,
10971
- 16,
10972
- 132,
10973
- 4,
10974
- 142,
10975
- 123,
10976
- 216,
10977
- 219,
10978
- 233,
10979
- 248,
10980
- 89
10981
- ]
10982
- }
10983
- }
10453
+ "writable": true
10984
10454
  },
10985
10455
  {
10986
10456
  "name": "feeVault",
@@ -11915,120 +11385,14 @@ export type Liquid = {
11915
11385
  "docs": [
11916
11386
  "User's base token account to send sold tokens from."
11917
11387
  ],
11918
- "writable": true,
11919
- "pda": {
11920
- "seeds": [
11921
- {
11922
- "kind": "account",
11923
- "path": "user"
11924
- },
11925
- {
11926
- "kind": "account",
11927
- "path": "tokenProgram2022"
11928
- },
11929
- {
11930
- "kind": "account",
11931
- "path": "mint"
11932
- }
11933
- ],
11934
- "program": {
11935
- "kind": "const",
11936
- "value": [
11937
- 140,
11938
- 151,
11939
- 37,
11940
- 143,
11941
- 78,
11942
- 36,
11943
- 137,
11944
- 241,
11945
- 187,
11946
- 61,
11947
- 16,
11948
- 41,
11949
- 20,
11950
- 142,
11951
- 13,
11952
- 131,
11953
- 11,
11954
- 90,
11955
- 19,
11956
- 153,
11957
- 218,
11958
- 255,
11959
- 16,
11960
- 132,
11961
- 4,
11962
- 142,
11963
- 123,
11964
- 216,
11965
- 219,
11966
- 233,
11967
- 248,
11968
- 89
11969
- ]
11970
- }
11971
- }
11388
+ "writable": true
11972
11389
  },
11973
11390
  {
11974
11391
  "name": "userQuoteAccount",
11975
11392
  "docs": [
11976
11393
  "User's quote token account (e.g., USDC) to receive payment."
11977
11394
  ],
11978
- "writable": true,
11979
- "pda": {
11980
- "seeds": [
11981
- {
11982
- "kind": "account",
11983
- "path": "user"
11984
- },
11985
- {
11986
- "kind": "account",
11987
- "path": "tokenProgram"
11988
- },
11989
- {
11990
- "kind": "account",
11991
- "path": "quoteMint"
11992
- }
11993
- ],
11994
- "program": {
11995
- "kind": "const",
11996
- "value": [
11997
- 140,
11998
- 151,
11999
- 37,
12000
- 143,
12001
- 78,
12002
- 36,
12003
- 137,
12004
- 241,
12005
- 187,
12006
- 61,
12007
- 16,
12008
- 41,
12009
- 20,
12010
- 142,
12011
- 13,
12012
- 131,
12013
- 11,
12014
- 90,
12015
- 19,
12016
- 153,
12017
- 218,
12018
- 255,
12019
- 16,
12020
- 132,
12021
- 4,
12022
- 142,
12023
- 123,
12024
- 216,
12025
- 219,
12026
- 233,
12027
- 248,
12028
- 89
12029
- ]
12030
- }
12031
- }
11395
+ "writable": true
12032
11396
  },
12033
11397
  {
12034
11398
  "name": "feeVault",