@liquid-af/sdk 1.0.2 → 1.0.4
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/dist/idl/liquid.d.ts +104 -81
- package/dist/idl/liquid.d.ts.map +1 -1
- package/dist/idl/liquid.json +105 -82
- package/dist/idl/liquid_events.d.ts +0 -7
- package/dist/idl/liquid_events.d.ts.map +1 -1
- package/dist/idl/liquid_events.json +0 -7
- package/dist/instructions/liquid.d.ts.map +1 -1
- package/dist/instructions/liquid.js +1 -3
- package/dist/instructions/liquid.js.map +1 -1
- package/package.json +1 -1
- package/src/idl/liquid.json +105 -82
- package/src/idl/liquid.ts +105 -82
- package/src/idl/liquid_events.json +0 -7
- package/src/idl/liquid_events.ts +0 -7
- package/src/instructions/liquid.ts +0 -6
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": "
|
|
12819
|
-
"msg": "
|
|
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": "
|
|
12824
|
-
"msg": "
|
|
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": "
|
|
12829
|
-
"msg": "
|
|
12881
|
+
"name": "referrerIsSelf",
|
|
12882
|
+
"msg": "Cannot set self as referrer"
|
|
12830
12883
|
},
|
|
12831
12884
|
{
|
|
12832
12885
|
"code": 6007,
|
|
12833
|
-
"name": "
|
|
12834
|
-
"msg": "The provided
|
|
12886
|
+
"name": "referrerInvalid",
|
|
12887
|
+
"msg": "The provided referrer is invalid"
|
|
12835
12888
|
},
|
|
12836
12889
|
{
|
|
12837
12890
|
"code": 6008,
|
|
@@ -12860,28 +12913,28 @@ export type Liquid = {
|
|
|
12860
12913
|
},
|
|
12861
12914
|
{
|
|
12862
12915
|
"code": 6013,
|
|
12863
|
-
"name": "
|
|
12864
|
-
"msg": "
|
|
12916
|
+
"name": "slippageExceeded",
|
|
12917
|
+
"msg": "Slippage tolerance exceeded"
|
|
12865
12918
|
},
|
|
12866
12919
|
{
|
|
12867
12920
|
"code": 6014,
|
|
12868
|
-
"name": "
|
|
12869
|
-
"msg": "Bonding curve is
|
|
12921
|
+
"name": "curveComplete",
|
|
12922
|
+
"msg": "Bonding curve is complete and trading is halted"
|
|
12870
12923
|
},
|
|
12871
12924
|
{
|
|
12872
12925
|
"code": 6015,
|
|
12873
|
-
"name": "
|
|
12874
|
-
"msg": "Bonding curve
|
|
12926
|
+
"name": "curveNotComplete",
|
|
12927
|
+
"msg": "Bonding curve is not complete"
|
|
12875
12928
|
},
|
|
12876
12929
|
{
|
|
12877
12930
|
"code": 6016,
|
|
12878
|
-
"name": "
|
|
12879
|
-
"msg": "
|
|
12931
|
+
"name": "alreadyMigrated",
|
|
12932
|
+
"msg": "Bonding curve has already been migrated"
|
|
12880
12933
|
},
|
|
12881
12934
|
{
|
|
12882
12935
|
"code": 6017,
|
|
12883
|
-
"name": "
|
|
12884
|
-
"msg": "
|
|
12936
|
+
"name": "insufficientQuoteForMigration",
|
|
12937
|
+
"msg": "Insufficient quote reserves for migration"
|
|
12885
12938
|
},
|
|
12886
12939
|
{
|
|
12887
12940
|
"code": 6018,
|
|
@@ -12895,29 +12948,29 @@ export type Liquid = {
|
|
|
12895
12948
|
},
|
|
12896
12949
|
{
|
|
12897
12950
|
"code": 6020,
|
|
12951
|
+
"name": "creatorFeesNotRevoked",
|
|
12952
|
+
"msg": "Creator fees have not been revoked - buyback not available"
|
|
12953
|
+
},
|
|
12954
|
+
{
|
|
12955
|
+
"code": 6021,
|
|
12898
12956
|
"name": "invalidFeeAccountInput",
|
|
12899
12957
|
"msg": "Invalid fee configuration account"
|
|
12900
12958
|
},
|
|
12901
12959
|
{
|
|
12902
|
-
"code":
|
|
12960
|
+
"code": 6022,
|
|
12903
12961
|
"name": "feeConfigurationAlreadyExists",
|
|
12904
12962
|
"msg": "A fee configuration already exists. Detach it first before attaching a new one"
|
|
12905
12963
|
},
|
|
12906
12964
|
{
|
|
12907
|
-
"code":
|
|
12965
|
+
"code": 6023,
|
|
12908
12966
|
"name": "incorrectFeeRecipientsCount",
|
|
12909
12967
|
"msg": "Incorrect number of protocol fee recipients provided"
|
|
12910
12968
|
},
|
|
12911
12969
|
{
|
|
12912
|
-
"code":
|
|
12970
|
+
"code": 6024,
|
|
12913
12971
|
"name": "invalidFeeRecipient",
|
|
12914
12972
|
"msg": "The fee recipient provided is not in the global configuration"
|
|
12915
12973
|
},
|
|
12916
|
-
{
|
|
12917
|
-
"code": 6024,
|
|
12918
|
-
"name": "invalidProtocolConfiguration",
|
|
12919
|
-
"msg": "Invalid protocol configuration"
|
|
12920
|
-
},
|
|
12921
12974
|
{
|
|
12922
12975
|
"code": 6025,
|
|
12923
12976
|
"name": "invalidFeeConfiguration",
|
|
@@ -12930,103 +12983,73 @@ export type Liquid = {
|
|
|
12930
12983
|
},
|
|
12931
12984
|
{
|
|
12932
12985
|
"code": 6027,
|
|
12933
|
-
"name": "
|
|
12934
|
-
"msg": "
|
|
12986
|
+
"name": "feesMustBeWithdrawn",
|
|
12987
|
+
"msg": "Existing creator fees must be fully withdrawn before updating the configuration"
|
|
12935
12988
|
},
|
|
12936
12989
|
{
|
|
12937
12990
|
"code": 6028,
|
|
12938
|
-
"name": "
|
|
12939
|
-
"msg": "
|
|
12991
|
+
"name": "feeTooHigh",
|
|
12992
|
+
"msg": "Individual fee cannot exceed maximum"
|
|
12940
12993
|
},
|
|
12941
12994
|
{
|
|
12942
12995
|
"code": 6029,
|
|
12943
|
-
"name": "
|
|
12944
|
-
"msg": "
|
|
12996
|
+
"name": "invalidProtocolConfiguration",
|
|
12997
|
+
"msg": "Invalid protocol configuration"
|
|
12945
12998
|
},
|
|
12946
12999
|
{
|
|
12947
13000
|
"code": 6030,
|
|
12948
|
-
"name": "
|
|
12949
|
-
"msg": "
|
|
13001
|
+
"name": "tooManyQuoteMints",
|
|
13002
|
+
"msg": "Too many quote mints provided"
|
|
12950
13003
|
},
|
|
12951
13004
|
{
|
|
12952
13005
|
"code": 6031,
|
|
12953
|
-
"name": "
|
|
12954
|
-
"msg": "
|
|
13006
|
+
"name": "duplicateQuoteMint",
|
|
13007
|
+
"msg": "Duplicate quote mint provided"
|
|
12955
13008
|
},
|
|
12956
13009
|
{
|
|
12957
13010
|
"code": 6032,
|
|
12958
|
-
"name": "
|
|
12959
|
-
"msg": "
|
|
13011
|
+
"name": "invalidQuoteMint",
|
|
13012
|
+
"msg": "Invalid quote mint - not in whitelist"
|
|
12960
13013
|
},
|
|
12961
13014
|
{
|
|
12962
13015
|
"code": 6033,
|
|
12963
|
-
"name": "
|
|
12964
|
-
"msg": "
|
|
13016
|
+
"name": "invalidTokenTotalSupply",
|
|
13017
|
+
"msg": "Invalid token total supply. Must be greater than initial real token reserves"
|
|
12965
13018
|
},
|
|
12966
13019
|
{
|
|
12967
13020
|
"code": 6034,
|
|
12968
|
-
"name": "
|
|
12969
|
-
"msg": "
|
|
13021
|
+
"name": "invalidReserves",
|
|
13022
|
+
"msg": "Reserve values must be greater than zero"
|
|
12970
13023
|
},
|
|
12971
13024
|
{
|
|
12972
13025
|
"code": 6035,
|
|
12973
|
-
"name": "
|
|
12974
|
-
"msg": "
|
|
13026
|
+
"name": "invalidCashbackConfiguration",
|
|
13027
|
+
"msg": "Invalid cashback configuration"
|
|
12975
13028
|
},
|
|
12976
13029
|
{
|
|
12977
13030
|
"code": 6036,
|
|
12978
|
-
"name": "
|
|
12979
|
-
"msg": "
|
|
13031
|
+
"name": "cannotChangeCashbackMode",
|
|
13032
|
+
"msg": "Cannot activate spending mode without existing cashback credits"
|
|
12980
13033
|
},
|
|
12981
13034
|
{
|
|
12982
13035
|
"code": 6037,
|
|
12983
|
-
"name": "curveComplete",
|
|
12984
|
-
"msg": "Curve has already completed trading"
|
|
12985
|
-
},
|
|
12986
|
-
{
|
|
12987
|
-
"code": 6038,
|
|
12988
|
-
"name": "creatorFeesNotRevoked",
|
|
12989
|
-
"msg": "Creator fees have not been revoked - buyback not available"
|
|
12990
|
-
},
|
|
12991
|
-
{
|
|
12992
|
-
"code": 6039,
|
|
12993
13036
|
"name": "protocolPaused",
|
|
12994
13037
|
"msg": "Protocol is paused"
|
|
12995
13038
|
},
|
|
12996
13039
|
{
|
|
12997
|
-
"code":
|
|
13040
|
+
"code": 6038,
|
|
12998
13041
|
"name": "invalidPriceFeed",
|
|
12999
13042
|
"msg": "Invalid price feed account"
|
|
13000
13043
|
},
|
|
13001
13044
|
{
|
|
13002
|
-
"code":
|
|
13045
|
+
"code": 6039,
|
|
13003
13046
|
"name": "stalePriceFeed",
|
|
13004
13047
|
"msg": "Price feed data is stale"
|
|
13005
13048
|
},
|
|
13006
13049
|
{
|
|
13007
|
-
"code":
|
|
13008
|
-
"name": "
|
|
13009
|
-
"msg": "
|
|
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"
|
|
13050
|
+
"code": 6040,
|
|
13051
|
+
"name": "arithmeticOverflow",
|
|
13052
|
+
"msg": "Arithmetic operation resulted in overflow"
|
|
13030
13053
|
}
|
|
13031
13054
|
],
|
|
13032
13055
|
"types": [
|
package/src/idl/liquid_events.ts
CHANGED
|
@@ -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
|
}
|