@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
@@ -367,60 +367,7 @@
367
367
  "docs": [
368
368
  "User's token account to receive bought tokens."
369
369
  ],
370
- "writable": true,
371
- "pda": {
372
- "seeds": [
373
- {
374
- "kind": "account",
375
- "path": "user"
376
- },
377
- {
378
- "kind": "account",
379
- "path": "token_program"
380
- },
381
- {
382
- "kind": "account",
383
- "path": "mint"
384
- }
385
- ],
386
- "program": {
387
- "kind": "const",
388
- "value": [
389
- 140,
390
- 151,
391
- 37,
392
- 143,
393
- 78,
394
- 36,
395
- 137,
396
- 241,
397
- 187,
398
- 61,
399
- 16,
400
- 41,
401
- 20,
402
- 142,
403
- 13,
404
- 131,
405
- 11,
406
- 90,
407
- 19,
408
- 153,
409
- 218,
410
- 255,
411
- 16,
412
- 132,
413
- 4,
414
- 142,
415
- 123,
416
- 216,
417
- 219,
418
- 233,
419
- 248,
420
- 89
421
- ]
422
- }
423
- }
370
+ "writable": true
424
371
  },
425
372
  {
426
373
  "name": "fee_vault",
@@ -1355,120 +1302,14 @@
1355
1302
  "docs": [
1356
1303
  "User's base token account to receive bought tokens."
1357
1304
  ],
1358
- "writable": true,
1359
- "pda": {
1360
- "seeds": [
1361
- {
1362
- "kind": "account",
1363
- "path": "user"
1364
- },
1365
- {
1366
- "kind": "account",
1367
- "path": "token_program_2022"
1368
- },
1369
- {
1370
- "kind": "account",
1371
- "path": "mint"
1372
- }
1373
- ],
1374
- "program": {
1375
- "kind": "const",
1376
- "value": [
1377
- 140,
1378
- 151,
1379
- 37,
1380
- 143,
1381
- 78,
1382
- 36,
1383
- 137,
1384
- 241,
1385
- 187,
1386
- 61,
1387
- 16,
1388
- 41,
1389
- 20,
1390
- 142,
1391
- 13,
1392
- 131,
1393
- 11,
1394
- 90,
1395
- 19,
1396
- 153,
1397
- 218,
1398
- 255,
1399
- 16,
1400
- 132,
1401
- 4,
1402
- 142,
1403
- 123,
1404
- 216,
1405
- 219,
1406
- 233,
1407
- 248,
1408
- 89
1409
- ]
1410
- }
1411
- }
1305
+ "writable": true
1412
1306
  },
1413
1307
  {
1414
1308
  "name": "user_quote_account",
1415
1309
  "docs": [
1416
1310
  "User's quote token account (e.g., USDC) to pay from."
1417
1311
  ],
1418
- "writable": true,
1419
- "pda": {
1420
- "seeds": [
1421
- {
1422
- "kind": "account",
1423
- "path": "user"
1424
- },
1425
- {
1426
- "kind": "account",
1427
- "path": "token_program"
1428
- },
1429
- {
1430
- "kind": "account",
1431
- "path": "quote_mint"
1432
- }
1433
- ],
1434
- "program": {
1435
- "kind": "const",
1436
- "value": [
1437
- 140,
1438
- 151,
1439
- 37,
1440
- 143,
1441
- 78,
1442
- 36,
1443
- 137,
1444
- 241,
1445
- 187,
1446
- 61,
1447
- 16,
1448
- 41,
1449
- 20,
1450
- 142,
1451
- 13,
1452
- 131,
1453
- 11,
1454
- 90,
1455
- 19,
1456
- 153,
1457
- 218,
1458
- 255,
1459
- 16,
1460
- 132,
1461
- 4,
1462
- 142,
1463
- 123,
1464
- 216,
1465
- 219,
1466
- 233,
1467
- 248,
1468
- 89
1469
- ]
1470
- }
1471
- }
1312
+ "writable": true
1472
1313
  },
1473
1314
  {
1474
1315
  "name": "fee_vault",
@@ -2456,60 +2297,7 @@
2456
2297
  "docs": [
2457
2298
  "User's token account to receive bought tokens."
2458
2299
  ],
2459
- "writable": true,
2460
- "pda": {
2461
- "seeds": [
2462
- {
2463
- "kind": "account",
2464
- "path": "user"
2465
- },
2466
- {
2467
- "kind": "account",
2468
- "path": "token_program"
2469
- },
2470
- {
2471
- "kind": "account",
2472
- "path": "mint"
2473
- }
2474
- ],
2475
- "program": {
2476
- "kind": "const",
2477
- "value": [
2478
- 140,
2479
- 151,
2480
- 37,
2481
- 143,
2482
- 78,
2483
- 36,
2484
- 137,
2485
- 241,
2486
- 187,
2487
- 61,
2488
- 16,
2489
- 41,
2490
- 20,
2491
- 142,
2492
- 13,
2493
- 131,
2494
- 11,
2495
- 90,
2496
- 19,
2497
- 153,
2498
- 218,
2499
- 255,
2500
- 16,
2501
- 132,
2502
- 4,
2503
- 142,
2504
- 123,
2505
- 216,
2506
- 219,
2507
- 233,
2508
- 248,
2509
- 89
2510
- ]
2511
- }
2512
- }
2300
+ "writable": true
2513
2301
  },
2514
2302
  {
2515
2303
  "name": "fee_vault",
@@ -3444,146 +3232,40 @@
3444
3232
  "docs": [
3445
3233
  "User's base token account to receive bought tokens."
3446
3234
  ],
3235
+ "writable": true
3236
+ },
3237
+ {
3238
+ "name": "user_quote_account",
3239
+ "docs": [
3240
+ "User's quote token account (e.g., USDC) to pay from."
3241
+ ],
3242
+ "writable": true
3243
+ },
3244
+ {
3245
+ "name": "fee_vault",
3246
+ "docs": [
3247
+ "The fee vault (for Direct/Recipients mode, from liquid-fees)."
3248
+ ],
3447
3249
  "writable": true,
3448
3250
  "pda": {
3449
3251
  "seeds": [
3450
3252
  {
3451
- "kind": "account",
3452
- "path": "user"
3453
- },
3454
- {
3455
- "kind": "account",
3456
- "path": "token_program_2022"
3253
+ "kind": "const",
3254
+ "value": [
3255
+ 102,
3256
+ 101,
3257
+ 101,
3258
+ 95,
3259
+ 118,
3260
+ 97,
3261
+ 117,
3262
+ 108,
3263
+ 116
3264
+ ]
3457
3265
  },
3458
3266
  {
3459
3267
  "kind": "account",
3460
- "path": "mint"
3461
- }
3462
- ],
3463
- "program": {
3464
- "kind": "const",
3465
- "value": [
3466
- 140,
3467
- 151,
3468
- 37,
3469
- 143,
3470
- 78,
3471
- 36,
3472
- 137,
3473
- 241,
3474
- 187,
3475
- 61,
3476
- 16,
3477
- 41,
3478
- 20,
3479
- 142,
3480
- 13,
3481
- 131,
3482
- 11,
3483
- 90,
3484
- 19,
3485
- 153,
3486
- 218,
3487
- 255,
3488
- 16,
3489
- 132,
3490
- 4,
3491
- 142,
3492
- 123,
3493
- 216,
3494
- 219,
3495
- 233,
3496
- 248,
3497
- 89
3498
- ]
3499
- }
3500
- }
3501
- },
3502
- {
3503
- "name": "user_quote_account",
3504
- "docs": [
3505
- "User's quote token account (e.g., USDC) to pay from."
3506
- ],
3507
- "writable": true,
3508
- "pda": {
3509
- "seeds": [
3510
- {
3511
- "kind": "account",
3512
- "path": "user"
3513
- },
3514
- {
3515
- "kind": "account",
3516
- "path": "token_program"
3517
- },
3518
- {
3519
- "kind": "account",
3520
- "path": "quote_mint"
3521
- }
3522
- ],
3523
- "program": {
3524
- "kind": "const",
3525
- "value": [
3526
- 140,
3527
- 151,
3528
- 37,
3529
- 143,
3530
- 78,
3531
- 36,
3532
- 137,
3533
- 241,
3534
- 187,
3535
- 61,
3536
- 16,
3537
- 41,
3538
- 20,
3539
- 142,
3540
- 13,
3541
- 131,
3542
- 11,
3543
- 90,
3544
- 19,
3545
- 153,
3546
- 218,
3547
- 255,
3548
- 16,
3549
- 132,
3550
- 4,
3551
- 142,
3552
- 123,
3553
- 216,
3554
- 219,
3555
- 233,
3556
- 248,
3557
- 89
3558
- ]
3559
- }
3560
- }
3561
- },
3562
- {
3563
- "name": "fee_vault",
3564
- "docs": [
3565
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
3566
- ],
3567
- "writable": true,
3568
- "pda": {
3569
- "seeds": [
3570
- {
3571
- "kind": "const",
3572
- "value": [
3573
- 102,
3574
- 101,
3575
- 101,
3576
- 95,
3577
- 118,
3578
- 97,
3579
- 117,
3580
- 108,
3581
- 116
3582
- ]
3583
- },
3584
- {
3585
- "kind": "account",
3586
- "path": "fee_config"
3268
+ "path": "fee_config"
3587
3269
  }
3588
3270
  ],
3589
3271
  "program": {
@@ -8832,60 +8514,7 @@
8832
8514
  "docs": [
8833
8515
  "User's token account to send sold tokens from."
8834
8516
  ],
8835
- "writable": true,
8836
- "pda": {
8837
- "seeds": [
8838
- {
8839
- "kind": "account",
8840
- "path": "user"
8841
- },
8842
- {
8843
- "kind": "account",
8844
- "path": "token_program"
8845
- },
8846
- {
8847
- "kind": "account",
8848
- "path": "mint"
8849
- }
8850
- ],
8851
- "program": {
8852
- "kind": "const",
8853
- "value": [
8854
- 140,
8855
- 151,
8856
- 37,
8857
- 143,
8858
- 78,
8859
- 36,
8860
- 137,
8861
- 241,
8862
- 187,
8863
- 61,
8864
- 16,
8865
- 41,
8866
- 20,
8867
- 142,
8868
- 13,
8869
- 131,
8870
- 11,
8871
- 90,
8872
- 19,
8873
- 153,
8874
- 218,
8875
- 255,
8876
- 16,
8877
- 132,
8878
- 4,
8879
- 142,
8880
- 123,
8881
- 216,
8882
- 219,
8883
- 233,
8884
- 248,
8885
- 89
8886
- ]
8887
- }
8888
- }
8517
+ "writable": true
8889
8518
  },
8890
8519
  {
8891
8520
  "name": "fee_vault",
@@ -9820,120 +9449,14 @@
9820
9449
  "docs": [
9821
9450
  "User's base token account to send sold tokens from."
9822
9451
  ],
9823
- "writable": true,
9824
- "pda": {
9825
- "seeds": [
9826
- {
9827
- "kind": "account",
9828
- "path": "user"
9829
- },
9830
- {
9831
- "kind": "account",
9832
- "path": "token_program_2022"
9833
- },
9834
- {
9835
- "kind": "account",
9836
- "path": "mint"
9837
- }
9838
- ],
9839
- "program": {
9840
- "kind": "const",
9841
- "value": [
9842
- 140,
9843
- 151,
9844
- 37,
9845
- 143,
9846
- 78,
9847
- 36,
9848
- 137,
9849
- 241,
9850
- 187,
9851
- 61,
9852
- 16,
9853
- 41,
9854
- 20,
9855
- 142,
9856
- 13,
9857
- 131,
9858
- 11,
9859
- 90,
9860
- 19,
9861
- 153,
9862
- 218,
9863
- 255,
9864
- 16,
9865
- 132,
9866
- 4,
9867
- 142,
9868
- 123,
9869
- 216,
9870
- 219,
9871
- 233,
9872
- 248,
9873
- 89
9874
- ]
9875
- }
9876
- }
9452
+ "writable": true
9877
9453
  },
9878
9454
  {
9879
9455
  "name": "user_quote_account",
9880
9456
  "docs": [
9881
9457
  "User's quote token account (e.g., USDC) to receive payment."
9882
9458
  ],
9883
- "writable": true,
9884
- "pda": {
9885
- "seeds": [
9886
- {
9887
- "kind": "account",
9888
- "path": "user"
9889
- },
9890
- {
9891
- "kind": "account",
9892
- "path": "token_program"
9893
- },
9894
- {
9895
- "kind": "account",
9896
- "path": "quote_mint"
9897
- }
9898
- ],
9899
- "program": {
9900
- "kind": "const",
9901
- "value": [
9902
- 140,
9903
- 151,
9904
- 37,
9905
- 143,
9906
- 78,
9907
- 36,
9908
- 137,
9909
- 241,
9910
- 187,
9911
- 61,
9912
- 16,
9913
- 41,
9914
- 20,
9915
- 142,
9916
- 13,
9917
- 131,
9918
- 11,
9919
- 90,
9920
- 19,
9921
- 153,
9922
- 218,
9923
- 255,
9924
- 16,
9925
- 132,
9926
- 4,
9927
- 142,
9928
- 123,
9929
- 216,
9930
- 219,
9931
- 233,
9932
- 248,
9933
- 89
9934
- ]
9935
- }
9936
- }
9459
+ "writable": true
9937
9460
  },
9938
9461
  {
9939
9462
  "name": "fee_vault",
@@ -10921,60 +10444,7 @@
10921
10444
  "docs": [
10922
10445
  "User's token account to send sold tokens from."
10923
10446
  ],
10924
- "writable": true,
10925
- "pda": {
10926
- "seeds": [
10927
- {
10928
- "kind": "account",
10929
- "path": "user"
10930
- },
10931
- {
10932
- "kind": "account",
10933
- "path": "token_program"
10934
- },
10935
- {
10936
- "kind": "account",
10937
- "path": "mint"
10938
- }
10939
- ],
10940
- "program": {
10941
- "kind": "const",
10942
- "value": [
10943
- 140,
10944
- 151,
10945
- 37,
10946
- 143,
10947
- 78,
10948
- 36,
10949
- 137,
10950
- 241,
10951
- 187,
10952
- 61,
10953
- 16,
10954
- 41,
10955
- 20,
10956
- 142,
10957
- 13,
10958
- 131,
10959
- 11,
10960
- 90,
10961
- 19,
10962
- 153,
10963
- 218,
10964
- 255,
10965
- 16,
10966
- 132,
10967
- 4,
10968
- 142,
10969
- 123,
10970
- 216,
10971
- 219,
10972
- 233,
10973
- 248,
10974
- 89
10975
- ]
10976
- }
10977
- }
10447
+ "writable": true
10978
10448
  },
10979
10449
  {
10980
10450
  "name": "fee_vault",
@@ -11909,120 +11379,14 @@
11909
11379
  "docs": [
11910
11380
  "User's base token account to send sold tokens from."
11911
11381
  ],
11912
- "writable": true,
11913
- "pda": {
11914
- "seeds": [
11915
- {
11916
- "kind": "account",
11917
- "path": "user"
11918
- },
11919
- {
11920
- "kind": "account",
11921
- "path": "token_program_2022"
11922
- },
11923
- {
11924
- "kind": "account",
11925
- "path": "mint"
11926
- }
11927
- ],
11928
- "program": {
11929
- "kind": "const",
11930
- "value": [
11931
- 140,
11932
- 151,
11933
- 37,
11934
- 143,
11935
- 78,
11936
- 36,
11937
- 137,
11938
- 241,
11939
- 187,
11940
- 61,
11941
- 16,
11942
- 41,
11943
- 20,
11944
- 142,
11945
- 13,
11946
- 131,
11947
- 11,
11948
- 90,
11949
- 19,
11950
- 153,
11951
- 218,
11952
- 255,
11953
- 16,
11954
- 132,
11955
- 4,
11956
- 142,
11957
- 123,
11958
- 216,
11959
- 219,
11960
- 233,
11961
- 248,
11962
- 89
11963
- ]
11964
- }
11965
- }
11382
+ "writable": true
11966
11383
  },
11967
11384
  {
11968
11385
  "name": "user_quote_account",
11969
11386
  "docs": [
11970
11387
  "User's quote token account (e.g., USDC) to receive payment."
11971
11388
  ],
11972
- "writable": true,
11973
- "pda": {
11974
- "seeds": [
11975
- {
11976
- "kind": "account",
11977
- "path": "user"
11978
- },
11979
- {
11980
- "kind": "account",
11981
- "path": "token_program"
11982
- },
11983
- {
11984
- "kind": "account",
11985
- "path": "quote_mint"
11986
- }
11987
- ],
11988
- "program": {
11989
- "kind": "const",
11990
- "value": [
11991
- 140,
11992
- 151,
11993
- 37,
11994
- 143,
11995
- 78,
11996
- 36,
11997
- 137,
11998
- 241,
11999
- 187,
12000
- 61,
12001
- 16,
12002
- 41,
12003
- 20,
12004
- 142,
12005
- 13,
12006
- 131,
12007
- 11,
12008
- 90,
12009
- 19,
12010
- 153,
12011
- 218,
12012
- 255,
12013
- 16,
12014
- 132,
12015
- 4,
12016
- 142,
12017
- 123,
12018
- 216,
12019
- 219,
12020
- 233,
12021
- 248,
12022
- 89
12023
- ]
12024
- }
12025
- }
11389
+ "writable": true
12026
11390
  },
12027
11391
  {
12028
11392
  "name": "fee_vault",