@kamino-finance/klend-sdk 5.0.3 → 5.0.5
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/classes/manager.d.ts +38 -4
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +98 -4
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts.map +1 -1
- package/dist/classes/market.js +2 -25
- package/dist/classes/market.js.map +1 -1
- package/dist/classes/vault.d.ts +12 -8
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +94 -66
- package/dist/classes/vault.js.map +1 -1
- package/dist/client_kamino_manager.d.ts.map +1 -1
- package/dist/client_kamino_manager.js +14 -0
- package/dist/client_kamino_manager.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts +3 -3
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js +22 -18
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts +45 -15
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js +101 -39
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/index.d.ts +4 -4
- package/dist/idl_codegen_kamino_vault/accounts/index.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/anchor.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/anchor.js +162 -162
- package/dist/idl_codegen_kamino_vault/errors/anchor.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts +144 -32
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/custom.js +305 -109
- package/dist/idl_codegen_kamino_vault/errors/custom.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts +3 -3
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/index.js +7 -2
- package/dist/idl_codegen_kamino_vault/errors/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts +4 -2
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js +3 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts +13 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js +47 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/index.d.ts +18 -10
- package/dist/idl_codegen_kamino_vault/instructions/index.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/index.js +9 -1
- package/dist/idl_codegen_kamino_vault/instructions/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts +2 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts +6 -2
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.js +9 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts +7 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js +16 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts +14 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js +52 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts +4 -2
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js +8 -2
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts +23 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js +51 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/programId.d.ts +1 -1
- package/dist/idl_codegen_kamino_vault/programId.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/programId.js +1 -1
- package/dist/idl_codegen_kamino_vault/programId.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js +4 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.js +6 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts +3 -3
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js +5 -5
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts +27 -24
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js +59 -53
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.js +5 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts +11 -3
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js +25 -17
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js +3 -3
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts +3 -3
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.js +11 -11
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts +18 -8
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js +27 -13
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts +110 -0
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js +242 -0
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/index.d.ts +34 -30
- package/dist/idl_codegen_kamino_vault/types/index.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/index.js +26 -1
- package/dist/idl_codegen_kamino_vault/types/index.js.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.d.ts.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.js +6 -0
- package/dist/lending_operations/repay_with_collateral_operations.js.map +1 -1
- package/dist/leverage/calcs.d.ts +28 -1
- package/dist/leverage/calcs.d.ts.map +1 -1
- package/dist/leverage/calcs.js +204 -8
- package/dist/leverage/calcs.js.map +1 -1
- package/dist/leverage/index.d.ts +1 -0
- package/dist/leverage/index.d.ts.map +1 -1
- package/dist/leverage/index.js +1 -0
- package/dist/leverage/index.js.map +1 -1
- package/dist/leverage/operations.d.ts +14 -241
- package/dist/leverage/operations.d.ts.map +1 -1
- package/dist/leverage/operations.js +508 -776
- package/dist/leverage/operations.js.map +1 -1
- package/dist/leverage/types.d.ts +173 -0
- package/dist/leverage/types.d.ts.map +1 -0
- package/dist/leverage/types.js +3 -0
- package/dist/leverage/types.js.map +1 -0
- package/dist/leverage/utils.d.ts +5 -5
- package/dist/leverage/utils.d.ts.map +1 -1
- package/dist/leverage/utils.js +68 -33
- package/dist/leverage/utils.js.map +1 -1
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +2 -1
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/fuzz.d.ts +3 -0
- package/dist/utils/fuzz.d.ts.map +1 -0
- package/dist/utils/fuzz.js +11 -0
- package/dist/utils/fuzz.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/rpc.d.ts.map +1 -1
- package/dist/utils/rpc.js +2 -1
- package/dist/utils/rpc.js.map +1 -1
- package/package.json +2 -1
- package/src/classes/manager.ts +122 -4
- package/src/classes/market.ts +1 -1
- package/src/classes/vault.ts +123 -49
- package/src/client_kamino_manager.ts +18 -0
- package/src/idl_codegen_kamino_vault/accounts/Reserve.ts +132 -105
- package/src/idl_codegen_kamino_vault/accounts/VaultState.ts +217 -124
- package/src/idl_codegen_kamino_vault/accounts/index.ts +4 -4
- package/src/idl_codegen_kamino_vault/errors/anchor.ts +335 -326
- package/src/idl_codegen_kamino_vault/errors/custom.ts +353 -157
- package/src/idl_codegen_kamino_vault/errors/index.ts +35 -22
- package/src/idl_codegen_kamino_vault/instructions/deposit.ts +33 -25
- package/src/idl_codegen_kamino_vault/instructions/giveUpPendingFees.ts +40 -0
- package/src/idl_codegen_kamino_vault/instructions/index.ts +27 -10
- package/src/idl_codegen_kamino_vault/instructions/initVault.ts +25 -20
- package/src/idl_codegen_kamino_vault/instructions/invest.ts +40 -25
- package/src/idl_codegen_kamino_vault/instructions/updateAdmin.ts +24 -0
- package/src/idl_codegen_kamino_vault/instructions/updateReserveAllocation.ts +24 -24
- package/src/idl_codegen_kamino_vault/instructions/updateVaultConfig.ts +49 -0
- package/src/idl_codegen_kamino_vault/instructions/withdraw.ts +45 -33
- package/src/idl_codegen_kamino_vault/instructions/withdrawPendingFees.ts +75 -0
- package/src/idl_codegen_kamino_vault/programId.ts +5 -3
- package/src/idl_codegen_kamino_vault/types/BigFractionBytes.ts +24 -18
- package/src/idl_codegen_kamino_vault/types/BorrowRateCurve.ts +21 -16
- package/src/idl_codegen_kamino_vault/types/CurvePoint.ts +21 -18
- package/src/idl_codegen_kamino_vault/types/LastUpdate.ts +32 -27
- package/src/idl_codegen_kamino_vault/types/PriceHeuristic.ts +25 -22
- package/src/idl_codegen_kamino_vault/types/PythConfiguration.ts +14 -14
- package/src/idl_codegen_kamino_vault/types/ReserveCollateral.ts +35 -35
- package/src/idl_codegen_kamino_vault/types/ReserveConfig.ts +232 -191
- package/src/idl_codegen_kamino_vault/types/ReserveFees.ts +27 -23
- package/src/idl_codegen_kamino_vault/types/ReserveLiquidity.ts +116 -98
- package/src/idl_codegen_kamino_vault/types/ScopeConfiguration.ts +25 -25
- package/src/idl_codegen_kamino_vault/types/SwitchboardConfiguration.ts +21 -18
- package/src/idl_codegen_kamino_vault/types/TokenInfo.ts +92 -74
- package/src/idl_codegen_kamino_vault/types/VaultAllocation.ts +67 -49
- package/src/idl_codegen_kamino_vault/types/VaultConfigField.ts +270 -0
- package/src/idl_codegen_kamino_vault/types/index.ts +77 -30
- package/src/lending_operations/repay_with_collateral_operations.ts +2 -0
- package/src/leverage/calcs.ts +315 -8
- package/src/leverage/index.ts +1 -0
- package/src/leverage/operations.ts +1079 -1331
- package/src/leverage/types.ts +211 -0
- package/src/leverage/utils.ts +103 -64
- package/src/utils/constants.ts +2 -0
- package/src/utils/fuzz.ts +5 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/rpc.ts +2 -1
|
@@ -52,713 +52,722 @@ export type AnchorError =
|
|
|
52
52
|
| AccountReallocExceedsLimit
|
|
53
53
|
| AccountDuplicateReallocs
|
|
54
54
|
| DeclaredProgramIdMismatch
|
|
55
|
-
| Deprecated
|
|
55
|
+
| Deprecated
|
|
56
56
|
|
|
57
57
|
export class InstructionMissing extends Error {
|
|
58
|
-
static readonly code = 100
|
|
59
|
-
readonly code = 100
|
|
60
|
-
readonly name =
|
|
61
|
-
readonly msg =
|
|
58
|
+
static readonly code = 100
|
|
59
|
+
readonly code = 100
|
|
60
|
+
readonly name = "InstructionMissing"
|
|
61
|
+
readonly msg = "8 byte instruction identifier not provided"
|
|
62
62
|
|
|
63
63
|
constructor(readonly logs?: string[]) {
|
|
64
|
-
super(
|
|
64
|
+
super("100: 8 byte instruction identifier not provided")
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export class InstructionFallbackNotFound extends Error {
|
|
69
|
-
static readonly code = 101
|
|
70
|
-
readonly code = 101
|
|
71
|
-
readonly name =
|
|
72
|
-
readonly msg =
|
|
69
|
+
static readonly code = 101
|
|
70
|
+
readonly code = 101
|
|
71
|
+
readonly name = "InstructionFallbackNotFound"
|
|
72
|
+
readonly msg = "Fallback functions are not supported"
|
|
73
73
|
|
|
74
74
|
constructor(readonly logs?: string[]) {
|
|
75
|
-
super(
|
|
75
|
+
super("101: Fallback functions are not supported")
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export class InstructionDidNotDeserialize extends Error {
|
|
80
|
-
static readonly code = 102
|
|
81
|
-
readonly code = 102
|
|
82
|
-
readonly name =
|
|
83
|
-
readonly msg =
|
|
80
|
+
static readonly code = 102
|
|
81
|
+
readonly code = 102
|
|
82
|
+
readonly name = "InstructionDidNotDeserialize"
|
|
83
|
+
readonly msg = "The program could not deserialize the given instruction"
|
|
84
84
|
|
|
85
85
|
constructor(readonly logs?: string[]) {
|
|
86
|
-
super(
|
|
86
|
+
super("102: The program could not deserialize the given instruction")
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export class InstructionDidNotSerialize extends Error {
|
|
91
|
-
static readonly code = 103
|
|
92
|
-
readonly code = 103
|
|
93
|
-
readonly name =
|
|
94
|
-
readonly msg =
|
|
91
|
+
static readonly code = 103
|
|
92
|
+
readonly code = 103
|
|
93
|
+
readonly name = "InstructionDidNotSerialize"
|
|
94
|
+
readonly msg = "The program could not serialize the given instruction"
|
|
95
95
|
|
|
96
96
|
constructor(readonly logs?: string[]) {
|
|
97
|
-
super(
|
|
97
|
+
super("103: The program could not serialize the given instruction")
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
export class IdlInstructionStub extends Error {
|
|
102
|
-
static readonly code = 1000
|
|
103
|
-
readonly code = 1000
|
|
104
|
-
readonly name =
|
|
105
|
-
readonly msg =
|
|
102
|
+
static readonly code = 1000
|
|
103
|
+
readonly code = 1000
|
|
104
|
+
readonly name = "IdlInstructionStub"
|
|
105
|
+
readonly msg = "The program was compiled without idl instructions"
|
|
106
106
|
|
|
107
107
|
constructor(readonly logs?: string[]) {
|
|
108
|
-
super(
|
|
108
|
+
super("1000: The program was compiled without idl instructions")
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export class IdlInstructionInvalidProgram extends Error {
|
|
113
|
-
static readonly code = 1001
|
|
114
|
-
readonly code = 1001
|
|
115
|
-
readonly name =
|
|
116
|
-
readonly msg =
|
|
113
|
+
static readonly code = 1001
|
|
114
|
+
readonly code = 1001
|
|
115
|
+
readonly name = "IdlInstructionInvalidProgram"
|
|
116
|
+
readonly msg =
|
|
117
|
+
"The transaction was given an invalid program for the IDL instruction"
|
|
117
118
|
|
|
118
119
|
constructor(readonly logs?: string[]) {
|
|
119
|
-
super(
|
|
120
|
+
super(
|
|
121
|
+
"1001: The transaction was given an invalid program for the IDL instruction"
|
|
122
|
+
)
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
export class ConstraintMut extends Error {
|
|
124
|
-
static readonly code = 2000
|
|
125
|
-
readonly code = 2000
|
|
126
|
-
readonly name =
|
|
127
|
-
readonly msg =
|
|
127
|
+
static readonly code = 2000
|
|
128
|
+
readonly code = 2000
|
|
129
|
+
readonly name = "ConstraintMut"
|
|
130
|
+
readonly msg = "A mut constraint was violated"
|
|
128
131
|
|
|
129
132
|
constructor(readonly logs?: string[]) {
|
|
130
|
-
super(
|
|
133
|
+
super("2000: A mut constraint was violated")
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
|
|
134
137
|
export class ConstraintHasOne extends Error {
|
|
135
|
-
static readonly code = 2001
|
|
136
|
-
readonly code = 2001
|
|
137
|
-
readonly name =
|
|
138
|
-
readonly msg =
|
|
138
|
+
static readonly code = 2001
|
|
139
|
+
readonly code = 2001
|
|
140
|
+
readonly name = "ConstraintHasOne"
|
|
141
|
+
readonly msg = "A has one constraint was violated"
|
|
139
142
|
|
|
140
143
|
constructor(readonly logs?: string[]) {
|
|
141
|
-
super(
|
|
144
|
+
super("2001: A has one constraint was violated")
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
147
|
|
|
145
148
|
export class ConstraintSigner extends Error {
|
|
146
|
-
static readonly code = 2002
|
|
147
|
-
readonly code = 2002
|
|
148
|
-
readonly name =
|
|
149
|
-
readonly msg =
|
|
149
|
+
static readonly code = 2002
|
|
150
|
+
readonly code = 2002
|
|
151
|
+
readonly name = "ConstraintSigner"
|
|
152
|
+
readonly msg = "A signer constraint was violated"
|
|
150
153
|
|
|
151
154
|
constructor(readonly logs?: string[]) {
|
|
152
|
-
super(
|
|
155
|
+
super("2002: A signer constraint was violated")
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
|
|
156
159
|
export class ConstraintRaw extends Error {
|
|
157
|
-
static readonly code = 2003
|
|
158
|
-
readonly code = 2003
|
|
159
|
-
readonly name =
|
|
160
|
-
readonly msg =
|
|
160
|
+
static readonly code = 2003
|
|
161
|
+
readonly code = 2003
|
|
162
|
+
readonly name = "ConstraintRaw"
|
|
163
|
+
readonly msg = "A raw constraint was violated"
|
|
161
164
|
|
|
162
165
|
constructor(readonly logs?: string[]) {
|
|
163
|
-
super(
|
|
166
|
+
super("2003: A raw constraint was violated")
|
|
164
167
|
}
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
export class ConstraintOwner extends Error {
|
|
168
|
-
static readonly code = 2004
|
|
169
|
-
readonly code = 2004
|
|
170
|
-
readonly name =
|
|
171
|
-
readonly msg =
|
|
171
|
+
static readonly code = 2004
|
|
172
|
+
readonly code = 2004
|
|
173
|
+
readonly name = "ConstraintOwner"
|
|
174
|
+
readonly msg = "An owner constraint was violated"
|
|
172
175
|
|
|
173
176
|
constructor(readonly logs?: string[]) {
|
|
174
|
-
super(
|
|
177
|
+
super("2004: An owner constraint was violated")
|
|
175
178
|
}
|
|
176
179
|
}
|
|
177
180
|
|
|
178
181
|
export class ConstraintRentExempt extends Error {
|
|
179
|
-
static readonly code = 2005
|
|
180
|
-
readonly code = 2005
|
|
181
|
-
readonly name =
|
|
182
|
-
readonly msg =
|
|
182
|
+
static readonly code = 2005
|
|
183
|
+
readonly code = 2005
|
|
184
|
+
readonly name = "ConstraintRentExempt"
|
|
185
|
+
readonly msg = "A rent exemption constraint was violated"
|
|
183
186
|
|
|
184
187
|
constructor(readonly logs?: string[]) {
|
|
185
|
-
super(
|
|
188
|
+
super("2005: A rent exemption constraint was violated")
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
191
|
|
|
189
192
|
export class ConstraintSeeds extends Error {
|
|
190
|
-
static readonly code = 2006
|
|
191
|
-
readonly code = 2006
|
|
192
|
-
readonly name =
|
|
193
|
-
readonly msg =
|
|
193
|
+
static readonly code = 2006
|
|
194
|
+
readonly code = 2006
|
|
195
|
+
readonly name = "ConstraintSeeds"
|
|
196
|
+
readonly msg = "A seeds constraint was violated"
|
|
194
197
|
|
|
195
198
|
constructor(readonly logs?: string[]) {
|
|
196
|
-
super(
|
|
199
|
+
super("2006: A seeds constraint was violated")
|
|
197
200
|
}
|
|
198
201
|
}
|
|
199
202
|
|
|
200
203
|
export class ConstraintExecutable extends Error {
|
|
201
|
-
static readonly code = 2007
|
|
202
|
-
readonly code = 2007
|
|
203
|
-
readonly name =
|
|
204
|
-
readonly msg =
|
|
204
|
+
static readonly code = 2007
|
|
205
|
+
readonly code = 2007
|
|
206
|
+
readonly name = "ConstraintExecutable"
|
|
207
|
+
readonly msg = "An executable constraint was violated"
|
|
205
208
|
|
|
206
209
|
constructor(readonly logs?: string[]) {
|
|
207
|
-
super(
|
|
210
|
+
super("2007: An executable constraint was violated")
|
|
208
211
|
}
|
|
209
212
|
}
|
|
210
213
|
|
|
211
214
|
export class ConstraintState extends Error {
|
|
212
|
-
static readonly code = 2008
|
|
213
|
-
readonly code = 2008
|
|
214
|
-
readonly name =
|
|
215
|
-
readonly msg =
|
|
215
|
+
static readonly code = 2008
|
|
216
|
+
readonly code = 2008
|
|
217
|
+
readonly name = "ConstraintState"
|
|
218
|
+
readonly msg = "Deprecated Error, feel free to replace with something else"
|
|
216
219
|
|
|
217
220
|
constructor(readonly logs?: string[]) {
|
|
218
|
-
super(
|
|
221
|
+
super("2008: Deprecated Error, feel free to replace with something else")
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
|
|
222
225
|
export class ConstraintAssociated extends Error {
|
|
223
|
-
static readonly code = 2009
|
|
224
|
-
readonly code = 2009
|
|
225
|
-
readonly name =
|
|
226
|
-
readonly msg =
|
|
226
|
+
static readonly code = 2009
|
|
227
|
+
readonly code = 2009
|
|
228
|
+
readonly name = "ConstraintAssociated"
|
|
229
|
+
readonly msg = "An associated constraint was violated"
|
|
227
230
|
|
|
228
231
|
constructor(readonly logs?: string[]) {
|
|
229
|
-
super(
|
|
232
|
+
super("2009: An associated constraint was violated")
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
235
|
|
|
233
236
|
export class ConstraintAssociatedInit extends Error {
|
|
234
|
-
static readonly code = 2010
|
|
235
|
-
readonly code = 2010
|
|
236
|
-
readonly name =
|
|
237
|
-
readonly msg =
|
|
237
|
+
static readonly code = 2010
|
|
238
|
+
readonly code = 2010
|
|
239
|
+
readonly name = "ConstraintAssociatedInit"
|
|
240
|
+
readonly msg = "An associated init constraint was violated"
|
|
238
241
|
|
|
239
242
|
constructor(readonly logs?: string[]) {
|
|
240
|
-
super(
|
|
243
|
+
super("2010: An associated init constraint was violated")
|
|
241
244
|
}
|
|
242
245
|
}
|
|
243
246
|
|
|
244
247
|
export class ConstraintClose extends Error {
|
|
245
|
-
static readonly code = 2011
|
|
246
|
-
readonly code = 2011
|
|
247
|
-
readonly name =
|
|
248
|
-
readonly msg =
|
|
248
|
+
static readonly code = 2011
|
|
249
|
+
readonly code = 2011
|
|
250
|
+
readonly name = "ConstraintClose"
|
|
251
|
+
readonly msg = "A close constraint was violated"
|
|
249
252
|
|
|
250
253
|
constructor(readonly logs?: string[]) {
|
|
251
|
-
super(
|
|
254
|
+
super("2011: A close constraint was violated")
|
|
252
255
|
}
|
|
253
256
|
}
|
|
254
257
|
|
|
255
258
|
export class ConstraintAddress extends Error {
|
|
256
|
-
static readonly code = 2012
|
|
257
|
-
readonly code = 2012
|
|
258
|
-
readonly name =
|
|
259
|
-
readonly msg =
|
|
259
|
+
static readonly code = 2012
|
|
260
|
+
readonly code = 2012
|
|
261
|
+
readonly name = "ConstraintAddress"
|
|
262
|
+
readonly msg = "An address constraint was violated"
|
|
260
263
|
|
|
261
264
|
constructor(readonly logs?: string[]) {
|
|
262
|
-
super(
|
|
265
|
+
super("2012: An address constraint was violated")
|
|
263
266
|
}
|
|
264
267
|
}
|
|
265
268
|
|
|
266
269
|
export class ConstraintZero extends Error {
|
|
267
|
-
static readonly code = 2013
|
|
268
|
-
readonly code = 2013
|
|
269
|
-
readonly name =
|
|
270
|
-
readonly msg =
|
|
270
|
+
static readonly code = 2013
|
|
271
|
+
readonly code = 2013
|
|
272
|
+
readonly name = "ConstraintZero"
|
|
273
|
+
readonly msg = "Expected zero account discriminant"
|
|
271
274
|
|
|
272
275
|
constructor(readonly logs?: string[]) {
|
|
273
|
-
super(
|
|
276
|
+
super("2013: Expected zero account discriminant")
|
|
274
277
|
}
|
|
275
278
|
}
|
|
276
279
|
|
|
277
280
|
export class ConstraintTokenMint extends Error {
|
|
278
|
-
static readonly code = 2014
|
|
279
|
-
readonly code = 2014
|
|
280
|
-
readonly name =
|
|
281
|
-
readonly msg =
|
|
281
|
+
static readonly code = 2014
|
|
282
|
+
readonly code = 2014
|
|
283
|
+
readonly name = "ConstraintTokenMint"
|
|
284
|
+
readonly msg = "A token mint constraint was violated"
|
|
282
285
|
|
|
283
286
|
constructor(readonly logs?: string[]) {
|
|
284
|
-
super(
|
|
287
|
+
super("2014: A token mint constraint was violated")
|
|
285
288
|
}
|
|
286
289
|
}
|
|
287
290
|
|
|
288
291
|
export class ConstraintTokenOwner extends Error {
|
|
289
|
-
static readonly code = 2015
|
|
290
|
-
readonly code = 2015
|
|
291
|
-
readonly name =
|
|
292
|
-
readonly msg =
|
|
292
|
+
static readonly code = 2015
|
|
293
|
+
readonly code = 2015
|
|
294
|
+
readonly name = "ConstraintTokenOwner"
|
|
295
|
+
readonly msg = "A token owner constraint was violated"
|
|
293
296
|
|
|
294
297
|
constructor(readonly logs?: string[]) {
|
|
295
|
-
super(
|
|
298
|
+
super("2015: A token owner constraint was violated")
|
|
296
299
|
}
|
|
297
300
|
}
|
|
298
301
|
|
|
299
302
|
export class ConstraintMintMintAuthority extends Error {
|
|
300
|
-
static readonly code = 2016
|
|
301
|
-
readonly code = 2016
|
|
302
|
-
readonly name =
|
|
303
|
-
readonly msg =
|
|
303
|
+
static readonly code = 2016
|
|
304
|
+
readonly code = 2016
|
|
305
|
+
readonly name = "ConstraintMintMintAuthority"
|
|
306
|
+
readonly msg = "A mint mint authority constraint was violated"
|
|
304
307
|
|
|
305
308
|
constructor(readonly logs?: string[]) {
|
|
306
|
-
super(
|
|
309
|
+
super("2016: A mint mint authority constraint was violated")
|
|
307
310
|
}
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
export class ConstraintMintFreezeAuthority extends Error {
|
|
311
|
-
static readonly code = 2017
|
|
312
|
-
readonly code = 2017
|
|
313
|
-
readonly name =
|
|
314
|
-
readonly msg =
|
|
314
|
+
static readonly code = 2017
|
|
315
|
+
readonly code = 2017
|
|
316
|
+
readonly name = "ConstraintMintFreezeAuthority"
|
|
317
|
+
readonly msg = "A mint freeze authority constraint was violated"
|
|
315
318
|
|
|
316
319
|
constructor(readonly logs?: string[]) {
|
|
317
|
-
super(
|
|
320
|
+
super("2017: A mint freeze authority constraint was violated")
|
|
318
321
|
}
|
|
319
322
|
}
|
|
320
323
|
|
|
321
324
|
export class ConstraintMintDecimals extends Error {
|
|
322
|
-
static readonly code = 2018
|
|
323
|
-
readonly code = 2018
|
|
324
|
-
readonly name =
|
|
325
|
-
readonly msg =
|
|
325
|
+
static readonly code = 2018
|
|
326
|
+
readonly code = 2018
|
|
327
|
+
readonly name = "ConstraintMintDecimals"
|
|
328
|
+
readonly msg = "A mint decimals constraint was violated"
|
|
326
329
|
|
|
327
330
|
constructor(readonly logs?: string[]) {
|
|
328
|
-
super(
|
|
331
|
+
super("2018: A mint decimals constraint was violated")
|
|
329
332
|
}
|
|
330
333
|
}
|
|
331
334
|
|
|
332
335
|
export class ConstraintSpace extends Error {
|
|
333
|
-
static readonly code = 2019
|
|
334
|
-
readonly code = 2019
|
|
335
|
-
readonly name =
|
|
336
|
-
readonly msg =
|
|
336
|
+
static readonly code = 2019
|
|
337
|
+
readonly code = 2019
|
|
338
|
+
readonly name = "ConstraintSpace"
|
|
339
|
+
readonly msg = "A space constraint was violated"
|
|
337
340
|
|
|
338
341
|
constructor(readonly logs?: string[]) {
|
|
339
|
-
super(
|
|
342
|
+
super("2019: A space constraint was violated")
|
|
340
343
|
}
|
|
341
344
|
}
|
|
342
345
|
|
|
343
346
|
export class ConstraintAccountIsNone extends Error {
|
|
344
|
-
static readonly code = 2020
|
|
345
|
-
readonly code = 2020
|
|
346
|
-
readonly name =
|
|
347
|
-
readonly msg =
|
|
347
|
+
static readonly code = 2020
|
|
348
|
+
readonly code = 2020
|
|
349
|
+
readonly name = "ConstraintAccountIsNone"
|
|
350
|
+
readonly msg = "A required account for the constraint is None"
|
|
348
351
|
|
|
349
352
|
constructor(readonly logs?: string[]) {
|
|
350
|
-
super(
|
|
353
|
+
super("2020: A required account for the constraint is None")
|
|
351
354
|
}
|
|
352
355
|
}
|
|
353
356
|
|
|
354
357
|
export class RequireViolated extends Error {
|
|
355
|
-
static readonly code = 2500
|
|
356
|
-
readonly code = 2500
|
|
357
|
-
readonly name =
|
|
358
|
-
readonly msg =
|
|
358
|
+
static readonly code = 2500
|
|
359
|
+
readonly code = 2500
|
|
360
|
+
readonly name = "RequireViolated"
|
|
361
|
+
readonly msg = "A require expression was violated"
|
|
359
362
|
|
|
360
363
|
constructor(readonly logs?: string[]) {
|
|
361
|
-
super(
|
|
364
|
+
super("2500: A require expression was violated")
|
|
362
365
|
}
|
|
363
366
|
}
|
|
364
367
|
|
|
365
368
|
export class RequireEqViolated extends Error {
|
|
366
|
-
static readonly code = 2501
|
|
367
|
-
readonly code = 2501
|
|
368
|
-
readonly name =
|
|
369
|
-
readonly msg =
|
|
369
|
+
static readonly code = 2501
|
|
370
|
+
readonly code = 2501
|
|
371
|
+
readonly name = "RequireEqViolated"
|
|
372
|
+
readonly msg = "A require_eq expression was violated"
|
|
370
373
|
|
|
371
374
|
constructor(readonly logs?: string[]) {
|
|
372
|
-
super(
|
|
375
|
+
super("2501: A require_eq expression was violated")
|
|
373
376
|
}
|
|
374
377
|
}
|
|
375
378
|
|
|
376
379
|
export class RequireKeysEqViolated extends Error {
|
|
377
|
-
static readonly code = 2502
|
|
378
|
-
readonly code = 2502
|
|
379
|
-
readonly name =
|
|
380
|
-
readonly msg =
|
|
380
|
+
static readonly code = 2502
|
|
381
|
+
readonly code = 2502
|
|
382
|
+
readonly name = "RequireKeysEqViolated"
|
|
383
|
+
readonly msg = "A require_keys_eq expression was violated"
|
|
381
384
|
|
|
382
385
|
constructor(readonly logs?: string[]) {
|
|
383
|
-
super(
|
|
386
|
+
super("2502: A require_keys_eq expression was violated")
|
|
384
387
|
}
|
|
385
388
|
}
|
|
386
389
|
|
|
387
390
|
export class RequireNeqViolated extends Error {
|
|
388
|
-
static readonly code = 2503
|
|
389
|
-
readonly code = 2503
|
|
390
|
-
readonly name =
|
|
391
|
-
readonly msg =
|
|
391
|
+
static readonly code = 2503
|
|
392
|
+
readonly code = 2503
|
|
393
|
+
readonly name = "RequireNeqViolated"
|
|
394
|
+
readonly msg = "A require_neq expression was violated"
|
|
392
395
|
|
|
393
396
|
constructor(readonly logs?: string[]) {
|
|
394
|
-
super(
|
|
397
|
+
super("2503: A require_neq expression was violated")
|
|
395
398
|
}
|
|
396
399
|
}
|
|
397
400
|
|
|
398
401
|
export class RequireKeysNeqViolated extends Error {
|
|
399
|
-
static readonly code = 2504
|
|
400
|
-
readonly code = 2504
|
|
401
|
-
readonly name =
|
|
402
|
-
readonly msg =
|
|
402
|
+
static readonly code = 2504
|
|
403
|
+
readonly code = 2504
|
|
404
|
+
readonly name = "RequireKeysNeqViolated"
|
|
405
|
+
readonly msg = "A require_keys_neq expression was violated"
|
|
403
406
|
|
|
404
407
|
constructor(readonly logs?: string[]) {
|
|
405
|
-
super(
|
|
408
|
+
super("2504: A require_keys_neq expression was violated")
|
|
406
409
|
}
|
|
407
410
|
}
|
|
408
411
|
|
|
409
412
|
export class RequireGtViolated extends Error {
|
|
410
|
-
static readonly code = 2505
|
|
411
|
-
readonly code = 2505
|
|
412
|
-
readonly name =
|
|
413
|
-
readonly msg =
|
|
413
|
+
static readonly code = 2505
|
|
414
|
+
readonly code = 2505
|
|
415
|
+
readonly name = "RequireGtViolated"
|
|
416
|
+
readonly msg = "A require_gt expression was violated"
|
|
414
417
|
|
|
415
418
|
constructor(readonly logs?: string[]) {
|
|
416
|
-
super(
|
|
419
|
+
super("2505: A require_gt expression was violated")
|
|
417
420
|
}
|
|
418
421
|
}
|
|
419
422
|
|
|
420
423
|
export class RequireGteViolated extends Error {
|
|
421
|
-
static readonly code = 2506
|
|
422
|
-
readonly code = 2506
|
|
423
|
-
readonly name =
|
|
424
|
-
readonly msg =
|
|
424
|
+
static readonly code = 2506
|
|
425
|
+
readonly code = 2506
|
|
426
|
+
readonly name = "RequireGteViolated"
|
|
427
|
+
readonly msg = "A require_gte expression was violated"
|
|
425
428
|
|
|
426
429
|
constructor(readonly logs?: string[]) {
|
|
427
|
-
super(
|
|
430
|
+
super("2506: A require_gte expression was violated")
|
|
428
431
|
}
|
|
429
432
|
}
|
|
430
433
|
|
|
431
434
|
export class AccountDiscriminatorAlreadySet extends Error {
|
|
432
|
-
static readonly code = 3000
|
|
433
|
-
readonly code = 3000
|
|
434
|
-
readonly name =
|
|
435
|
-
readonly msg =
|
|
435
|
+
static readonly code = 3000
|
|
436
|
+
readonly code = 3000
|
|
437
|
+
readonly name = "AccountDiscriminatorAlreadySet"
|
|
438
|
+
readonly msg = "The account discriminator was already set on this account"
|
|
436
439
|
|
|
437
440
|
constructor(readonly logs?: string[]) {
|
|
438
|
-
super(
|
|
441
|
+
super("3000: The account discriminator was already set on this account")
|
|
439
442
|
}
|
|
440
443
|
}
|
|
441
444
|
|
|
442
445
|
export class AccountDiscriminatorNotFound extends Error {
|
|
443
|
-
static readonly code = 3001
|
|
444
|
-
readonly code = 3001
|
|
445
|
-
readonly name =
|
|
446
|
-
readonly msg =
|
|
446
|
+
static readonly code = 3001
|
|
447
|
+
readonly code = 3001
|
|
448
|
+
readonly name = "AccountDiscriminatorNotFound"
|
|
449
|
+
readonly msg = "No 8 byte discriminator was found on the account"
|
|
447
450
|
|
|
448
451
|
constructor(readonly logs?: string[]) {
|
|
449
|
-
super(
|
|
452
|
+
super("3001: No 8 byte discriminator was found on the account")
|
|
450
453
|
}
|
|
451
454
|
}
|
|
452
455
|
|
|
453
456
|
export class AccountDiscriminatorMismatch extends Error {
|
|
454
|
-
static readonly code = 3002
|
|
455
|
-
readonly code = 3002
|
|
456
|
-
readonly name =
|
|
457
|
-
readonly msg =
|
|
457
|
+
static readonly code = 3002
|
|
458
|
+
readonly code = 3002
|
|
459
|
+
readonly name = "AccountDiscriminatorMismatch"
|
|
460
|
+
readonly msg = "8 byte discriminator did not match what was expected"
|
|
458
461
|
|
|
459
462
|
constructor(readonly logs?: string[]) {
|
|
460
|
-
super(
|
|
463
|
+
super("3002: 8 byte discriminator did not match what was expected")
|
|
461
464
|
}
|
|
462
465
|
}
|
|
463
466
|
|
|
464
467
|
export class AccountDidNotDeserialize extends Error {
|
|
465
|
-
static readonly code = 3003
|
|
466
|
-
readonly code = 3003
|
|
467
|
-
readonly name =
|
|
468
|
-
readonly msg =
|
|
468
|
+
static readonly code = 3003
|
|
469
|
+
readonly code = 3003
|
|
470
|
+
readonly name = "AccountDidNotDeserialize"
|
|
471
|
+
readonly msg = "Failed to deserialize the account"
|
|
469
472
|
|
|
470
473
|
constructor(readonly logs?: string[]) {
|
|
471
|
-
super(
|
|
474
|
+
super("3003: Failed to deserialize the account")
|
|
472
475
|
}
|
|
473
476
|
}
|
|
474
477
|
|
|
475
478
|
export class AccountDidNotSerialize extends Error {
|
|
476
|
-
static readonly code = 3004
|
|
477
|
-
readonly code = 3004
|
|
478
|
-
readonly name =
|
|
479
|
-
readonly msg =
|
|
479
|
+
static readonly code = 3004
|
|
480
|
+
readonly code = 3004
|
|
481
|
+
readonly name = "AccountDidNotSerialize"
|
|
482
|
+
readonly msg = "Failed to serialize the account"
|
|
480
483
|
|
|
481
484
|
constructor(readonly logs?: string[]) {
|
|
482
|
-
super(
|
|
485
|
+
super("3004: Failed to serialize the account")
|
|
483
486
|
}
|
|
484
487
|
}
|
|
485
488
|
|
|
486
489
|
export class AccountNotEnoughKeys extends Error {
|
|
487
|
-
static readonly code = 3005
|
|
488
|
-
readonly code = 3005
|
|
489
|
-
readonly name =
|
|
490
|
-
readonly msg =
|
|
490
|
+
static readonly code = 3005
|
|
491
|
+
readonly code = 3005
|
|
492
|
+
readonly name = "AccountNotEnoughKeys"
|
|
493
|
+
readonly msg = "Not enough account keys given to the instruction"
|
|
491
494
|
|
|
492
495
|
constructor(readonly logs?: string[]) {
|
|
493
|
-
super(
|
|
496
|
+
super("3005: Not enough account keys given to the instruction")
|
|
494
497
|
}
|
|
495
498
|
}
|
|
496
499
|
|
|
497
500
|
export class AccountNotMutable extends Error {
|
|
498
|
-
static readonly code = 3006
|
|
499
|
-
readonly code = 3006
|
|
500
|
-
readonly name =
|
|
501
|
-
readonly msg =
|
|
501
|
+
static readonly code = 3006
|
|
502
|
+
readonly code = 3006
|
|
503
|
+
readonly name = "AccountNotMutable"
|
|
504
|
+
readonly msg = "The given account is not mutable"
|
|
502
505
|
|
|
503
506
|
constructor(readonly logs?: string[]) {
|
|
504
|
-
super(
|
|
507
|
+
super("3006: The given account is not mutable")
|
|
505
508
|
}
|
|
506
509
|
}
|
|
507
510
|
|
|
508
511
|
export class AccountOwnedByWrongProgram extends Error {
|
|
509
|
-
static readonly code = 3007
|
|
510
|
-
readonly code = 3007
|
|
511
|
-
readonly name =
|
|
512
|
-
readonly msg =
|
|
512
|
+
static readonly code = 3007
|
|
513
|
+
readonly code = 3007
|
|
514
|
+
readonly name = "AccountOwnedByWrongProgram"
|
|
515
|
+
readonly msg =
|
|
516
|
+
"The given account is owned by a different program than expected"
|
|
513
517
|
|
|
514
518
|
constructor(readonly logs?: string[]) {
|
|
515
|
-
super(
|
|
519
|
+
super(
|
|
520
|
+
"3007: The given account is owned by a different program than expected"
|
|
521
|
+
)
|
|
516
522
|
}
|
|
517
523
|
}
|
|
518
524
|
|
|
519
525
|
export class InvalidProgramId extends Error {
|
|
520
|
-
static readonly code = 3008
|
|
521
|
-
readonly code = 3008
|
|
522
|
-
readonly name =
|
|
523
|
-
readonly msg =
|
|
526
|
+
static readonly code = 3008
|
|
527
|
+
readonly code = 3008
|
|
528
|
+
readonly name = "InvalidProgramId"
|
|
529
|
+
readonly msg = "Program ID was not as expected"
|
|
524
530
|
|
|
525
531
|
constructor(readonly logs?: string[]) {
|
|
526
|
-
super(
|
|
532
|
+
super("3008: Program ID was not as expected")
|
|
527
533
|
}
|
|
528
534
|
}
|
|
529
535
|
|
|
530
536
|
export class InvalidProgramExecutable extends Error {
|
|
531
|
-
static readonly code = 3009
|
|
532
|
-
readonly code = 3009
|
|
533
|
-
readonly name =
|
|
534
|
-
readonly msg =
|
|
537
|
+
static readonly code = 3009
|
|
538
|
+
readonly code = 3009
|
|
539
|
+
readonly name = "InvalidProgramExecutable"
|
|
540
|
+
readonly msg = "Program account is not executable"
|
|
535
541
|
|
|
536
542
|
constructor(readonly logs?: string[]) {
|
|
537
|
-
super(
|
|
543
|
+
super("3009: Program account is not executable")
|
|
538
544
|
}
|
|
539
545
|
}
|
|
540
546
|
|
|
541
547
|
export class AccountNotSigner extends Error {
|
|
542
|
-
static readonly code = 3010
|
|
543
|
-
readonly code = 3010
|
|
544
|
-
readonly name =
|
|
545
|
-
readonly msg =
|
|
548
|
+
static readonly code = 3010
|
|
549
|
+
readonly code = 3010
|
|
550
|
+
readonly name = "AccountNotSigner"
|
|
551
|
+
readonly msg = "The given account did not sign"
|
|
546
552
|
|
|
547
553
|
constructor(readonly logs?: string[]) {
|
|
548
|
-
super(
|
|
554
|
+
super("3010: The given account did not sign")
|
|
549
555
|
}
|
|
550
556
|
}
|
|
551
557
|
|
|
552
558
|
export class AccountNotSystemOwned extends Error {
|
|
553
|
-
static readonly code = 3011
|
|
554
|
-
readonly code = 3011
|
|
555
|
-
readonly name =
|
|
556
|
-
readonly msg =
|
|
559
|
+
static readonly code = 3011
|
|
560
|
+
readonly code = 3011
|
|
561
|
+
readonly name = "AccountNotSystemOwned"
|
|
562
|
+
readonly msg = "The given account is not owned by the system program"
|
|
557
563
|
|
|
558
564
|
constructor(readonly logs?: string[]) {
|
|
559
|
-
super(
|
|
565
|
+
super("3011: The given account is not owned by the system program")
|
|
560
566
|
}
|
|
561
567
|
}
|
|
562
568
|
|
|
563
569
|
export class AccountNotInitialized extends Error {
|
|
564
|
-
static readonly code = 3012
|
|
565
|
-
readonly code = 3012
|
|
566
|
-
readonly name =
|
|
567
|
-
readonly msg =
|
|
570
|
+
static readonly code = 3012
|
|
571
|
+
readonly code = 3012
|
|
572
|
+
readonly name = "AccountNotInitialized"
|
|
573
|
+
readonly msg = "The program expected this account to be already initialized"
|
|
568
574
|
|
|
569
575
|
constructor(readonly logs?: string[]) {
|
|
570
|
-
super(
|
|
576
|
+
super("3012: The program expected this account to be already initialized")
|
|
571
577
|
}
|
|
572
578
|
}
|
|
573
579
|
|
|
574
580
|
export class AccountNotProgramData extends Error {
|
|
575
|
-
static readonly code = 3013
|
|
576
|
-
readonly code = 3013
|
|
577
|
-
readonly name =
|
|
578
|
-
readonly msg =
|
|
581
|
+
static readonly code = 3013
|
|
582
|
+
readonly code = 3013
|
|
583
|
+
readonly name = "AccountNotProgramData"
|
|
584
|
+
readonly msg = "The given account is not a program data account"
|
|
579
585
|
|
|
580
586
|
constructor(readonly logs?: string[]) {
|
|
581
|
-
super(
|
|
587
|
+
super("3013: The given account is not a program data account")
|
|
582
588
|
}
|
|
583
589
|
}
|
|
584
590
|
|
|
585
591
|
export class AccountNotAssociatedTokenAccount extends Error {
|
|
586
|
-
static readonly code = 3014
|
|
587
|
-
readonly code = 3014
|
|
588
|
-
readonly name =
|
|
589
|
-
readonly msg =
|
|
592
|
+
static readonly code = 3014
|
|
593
|
+
readonly code = 3014
|
|
594
|
+
readonly name = "AccountNotAssociatedTokenAccount"
|
|
595
|
+
readonly msg = "The given account is not the associated token account"
|
|
590
596
|
|
|
591
597
|
constructor(readonly logs?: string[]) {
|
|
592
|
-
super(
|
|
598
|
+
super("3014: The given account is not the associated token account")
|
|
593
599
|
}
|
|
594
600
|
}
|
|
595
601
|
|
|
596
602
|
export class AccountSysvarMismatch extends Error {
|
|
597
|
-
static readonly code = 3015
|
|
598
|
-
readonly code = 3015
|
|
599
|
-
readonly name =
|
|
600
|
-
readonly msg =
|
|
603
|
+
static readonly code = 3015
|
|
604
|
+
readonly code = 3015
|
|
605
|
+
readonly name = "AccountSysvarMismatch"
|
|
606
|
+
readonly msg = "The given public key does not match the required sysvar"
|
|
601
607
|
|
|
602
608
|
constructor(readonly logs?: string[]) {
|
|
603
|
-
super(
|
|
609
|
+
super("3015: The given public key does not match the required sysvar")
|
|
604
610
|
}
|
|
605
611
|
}
|
|
606
612
|
|
|
607
613
|
export class AccountReallocExceedsLimit extends Error {
|
|
608
|
-
static readonly code = 3016
|
|
609
|
-
readonly code = 3016
|
|
610
|
-
readonly name =
|
|
611
|
-
readonly msg =
|
|
614
|
+
static readonly code = 3016
|
|
615
|
+
readonly code = 3016
|
|
616
|
+
readonly name = "AccountReallocExceedsLimit"
|
|
617
|
+
readonly msg =
|
|
618
|
+
"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit"
|
|
612
619
|
|
|
613
620
|
constructor(readonly logs?: string[]) {
|
|
614
|
-
super(
|
|
621
|
+
super(
|
|
622
|
+
"3016: The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit"
|
|
623
|
+
)
|
|
615
624
|
}
|
|
616
625
|
}
|
|
617
626
|
|
|
618
627
|
export class AccountDuplicateReallocs extends Error {
|
|
619
|
-
static readonly code = 3017
|
|
620
|
-
readonly code = 3017
|
|
621
|
-
readonly name =
|
|
622
|
-
readonly msg =
|
|
628
|
+
static readonly code = 3017
|
|
629
|
+
readonly code = 3017
|
|
630
|
+
readonly name = "AccountDuplicateReallocs"
|
|
631
|
+
readonly msg = "The account was duplicated for more than one reallocation"
|
|
623
632
|
|
|
624
633
|
constructor(readonly logs?: string[]) {
|
|
625
|
-
super(
|
|
634
|
+
super("3017: The account was duplicated for more than one reallocation")
|
|
626
635
|
}
|
|
627
636
|
}
|
|
628
637
|
|
|
629
638
|
export class DeclaredProgramIdMismatch extends Error {
|
|
630
|
-
static readonly code = 4100
|
|
631
|
-
readonly code = 4100
|
|
632
|
-
readonly name =
|
|
633
|
-
readonly msg =
|
|
639
|
+
static readonly code = 4100
|
|
640
|
+
readonly code = 4100
|
|
641
|
+
readonly name = "DeclaredProgramIdMismatch"
|
|
642
|
+
readonly msg = "The declared program id does not match the actual program id"
|
|
634
643
|
|
|
635
644
|
constructor(readonly logs?: string[]) {
|
|
636
|
-
super(
|
|
645
|
+
super("4100: The declared program id does not match the actual program id")
|
|
637
646
|
}
|
|
638
647
|
}
|
|
639
648
|
|
|
640
649
|
export class Deprecated extends Error {
|
|
641
|
-
static readonly code = 5000
|
|
642
|
-
readonly code = 5000
|
|
643
|
-
readonly name =
|
|
644
|
-
readonly msg =
|
|
650
|
+
static readonly code = 5000
|
|
651
|
+
readonly code = 5000
|
|
652
|
+
readonly name = "Deprecated"
|
|
653
|
+
readonly msg = "The API being used is deprecated and should no longer be used"
|
|
645
654
|
|
|
646
655
|
constructor(readonly logs?: string[]) {
|
|
647
|
-
super(
|
|
656
|
+
super("5000: The API being used is deprecated and should no longer be used")
|
|
648
657
|
}
|
|
649
658
|
}
|
|
650
659
|
|
|
651
660
|
export function fromCode(code: number, logs?: string[]): AnchorError | null {
|
|
652
661
|
switch (code) {
|
|
653
662
|
case 100:
|
|
654
|
-
return new InstructionMissing(logs)
|
|
663
|
+
return new InstructionMissing(logs)
|
|
655
664
|
case 101:
|
|
656
|
-
return new InstructionFallbackNotFound(logs)
|
|
665
|
+
return new InstructionFallbackNotFound(logs)
|
|
657
666
|
case 102:
|
|
658
|
-
return new InstructionDidNotDeserialize(logs)
|
|
667
|
+
return new InstructionDidNotDeserialize(logs)
|
|
659
668
|
case 103:
|
|
660
|
-
return new InstructionDidNotSerialize(logs)
|
|
669
|
+
return new InstructionDidNotSerialize(logs)
|
|
661
670
|
case 1000:
|
|
662
|
-
return new IdlInstructionStub(logs)
|
|
671
|
+
return new IdlInstructionStub(logs)
|
|
663
672
|
case 1001:
|
|
664
|
-
return new IdlInstructionInvalidProgram(logs)
|
|
673
|
+
return new IdlInstructionInvalidProgram(logs)
|
|
665
674
|
case 2000:
|
|
666
|
-
return new ConstraintMut(logs)
|
|
675
|
+
return new ConstraintMut(logs)
|
|
667
676
|
case 2001:
|
|
668
|
-
return new ConstraintHasOne(logs)
|
|
677
|
+
return new ConstraintHasOne(logs)
|
|
669
678
|
case 2002:
|
|
670
|
-
return new ConstraintSigner(logs)
|
|
679
|
+
return new ConstraintSigner(logs)
|
|
671
680
|
case 2003:
|
|
672
|
-
return new ConstraintRaw(logs)
|
|
681
|
+
return new ConstraintRaw(logs)
|
|
673
682
|
case 2004:
|
|
674
|
-
return new ConstraintOwner(logs)
|
|
683
|
+
return new ConstraintOwner(logs)
|
|
675
684
|
case 2005:
|
|
676
|
-
return new ConstraintRentExempt(logs)
|
|
685
|
+
return new ConstraintRentExempt(logs)
|
|
677
686
|
case 2006:
|
|
678
|
-
return new ConstraintSeeds(logs)
|
|
687
|
+
return new ConstraintSeeds(logs)
|
|
679
688
|
case 2007:
|
|
680
|
-
return new ConstraintExecutable(logs)
|
|
689
|
+
return new ConstraintExecutable(logs)
|
|
681
690
|
case 2008:
|
|
682
|
-
return new ConstraintState(logs)
|
|
691
|
+
return new ConstraintState(logs)
|
|
683
692
|
case 2009:
|
|
684
|
-
return new ConstraintAssociated(logs)
|
|
693
|
+
return new ConstraintAssociated(logs)
|
|
685
694
|
case 2010:
|
|
686
|
-
return new ConstraintAssociatedInit(logs)
|
|
695
|
+
return new ConstraintAssociatedInit(logs)
|
|
687
696
|
case 2011:
|
|
688
|
-
return new ConstraintClose(logs)
|
|
697
|
+
return new ConstraintClose(logs)
|
|
689
698
|
case 2012:
|
|
690
|
-
return new ConstraintAddress(logs)
|
|
699
|
+
return new ConstraintAddress(logs)
|
|
691
700
|
case 2013:
|
|
692
|
-
return new ConstraintZero(logs)
|
|
701
|
+
return new ConstraintZero(logs)
|
|
693
702
|
case 2014:
|
|
694
|
-
return new ConstraintTokenMint(logs)
|
|
703
|
+
return new ConstraintTokenMint(logs)
|
|
695
704
|
case 2015:
|
|
696
|
-
return new ConstraintTokenOwner(logs)
|
|
705
|
+
return new ConstraintTokenOwner(logs)
|
|
697
706
|
case 2016:
|
|
698
|
-
return new ConstraintMintMintAuthority(logs)
|
|
707
|
+
return new ConstraintMintMintAuthority(logs)
|
|
699
708
|
case 2017:
|
|
700
|
-
return new ConstraintMintFreezeAuthority(logs)
|
|
709
|
+
return new ConstraintMintFreezeAuthority(logs)
|
|
701
710
|
case 2018:
|
|
702
|
-
return new ConstraintMintDecimals(logs)
|
|
711
|
+
return new ConstraintMintDecimals(logs)
|
|
703
712
|
case 2019:
|
|
704
|
-
return new ConstraintSpace(logs)
|
|
713
|
+
return new ConstraintSpace(logs)
|
|
705
714
|
case 2020:
|
|
706
|
-
return new ConstraintAccountIsNone(logs)
|
|
715
|
+
return new ConstraintAccountIsNone(logs)
|
|
707
716
|
case 2500:
|
|
708
|
-
return new RequireViolated(logs)
|
|
717
|
+
return new RequireViolated(logs)
|
|
709
718
|
case 2501:
|
|
710
|
-
return new RequireEqViolated(logs)
|
|
719
|
+
return new RequireEqViolated(logs)
|
|
711
720
|
case 2502:
|
|
712
|
-
return new RequireKeysEqViolated(logs)
|
|
721
|
+
return new RequireKeysEqViolated(logs)
|
|
713
722
|
case 2503:
|
|
714
|
-
return new RequireNeqViolated(logs)
|
|
723
|
+
return new RequireNeqViolated(logs)
|
|
715
724
|
case 2504:
|
|
716
|
-
return new RequireKeysNeqViolated(logs)
|
|
725
|
+
return new RequireKeysNeqViolated(logs)
|
|
717
726
|
case 2505:
|
|
718
|
-
return new RequireGtViolated(logs)
|
|
727
|
+
return new RequireGtViolated(logs)
|
|
719
728
|
case 2506:
|
|
720
|
-
return new RequireGteViolated(logs)
|
|
729
|
+
return new RequireGteViolated(logs)
|
|
721
730
|
case 3000:
|
|
722
|
-
return new AccountDiscriminatorAlreadySet(logs)
|
|
731
|
+
return new AccountDiscriminatorAlreadySet(logs)
|
|
723
732
|
case 3001:
|
|
724
|
-
return new AccountDiscriminatorNotFound(logs)
|
|
733
|
+
return new AccountDiscriminatorNotFound(logs)
|
|
725
734
|
case 3002:
|
|
726
|
-
return new AccountDiscriminatorMismatch(logs)
|
|
735
|
+
return new AccountDiscriminatorMismatch(logs)
|
|
727
736
|
case 3003:
|
|
728
|
-
return new AccountDidNotDeserialize(logs)
|
|
737
|
+
return new AccountDidNotDeserialize(logs)
|
|
729
738
|
case 3004:
|
|
730
|
-
return new AccountDidNotSerialize(logs)
|
|
739
|
+
return new AccountDidNotSerialize(logs)
|
|
731
740
|
case 3005:
|
|
732
|
-
return new AccountNotEnoughKeys(logs)
|
|
741
|
+
return new AccountNotEnoughKeys(logs)
|
|
733
742
|
case 3006:
|
|
734
|
-
return new AccountNotMutable(logs)
|
|
743
|
+
return new AccountNotMutable(logs)
|
|
735
744
|
case 3007:
|
|
736
|
-
return new AccountOwnedByWrongProgram(logs)
|
|
745
|
+
return new AccountOwnedByWrongProgram(logs)
|
|
737
746
|
case 3008:
|
|
738
|
-
return new InvalidProgramId(logs)
|
|
747
|
+
return new InvalidProgramId(logs)
|
|
739
748
|
case 3009:
|
|
740
|
-
return new InvalidProgramExecutable(logs)
|
|
749
|
+
return new InvalidProgramExecutable(logs)
|
|
741
750
|
case 3010:
|
|
742
|
-
return new AccountNotSigner(logs)
|
|
751
|
+
return new AccountNotSigner(logs)
|
|
743
752
|
case 3011:
|
|
744
|
-
return new AccountNotSystemOwned(logs)
|
|
753
|
+
return new AccountNotSystemOwned(logs)
|
|
745
754
|
case 3012:
|
|
746
|
-
return new AccountNotInitialized(logs)
|
|
755
|
+
return new AccountNotInitialized(logs)
|
|
747
756
|
case 3013:
|
|
748
|
-
return new AccountNotProgramData(logs)
|
|
757
|
+
return new AccountNotProgramData(logs)
|
|
749
758
|
case 3014:
|
|
750
|
-
return new AccountNotAssociatedTokenAccount(logs)
|
|
759
|
+
return new AccountNotAssociatedTokenAccount(logs)
|
|
751
760
|
case 3015:
|
|
752
|
-
return new AccountSysvarMismatch(logs)
|
|
761
|
+
return new AccountSysvarMismatch(logs)
|
|
753
762
|
case 3016:
|
|
754
|
-
return new AccountReallocExceedsLimit(logs)
|
|
763
|
+
return new AccountReallocExceedsLimit(logs)
|
|
755
764
|
case 3017:
|
|
756
|
-
return new AccountDuplicateReallocs(logs)
|
|
765
|
+
return new AccountDuplicateReallocs(logs)
|
|
757
766
|
case 4100:
|
|
758
|
-
return new DeclaredProgramIdMismatch(logs)
|
|
767
|
+
return new DeclaredProgramIdMismatch(logs)
|
|
759
768
|
case 5000:
|
|
760
|
-
return new Deprecated(logs)
|
|
769
|
+
return new Deprecated(logs)
|
|
761
770
|
}
|
|
762
771
|
|
|
763
|
-
return null
|
|
772
|
+
return null
|
|
764
773
|
}
|