@liquid-af/sdk 0.7.2 → 0.8.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.
package/src/idl/liquid.ts CHANGED
@@ -198,23 +198,23 @@ export type Liquid = {
198
198
  "args": []
199
199
  },
200
200
  {
201
- "name": "buyExactNative",
201
+ "name": "buyExactInNative",
202
202
  "docs": [
203
- "Buys an exact amount of tokens from the bonding curve, paying SOL.",
203
+ "Buys tokens from the bonding curve by spending an exact amount of SOL (exact input).",
204
204
  "",
205
205
  "# Arguments",
206
- "* `exact_amount_out` - Exact amount of tokens to receive.",
207
- "* `max_amount_in` - Maximum SOL willing to spend (slippage protection)."
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
- 58,
210
+ 78,
211
211
  141,
212
- 193,
213
- 198,
214
- 65,
215
- 238,
216
- 124,
217
- 188
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": "exactAmountOut",
1163
+ "name": "amountIn",
1164
1164
  "type": "u64"
1165
1165
  },
1166
1166
  {
1167
- "name": "maxAmountIn",
1167
+ "name": "minAmountOut",
1168
1168
  "type": "u64"
1169
1169
  }
1170
1170
  ]
1171
1171
  },
1172
1172
  {
1173
- "name": "buyExactStable",
1173
+ "name": "buyExactInStable",
1174
1174
  "docs": [
1175
- "Buys an exact amount of base tokens from a token-based bonding curve.",
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
- "* `exact_amount_out` - Exact amount of base tokens to receive.",
1179
- "* `max_amount_in` - Maximum quote tokens willing to spend (slippage protection)."
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
- 197,
1183
- 162,
1184
- 80,
1185
- 72,
1186
- 207,
1187
- 13,
1188
- 202,
1189
- 198
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": "exactAmountOut",
2280
+ "name": "amountIn",
2281
2281
  "type": "u64"
2282
2282
  },
2283
2283
  {
2284
- "name": "maxAmountIn",
2284
+ "name": "minAmountOut",
2285
2285
  "type": "u64"
2286
2286
  }
2287
2287
  ]
2288
2288
  },
2289
2289
  {
2290
- "name": "buyNative",
2290
+ "name": "buyExactOutNative",
2291
2291
  "docs": [
2292
- "Executes a buy on the bonding curve, exchanging SOL for tokens.",
2292
+ "Buys an exact amount of tokens from the bonding curve (exact output).",
2293
2293
  "",
2294
2294
  "# Arguments",
2295
- "* `amount_in` - Amount of SOL to spend (gross, before fees).",
2296
- "* `min_amount_out` - Minimum tokens expected (slippage protection)."
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
- 80,
2300
- 193,
2301
- 180,
2302
- 217,
2303
- 182,
2304
- 175,
2305
- 112,
2306
- 215
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": "amountIn",
3252
+ "name": "amountOut",
3253
3253
  "type": "u64"
3254
3254
  },
3255
3255
  {
3256
- "name": "minAmountOut",
3256
+ "name": "maxAmountIn",
3257
3257
  "type": "u64"
3258
3258
  }
3259
3259
  ]
3260
3260
  },
3261
3261
  {
3262
- "name": "buyStable",
3262
+ "name": "buyExactOutStable",
3263
3263
  "docs": [
3264
- "Executes a buy on a token-based bonding curve, exchanging quote tokens for base tokens.",
3264
+ "Buys an exact amount of base tokens from a token-based bonding curve (exact output).",
3265
3265
  "",
3266
3266
  "# Arguments",
3267
- "* `amount_in` - Amount of quote tokens (e.g., USDC) to spend (gross, before fees).",
3268
- "* `min_amount_out` - Minimum base tokens expected (slippage protection)."
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
- 134,
3272
- 103,
3273
- 186,
3274
- 174,
3275
- 6,
3276
- 130,
3277
- 71,
3278
- 32
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": "amountIn",
4369
+ "name": "amountOut",
4370
4370
  "type": "u64"
4371
4371
  },
4372
4372
  {
4373
- "name": "minAmountOut",
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": "sellExactOutNative",
8666
+ "name": "sellExactInNative",
8667
8667
  "docs": [
8668
- "Sells tokens on the bonding curve to receive an exact amount of SOL.",
8668
+ "Sells an exact amount of tokens on the bonding curve for SOL (exact input).",
8669
8669
  "",
8670
8670
  "# Arguments",
8671
- "* `exact_amount_out` - Exact net SOL to receive (after fees).",
8672
- "* `max_amount_in` - Maximum tokens willing to sell (slippage protection)."
8671
+ "* `amount_in` - Exact amount of tokens to sell.",
8672
+ "* `min_amount_out` - Minimum SOL expected (slippage protection)."
8673
8673
  ],
8674
8674
  "discriminator": [
8675
- 12,
8676
- 37,
8677
- 246,
8678
- 175,
8679
- 240,
8680
- 13,
8681
- 94,
8682
- 159
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": "exactAmountOut",
9628
+ "name": "amountIn",
9629
9629
  "type": "u64"
9630
9630
  },
9631
9631
  {
9632
- "name": "maxAmountIn",
9632
+ "name": "minAmountOut",
9633
9633
  "type": "u64"
9634
9634
  }
9635
9635
  ]
9636
9636
  },
9637
9637
  {
9638
- "name": "sellExactOutStable",
9638
+ "name": "sellExactInStable",
9639
9639
  "docs": [
9640
- "Sells base tokens on a token-based bonding curve to receive an exact amount of quote tokens.",
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
- "* `exact_amount_out` - Exact net quote tokens to receive (after fees).",
9644
- "* `max_amount_in` - Maximum base tokens willing to sell (slippage protection)."
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
- 142,
9648
- 160,
9649
- 62,
9650
- 117,
9651
- 13,
9652
- 119,
9653
- 8,
9654
- 3
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": "exactAmountOut",
10745
+ "name": "amountIn",
10746
10746
  "type": "u64"
10747
10747
  },
10748
10748
  {
10749
- "name": "maxAmountIn",
10749
+ "name": "minAmountOut",
10750
10750
  "type": "u64"
10751
10751
  }
10752
10752
  ]
10753
10753
  },
10754
10754
  {
10755
- "name": "sellNative",
10755
+ "name": "sellExactOutNative",
10756
10756
  "docs": [
10757
- "Executes a sell on the bonding curve, exchanging tokens for SOL.",
10757
+ "Sells tokens on the bonding curve to receive an exact amount of SOL (exact output).",
10758
10758
  "",
10759
10759
  "# Arguments",
10760
- "* `amount_in` - Amount of tokens to sell.",
10761
- "* `min_amount_out` - Minimum SOL expected (slippage protection)."
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
- 79,
10765
- 161,
10766
- 3,
10767
- 80,
10768
- 113,
10769
- 42,
10770
- 114,
10771
- 195
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": "amountIn",
11717
+ "name": "amountOut",
11718
11718
  "type": "u64"
11719
11719
  },
11720
11720
  {
11721
- "name": "minAmountOut",
11721
+ "name": "maxAmountIn",
11722
11722
  "type": "u64"
11723
11723
  }
11724
11724
  ]
11725
11725
  },
11726
11726
  {
11727
- "name": "sellStable",
11727
+ "name": "sellExactOutStable",
11728
11728
  "docs": [
11729
- "Executes a sell on a token-based bonding curve, exchanging base tokens for quote tokens.",
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
- "* `amount_in` - Amount of base tokens to sell.",
11733
- "* `min_amount_out` - Minimum quote tokens expected (slippage protection)."
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
- 151,
11737
- 118,
11738
- 238,
11739
- 12,
11740
- 206,
11741
- 34,
11742
- 84,
11743
- 220
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": "amountIn",
12834
+ "name": "amountOut",
12835
12835
  "type": "u64"
12836
12836
  },
12837
12837
  {
12838
- "name": "minAmountOut",
12838
+ "name": "maxAmountIn",
12839
12839
  "type": "u64"
12840
12840
  }
12841
12841
  ]
@@ -64,23 +64,23 @@
64
64
  "args": []
65
65
  },
66
66
  {
67
- "name": "buy",
67
+ "name": "buy_exact_in",
68
68
  "docs": [
69
- "Swap the tokens in the pool base output amount.",
69
+ "Buys base tokens by providing an exact amount of quote tokens (exact input).",
70
70
  "",
71
71
  "# Arguments",
72
- "* `max_amount_in` - input amount prevents excessive slippage",
73
- "* `amount_out` - amount of output token"
72
+ "* `amount_in` - Exact quote tokens to spend (before transfer fees).",
73
+ "* `minimum_amount_out` - Minimum base tokens to receive (after transfer fees; slippage protection)."
74
74
  ],
75
75
  "discriminator": [
76
- 102,
77
- 6,
78
- 61,
79
- 18,
80
- 1,
81
- 218,
82
- 235,
83
- 234
76
+ 250,
77
+ 234,
78
+ 13,
79
+ 123,
80
+ 213,
81
+ 156,
82
+ 19,
83
+ 236
84
84
  ],
85
85
  "accounts": [
86
86
  {
@@ -1040,33 +1040,33 @@
1040
1040
  ],
1041
1041
  "args": [
1042
1042
  {
1043
- "name": "max_amount_in",
1043
+ "name": "amount_in",
1044
1044
  "type": "u64"
1045
1045
  },
1046
1046
  {
1047
- "name": "amount_out",
1047
+ "name": "minimum_amount_out",
1048
1048
  "type": "u64"
1049
1049
  }
1050
1050
  ]
1051
1051
  },
1052
1052
  {
1053
- "name": "buy_exact",
1053
+ "name": "buy_exact_out",
1054
1054
  "docs": [
1055
- "Buys base tokens by providing an exact amount of quote tokens (exact input).",
1055
+ "Buys base tokens by providing quote tokens to the pool (exact output).",
1056
1056
  "",
1057
1057
  "# Arguments",
1058
- "* `amount_in` - Exact quote tokens to spend.",
1059
- "* `minimum_amount_out` - Minimum base tokens to receive (slippage protection)."
1058
+ "* `max_amount_in` - Maximum quote tokens willing to spend (including transfer fees; slippage protection).",
1059
+ "* `amount_out` - Exact base tokens the user wants to receive (after transfer fees)."
1060
1060
  ],
1061
1061
  "discriminator": [
1062
- 2,
1063
- 162,
1064
- 8,
1065
- 52,
1066
- 139,
1067
- 46,
1068
- 160,
1069
- 13
1062
+ 24,
1063
+ 211,
1064
+ 116,
1065
+ 40,
1066
+ 105,
1067
+ 3,
1068
+ 153,
1069
+ 56
1070
1070
  ],
1071
1071
  "accounts": [
1072
1072
  {
@@ -2026,11 +2026,11 @@
2026
2026
  ],
2027
2027
  "args": [
2028
2028
  {
2029
- "name": "amount_in",
2029
+ "name": "max_amount_in",
2030
2030
  "type": "u64"
2031
2031
  },
2032
2032
  {
2033
- "name": "minimum_amount_out",
2033
+ "name": "amount_out",
2034
2034
  "type": "u64"
2035
2035
  }
2036
2036
  ]
@@ -4178,23 +4178,23 @@
4178
4178
  "args": []
4179
4179
  },
4180
4180
  {
4181
- "name": "sell",
4181
+ "name": "sell_exact_in",
4182
4182
  "docs": [
4183
- "Swap the tokens in the pool base input amount.",
4183
+ "Sells base tokens by providing them to the pool and receiving quote tokens (exact input).",
4184
4184
  "",
4185
4185
  "# Arguments",
4186
- "* `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate",
4187
- "* `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage"
4186
+ "* `amount_in` - Exact amount of base tokens to sell (before transfer fees).",
4187
+ "* `minimum_amount_out` - Minimum quote tokens expected (after transfer fees; slippage protection)."
4188
4188
  ],
4189
4189
  "discriminator": [
4190
- 51,
4191
- 230,
4192
- 133,
4193
- 164,
4194
- 1,
4195
- 127,
4196
- 131,
4197
- 173
4190
+ 149,
4191
+ 39,
4192
+ 222,
4193
+ 155,
4194
+ 211,
4195
+ 124,
4196
+ 152,
4197
+ 26
4198
4198
  ],
4199
4199
  "accounts": [
4200
4200
  {
@@ -70,23 +70,23 @@ export type LiquidSwap = {
70
70
  "args": []
71
71
  },
72
72
  {
73
- "name": "buy",
73
+ "name": "buyExactIn",
74
74
  "docs": [
75
- "Swap the tokens in the pool base output amount.",
75
+ "Buys base tokens by providing an exact amount of quote tokens (exact input).",
76
76
  "",
77
77
  "# Arguments",
78
- "* `max_amount_in` - input amount prevents excessive slippage",
79
- "* `amount_out` - amount of output token"
78
+ "* `amount_in` - Exact quote tokens to spend (before transfer fees).",
79
+ "* `minimum_amount_out` - Minimum base tokens to receive (after transfer fees; slippage protection)."
80
80
  ],
81
81
  "discriminator": [
82
- 102,
83
- 6,
84
- 61,
85
- 18,
86
- 1,
87
- 218,
88
- 235,
89
- 234
82
+ 250,
83
+ 234,
84
+ 13,
85
+ 123,
86
+ 213,
87
+ 156,
88
+ 19,
89
+ 236
90
90
  ],
91
91
  "accounts": [
92
92
  {
@@ -1046,33 +1046,33 @@ export type LiquidSwap = {
1046
1046
  ],
1047
1047
  "args": [
1048
1048
  {
1049
- "name": "maxAmountIn",
1049
+ "name": "amountIn",
1050
1050
  "type": "u64"
1051
1051
  },
1052
1052
  {
1053
- "name": "amountOut",
1053
+ "name": "minimumAmountOut",
1054
1054
  "type": "u64"
1055
1055
  }
1056
1056
  ]
1057
1057
  },
1058
1058
  {
1059
- "name": "buyExact",
1059
+ "name": "buyExactOut",
1060
1060
  "docs": [
1061
- "Buys base tokens by providing an exact amount of quote tokens (exact input).",
1061
+ "Buys base tokens by providing quote tokens to the pool (exact output).",
1062
1062
  "",
1063
1063
  "# Arguments",
1064
- "* `amount_in` - Exact quote tokens to spend.",
1065
- "* `minimum_amount_out` - Minimum base tokens to receive (slippage protection)."
1064
+ "* `max_amount_in` - Maximum quote tokens willing to spend (including transfer fees; slippage protection).",
1065
+ "* `amount_out` - Exact base tokens the user wants to receive (after transfer fees)."
1066
1066
  ],
1067
1067
  "discriminator": [
1068
- 2,
1069
- 162,
1070
- 8,
1071
- 52,
1072
- 139,
1073
- 46,
1074
- 160,
1075
- 13
1068
+ 24,
1069
+ 211,
1070
+ 116,
1071
+ 40,
1072
+ 105,
1073
+ 3,
1074
+ 153,
1075
+ 56
1076
1076
  ],
1077
1077
  "accounts": [
1078
1078
  {
@@ -2032,11 +2032,11 @@ export type LiquidSwap = {
2032
2032
  ],
2033
2033
  "args": [
2034
2034
  {
2035
- "name": "amountIn",
2035
+ "name": "maxAmountIn",
2036
2036
  "type": "u64"
2037
2037
  },
2038
2038
  {
2039
- "name": "minimumAmountOut",
2039
+ "name": "amountOut",
2040
2040
  "type": "u64"
2041
2041
  }
2042
2042
  ]
@@ -4184,23 +4184,23 @@ export type LiquidSwap = {
4184
4184
  "args": []
4185
4185
  },
4186
4186
  {
4187
- "name": "sell",
4187
+ "name": "sellExactIn",
4188
4188
  "docs": [
4189
- "Swap the tokens in the pool base input amount.",
4189
+ "Sells base tokens by providing them to the pool and receiving quote tokens (exact input).",
4190
4190
  "",
4191
4191
  "# Arguments",
4192
- "* `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate",
4193
- "* `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage"
4192
+ "* `amount_in` - Exact amount of base tokens to sell (before transfer fees).",
4193
+ "* `minimum_amount_out` - Minimum quote tokens expected (after transfer fees; slippage protection)."
4194
4194
  ],
4195
4195
  "discriminator": [
4196
- 51,
4197
- 230,
4198
- 133,
4199
- 164,
4200
- 1,
4201
- 127,
4202
- 131,
4203
- 173
4196
+ 149,
4197
+ 39,
4198
+ 222,
4199
+ 155,
4200
+ 211,
4201
+ 124,
4202
+ 152,
4203
+ 26
4204
4204
  ],
4205
4205
  "accounts": [
4206
4206
  {