@liquid-af/sdk 0.10.2 → 0.10.3

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
@@ -220,7 +220,7 @@ export type Liquid = {
220
220
  {
221
221
  "name": "user",
222
222
  "docs": [
223
- "The user buying tokens."
223
+ "The user executing the trade."
224
224
  ],
225
225
  "writable": true,
226
226
  "signer": true
@@ -371,14 +371,14 @@ export type Liquid = {
371
371
  {
372
372
  "name": "userTokenAccount",
373
373
  "docs": [
374
- "User's token account to receive bought tokens."
374
+ "User's token account for the traded token."
375
375
  ],
376
376
  "writable": true
377
377
  },
378
378
  {
379
379
  "name": "feeVault",
380
380
  "docs": [
381
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
381
+ "The fee vault (for Recipients mode, from liquid-fees)."
382
382
  ],
383
383
  "writable": true,
384
384
  "pda": {
@@ -521,7 +521,7 @@ export type Liquid = {
521
521
  {
522
522
  "name": "mint",
523
523
  "docs": [
524
- "The mint of the token being bought."
524
+ "The mint of the traded token."
525
525
  ]
526
526
  },
527
527
  {
@@ -534,7 +534,7 @@ export type Liquid = {
534
534
  {
535
535
  "name": "feeConfig",
536
536
  "docs": [
537
- "The fee configuration for this token."
537
+ "The fee configuration for this token (from liquid-fees program)."
538
538
  ],
539
539
  "pda": {
540
540
  "seeds": [
@@ -1146,7 +1146,7 @@ export type Liquid = {
1146
1146
  {
1147
1147
  "name": "user",
1148
1148
  "docs": [
1149
- "The user buying tokens."
1149
+ "The user executing the trade."
1150
1150
  ],
1151
1151
  "writable": true,
1152
1152
  "signer": true
@@ -1313,21 +1313,21 @@ export type Liquid = {
1313
1313
  {
1314
1314
  "name": "userTokenAccount",
1315
1315
  "docs": [
1316
- "User's base token account to receive bought tokens."
1316
+ "User's base token account for the traded token."
1317
1317
  ],
1318
1318
  "writable": true
1319
1319
  },
1320
1320
  {
1321
1321
  "name": "userQuoteAccount",
1322
1322
  "docs": [
1323
- "User's quote token account (e.g., USDC) to pay from."
1323
+ "User's quote token account (e.g., USDC)."
1324
1324
  ],
1325
1325
  "writable": true
1326
1326
  },
1327
1327
  {
1328
1328
  "name": "feeVault",
1329
1329
  "docs": [
1330
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
1330
+ "The fee vault (for Recipients mode, from liquid-fees)."
1331
1331
  ],
1332
1332
  "writable": true,
1333
1333
  "pda": {
@@ -1539,7 +1539,7 @@ export type Liquid = {
1539
1539
  {
1540
1540
  "name": "mint",
1541
1541
  "docs": [
1542
- "The base token mint being bought."
1542
+ "The base token mint being traded."
1543
1543
  ]
1544
1544
  },
1545
1545
  {
@@ -2164,7 +2164,7 @@ export type Liquid = {
2164
2164
  {
2165
2165
  "name": "user",
2166
2166
  "docs": [
2167
- "The user buying tokens."
2167
+ "The user executing the trade."
2168
2168
  ],
2169
2169
  "writable": true,
2170
2170
  "signer": true
@@ -2315,14 +2315,14 @@ export type Liquid = {
2315
2315
  {
2316
2316
  "name": "userTokenAccount",
2317
2317
  "docs": [
2318
- "User's token account to receive bought tokens."
2318
+ "User's token account for the traded token."
2319
2319
  ],
2320
2320
  "writable": true
2321
2321
  },
2322
2322
  {
2323
2323
  "name": "feeVault",
2324
2324
  "docs": [
2325
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
2325
+ "The fee vault (for Recipients mode, from liquid-fees)."
2326
2326
  ],
2327
2327
  "writable": true,
2328
2328
  "pda": {
@@ -2465,7 +2465,7 @@ export type Liquid = {
2465
2465
  {
2466
2466
  "name": "mint",
2467
2467
  "docs": [
2468
- "The mint of the token being bought."
2468
+ "The mint of the traded token."
2469
2469
  ]
2470
2470
  },
2471
2471
  {
@@ -2478,7 +2478,7 @@ export type Liquid = {
2478
2478
  {
2479
2479
  "name": "feeConfig",
2480
2480
  "docs": [
2481
- "The fee configuration for this token."
2481
+ "The fee configuration for this token (from liquid-fees program)."
2482
2482
  ],
2483
2483
  "pda": {
2484
2484
  "seeds": [
@@ -3090,7 +3090,7 @@ export type Liquid = {
3090
3090
  {
3091
3091
  "name": "user",
3092
3092
  "docs": [
3093
- "The user buying tokens."
3093
+ "The user executing the trade."
3094
3094
  ],
3095
3095
  "writable": true,
3096
3096
  "signer": true
@@ -3257,21 +3257,21 @@ export type Liquid = {
3257
3257
  {
3258
3258
  "name": "userTokenAccount",
3259
3259
  "docs": [
3260
- "User's base token account to receive bought tokens."
3260
+ "User's base token account for the traded token."
3261
3261
  ],
3262
3262
  "writable": true
3263
3263
  },
3264
3264
  {
3265
3265
  "name": "userQuoteAccount",
3266
3266
  "docs": [
3267
- "User's quote token account (e.g., USDC) to pay from."
3267
+ "User's quote token account (e.g., USDC)."
3268
3268
  ],
3269
3269
  "writable": true
3270
3270
  },
3271
3271
  {
3272
3272
  "name": "feeVault",
3273
3273
  "docs": [
3274
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
3274
+ "The fee vault (for Recipients mode, from liquid-fees)."
3275
3275
  ],
3276
3276
  "writable": true,
3277
3277
  "pda": {
@@ -3483,7 +3483,7 @@ export type Liquid = {
3483
3483
  {
3484
3484
  "name": "mint",
3485
3485
  "docs": [
3486
- "The base token mint being bought."
3486
+ "The base token mint being traded."
3487
3487
  ]
3488
3488
  },
3489
3489
  {
@@ -8395,7 +8395,7 @@ export type Liquid = {
8395
8395
  {
8396
8396
  "name": "user",
8397
8397
  "docs": [
8398
- "The user selling tokens."
8398
+ "The user executing the trade."
8399
8399
  ],
8400
8400
  "writable": true,
8401
8401
  "signer": true
@@ -8546,14 +8546,14 @@ export type Liquid = {
8546
8546
  {
8547
8547
  "name": "userTokenAccount",
8548
8548
  "docs": [
8549
- "User's token account to send sold tokens from."
8549
+ "User's token account for the traded token."
8550
8550
  ],
8551
8551
  "writable": true
8552
8552
  },
8553
8553
  {
8554
8554
  "name": "feeVault",
8555
8555
  "docs": [
8556
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
8556
+ "The fee vault (for Recipients mode, from liquid-fees)."
8557
8557
  ],
8558
8558
  "writable": true,
8559
8559
  "pda": {
@@ -8696,7 +8696,7 @@ export type Liquid = {
8696
8696
  {
8697
8697
  "name": "mint",
8698
8698
  "docs": [
8699
- "The mint of the token being sold."
8699
+ "The mint of the traded token."
8700
8700
  ]
8701
8701
  },
8702
8702
  {
@@ -8779,7 +8779,7 @@ export type Liquid = {
8779
8779
  {
8780
8780
  "name": "creatorUserProperties",
8781
8781
  "docs": [
8782
- "Creator's user properties from liquid-state"
8782
+ "Creator's user properties from liquid-state."
8783
8783
  ],
8784
8784
  "pda": {
8785
8785
  "seeds": [
@@ -9321,7 +9321,7 @@ export type Liquid = {
9321
9321
  {
9322
9322
  "name": "user",
9323
9323
  "docs": [
9324
- "The user selling tokens."
9324
+ "The user executing the trade."
9325
9325
  ],
9326
9326
  "writable": true,
9327
9327
  "signer": true
@@ -9488,21 +9488,21 @@ export type Liquid = {
9488
9488
  {
9489
9489
  "name": "userTokenAccount",
9490
9490
  "docs": [
9491
- "User's base token account to send sold tokens from."
9491
+ "User's base token account for the traded token."
9492
9492
  ],
9493
9493
  "writable": true
9494
9494
  },
9495
9495
  {
9496
9496
  "name": "userQuoteAccount",
9497
9497
  "docs": [
9498
- "User's quote token account (e.g., USDC) to receive payment."
9498
+ "User's quote token account (e.g., USDC)."
9499
9499
  ],
9500
9500
  "writable": true
9501
9501
  },
9502
9502
  {
9503
9503
  "name": "feeVault",
9504
9504
  "docs": [
9505
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
9505
+ "The fee vault (for Recipients mode, from liquid-fees)."
9506
9506
  ],
9507
9507
  "writable": true,
9508
9508
  "pda": {
@@ -9714,7 +9714,7 @@ export type Liquid = {
9714
9714
  {
9715
9715
  "name": "mint",
9716
9716
  "docs": [
9717
- "The base token mint being sold."
9717
+ "The base token mint being traded."
9718
9718
  ]
9719
9719
  },
9720
9720
  {
@@ -10339,7 +10339,7 @@ export type Liquid = {
10339
10339
  {
10340
10340
  "name": "user",
10341
10341
  "docs": [
10342
- "The user selling tokens."
10342
+ "The user executing the trade."
10343
10343
  ],
10344
10344
  "writable": true,
10345
10345
  "signer": true
@@ -10490,14 +10490,14 @@ export type Liquid = {
10490
10490
  {
10491
10491
  "name": "userTokenAccount",
10492
10492
  "docs": [
10493
- "User's token account to send sold tokens from."
10493
+ "User's token account for the traded token."
10494
10494
  ],
10495
10495
  "writable": true
10496
10496
  },
10497
10497
  {
10498
10498
  "name": "feeVault",
10499
10499
  "docs": [
10500
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
10500
+ "The fee vault (for Recipients mode, from liquid-fees)."
10501
10501
  ],
10502
10502
  "writable": true,
10503
10503
  "pda": {
@@ -10640,7 +10640,7 @@ export type Liquid = {
10640
10640
  {
10641
10641
  "name": "mint",
10642
10642
  "docs": [
10643
- "The mint of the token being sold."
10643
+ "The mint of the traded token."
10644
10644
  ]
10645
10645
  },
10646
10646
  {
@@ -10723,7 +10723,7 @@ export type Liquid = {
10723
10723
  {
10724
10724
  "name": "creatorUserProperties",
10725
10725
  "docs": [
10726
- "Creator's user properties from liquid-state"
10726
+ "Creator's user properties from liquid-state."
10727
10727
  ],
10728
10728
  "pda": {
10729
10729
  "seeds": [
@@ -11265,7 +11265,7 @@ export type Liquid = {
11265
11265
  {
11266
11266
  "name": "user",
11267
11267
  "docs": [
11268
- "The user selling tokens."
11268
+ "The user executing the trade."
11269
11269
  ],
11270
11270
  "writable": true,
11271
11271
  "signer": true
@@ -11432,21 +11432,21 @@ export type Liquid = {
11432
11432
  {
11433
11433
  "name": "userTokenAccount",
11434
11434
  "docs": [
11435
- "User's base token account to send sold tokens from."
11435
+ "User's base token account for the traded token."
11436
11436
  ],
11437
11437
  "writable": true
11438
11438
  },
11439
11439
  {
11440
11440
  "name": "userQuoteAccount",
11441
11441
  "docs": [
11442
- "User's quote token account (e.g., USDC) to receive payment."
11442
+ "User's quote token account (e.g., USDC)."
11443
11443
  ],
11444
11444
  "writable": true
11445
11445
  },
11446
11446
  {
11447
11447
  "name": "feeVault",
11448
11448
  "docs": [
11449
- "The fee vault (for Direct/Recipients mode, from liquid-fees)."
11449
+ "The fee vault (for Recipients mode, from liquid-fees)."
11450
11450
  ],
11451
11451
  "writable": true,
11452
11452
  "pda": {
@@ -11658,7 +11658,7 @@ export type Liquid = {
11658
11658
  {
11659
11659
  "name": "mint",
11660
11660
  "docs": [
11661
- "The base token mint being sold."
11661
+ "The base token mint being traded."
11662
11662
  ]
11663
11663
  },
11664
11664
  {
@@ -13225,7 +13225,9 @@ export type Liquid = {
13225
13225
  {
13226
13226
  "name": "ranges",
13227
13227
  "docs": [
13228
- "Volume-based multiplier ranges (use len() for active count)"
13228
+ "Balance-based multiplier ranges (use len() for active count).",
13229
+ "Thresholds refer to the user's cashback credit balance. Multiplier is",
13230
+ "applied progressively as credits are earned, not at mode-switch."
13229
13231
  ],
13230
13232
  "type": {
13231
13233
  "vec": {
@@ -13257,7 +13259,12 @@ export type Liquid = {
13257
13259
  {
13258
13260
  "name": "cashbackRange",
13259
13261
  "docs": [
13260
- "Cashback range defining volume-based multiplier tiers"
13262
+ "Cashback range defining balance-based multiplier tiers.",
13263
+ "",
13264
+ "Each range maps a cashback balance interval to a multiplier. When a user earns",
13265
+ "cashback, the earned amount is multiplied by the tier corresponding to their",
13266
+ "current balance. If earning crosses a tier boundary, the amount is split so",
13267
+ "each portion receives its respective tier's multiplier."
13261
13268
  ],
13262
13269
  "type": {
13263
13270
  "kind": "struct",
@@ -13265,14 +13272,14 @@ export type Liquid = {
13265
13272
  {
13266
13273
  "name": "rangeStartInclusive",
13267
13274
  "docs": [
13268
- "Lower bound of volume range (inclusive)"
13275
+ "Lower bound of balance range (inclusive), in USD with 6 decimals"
13269
13276
  ],
13270
13277
  "type": "u64"
13271
13278
  },
13272
13279
  {
13273
13280
  "name": "rangeEndExclusive",
13274
13281
  "docs": [
13275
- "Upper bound of volume range (exclusive)"
13282
+ "Upper bound of balance range (exclusive), in USD with 6 decimals"
13276
13283
  ],
13277
13284
  "type": "u64"
13278
13285
  },
@@ -13569,9 +13576,9 @@ export type Liquid = {
13569
13576
  "kind": "struct",
13570
13577
  "fields": [
13571
13578
  {
13572
- "name": "totalSolVolume",
13579
+ "name": "totalUsdVolume",
13573
13580
  "docs": [
13574
- "Total SOL volume across all curve trades"
13581
+ "Total USD volume across all curve trades (6 decimals)"
13575
13582
  ],
13576
13583
  "type": "u128"
13577
13584
  },
@@ -13801,9 +13808,9 @@ export type Liquid = {
13801
13808
  "type": "pubkey"
13802
13809
  },
13803
13810
  {
13804
- "name": "totalSolVolume",
13811
+ "name": "totalUsdVolume",
13805
13812
  "docs": [
13806
- "Total SOL volume for this token (curve + AMM)"
13813
+ "Total USD volume for this token (curve + AMM, 6 decimals)"
13807
13814
  ],
13808
13815
  "type": "u128"
13809
13816
  },
@@ -13815,16 +13822,16 @@ export type Liquid = {
13815
13822
  "type": "u128"
13816
13823
  },
13817
13824
  {
13818
- "name": "curveSolVolume",
13825
+ "name": "curveUsdVolume",
13819
13826
  "docs": [
13820
- "SOL volume from curve trades (for analytics)"
13827
+ "USD volume from curve trades (for analytics)"
13821
13828
  ],
13822
13829
  "type": "u128"
13823
13830
  },
13824
13831
  {
13825
- "name": "ammSolVolume",
13832
+ "name": "ammUsdVolume",
13826
13833
  "docs": [
13827
- "SOL volume from AMM trades (for analytics)"
13834
+ "USD volume from AMM trades (for analytics)"
13828
13835
  ],
13829
13836
  "type": "u128"
13830
13837
  }
@@ -13939,9 +13946,9 @@ export type Liquid = {
13939
13946
  }
13940
13947
  },
13941
13948
  {
13942
- "name": "totalSolVolume",
13949
+ "name": "totalUsdVolume",
13943
13950
  "docs": [
13944
- "Total SOL volume traded across both curve and AMM (used for cashback multiplier)"
13951
+ "Total USD volume traded across both curve and AMM"
13945
13952
  ],
13946
13953
  "type": "u128"
13947
13954
  },
@@ -13967,23 +13974,23 @@ export type Liquid = {
13967
13974
  "type": "bool"
13968
13975
  },
13969
13976
  {
13970
- "name": "curveSolVolume",
13977
+ "name": "curveUsdVolume",
13971
13978
  "docs": [
13972
- "SOL volume from curve trades only (for analytics)"
13979
+ "USD volume from curve trades only (for analytics)"
13973
13980
  ],
13974
13981
  "type": "u128"
13975
13982
  },
13976
13983
  {
13977
- "name": "ammSolVolume",
13984
+ "name": "ammUsdVolume",
13978
13985
  "docs": [
13979
- "SOL volume from AMM trades only (for analytics)"
13986
+ "USD volume from AMM trades only (for analytics)"
13980
13987
  ],
13981
13988
  "type": "u128"
13982
13989
  },
13983
13990
  {
13984
- "name": "snapshotSolVolume",
13991
+ "name": "snapshotUsdVolume",
13985
13992
  "docs": [
13986
- "SOL volume accumulated since the last snapshot (resets on snapshot)"
13993
+ "USD volume accumulated since the last snapshot (resets on snapshot)"
13987
13994
  ],
13988
13995
  "type": "u128"
13989
13996
  },
@@ -1159,13 +1159,6 @@
1159
1159
  ],
1160
1160
  "type": "pubkey"
1161
1161
  },
1162
- {
1163
- "name": "multiplier_bps",
1164
- "docs": [
1165
- "Cashback multiplier in basis points."
1166
- ],
1167
- "type": "u16"
1168
- },
1169
1162
  {
1170
1163
  "name": "timestamp",
1171
1164
  "docs": [
@@ -2266,9 +2259,9 @@
2266
2259
  "type": "u32"
2267
2260
  },
2268
2261
  {
2269
- "name": "sol_volume",
2262
+ "name": "usd_volume",
2270
2263
  "docs": [
2271
- "SOL volume at snapshot time."
2264
+ "USD volume at snapshot time."
2272
2265
  ],
2273
2266
  "type": "u128"
2274
2267
  },
@@ -2622,7 +2615,7 @@
2622
2615
  {
2623
2616
  "name": "TradeAmounts",
2624
2617
  "docs": [
2625
- "Trade amount variants for bonding curve trades."
2618
+ "Trade amount variants for bonding curve and AMM trades."
2626
2619
  ],
2627
2620
  "type": {
2628
2621
  "kind": "enum",
@@ -1165,13 +1165,6 @@ export type LiquidEvents = {
1165
1165
  ],
1166
1166
  "type": "pubkey"
1167
1167
  },
1168
- {
1169
- "name": "multiplierBps",
1170
- "docs": [
1171
- "Cashback multiplier in basis points."
1172
- ],
1173
- "type": "u16"
1174
- },
1175
1168
  {
1176
1169
  "name": "timestamp",
1177
1170
  "docs": [
@@ -2272,9 +2265,9 @@ export type LiquidEvents = {
2272
2265
  "type": "u32"
2273
2266
  },
2274
2267
  {
2275
- "name": "solVolume",
2268
+ "name": "usdVolume",
2276
2269
  "docs": [
2277
- "SOL volume at snapshot time."
2270
+ "USD volume at snapshot time."
2278
2271
  ],
2279
2272
  "type": "u128"
2280
2273
  },
@@ -2628,7 +2621,7 @@ export type LiquidEvents = {
2628
2621
  {
2629
2622
  "name": "tradeAmounts",
2630
2623
  "docs": [
2631
- "Trade amount variants for bonding curve trades."
2624
+ "Trade amount variants for bonding curve and AMM trades."
2632
2625
  ],
2633
2626
  "type": {
2634
2627
  "kind": "enum",
@@ -10,10 +10,7 @@
10
10
  {
11
11
  "name": "accept_admin",
12
12
  "docs": [
13
- "Accept a pending admin transfer (step 2 of 2).",
14
- "",
15
- "# Arguments",
16
- "* `ctx` - Context containing the pending admin signer."
13
+ "Accept a pending admin transfer (step 2 of 2)."
17
14
  ],
18
15
  "discriminator": [
19
16
  112,
@@ -69,12 +66,7 @@
69
66
  {
70
67
  "name": "claim_fees",
71
68
  "docs": [
72
- "Claim accumulated SOL fees from a recipient's vault PDA.",
73
- "",
74
- "# Arguments",
75
- "The recipient must sign the transaction. The vault PDA is derived",
76
- "from the fee_config and recipient pubkey, ensuring only the rightful",
77
- "recipient can claim."
69
+ "Claim accumulated SOL fees from a recipient's vault PDA."
78
70
  ],
79
71
  "discriminator": [
80
72
  82,
@@ -186,11 +178,7 @@
186
178
  {
187
179
  "name": "claim_token_fees",
188
180
  "docs": [
189
- "Claim accumulated token fees from a recipient's vault ATA.",
190
- "",
191
- "# Arguments",
192
- "The recipient must sign the transaction. After claiming, the vault",
193
- "ATA is closed and rent is returned to the recipient."
181
+ "Claim accumulated token fees from a recipient's vault ATA."
194
182
  ],
195
183
  "discriminator": [
196
184
  205,
@@ -806,7 +794,10 @@
806
794
  "",
807
795
  "This should be called when creating a new bonding curve.",
808
796
  "The fee configuration is keyed by token_mint, so it persists",
809
- "across migration from bonding curve to AMM."
797
+ "across migration from bonding curve to AMM.",
798
+ "",
799
+ "# Arguments",
800
+ "* `args` - Fee recipients, basis points, and update authority."
810
801
  ],
811
802
  "discriminator": [
812
803
  62,
@@ -931,10 +922,7 @@
931
922
  {
932
923
  "name": "initialize_global_config",
933
924
  "docs": [
934
- "Initialize the global configuration for the liquid-fees program.",
935
- "",
936
- "# Arguments",
937
- "* `ctx` - Context containing the admin signer and global config PDA."
925
+ "Initialize the global configuration for the liquid-fees program."
938
926
  ],
939
927
  "discriminator": [
940
928
  113,
@@ -997,7 +985,6 @@
997
985
  "Override the update authority on a fee configuration.",
998
986
  "",
999
987
  "# Arguments",
1000
- "* `ctx` - Context containing the admin, global config, and target fee config.",
1001
988
  "* `args` - Contains the new update authority public key."
1002
989
  ],
1003
990
  "discriminator": [
@@ -1283,7 +1270,6 @@
1283
1270
  "Transfer admin authority to a new address (step 1 of 2).",
1284
1271
  "",
1285
1272
  "# Arguments",
1286
- "* `ctx` - Context containing the current admin signer.",
1287
1273
  "* `new_admin` - The new admin authority public key."
1288
1274
  ],
1289
1275
  "discriminator": [
@@ -1349,7 +1335,10 @@
1349
1335
  "",
1350
1336
  "Can update recipients or transfer update authority.",
1351
1337
  "Cannot be used to revoke - use `revoke_fee_config` instead.",
1352
- "Cannot be called on revoked configurations."
1338
+ "Cannot be called on revoked configurations.",
1339
+ "",
1340
+ "# Arguments",
1341
+ "* `args` - New recipients and/or new update authority."
1353
1342
  ],
1354
1343
  "discriminator": [
1355
1344
  104,