@liquid-af/sdk 0.7.1 → 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/events/types.d.ts +4 -2
- package/dist/events/types.d.ts.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_events.d.ts +34 -14
- package/dist/idl/liquid_events.d.ts.map +1 -1
- package/dist/idl/liquid_events.json +34 -14
- 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/events/types.ts +1 -2
- package/src/idl/liquid.json +111 -111
- package/src/idl/liquid.ts +111 -111
- package/src/idl/liquid_events.json +34 -14
- package/src/idl/liquid_events.ts +34 -14
- 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/dist/idl/liquid.d.ts
CHANGED
|
@@ -198,23 +198,23 @@ export type Liquid = {
|
|
|
198
198
|
"args": [];
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
|
-
"name": "
|
|
201
|
+
"name": "buyExactInNative";
|
|
202
202
|
"docs": [
|
|
203
|
-
"Buys
|
|
203
|
+
"Buys tokens from the bonding curve by spending an exact amount of SOL (exact input).",
|
|
204
204
|
"",
|
|
205
205
|
"# Arguments",
|
|
206
|
-
"* `
|
|
207
|
-
"* `
|
|
206
|
+
"* `amount_in` - Exact amount of SOL to spend (gross, before fees).",
|
|
207
|
+
"* `min_amount_out` - Minimum tokens expected (slippage protection)."
|
|
208
208
|
];
|
|
209
209
|
"discriminator": [
|
|
210
|
-
|
|
210
|
+
78,
|
|
211
211
|
141,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
86,
|
|
213
|
+
103,
|
|
214
|
+
221,
|
|
215
|
+
69,
|
|
216
|
+
201,
|
|
217
|
+
8
|
|
218
218
|
];
|
|
219
219
|
"accounts": [
|
|
220
220
|
{
|
|
@@ -1160,33 +1160,33 @@ export type Liquid = {
|
|
|
1160
1160
|
];
|
|
1161
1161
|
"args": [
|
|
1162
1162
|
{
|
|
1163
|
-
"name": "
|
|
1163
|
+
"name": "amountIn";
|
|
1164
1164
|
"type": "u64";
|
|
1165
1165
|
},
|
|
1166
1166
|
{
|
|
1167
|
-
"name": "
|
|
1167
|
+
"name": "minAmountOut";
|
|
1168
1168
|
"type": "u64";
|
|
1169
1169
|
}
|
|
1170
1170
|
];
|
|
1171
1171
|
},
|
|
1172
1172
|
{
|
|
1173
|
-
"name": "
|
|
1173
|
+
"name": "buyExactInStable";
|
|
1174
1174
|
"docs": [
|
|
1175
|
-
"Buys
|
|
1175
|
+
"Buys base tokens from a token-based bonding curve by spending an exact amount of quote tokens (exact input).",
|
|
1176
1176
|
"",
|
|
1177
1177
|
"# Arguments",
|
|
1178
|
-
"* `
|
|
1179
|
-
"* `
|
|
1178
|
+
"* `amount_in` - Exact amount of quote tokens (e.g., USDC) to spend (gross, before fees).",
|
|
1179
|
+
"* `min_amount_out` - Minimum base tokens expected (slippage protection)."
|
|
1180
1180
|
];
|
|
1181
1181
|
"discriminator": [
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1182
|
+
29,
|
|
1183
|
+
218,
|
|
1184
|
+
169,
|
|
1185
|
+
159,
|
|
1186
|
+
209,
|
|
1187
|
+
43,
|
|
1188
|
+
152,
|
|
1189
|
+
140
|
|
1190
1190
|
];
|
|
1191
1191
|
"accounts": [
|
|
1192
1192
|
{
|
|
@@ -2277,33 +2277,33 @@ export type Liquid = {
|
|
|
2277
2277
|
];
|
|
2278
2278
|
"args": [
|
|
2279
2279
|
{
|
|
2280
|
-
"name": "
|
|
2280
|
+
"name": "amountIn";
|
|
2281
2281
|
"type": "u64";
|
|
2282
2282
|
},
|
|
2283
2283
|
{
|
|
2284
|
-
"name": "
|
|
2284
|
+
"name": "minAmountOut";
|
|
2285
2285
|
"type": "u64";
|
|
2286
2286
|
}
|
|
2287
2287
|
];
|
|
2288
2288
|
},
|
|
2289
2289
|
{
|
|
2290
|
-
"name": "
|
|
2290
|
+
"name": "buyExactOutNative";
|
|
2291
2291
|
"docs": [
|
|
2292
|
-
"
|
|
2292
|
+
"Buys an exact amount of tokens from the bonding curve (exact output).",
|
|
2293
2293
|
"",
|
|
2294
2294
|
"# Arguments",
|
|
2295
|
-
"* `
|
|
2296
|
-
"* `
|
|
2295
|
+
"* `amount_out` - Exact amount of tokens to receive.",
|
|
2296
|
+
"* `max_amount_in` - Maximum SOL willing to spend (slippage protection)."
|
|
2297
2297
|
];
|
|
2298
2298
|
"discriminator": [
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2299
|
+
32,
|
|
2300
|
+
69,
|
|
2301
|
+
113,
|
|
2302
|
+
201,
|
|
2303
|
+
72,
|
|
2304
|
+
30,
|
|
2305
|
+
181,
|
|
2306
|
+
249
|
|
2307
2307
|
];
|
|
2308
2308
|
"accounts": [
|
|
2309
2309
|
{
|
|
@@ -3249,33 +3249,33 @@ export type Liquid = {
|
|
|
3249
3249
|
];
|
|
3250
3250
|
"args": [
|
|
3251
3251
|
{
|
|
3252
|
-
"name": "
|
|
3252
|
+
"name": "amountOut";
|
|
3253
3253
|
"type": "u64";
|
|
3254
3254
|
},
|
|
3255
3255
|
{
|
|
3256
|
-
"name": "
|
|
3256
|
+
"name": "maxAmountIn";
|
|
3257
3257
|
"type": "u64";
|
|
3258
3258
|
}
|
|
3259
3259
|
];
|
|
3260
3260
|
},
|
|
3261
3261
|
{
|
|
3262
|
-
"name": "
|
|
3262
|
+
"name": "buyExactOutStable";
|
|
3263
3263
|
"docs": [
|
|
3264
|
-
"
|
|
3264
|
+
"Buys an exact amount of base tokens from a token-based bonding curve (exact output).",
|
|
3265
3265
|
"",
|
|
3266
3266
|
"# Arguments",
|
|
3267
|
-
"* `
|
|
3268
|
-
"* `
|
|
3267
|
+
"* `amount_out` - Exact amount of base tokens to receive.",
|
|
3268
|
+
"* `max_amount_in` - Maximum quote tokens willing to spend (slippage protection)."
|
|
3269
3269
|
];
|
|
3270
3270
|
"discriminator": [
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3271
|
+
175,
|
|
3272
|
+
248,
|
|
3273
|
+
189,
|
|
3274
|
+
233,
|
|
3275
|
+
111,
|
|
3276
|
+
155,
|
|
3277
|
+
200,
|
|
3278
|
+
152
|
|
3279
3279
|
];
|
|
3280
3280
|
"accounts": [
|
|
3281
3281
|
{
|
|
@@ -4366,11 +4366,11 @@ export type Liquid = {
|
|
|
4366
4366
|
];
|
|
4367
4367
|
"args": [
|
|
4368
4368
|
{
|
|
4369
|
-
"name": "
|
|
4369
|
+
"name": "amountOut";
|
|
4370
4370
|
"type": "u64";
|
|
4371
4371
|
},
|
|
4372
4372
|
{
|
|
4373
|
-
"name": "
|
|
4373
|
+
"name": "maxAmountIn";
|
|
4374
4374
|
"type": "u64";
|
|
4375
4375
|
}
|
|
4376
4376
|
];
|
|
@@ -8663,23 +8663,23 @@ export type Liquid = {
|
|
|
8663
8663
|
"args": [];
|
|
8664
8664
|
},
|
|
8665
8665
|
{
|
|
8666
|
-
"name": "
|
|
8666
|
+
"name": "sellExactInNative";
|
|
8667
8667
|
"docs": [
|
|
8668
|
-
"Sells tokens on the bonding curve
|
|
8668
|
+
"Sells an exact amount of tokens on the bonding curve for SOL (exact input).",
|
|
8669
8669
|
"",
|
|
8670
8670
|
"# Arguments",
|
|
8671
|
-
"* `
|
|
8672
|
-
"* `
|
|
8671
|
+
"* `amount_in` - Exact amount of tokens to sell.",
|
|
8672
|
+
"* `min_amount_out` - Minimum SOL expected (slippage protection)."
|
|
8673
8673
|
];
|
|
8674
8674
|
"discriminator": [
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8675
|
+
63,
|
|
8676
|
+
236,
|
|
8677
|
+
105,
|
|
8678
|
+
4,
|
|
8679
|
+
82,
|
|
8680
|
+
226,
|
|
8681
|
+
6,
|
|
8682
|
+
53
|
|
8683
8683
|
];
|
|
8684
8684
|
"accounts": [
|
|
8685
8685
|
{
|
|
@@ -9625,33 +9625,33 @@ export type Liquid = {
|
|
|
9625
9625
|
];
|
|
9626
9626
|
"args": [
|
|
9627
9627
|
{
|
|
9628
|
-
"name": "
|
|
9628
|
+
"name": "amountIn";
|
|
9629
9629
|
"type": "u64";
|
|
9630
9630
|
},
|
|
9631
9631
|
{
|
|
9632
|
-
"name": "
|
|
9632
|
+
"name": "minAmountOut";
|
|
9633
9633
|
"type": "u64";
|
|
9634
9634
|
}
|
|
9635
9635
|
];
|
|
9636
9636
|
},
|
|
9637
9637
|
{
|
|
9638
|
-
"name": "
|
|
9638
|
+
"name": "sellExactInStable";
|
|
9639
9639
|
"docs": [
|
|
9640
|
-
"Sells base tokens on a token-based bonding curve
|
|
9640
|
+
"Sells an exact amount of base tokens on a token-based bonding curve for quote tokens (exact input).",
|
|
9641
9641
|
"",
|
|
9642
9642
|
"# Arguments",
|
|
9643
|
-
"* `
|
|
9644
|
-
"* `
|
|
9643
|
+
"* `amount_in` - Exact amount of base tokens to sell.",
|
|
9644
|
+
"* `min_amount_out` - Minimum quote tokens expected (slippage protection)."
|
|
9645
9645
|
];
|
|
9646
9646
|
"discriminator": [
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9647
|
+
58,
|
|
9648
|
+
81,
|
|
9649
|
+
251,
|
|
9650
|
+
217,
|
|
9651
|
+
70,
|
|
9652
|
+
33,
|
|
9653
|
+
92,
|
|
9654
|
+
126
|
|
9655
9655
|
];
|
|
9656
9656
|
"accounts": [
|
|
9657
9657
|
{
|
|
@@ -10742,33 +10742,33 @@ export type Liquid = {
|
|
|
10742
10742
|
];
|
|
10743
10743
|
"args": [
|
|
10744
10744
|
{
|
|
10745
|
-
"name": "
|
|
10745
|
+
"name": "amountIn";
|
|
10746
10746
|
"type": "u64";
|
|
10747
10747
|
},
|
|
10748
10748
|
{
|
|
10749
|
-
"name": "
|
|
10749
|
+
"name": "minAmountOut";
|
|
10750
10750
|
"type": "u64";
|
|
10751
10751
|
}
|
|
10752
10752
|
];
|
|
10753
10753
|
},
|
|
10754
10754
|
{
|
|
10755
|
-
"name": "
|
|
10755
|
+
"name": "sellExactOutNative";
|
|
10756
10756
|
"docs": [
|
|
10757
|
-
"
|
|
10757
|
+
"Sells tokens on the bonding curve to receive an exact amount of SOL (exact output).",
|
|
10758
10758
|
"",
|
|
10759
10759
|
"# Arguments",
|
|
10760
|
-
"* `
|
|
10761
|
-
"* `
|
|
10760
|
+
"* `amount_out` - Exact net SOL to receive (after fees).",
|
|
10761
|
+
"* `max_amount_in` - Maximum tokens willing to sell (slippage protection)."
|
|
10762
10762
|
];
|
|
10763
10763
|
"discriminator": [
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10764
|
+
12,
|
|
10765
|
+
37,
|
|
10766
|
+
246,
|
|
10767
|
+
175,
|
|
10768
|
+
240,
|
|
10769
|
+
13,
|
|
10770
|
+
94,
|
|
10771
|
+
159
|
|
10772
10772
|
];
|
|
10773
10773
|
"accounts": [
|
|
10774
10774
|
{
|
|
@@ -11714,33 +11714,33 @@ export type Liquid = {
|
|
|
11714
11714
|
];
|
|
11715
11715
|
"args": [
|
|
11716
11716
|
{
|
|
11717
|
-
"name": "
|
|
11717
|
+
"name": "amountOut";
|
|
11718
11718
|
"type": "u64";
|
|
11719
11719
|
},
|
|
11720
11720
|
{
|
|
11721
|
-
"name": "
|
|
11721
|
+
"name": "maxAmountIn";
|
|
11722
11722
|
"type": "u64";
|
|
11723
11723
|
}
|
|
11724
11724
|
];
|
|
11725
11725
|
},
|
|
11726
11726
|
{
|
|
11727
|
-
"name": "
|
|
11727
|
+
"name": "sellExactOutStable";
|
|
11728
11728
|
"docs": [
|
|
11729
|
-
"
|
|
11729
|
+
"Sells base tokens on a token-based bonding curve to receive an exact amount of quote tokens (exact output).",
|
|
11730
11730
|
"",
|
|
11731
11731
|
"# Arguments",
|
|
11732
|
-
"* `
|
|
11733
|
-
"* `
|
|
11732
|
+
"* `amount_out` - Exact net quote tokens to receive (after fees).",
|
|
11733
|
+
"* `max_amount_in` - Maximum base tokens willing to sell (slippage protection)."
|
|
11734
11734
|
];
|
|
11735
11735
|
"discriminator": [
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11736
|
+
142,
|
|
11737
|
+
160,
|
|
11738
|
+
62,
|
|
11739
|
+
117,
|
|
11740
|
+
13,
|
|
11741
|
+
119,
|
|
11742
|
+
8,
|
|
11743
|
+
3
|
|
11744
11744
|
];
|
|
11745
11745
|
"accounts": [
|
|
11746
11746
|
{
|
|
@@ -12831,11 +12831,11 @@ export type Liquid = {
|
|
|
12831
12831
|
];
|
|
12832
12832
|
"args": [
|
|
12833
12833
|
{
|
|
12834
|
-
"name": "
|
|
12834
|
+
"name": "amountOut";
|
|
12835
12835
|
"type": "u64";
|
|
12836
12836
|
},
|
|
12837
12837
|
{
|
|
12838
|
-
"name": "
|
|
12838
|
+
"name": "maxAmountIn";
|
|
12839
12839
|
"type": "u64";
|
|
12840
12840
|
}
|
|
12841
12841
|
];
|