@liquid-af/sdk 0.7.2 → 0.8.0
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/README.md +17 -17
- package/dist/client.d.ts +16 -16
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +28 -28
- package/dist/client.js.map +1 -1
- package/dist/idl/liquid.d.ts +111 -111
- package/dist/idl/liquid.d.ts.map +1 -1
- package/dist/idl/liquid.json +111 -111
- package/dist/idl/liquid_swap.d.ts +40 -40
- package/dist/idl/liquid_swap.d.ts.map +1 -1
- package/dist/idl/liquid_swap.json +40 -40
- package/dist/instructions/index.d.ts +4 -4
- package/dist/instructions/index.d.ts.map +1 -1
- package/dist/instructions/index.js +3 -3
- package/dist/instructions/index.js.map +1 -1
- package/dist/instructions/liquid-swap.d.ts +12 -12
- package/dist/instructions/liquid-swap.d.ts.map +1 -1
- package/dist/instructions/liquid-swap.js +12 -12
- package/dist/instructions/liquid-swap.js.map +1 -1
- package/dist/instructions/liquid.d.ts +36 -36
- package/dist/instructions/liquid.d.ts.map +1 -1
- package/dist/instructions/liquid.js +42 -42
- package/dist/instructions/liquid.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +36 -36
- package/src/idl/liquid.json +111 -111
- package/src/idl/liquid.ts +111 -111
- package/src/idl/liquid_swap.json +40 -40
- package/src/idl/liquid_swap.ts +40 -40
- package/src/instructions/index.ts +24 -24
- package/src/instructions/liquid-swap.ts +18 -18
- package/src/instructions/liquid.ts +60 -60
package/src/idl/liquid.json
CHANGED
|
@@ -192,23 +192,23 @@
|
|
|
192
192
|
"args": []
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
|
-
"name": "
|
|
195
|
+
"name": "buy_exact_in_native",
|
|
196
196
|
"docs": [
|
|
197
|
-
"Buys
|
|
197
|
+
"Buys tokens from the bonding curve by spending an exact amount of SOL (exact input).",
|
|
198
198
|
"",
|
|
199
199
|
"# Arguments",
|
|
200
|
-
"* `
|
|
201
|
-
"* `
|
|
200
|
+
"* `amount_in` - Exact amount of SOL to spend (gross, before fees).",
|
|
201
|
+
"* `min_amount_out` - Minimum tokens expected (slippage protection)."
|
|
202
202
|
],
|
|
203
203
|
"discriminator": [
|
|
204
|
-
|
|
204
|
+
78,
|
|
205
205
|
141,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
86,
|
|
207
|
+
103,
|
|
208
|
+
221,
|
|
209
|
+
69,
|
|
210
|
+
201,
|
|
211
|
+
8
|
|
212
212
|
],
|
|
213
213
|
"accounts": [
|
|
214
214
|
{
|
|
@@ -1154,33 +1154,33 @@
|
|
|
1154
1154
|
],
|
|
1155
1155
|
"args": [
|
|
1156
1156
|
{
|
|
1157
|
-
"name": "
|
|
1157
|
+
"name": "amount_in",
|
|
1158
1158
|
"type": "u64"
|
|
1159
1159
|
},
|
|
1160
1160
|
{
|
|
1161
|
-
"name": "
|
|
1161
|
+
"name": "min_amount_out",
|
|
1162
1162
|
"type": "u64"
|
|
1163
1163
|
}
|
|
1164
1164
|
]
|
|
1165
1165
|
},
|
|
1166
1166
|
{
|
|
1167
|
-
"name": "
|
|
1167
|
+
"name": "buy_exact_in_stable",
|
|
1168
1168
|
"docs": [
|
|
1169
|
-
"Buys
|
|
1169
|
+
"Buys base tokens from a token-based bonding curve by spending an exact amount of quote tokens (exact input).",
|
|
1170
1170
|
"",
|
|
1171
1171
|
"# Arguments",
|
|
1172
|
-
"* `
|
|
1173
|
-
"* `
|
|
1172
|
+
"* `amount_in` - Exact amount of quote tokens (e.g., USDC) to spend (gross, before fees).",
|
|
1173
|
+
"* `min_amount_out` - Minimum base tokens expected (slippage protection)."
|
|
1174
1174
|
],
|
|
1175
1175
|
"discriminator": [
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1176
|
+
29,
|
|
1177
|
+
218,
|
|
1178
|
+
169,
|
|
1179
|
+
159,
|
|
1180
|
+
209,
|
|
1181
|
+
43,
|
|
1182
|
+
152,
|
|
1183
|
+
140
|
|
1184
1184
|
],
|
|
1185
1185
|
"accounts": [
|
|
1186
1186
|
{
|
|
@@ -2271,33 +2271,33 @@
|
|
|
2271
2271
|
],
|
|
2272
2272
|
"args": [
|
|
2273
2273
|
{
|
|
2274
|
-
"name": "
|
|
2274
|
+
"name": "amount_in",
|
|
2275
2275
|
"type": "u64"
|
|
2276
2276
|
},
|
|
2277
2277
|
{
|
|
2278
|
-
"name": "
|
|
2278
|
+
"name": "min_amount_out",
|
|
2279
2279
|
"type": "u64"
|
|
2280
2280
|
}
|
|
2281
2281
|
]
|
|
2282
2282
|
},
|
|
2283
2283
|
{
|
|
2284
|
-
"name": "
|
|
2284
|
+
"name": "buy_exact_out_native",
|
|
2285
2285
|
"docs": [
|
|
2286
|
-
"
|
|
2286
|
+
"Buys an exact amount of tokens from the bonding curve (exact output).",
|
|
2287
2287
|
"",
|
|
2288
2288
|
"# Arguments",
|
|
2289
|
-
"* `
|
|
2290
|
-
"* `
|
|
2289
|
+
"* `amount_out` - Exact amount of tokens to receive.",
|
|
2290
|
+
"* `max_amount_in` - Maximum SOL willing to spend (slippage protection)."
|
|
2291
2291
|
],
|
|
2292
2292
|
"discriminator": [
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2293
|
+
32,
|
|
2294
|
+
69,
|
|
2295
|
+
113,
|
|
2296
|
+
201,
|
|
2297
|
+
72,
|
|
2298
|
+
30,
|
|
2299
|
+
181,
|
|
2300
|
+
249
|
|
2301
2301
|
],
|
|
2302
2302
|
"accounts": [
|
|
2303
2303
|
{
|
|
@@ -3243,33 +3243,33 @@
|
|
|
3243
3243
|
],
|
|
3244
3244
|
"args": [
|
|
3245
3245
|
{
|
|
3246
|
-
"name": "
|
|
3246
|
+
"name": "amount_out",
|
|
3247
3247
|
"type": "u64"
|
|
3248
3248
|
},
|
|
3249
3249
|
{
|
|
3250
|
-
"name": "
|
|
3250
|
+
"name": "max_amount_in",
|
|
3251
3251
|
"type": "u64"
|
|
3252
3252
|
}
|
|
3253
3253
|
]
|
|
3254
3254
|
},
|
|
3255
3255
|
{
|
|
3256
|
-
"name": "
|
|
3256
|
+
"name": "buy_exact_out_stable",
|
|
3257
3257
|
"docs": [
|
|
3258
|
-
"
|
|
3258
|
+
"Buys an exact amount of base tokens from a token-based bonding curve (exact output).",
|
|
3259
3259
|
"",
|
|
3260
3260
|
"# Arguments",
|
|
3261
|
-
"* `
|
|
3262
|
-
"* `
|
|
3261
|
+
"* `amount_out` - Exact amount of base tokens to receive.",
|
|
3262
|
+
"* `max_amount_in` - Maximum quote tokens willing to spend (slippage protection)."
|
|
3263
3263
|
],
|
|
3264
3264
|
"discriminator": [
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3265
|
+
175,
|
|
3266
|
+
248,
|
|
3267
|
+
189,
|
|
3268
|
+
233,
|
|
3269
|
+
111,
|
|
3270
|
+
155,
|
|
3271
|
+
200,
|
|
3272
|
+
152
|
|
3273
3273
|
],
|
|
3274
3274
|
"accounts": [
|
|
3275
3275
|
{
|
|
@@ -4360,11 +4360,11 @@
|
|
|
4360
4360
|
],
|
|
4361
4361
|
"args": [
|
|
4362
4362
|
{
|
|
4363
|
-
"name": "
|
|
4363
|
+
"name": "amount_out",
|
|
4364
4364
|
"type": "u64"
|
|
4365
4365
|
},
|
|
4366
4366
|
{
|
|
4367
|
-
"name": "
|
|
4367
|
+
"name": "max_amount_in",
|
|
4368
4368
|
"type": "u64"
|
|
4369
4369
|
}
|
|
4370
4370
|
]
|
|
@@ -8657,23 +8657,23 @@
|
|
|
8657
8657
|
"args": []
|
|
8658
8658
|
},
|
|
8659
8659
|
{
|
|
8660
|
-
"name": "
|
|
8660
|
+
"name": "sell_exact_in_native",
|
|
8661
8661
|
"docs": [
|
|
8662
|
-
"Sells tokens on the bonding curve
|
|
8662
|
+
"Sells an exact amount of tokens on the bonding curve for SOL (exact input).",
|
|
8663
8663
|
"",
|
|
8664
8664
|
"# Arguments",
|
|
8665
|
-
"* `
|
|
8666
|
-
"* `
|
|
8665
|
+
"* `amount_in` - Exact amount of tokens to sell.",
|
|
8666
|
+
"* `min_amount_out` - Minimum SOL expected (slippage protection)."
|
|
8667
8667
|
],
|
|
8668
8668
|
"discriminator": [
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8669
|
+
63,
|
|
8670
|
+
236,
|
|
8671
|
+
105,
|
|
8672
|
+
4,
|
|
8673
|
+
82,
|
|
8674
|
+
226,
|
|
8675
|
+
6,
|
|
8676
|
+
53
|
|
8677
8677
|
],
|
|
8678
8678
|
"accounts": [
|
|
8679
8679
|
{
|
|
@@ -9619,33 +9619,33 @@
|
|
|
9619
9619
|
],
|
|
9620
9620
|
"args": [
|
|
9621
9621
|
{
|
|
9622
|
-
"name": "
|
|
9622
|
+
"name": "amount_in",
|
|
9623
9623
|
"type": "u64"
|
|
9624
9624
|
},
|
|
9625
9625
|
{
|
|
9626
|
-
"name": "
|
|
9626
|
+
"name": "min_amount_out",
|
|
9627
9627
|
"type": "u64"
|
|
9628
9628
|
}
|
|
9629
9629
|
]
|
|
9630
9630
|
},
|
|
9631
9631
|
{
|
|
9632
|
-
"name": "
|
|
9632
|
+
"name": "sell_exact_in_stable",
|
|
9633
9633
|
"docs": [
|
|
9634
|
-
"Sells base tokens on a token-based bonding curve
|
|
9634
|
+
"Sells an exact amount of base tokens on a token-based bonding curve for quote tokens (exact input).",
|
|
9635
9635
|
"",
|
|
9636
9636
|
"# Arguments",
|
|
9637
|
-
"* `
|
|
9638
|
-
"* `
|
|
9637
|
+
"* `amount_in` - Exact amount of base tokens to sell.",
|
|
9638
|
+
"* `min_amount_out` - Minimum quote tokens expected (slippage protection)."
|
|
9639
9639
|
],
|
|
9640
9640
|
"discriminator": [
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9641
|
+
58,
|
|
9642
|
+
81,
|
|
9643
|
+
251,
|
|
9644
|
+
217,
|
|
9645
|
+
70,
|
|
9646
|
+
33,
|
|
9647
|
+
92,
|
|
9648
|
+
126
|
|
9649
9649
|
],
|
|
9650
9650
|
"accounts": [
|
|
9651
9651
|
{
|
|
@@ -10736,33 +10736,33 @@
|
|
|
10736
10736
|
],
|
|
10737
10737
|
"args": [
|
|
10738
10738
|
{
|
|
10739
|
-
"name": "
|
|
10739
|
+
"name": "amount_in",
|
|
10740
10740
|
"type": "u64"
|
|
10741
10741
|
},
|
|
10742
10742
|
{
|
|
10743
|
-
"name": "
|
|
10743
|
+
"name": "min_amount_out",
|
|
10744
10744
|
"type": "u64"
|
|
10745
10745
|
}
|
|
10746
10746
|
]
|
|
10747
10747
|
},
|
|
10748
10748
|
{
|
|
10749
|
-
"name": "
|
|
10749
|
+
"name": "sell_exact_out_native",
|
|
10750
10750
|
"docs": [
|
|
10751
|
-
"
|
|
10751
|
+
"Sells tokens on the bonding curve to receive an exact amount of SOL (exact output).",
|
|
10752
10752
|
"",
|
|
10753
10753
|
"# Arguments",
|
|
10754
|
-
"* `
|
|
10755
|
-
"* `
|
|
10754
|
+
"* `amount_out` - Exact net SOL to receive (after fees).",
|
|
10755
|
+
"* `max_amount_in` - Maximum tokens willing to sell (slippage protection)."
|
|
10756
10756
|
],
|
|
10757
10757
|
"discriminator": [
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10758
|
+
12,
|
|
10759
|
+
37,
|
|
10760
|
+
246,
|
|
10761
|
+
175,
|
|
10762
|
+
240,
|
|
10763
|
+
13,
|
|
10764
|
+
94,
|
|
10765
|
+
159
|
|
10766
10766
|
],
|
|
10767
10767
|
"accounts": [
|
|
10768
10768
|
{
|
|
@@ -11708,33 +11708,33 @@
|
|
|
11708
11708
|
],
|
|
11709
11709
|
"args": [
|
|
11710
11710
|
{
|
|
11711
|
-
"name": "
|
|
11711
|
+
"name": "amount_out",
|
|
11712
11712
|
"type": "u64"
|
|
11713
11713
|
},
|
|
11714
11714
|
{
|
|
11715
|
-
"name": "
|
|
11715
|
+
"name": "max_amount_in",
|
|
11716
11716
|
"type": "u64"
|
|
11717
11717
|
}
|
|
11718
11718
|
]
|
|
11719
11719
|
},
|
|
11720
11720
|
{
|
|
11721
|
-
"name": "
|
|
11721
|
+
"name": "sell_exact_out_stable",
|
|
11722
11722
|
"docs": [
|
|
11723
|
-
"
|
|
11723
|
+
"Sells base tokens on a token-based bonding curve to receive an exact amount of quote tokens (exact output).",
|
|
11724
11724
|
"",
|
|
11725
11725
|
"# Arguments",
|
|
11726
|
-
"* `
|
|
11727
|
-
"* `
|
|
11726
|
+
"* `amount_out` - Exact net quote tokens to receive (after fees).",
|
|
11727
|
+
"* `max_amount_in` - Maximum base tokens willing to sell (slippage protection)."
|
|
11728
11728
|
],
|
|
11729
11729
|
"discriminator": [
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11730
|
+
142,
|
|
11731
|
+
160,
|
|
11732
|
+
62,
|
|
11733
|
+
117,
|
|
11734
|
+
13,
|
|
11735
|
+
119,
|
|
11736
|
+
8,
|
|
11737
|
+
3
|
|
11738
11738
|
],
|
|
11739
11739
|
"accounts": [
|
|
11740
11740
|
{
|
|
@@ -12825,11 +12825,11 @@
|
|
|
12825
12825
|
],
|
|
12826
12826
|
"args": [
|
|
12827
12827
|
{
|
|
12828
|
-
"name": "
|
|
12828
|
+
"name": "amount_out",
|
|
12829
12829
|
"type": "u64"
|
|
12830
12830
|
},
|
|
12831
12831
|
{
|
|
12832
|
-
"name": "
|
|
12832
|
+
"name": "max_amount_in",
|
|
12833
12833
|
"type": "u64"
|
|
12834
12834
|
}
|
|
12835
12835
|
]
|