@liquid-af/sdk 1.0.1 → 1.0.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
@@ -4148,7 +4148,60 @@ export type Liquid = {
4148
4148
  "docs": [
4149
4149
  "Token account holding curve's token reserves."
4150
4150
  ],
4151
- "writable": true
4151
+ "writable": true,
4152
+ "pda": {
4153
+ "seeds": [
4154
+ {
4155
+ "kind": "account",
4156
+ "path": "bondingCurve"
4157
+ },
4158
+ {
4159
+ "kind": "account",
4160
+ "path": "tokenProgram2022"
4161
+ },
4162
+ {
4163
+ "kind": "account",
4164
+ "path": "mint"
4165
+ }
4166
+ ],
4167
+ "program": {
4168
+ "kind": "const",
4169
+ "value": [
4170
+ 140,
4171
+ 151,
4172
+ 37,
4173
+ 143,
4174
+ 78,
4175
+ 36,
4176
+ 137,
4177
+ 241,
4178
+ 187,
4179
+ 61,
4180
+ 16,
4181
+ 41,
4182
+ 20,
4183
+ 142,
4184
+ 13,
4185
+ 131,
4186
+ 11,
4187
+ 90,
4188
+ 19,
4189
+ 153,
4190
+ 218,
4191
+ 255,
4192
+ 16,
4193
+ 132,
4194
+ 4,
4195
+ 142,
4196
+ 123,
4197
+ 216,
4198
+ 219,
4199
+ 233,
4200
+ 248,
4201
+ 89
4202
+ ]
4203
+ }
4204
+ }
4152
4205
  },
4153
4206
  {
4154
4207
  "name": "feeVaultTokenAccount",
@@ -12815,23 +12868,23 @@ export type Liquid = {
12815
12868
  },
12816
12869
  {
12817
12870
  "code": 6004,
12818
- "name": "referrerNotSet",
12819
- "msg": "User has a referrer set but the referrer vault was not provided"
12871
+ "name": "invalidCreator",
12872
+ "msg": "The provided creator does not match the bonding curve creator"
12820
12873
  },
12821
12874
  {
12822
12875
  "code": 6005,
12823
- "name": "referrerIsSelf",
12824
- "msg": "A user cannot refer themself"
12876
+ "name": "referrerNotSet",
12877
+ "msg": "User has a referrer set but the referrer vault was not provided"
12825
12878
  },
12826
12879
  {
12827
12880
  "code": 6006,
12828
- "name": "referrerInvalid",
12829
- "msg": "The provided referrer is invalid"
12881
+ "name": "referrerIsSelf",
12882
+ "msg": "Cannot set self as referrer"
12830
12883
  },
12831
12884
  {
12832
12885
  "code": 6007,
12833
- "name": "invalidCreator",
12834
- "msg": "The provided creator does not match the bonding curve creator"
12886
+ "name": "referrerInvalid",
12887
+ "msg": "The provided referrer is invalid"
12835
12888
  },
12836
12889
  {
12837
12890
  "code": 6008,
@@ -12860,79 +12913,79 @@ export type Liquid = {
12860
12913
  },
12861
12914
  {
12862
12915
  "code": 6013,
12863
- "name": "bondingCurveComplete",
12864
- "msg": "Bonding curve is complete and trading is halted"
12916
+ "name": "slippageExceeded",
12917
+ "msg": "Slippage tolerance exceeded"
12865
12918
  },
12866
12919
  {
12867
12920
  "code": 6014,
12868
- "name": "curveNotComplete",
12869
- "msg": "Bonding curve is not complete"
12921
+ "name": "bondingCurveComplete",
12922
+ "msg": "Bonding curve is complete and trading is halted"
12870
12923
  },
12871
12924
  {
12872
12925
  "code": 6015,
12873
- "name": "alreadyMigrated",
12874
- "msg": "Bonding curve has already been migrated"
12926
+ "name": "curveComplete",
12927
+ "msg": "Curve has already completed trading"
12875
12928
  },
12876
12929
  {
12877
12930
  "code": 6016,
12878
- "name": "insufficientSolForMigration",
12879
- "msg": "Insufficient SOL reserves for migration"
12931
+ "name": "curveNotComplete",
12932
+ "msg": "Bonding curve is not complete"
12880
12933
  },
12881
12934
  {
12882
12935
  "code": 6017,
12883
- "name": "slippageExceeded",
12884
- "msg": "Slippage tolerance exceeded"
12936
+ "name": "alreadyMigrated",
12937
+ "msg": "Bonding curve has already been migrated"
12885
12938
  },
12886
12939
  {
12887
12940
  "code": 6018,
12941
+ "name": "insufficientQuoteForMigration",
12942
+ "msg": "Insufficient quote reserves for migration"
12943
+ },
12944
+ {
12945
+ "code": 6019,
12888
12946
  "name": "creatorFeesRevoked",
12889
12947
  "msg": "Creator fees have been permanently revoked"
12890
12948
  },
12891
12949
  {
12892
- "code": 6019,
12950
+ "code": 6020,
12893
12951
  "name": "creatorFeesAlreadyRevoked",
12894
12952
  "msg": "Creator fees have already been revoked"
12895
12953
  },
12896
12954
  {
12897
- "code": 6020,
12955
+ "code": 6021,
12956
+ "name": "creatorFeesNotRevoked",
12957
+ "msg": "Creator fees have not been revoked - buyback not available"
12958
+ },
12959
+ {
12960
+ "code": 6022,
12898
12961
  "name": "invalidFeeAccountInput",
12899
12962
  "msg": "Invalid fee configuration account"
12900
12963
  },
12901
12964
  {
12902
- "code": 6021,
12965
+ "code": 6023,
12903
12966
  "name": "feeConfigurationAlreadyExists",
12904
12967
  "msg": "A fee configuration already exists. Detach it first before attaching a new one"
12905
12968
  },
12906
12969
  {
12907
- "code": 6022,
12970
+ "code": 6024,
12908
12971
  "name": "incorrectFeeRecipientsCount",
12909
12972
  "msg": "Incorrect number of protocol fee recipients provided"
12910
12973
  },
12911
12974
  {
12912
- "code": 6023,
12975
+ "code": 6025,
12913
12976
  "name": "invalidFeeRecipient",
12914
12977
  "msg": "The fee recipient provided is not in the global configuration"
12915
12978
  },
12916
12979
  {
12917
- "code": 6024,
12918
- "name": "invalidProtocolConfiguration",
12919
- "msg": "Invalid protocol configuration"
12920
- },
12921
- {
12922
- "code": 6025,
12980
+ "code": 6026,
12923
12981
  "name": "invalidFeeConfiguration",
12924
12982
  "msg": "Invalid fee configuration. Total must be 10000 bps with no duplicate recipients"
12925
12983
  },
12926
12984
  {
12927
- "code": 6026,
12985
+ "code": 6027,
12928
12986
  "name": "invalidRemainingAccounts",
12929
12987
  "msg": "Invalid remaining accounts for fee distribution"
12930
12988
  },
12931
- {
12932
- "code": 6027,
12933
- "name": "cannotChangeCashbackMode",
12934
- "msg": "Cannot activate spending mode without existing cashback credits"
12935
- },
12936
12989
  {
12937
12990
  "code": 6028,
12938
12991
  "name": "feesMustBeWithdrawn",
@@ -12940,93 +12993,68 @@ export type Liquid = {
12940
12993
  },
12941
12994
  {
12942
12995
  "code": 6029,
12943
- "name": "tooManyQuoteMints",
12944
- "msg": "Too many quote mints provided"
12996
+ "name": "feeTooHigh",
12997
+ "msg": "Individual fee cannot exceed maximum"
12945
12998
  },
12946
12999
  {
12947
13000
  "code": 6030,
12948
- "name": "invalidTokenTotalSupply",
12949
- "msg": "Invalid token total supply. Must be greater than initial real token reserves"
13001
+ "name": "invalidProtocolConfiguration",
13002
+ "msg": "Invalid protocol configuration"
12950
13003
  },
12951
13004
  {
12952
13005
  "code": 6031,
12953
- "name": "arithmeticOverflow",
12954
- "msg": "Arithmetic operation resulted in overflow"
13006
+ "name": "tooManyQuoteMints",
13007
+ "msg": "Too many quote mints provided"
12955
13008
  },
12956
13009
  {
12957
13010
  "code": 6032,
12958
- "name": "invalidCashbackConfiguration",
12959
- "msg": "Cashback ranges must be contiguous and non-overlapping"
13011
+ "name": "duplicateQuoteMint",
13012
+ "msg": "Duplicate quote mint provided"
12960
13013
  },
12961
13014
  {
12962
13015
  "code": 6033,
12963
- "name": "feeTooHigh",
12964
- "msg": "Individual fee cannot exceed maximum"
13016
+ "name": "invalidQuoteMint",
13017
+ "msg": "Invalid quote mint - not in whitelist"
12965
13018
  },
12966
13019
  {
12967
13020
  "code": 6034,
12968
- "name": "invalidMigrateAuthority",
12969
- "msg": "Invalid migrate authority address"
13021
+ "name": "invalidTokenTotalSupply",
13022
+ "msg": "Invalid token total supply. Must be greater than initial real token reserves"
12970
13023
  },
12971
13024
  {
12972
13025
  "code": 6035,
12973
- "name": "duplicateQuoteMint",
12974
- "msg": "Duplicate quote mint provided"
13026
+ "name": "invalidReserves",
13027
+ "msg": "Reserve values must be greater than zero"
12975
13028
  },
12976
13029
  {
12977
13030
  "code": 6036,
12978
- "name": "invalidReserves",
12979
- "msg": "Reserve values must be greater than zero"
13031
+ "name": "invalidCashbackConfiguration",
13032
+ "msg": "Invalid cashback configuration"
12980
13033
  },
12981
13034
  {
12982
13035
  "code": 6037,
12983
- "name": "curveComplete",
12984
- "msg": "Curve has already completed trading"
13036
+ "name": "cannotChangeCashbackMode",
13037
+ "msg": "Cannot activate spending mode without existing cashback credits"
12985
13038
  },
12986
13039
  {
12987
13040
  "code": 6038,
12988
- "name": "creatorFeesNotRevoked",
12989
- "msg": "Creator fees have not been revoked - buyback not available"
12990
- },
12991
- {
12992
- "code": 6039,
12993
13041
  "name": "protocolPaused",
12994
13042
  "msg": "Protocol is paused"
12995
13043
  },
12996
13044
  {
12997
- "code": 6040,
13045
+ "code": 6039,
12998
13046
  "name": "invalidPriceFeed",
12999
13047
  "msg": "Invalid price feed account"
13000
13048
  },
13001
13049
  {
13002
- "code": 6041,
13050
+ "code": 6040,
13003
13051
  "name": "stalePriceFeed",
13004
13052
  "msg": "Price feed data is stale"
13005
13053
  },
13006
13054
  {
13007
- "code": 6042,
13008
- "name": "invalidQuoteMint",
13009
- "msg": "Invalid quote mint - not in whitelist"
13010
- },
13011
- {
13012
- "code": 6043,
13013
- "name": "invalidMultiplier",
13014
- "msg": "Computed ScaledUiAmount multiplier is invalid (zero, negative, NaN, or subnormal)"
13015
- },
13016
- {
13017
- "code": 6044,
13018
- "name": "invalidTokenAccount",
13019
- "msg": "Invalid token account address"
13020
- },
13021
- {
13022
- "code": 6045,
13023
- "name": "buybackVaultNotDrained",
13024
- "msg": "Buyback vault must be drained before migration"
13025
- },
13026
- {
13027
- "code": 6046,
13028
- "name": "exclusivityPeriod",
13029
- "msg": "This action cannot be performed during the exclusivity period"
13055
+ "code": 6041,
13056
+ "name": "arithmeticOverflow",
13057
+ "msg": "Arithmetic operation resulted in overflow"
13030
13058
  }
13031
13059
  ],
13032
13060
  "types": [
@@ -2016,13 +2016,6 @@
2016
2016
  ],
2017
2017
  "type": "i64"
2018
2018
  },
2019
- {
2020
- "name": "multiplier",
2021
- "docs": [
2022
- "The ScaledUiAmount multiplier applied at migration."
2023
- ],
2024
- "type": "f64"
2025
- },
2026
2019
  {
2027
2020
  "name": "lp_mint",
2028
2021
  "docs": [
@@ -2022,13 +2022,6 @@ export type LiquidEvents = {
2022
2022
  ],
2023
2023
  "type": "i64"
2024
2024
  },
2025
- {
2026
- "name": "multiplier",
2027
- "docs": [
2028
- "The ScaledUiAmount multiplier applied at migration."
2029
- ],
2030
- "type": "f64"
2031
- },
2032
2025
  {
2033
2026
  "name": "lpMint",
2034
2027
  "docs": [
@@ -16,7 +16,6 @@ import {
16
16
  } from "../config.js";
17
17
  import {
18
18
  getBondingCurvePDA,
19
- getBondingCurveTokenAccount,
20
19
  getBuybackVaultPDA,
21
20
  getStableBondingCurvePDA,
22
21
  } from "../pda/liquid.js";
@@ -64,10 +63,6 @@ export function buildCreateNativeCurve(
64
63
  const { creator, mint, name, symbol, uri, config } = params;
65
64
  const program = getCachedLiquidProgram(config);
66
65
 
67
- const bondingCurveTokenAccount = getBondingCurveTokenAccount(
68
- mint,
69
- config.liquidProgramId,
70
- );
71
66
  return program.methods
72
67
  .createNativeCurve({
73
68
  name,
@@ -77,7 +72,6 @@ export function buildCreateNativeCurve(
77
72
  .accounts({
78
73
  creator,
79
74
  mint,
80
- bondingCurveTokenAccount,
81
75
  })
82
76
  .instruction();
83
77
  }