@liquid-af/sdk 0.10.0 → 0.10.2

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 (39) hide show
  1. package/dist/accounts/liquid-fees.d.ts +2 -0
  2. package/dist/accounts/liquid-fees.d.ts.map +1 -1
  3. package/dist/client.d.ts +2 -0
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/events/index.d.ts +1 -1
  6. package/dist/events/index.d.ts.map +1 -1
  7. package/dist/events/parser.d.ts +20 -2
  8. package/dist/events/parser.d.ts.map +1 -1
  9. package/dist/events/parser.js.map +1 -1
  10. package/dist/helpers/preview.d.ts.map +1 -1
  11. package/dist/helpers/preview.js +21 -48
  12. package/dist/helpers/preview.js.map +1 -1
  13. package/dist/idl/liquid.d.ts +7 -3
  14. package/dist/idl/liquid.d.ts.map +1 -1
  15. package/dist/idl/liquid.json +7 -3
  16. package/dist/idl/liquid_events.d.ts +36 -18
  17. package/dist/idl/liquid_events.d.ts.map +1 -1
  18. package/dist/idl/liquid_events.json +36 -18
  19. package/dist/idl/liquid_fees.d.ts +5 -1
  20. package/dist/idl/liquid_fees.d.ts.map +1 -1
  21. package/dist/idl/liquid_fees.json +5 -1
  22. package/dist/idl/liquid_swap.d.ts +23 -1
  23. package/dist/idl/liquid_swap.d.ts.map +1 -1
  24. package/dist/idl/liquid_swap.json +29 -7
  25. package/dist/instructions/liquid-swap.js +2 -2
  26. package/dist/instructions/liquid-swap.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/events/index.ts +1 -1
  29. package/src/events/parser.ts +21 -10
  30. package/src/helpers/preview.ts +46 -48
  31. package/src/idl/liquid.json +7 -3
  32. package/src/idl/liquid.ts +7 -3
  33. package/src/idl/liquid_events.json +36 -18
  34. package/src/idl/liquid_events.ts +36 -18
  35. package/src/idl/liquid_fees.json +5 -1
  36. package/src/idl/liquid_fees.ts +5 -1
  37. package/src/idl/liquid_swap.json +29 -7
  38. package/src/idl/liquid_swap.ts +29 -7
  39. package/src/instructions/liquid-swap.ts +2 -2
@@ -2881,21 +2881,30 @@
2881
2881
  "docs": [
2882
2882
  "The address that holds pool tokens for base token."
2883
2883
  ],
2884
- "writable": true
2884
+ "writable": true,
2885
+ "relations": [
2886
+ "pool_state"
2887
+ ]
2885
2888
  },
2886
2889
  {
2887
2890
  "name": "quote_vault",
2888
2891
  "docs": [
2889
2892
  "The address that holds pool tokens for quote token."
2890
2893
  ],
2891
- "writable": true
2894
+ "writable": true,
2895
+ "relations": [
2896
+ "pool_state"
2897
+ ]
2892
2898
  },
2893
2899
  {
2894
2900
  "name": "lp_mint",
2895
2901
  "docs": [
2896
2902
  "LP token mint."
2897
2903
  ],
2898
- "writable": true
2904
+ "writable": true,
2905
+ "relations": [
2906
+ "pool_state"
2907
+ ]
2899
2908
  },
2900
2909
  {
2901
2910
  "name": "global_config",
@@ -6549,21 +6558,30 @@
6549
6558
  "docs": [
6550
6559
  "The address that holds pool tokens for base token."
6551
6560
  ],
6552
- "writable": true
6561
+ "writable": true,
6562
+ "relations": [
6563
+ "pool_state"
6564
+ ]
6553
6565
  },
6554
6566
  {
6555
6567
  "name": "quote_vault",
6556
6568
  "docs": [
6557
6569
  "The address that holds pool tokens for quote token."
6558
6570
  ],
6559
- "writable": true
6571
+ "writable": true,
6572
+ "relations": [
6573
+ "pool_state"
6574
+ ]
6560
6575
  },
6561
6576
  {
6562
6577
  "name": "lp_mint",
6563
6578
  "docs": [
6564
6579
  "Pool LP token mint."
6565
6580
  ],
6566
- "writable": true
6581
+ "writable": true,
6582
+ "relations": [
6583
+ "pool_state"
6584
+ ]
6567
6585
  },
6568
6586
  {
6569
6587
  "name": "global_config",
@@ -7185,12 +7203,16 @@
7185
7203
  "name": "basis_points",
7186
7204
  "type": "u16"
7187
7205
  },
7206
+ {
7207
+ "name": "vault_bump",
7208
+ "type": "u8"
7209
+ },
7188
7210
  {
7189
7211
  "name": "_padding",
7190
7212
  "type": {
7191
7213
  "array": [
7192
7214
  "u8",
7193
- 6
7215
+ 5
7194
7216
  ]
7195
7217
  }
7196
7218
  }
@@ -2887,21 +2887,30 @@ export type LiquidSwap = {
2887
2887
  "docs": [
2888
2888
  "The address that holds pool tokens for base token."
2889
2889
  ],
2890
- "writable": true
2890
+ "writable": true,
2891
+ "relations": [
2892
+ "poolState"
2893
+ ]
2891
2894
  },
2892
2895
  {
2893
2896
  "name": "quoteVault",
2894
2897
  "docs": [
2895
2898
  "The address that holds pool tokens for quote token."
2896
2899
  ],
2897
- "writable": true
2900
+ "writable": true,
2901
+ "relations": [
2902
+ "poolState"
2903
+ ]
2898
2904
  },
2899
2905
  {
2900
2906
  "name": "lpMint",
2901
2907
  "docs": [
2902
2908
  "LP token mint."
2903
2909
  ],
2904
- "writable": true
2910
+ "writable": true,
2911
+ "relations": [
2912
+ "poolState"
2913
+ ]
2905
2914
  },
2906
2915
  {
2907
2916
  "name": "globalConfig",
@@ -6555,21 +6564,30 @@ export type LiquidSwap = {
6555
6564
  "docs": [
6556
6565
  "The address that holds pool tokens for base token."
6557
6566
  ],
6558
- "writable": true
6567
+ "writable": true,
6568
+ "relations": [
6569
+ "poolState"
6570
+ ]
6559
6571
  },
6560
6572
  {
6561
6573
  "name": "quoteVault",
6562
6574
  "docs": [
6563
6575
  "The address that holds pool tokens for quote token."
6564
6576
  ],
6565
- "writable": true
6577
+ "writable": true,
6578
+ "relations": [
6579
+ "poolState"
6580
+ ]
6566
6581
  },
6567
6582
  {
6568
6583
  "name": "lpMint",
6569
6584
  "docs": [
6570
6585
  "Pool LP token mint."
6571
6586
  ],
6572
- "writable": true
6587
+ "writable": true,
6588
+ "relations": [
6589
+ "poolState"
6590
+ ]
6573
6591
  },
6574
6592
  {
6575
6593
  "name": "globalConfig",
@@ -7191,12 +7209,16 @@ export type LiquidSwap = {
7191
7209
  "name": "basisPoints",
7192
7210
  "type": "u16"
7193
7211
  },
7212
+ {
7213
+ "name": "vaultBump",
7214
+ "type": "u8"
7215
+ },
7194
7216
  {
7195
7217
  "name": "padding",
7196
7218
  "type": {
7197
7219
  "array": [
7198
7220
  "u8",
7199
- 6
7221
+ 5
7200
7222
  ]
7201
7223
  }
7202
7224
  }
@@ -422,7 +422,7 @@ export function buildDeposit(
422
422
 
423
423
  return program.methods
424
424
  .deposit(lpTokenAmount, maximumBaseAmount, maximumQuoteAmount)
425
- .accounts({
425
+ .accountsPartial({
426
426
  owner,
427
427
  poolState: poolAddress,
428
428
  ownerLpToken,
@@ -501,7 +501,7 @@ export function buildWithdraw(
501
501
 
502
502
  return program.methods
503
503
  .withdraw(lpTokenAmount, minimumBaseAmount, minimumQuoteAmount)
504
- .accounts({
504
+ .accountsPartial({
505
505
  owner,
506
506
  poolState: poolAddress,
507
507
  ownerLpToken,