@liquid-af/sdk 0.4.0 → 0.4.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.
@@ -464,11 +464,7 @@ async function resolveStableCurve(
464
464
  pre?.globalConfig ?? fetchCurveGlobalConfig(connection, config),
465
465
  pre?.bondingCurve
466
466
  ? null
467
- : fetchStableBondingCurve(
468
- connection,
469
- mint,
470
- config,
471
- ),
467
+ : fetchStableBondingCurve(connection, mint, config),
472
468
  ]);
473
469
 
474
470
  const bondingCurve = pre?.bondingCurve ?? {
@@ -4016,97 +4016,6 @@
4016
4016
  }
4017
4017
  ]
4018
4018
  },
4019
- {
4020
- "name": "set_reduce_only",
4021
- "docs": [
4022
- "Sets or clears reduce-only mode on a specific pool.",
4023
- "When enabled, only sells are allowed on the pool.",
4024
- "",
4025
- "# Arguments",
4026
- "* `reduce_only` - Whether to enable reduce-only mode."
4027
- ],
4028
- "discriminator": [
4029
- 187,
4030
- 233,
4031
- 208,
4032
- 249,
4033
- 160,
4034
- 104,
4035
- 209,
4036
- 117
4037
- ],
4038
- "accounts": [
4039
- {
4040
- "name": "admin",
4041
- "signer": true
4042
- },
4043
- {
4044
- "name": "global_config",
4045
- "pda": {
4046
- "seeds": [
4047
- {
4048
- "kind": "const",
4049
- "value": [
4050
- 103,
4051
- 108,
4052
- 111,
4053
- 98,
4054
- 97,
4055
- 108,
4056
- 95,
4057
- 99,
4058
- 111,
4059
- 110,
4060
- 102,
4061
- 105,
4062
- 103
4063
- ]
4064
- }
4065
- ]
4066
- }
4067
- },
4068
- {
4069
- "name": "pool",
4070
- "docs": [
4071
- "The pool to set reduce-only mode on."
4072
- ],
4073
- "writable": true,
4074
- "pda": {
4075
- "seeds": [
4076
- {
4077
- "kind": "const",
4078
- "value": [
4079
- 112,
4080
- 111,
4081
- 111,
4082
- 108
4083
- ]
4084
- },
4085
- {
4086
- "kind": "account",
4087
- "path": "base_mint"
4088
- },
4089
- {
4090
- "kind": "account",
4091
- "path": "quote_mint"
4092
- }
4093
- ]
4094
- }
4095
- },
4096
- {
4097
- "name": "base_mint"
4098
- },
4099
- {
4100
- "name": "quote_mint"
4101
- }
4102
- ],
4103
- "args": [
4104
- {
4105
- "name": "reduce_only",
4106
- "type": "bool"
4107
- }
4108
- ]
4109
- },
4110
4019
  {
4111
4020
  "name": "transfer_admin",
4112
4021
  "docs": [
@@ -4852,11 +4761,6 @@
4852
4761
  "code": 6035,
4853
4762
  "name": "InvalidPoolState",
4854
4763
  "msg": "Invalid pool state (empty vaults or invalid reserves)"
4855
- },
4856
- {
4857
- "code": 6036,
4858
- "name": "ReduceOnly",
4859
- "msg": "Pool is in reduce-only mode"
4860
4764
  }
4861
4765
  ],
4862
4766
  "types": [
@@ -5519,48 +5423,50 @@
5519
5423
  {
5520
5424
  "name": "quote_mint",
5521
5425
  "docs": [
5522
- "Mint information for Quote"
5426
+ "Mint information for quote"
5523
5427
  ],
5524
5428
  "type": "pubkey"
5525
5429
  },
5526
5430
  {
5527
5431
  "name": "base_token_program",
5528
5432
  "docs": [
5529
- "base program"
5433
+ "Base program"
5530
5434
  ],
5531
5435
  "type": "pubkey"
5532
5436
  },
5533
5437
  {
5534
5438
  "name": "quote_token_program",
5535
5439
  "docs": [
5536
- "quote program"
5440
+ "Quote program"
5537
5441
  ],
5538
5442
  "type": "pubkey"
5539
5443
  },
5540
5444
  {
5541
5445
  "name": "observation_key",
5542
5446
  "docs": [
5543
- "observation account to store oracle data"
5447
+ "Observation account to store oracle data"
5544
5448
  ],
5545
5449
  "type": "pubkey"
5546
5450
  },
5547
- {
5548
- "name": "auth_bump",
5549
- "type": "u8"
5550
- },
5551
5451
  {
5552
5452
  "name": "lp_mint_decimals",
5453
+ "docs": [
5454
+ "Mint decimals for LP token"
5455
+ ],
5553
5456
  "type": "u8"
5554
5457
  },
5555
5458
  {
5556
5459
  "name": "base_decimals",
5557
5460
  "docs": [
5558
- "mint base and mint quote decimals"
5461
+ "Mint base decimals"
5559
5462
  ],
5560
5463
  "type": "u8"
5561
5464
  },
5562
5465
  {
5563
5466
  "name": "quote_decimals",
5467
+ "docs": [
5468
+ "Mint quote decimals"
5469
+ ],
5564
5470
  "type": "u8"
5565
5471
  },
5566
5472
  {
@@ -5571,23 +5477,23 @@
5571
5477
  "type": "u64"
5572
5478
  },
5573
5479
  {
5574
- "name": "recent_epoch",
5480
+ "name": "creator",
5575
5481
  "docs": [
5576
- "recent epoch"
5482
+ "Creator of the token"
5577
5483
  ],
5578
- "type": "u64"
5484
+ "type": "pubkey"
5579
5485
  },
5580
5486
  {
5581
- "name": "creator",
5487
+ "name": "recent_epoch",
5582
5488
  "docs": [
5583
- "Creator of the token"
5489
+ "Recent epoch"
5584
5490
  ],
5585
- "type": "pubkey"
5491
+ "type": "u64"
5586
5492
  },
5587
5493
  {
5588
- "name": "reduce_only",
5494
+ "name": "bump",
5589
5495
  "docs": [
5590
- "Reduce-only mode: when nonzero, only sells are allowed"
5496
+ "Bump for PDA"
5591
5497
  ],
5592
5498
  "type": "u8"
5593
5499
  }
@@ -4022,97 +4022,6 @@ export type LiquidSwap = {
4022
4022
  }
4023
4023
  ]
4024
4024
  },
4025
- {
4026
- "name": "setReduceOnly",
4027
- "docs": [
4028
- "Sets or clears reduce-only mode on a specific pool.",
4029
- "When enabled, only sells are allowed on the pool.",
4030
- "",
4031
- "# Arguments",
4032
- "* `reduce_only` - Whether to enable reduce-only mode."
4033
- ],
4034
- "discriminator": [
4035
- 187,
4036
- 233,
4037
- 208,
4038
- 249,
4039
- 160,
4040
- 104,
4041
- 209,
4042
- 117
4043
- ],
4044
- "accounts": [
4045
- {
4046
- "name": "admin",
4047
- "signer": true
4048
- },
4049
- {
4050
- "name": "globalConfig",
4051
- "pda": {
4052
- "seeds": [
4053
- {
4054
- "kind": "const",
4055
- "value": [
4056
- 103,
4057
- 108,
4058
- 111,
4059
- 98,
4060
- 97,
4061
- 108,
4062
- 95,
4063
- 99,
4064
- 111,
4065
- 110,
4066
- 102,
4067
- 105,
4068
- 103
4069
- ]
4070
- }
4071
- ]
4072
- }
4073
- },
4074
- {
4075
- "name": "pool",
4076
- "docs": [
4077
- "The pool to set reduce-only mode on."
4078
- ],
4079
- "writable": true,
4080
- "pda": {
4081
- "seeds": [
4082
- {
4083
- "kind": "const",
4084
- "value": [
4085
- 112,
4086
- 111,
4087
- 111,
4088
- 108
4089
- ]
4090
- },
4091
- {
4092
- "kind": "account",
4093
- "path": "baseMint"
4094
- },
4095
- {
4096
- "kind": "account",
4097
- "path": "quoteMint"
4098
- }
4099
- ]
4100
- }
4101
- },
4102
- {
4103
- "name": "baseMint"
4104
- },
4105
- {
4106
- "name": "quoteMint"
4107
- }
4108
- ],
4109
- "args": [
4110
- {
4111
- "name": "reduceOnly",
4112
- "type": "bool"
4113
- }
4114
- ]
4115
- },
4116
4025
  {
4117
4026
  "name": "transferAdmin",
4118
4027
  "docs": [
@@ -4858,11 +4767,6 @@ export type LiquidSwap = {
4858
4767
  "code": 6035,
4859
4768
  "name": "invalidPoolState",
4860
4769
  "msg": "Invalid pool state (empty vaults or invalid reserves)"
4861
- },
4862
- {
4863
- "code": 6036,
4864
- "name": "reduceOnly",
4865
- "msg": "Pool is in reduce-only mode"
4866
4770
  }
4867
4771
  ],
4868
4772
  "types": [
@@ -5525,48 +5429,50 @@ export type LiquidSwap = {
5525
5429
  {
5526
5430
  "name": "quoteMint",
5527
5431
  "docs": [
5528
- "Mint information for Quote"
5432
+ "Mint information for quote"
5529
5433
  ],
5530
5434
  "type": "pubkey"
5531
5435
  },
5532
5436
  {
5533
5437
  "name": "baseTokenProgram",
5534
5438
  "docs": [
5535
- "base program"
5439
+ "Base program"
5536
5440
  ],
5537
5441
  "type": "pubkey"
5538
5442
  },
5539
5443
  {
5540
5444
  "name": "quoteTokenProgram",
5541
5445
  "docs": [
5542
- "quote program"
5446
+ "Quote program"
5543
5447
  ],
5544
5448
  "type": "pubkey"
5545
5449
  },
5546
5450
  {
5547
5451
  "name": "observationKey",
5548
5452
  "docs": [
5549
- "observation account to store oracle data"
5453
+ "Observation account to store oracle data"
5550
5454
  ],
5551
5455
  "type": "pubkey"
5552
5456
  },
5553
- {
5554
- "name": "authBump",
5555
- "type": "u8"
5556
- },
5557
5457
  {
5558
5458
  "name": "lpMintDecimals",
5459
+ "docs": [
5460
+ "Mint decimals for LP token"
5461
+ ],
5559
5462
  "type": "u8"
5560
5463
  },
5561
5464
  {
5562
5465
  "name": "baseDecimals",
5563
5466
  "docs": [
5564
- "mint base and mint quote decimals"
5467
+ "Mint base decimals"
5565
5468
  ],
5566
5469
  "type": "u8"
5567
5470
  },
5568
5471
  {
5569
5472
  "name": "quoteDecimals",
5473
+ "docs": [
5474
+ "Mint quote decimals"
5475
+ ],
5570
5476
  "type": "u8"
5571
5477
  },
5572
5478
  {
@@ -5577,23 +5483,23 @@ export type LiquidSwap = {
5577
5483
  "type": "u64"
5578
5484
  },
5579
5485
  {
5580
- "name": "recentEpoch",
5486
+ "name": "creator",
5581
5487
  "docs": [
5582
- "recent epoch"
5488
+ "Creator of the token"
5583
5489
  ],
5584
- "type": "u64"
5490
+ "type": "pubkey"
5585
5491
  },
5586
5492
  {
5587
- "name": "creator",
5493
+ "name": "recentEpoch",
5588
5494
  "docs": [
5589
- "Creator of the token"
5495
+ "Recent epoch"
5590
5496
  ],
5591
- "type": "pubkey"
5497
+ "type": "u64"
5592
5498
  },
5593
5499
  {
5594
- "name": "reduceOnly",
5500
+ "name": "bump",
5595
5501
  "docs": [
5596
- "Reduce-only mode: when nonzero, only sells are allowed"
5502
+ "Bump for PDA"
5597
5503
  ],
5598
5504
  "type": "u8"
5599
5505
  }