@kamino-finance/klend-sdk 5.0.4 → 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.
Files changed (238) hide show
  1. package/dist/classes/fraction.d.ts.map +1 -1
  2. package/dist/classes/fraction.js.map +1 -1
  3. package/dist/classes/manager.d.ts +38 -4
  4. package/dist/classes/manager.d.ts.map +1 -1
  5. package/dist/classes/manager.js +112 -5
  6. package/dist/classes/manager.js.map +1 -1
  7. package/dist/classes/market.d.ts +4 -0
  8. package/dist/classes/market.d.ts.map +1 -1
  9. package/dist/classes/market.js +17 -25
  10. package/dist/classes/market.js.map +1 -1
  11. package/dist/classes/obligation.d.ts.map +1 -1
  12. package/dist/classes/obligation.js +2 -1
  13. package/dist/classes/obligation.js.map +1 -1
  14. package/dist/classes/reserve.d.ts +1 -0
  15. package/dist/classes/reserve.d.ts.map +1 -1
  16. package/dist/classes/reserve.js +22 -27
  17. package/dist/classes/reserve.js.map +1 -1
  18. package/dist/classes/utils.d.ts +3 -0
  19. package/dist/classes/utils.d.ts.map +1 -1
  20. package/dist/classes/utils.js +30 -0
  21. package/dist/classes/utils.js.map +1 -1
  22. package/dist/classes/vault.d.ts +12 -8
  23. package/dist/classes/vault.d.ts.map +1 -1
  24. package/dist/classes/vault.js +94 -66
  25. package/dist/classes/vault.js.map +1 -1
  26. package/dist/client_kamino_manager.d.ts.map +1 -1
  27. package/dist/client_kamino_manager.js +15 -1
  28. package/dist/client_kamino_manager.js.map +1 -1
  29. package/dist/idl.json +27 -2
  30. package/dist/idl_codegen/accounts/LendingMarket.d.ts +6 -0
  31. package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +1 -1
  32. package/dist/idl_codegen/accounts/LendingMarket.js +8 -1
  33. package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -1
  34. package/dist/idl_codegen/accounts/Obligation.d.ts +3 -12
  35. package/dist/idl_codegen/accounts/Obligation.d.ts.map +1 -1
  36. package/dist/idl_codegen/accounts/Obligation.js +1 -4
  37. package/dist/idl_codegen/accounts/Obligation.js.map +1 -1
  38. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts +20 -0
  39. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts.map +1 -1
  40. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js +33 -1
  41. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js.map +1 -1
  42. package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +13 -0
  43. package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +1 -1
  44. package/dist/idl_codegen/types/UpdateLendingMarketMode.js +25 -1
  45. package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -1
  46. package/dist/idl_codegen/types/index.d.ts +4 -4
  47. package/dist/idl_codegen/types/index.d.ts.map +1 -1
  48. package/dist/idl_codegen/types/index.js.map +1 -1
  49. package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts +3 -3
  50. package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts.map +1 -1
  51. package/dist/idl_codegen_kamino_vault/accounts/Reserve.js +22 -18
  52. package/dist/idl_codegen_kamino_vault/accounts/Reserve.js.map +1 -1
  53. package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts +45 -15
  54. package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts.map +1 -1
  55. package/dist/idl_codegen_kamino_vault/accounts/VaultState.js +101 -39
  56. package/dist/idl_codegen_kamino_vault/accounts/VaultState.js.map +1 -1
  57. package/dist/idl_codegen_kamino_vault/accounts/index.d.ts +4 -4
  58. package/dist/idl_codegen_kamino_vault/accounts/index.d.ts.map +1 -1
  59. package/dist/idl_codegen_kamino_vault/accounts/index.js.map +1 -1
  60. package/dist/idl_codegen_kamino_vault/errors/anchor.d.ts.map +1 -1
  61. package/dist/idl_codegen_kamino_vault/errors/anchor.js +162 -162
  62. package/dist/idl_codegen_kamino_vault/errors/anchor.js.map +1 -1
  63. package/dist/idl_codegen_kamino_vault/errors/custom.d.ts +144 -32
  64. package/dist/idl_codegen_kamino_vault/errors/custom.d.ts.map +1 -1
  65. package/dist/idl_codegen_kamino_vault/errors/custom.js +305 -109
  66. package/dist/idl_codegen_kamino_vault/errors/custom.js.map +1 -1
  67. package/dist/idl_codegen_kamino_vault/errors/index.d.ts +3 -3
  68. package/dist/idl_codegen_kamino_vault/errors/index.d.ts.map +1 -1
  69. package/dist/idl_codegen_kamino_vault/errors/index.js +7 -2
  70. package/dist/idl_codegen_kamino_vault/errors/index.js.map +1 -1
  71. package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts +4 -2
  72. package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts.map +1 -1
  73. package/dist/idl_codegen_kamino_vault/instructions/deposit.js +3 -1
  74. package/dist/idl_codegen_kamino_vault/instructions/deposit.js.map +1 -1
  75. package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts +13 -0
  76. package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts.map +1 -0
  77. package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js +47 -0
  78. package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js.map +1 -0
  79. package/dist/idl_codegen_kamino_vault/instructions/index.d.ts +18 -10
  80. package/dist/idl_codegen_kamino_vault/instructions/index.d.ts.map +1 -1
  81. package/dist/idl_codegen_kamino_vault/instructions/index.js +9 -1
  82. package/dist/idl_codegen_kamino_vault/instructions/index.js.map +1 -1
  83. package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts +2 -1
  84. package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts.map +1 -1
  85. package/dist/idl_codegen_kamino_vault/instructions/initVault.js +1 -0
  86. package/dist/idl_codegen_kamino_vault/instructions/initVault.js.map +1 -1
  87. package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts +6 -2
  88. package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts.map +1 -1
  89. package/dist/idl_codegen_kamino_vault/instructions/invest.js +9 -1
  90. package/dist/idl_codegen_kamino_vault/instructions/invest.js.map +1 -1
  91. package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts +7 -0
  92. package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts.map +1 -0
  93. package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js +16 -0
  94. package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js.map +1 -0
  95. package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts +2 -2
  96. package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts.map +1 -1
  97. package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js +1 -1
  98. package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js.map +1 -1
  99. package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts +14 -0
  100. package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts.map +1 -0
  101. package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js +52 -0
  102. package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js.map +1 -0
  103. package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts +4 -2
  104. package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts.map +1 -1
  105. package/dist/idl_codegen_kamino_vault/instructions/withdraw.js +8 -2
  106. package/dist/idl_codegen_kamino_vault/instructions/withdraw.js.map +1 -1
  107. package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts +23 -0
  108. package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts.map +1 -0
  109. package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js +51 -0
  110. package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js.map +1 -0
  111. package/dist/idl_codegen_kamino_vault/programId.d.ts +1 -1
  112. package/dist/idl_codegen_kamino_vault/programId.d.ts.map +1 -1
  113. package/dist/idl_codegen_kamino_vault/programId.js +1 -1
  114. package/dist/idl_codegen_kamino_vault/programId.js.map +1 -1
  115. package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts +2 -2
  116. package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts.map +1 -1
  117. package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js +4 -1
  118. package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js.map +1 -1
  119. package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts +1 -1
  120. package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts.map +1 -1
  121. package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js +1 -1
  122. package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js.map +1 -1
  123. package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts +1 -1
  124. package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts.map +1 -1
  125. package/dist/idl_codegen_kamino_vault/types/CurvePoint.js +1 -1
  126. package/dist/idl_codegen_kamino_vault/types/CurvePoint.js.map +1 -1
  127. package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts +2 -2
  128. package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts.map +1 -1
  129. package/dist/idl_codegen_kamino_vault/types/LastUpdate.js +6 -1
  130. package/dist/idl_codegen_kamino_vault/types/LastUpdate.js.map +1 -1
  131. package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts +2 -2
  132. package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts.map +1 -1
  133. package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js +1 -1
  134. package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js.map +1 -1
  135. package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts +2 -2
  136. package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts.map +1 -1
  137. package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js +1 -1
  138. package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js.map +1 -1
  139. package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts +3 -3
  140. package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts.map +1 -1
  141. package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js +5 -5
  142. package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js.map +1 -1
  143. package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts +27 -24
  144. package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts.map +1 -1
  145. package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js +59 -53
  146. package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js.map +1 -1
  147. package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts +2 -2
  148. package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts.map +1 -1
  149. package/dist/idl_codegen_kamino_vault/types/ReserveFees.js +5 -1
  150. package/dist/idl_codegen_kamino_vault/types/ReserveFees.js.map +1 -1
  151. package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts +11 -3
  152. package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts.map +1 -1
  153. package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js +25 -17
  154. package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js.map +1 -1
  155. package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts +2 -2
  156. package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts.map +1 -1
  157. package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js +3 -3
  158. package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js.map +1 -1
  159. package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts +2 -2
  160. package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts.map +1 -1
  161. package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js +1 -1
  162. package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js.map +1 -1
  163. package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts +3 -3
  164. package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts.map +1 -1
  165. package/dist/idl_codegen_kamino_vault/types/TokenInfo.js +11 -11
  166. package/dist/idl_codegen_kamino_vault/types/TokenInfo.js.map +1 -1
  167. package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts +18 -8
  168. package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts.map +1 -1
  169. package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js +27 -13
  170. package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js.map +1 -1
  171. package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts +110 -0
  172. package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts.map +1 -0
  173. package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js +242 -0
  174. package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js.map +1 -0
  175. package/dist/idl_codegen_kamino_vault/types/index.d.ts +34 -30
  176. package/dist/idl_codegen_kamino_vault/types/index.d.ts.map +1 -1
  177. package/dist/idl_codegen_kamino_vault/types/index.js +26 -1
  178. package/dist/idl_codegen_kamino_vault/types/index.js.map +1 -1
  179. package/dist/utils/ObligationType.d.ts.map +1 -1
  180. package/dist/utils/ObligationType.js.map +1 -1
  181. package/dist/utils/managerTypes.d.ts.map +1 -1
  182. package/dist/utils/managerTypes.js.map +1 -1
  183. package/dist/utils/pubkey.d.ts.map +1 -1
  184. package/dist/utils/pubkey.js.map +1 -1
  185. package/dist/utils/rpc.d.ts.map +1 -1
  186. package/dist/utils/rpc.js +2 -1
  187. package/dist/utils/rpc.js.map +1 -1
  188. package/package.json +2 -1
  189. package/src/classes/fraction.ts +5 -0
  190. package/src/classes/manager.ts +136 -5
  191. package/src/classes/market.ts +19 -2
  192. package/src/classes/obligation.ts +2 -1
  193. package/src/classes/reserve.ts +55 -39
  194. package/src/classes/utils.ts +30 -0
  195. package/src/classes/vault.ts +123 -49
  196. package/src/client_kamino_manager.ts +19 -1
  197. package/src/idl_codegen/accounts/LendingMarket.ts +12 -1
  198. package/src/idl_codegen/accounts/Obligation.ts +3 -12
  199. package/src/idl_codegen/types/UpdateLendingMarketConfigValue.ts +43 -0
  200. package/src/idl_codegen/types/UpdateLendingMarketMode.ts +30 -0
  201. package/src/idl_codegen/types/index.ts +4 -0
  202. package/src/idl_codegen_kamino_vault/accounts/Reserve.ts +132 -105
  203. package/src/idl_codegen_kamino_vault/accounts/VaultState.ts +217 -124
  204. package/src/idl_codegen_kamino_vault/accounts/index.ts +4 -4
  205. package/src/idl_codegen_kamino_vault/errors/anchor.ts +335 -326
  206. package/src/idl_codegen_kamino_vault/errors/custom.ts +353 -157
  207. package/src/idl_codegen_kamino_vault/errors/index.ts +35 -22
  208. package/src/idl_codegen_kamino_vault/instructions/deposit.ts +33 -25
  209. package/src/idl_codegen_kamino_vault/instructions/giveUpPendingFees.ts +40 -0
  210. package/src/idl_codegen_kamino_vault/instructions/index.ts +27 -10
  211. package/src/idl_codegen_kamino_vault/instructions/initVault.ts +25 -20
  212. package/src/idl_codegen_kamino_vault/instructions/invest.ts +40 -25
  213. package/src/idl_codegen_kamino_vault/instructions/updateAdmin.ts +24 -0
  214. package/src/idl_codegen_kamino_vault/instructions/updateReserveAllocation.ts +24 -24
  215. package/src/idl_codegen_kamino_vault/instructions/updateVaultConfig.ts +49 -0
  216. package/src/idl_codegen_kamino_vault/instructions/withdraw.ts +45 -33
  217. package/src/idl_codegen_kamino_vault/instructions/withdrawPendingFees.ts +75 -0
  218. package/src/idl_codegen_kamino_vault/programId.ts +5 -3
  219. package/src/idl_codegen_kamino_vault/types/BigFractionBytes.ts +24 -18
  220. package/src/idl_codegen_kamino_vault/types/BorrowRateCurve.ts +21 -16
  221. package/src/idl_codegen_kamino_vault/types/CurvePoint.ts +21 -18
  222. package/src/idl_codegen_kamino_vault/types/LastUpdate.ts +32 -27
  223. package/src/idl_codegen_kamino_vault/types/PriceHeuristic.ts +25 -22
  224. package/src/idl_codegen_kamino_vault/types/PythConfiguration.ts +14 -14
  225. package/src/idl_codegen_kamino_vault/types/ReserveCollateral.ts +35 -35
  226. package/src/idl_codegen_kamino_vault/types/ReserveConfig.ts +232 -191
  227. package/src/idl_codegen_kamino_vault/types/ReserveFees.ts +27 -23
  228. package/src/idl_codegen_kamino_vault/types/ReserveLiquidity.ts +116 -98
  229. package/src/idl_codegen_kamino_vault/types/ScopeConfiguration.ts +25 -25
  230. package/src/idl_codegen_kamino_vault/types/SwitchboardConfiguration.ts +21 -18
  231. package/src/idl_codegen_kamino_vault/types/TokenInfo.ts +92 -74
  232. package/src/idl_codegen_kamino_vault/types/VaultAllocation.ts +67 -49
  233. package/src/idl_codegen_kamino_vault/types/VaultConfigField.ts +270 -0
  234. package/src/idl_codegen_kamino_vault/types/index.ts +77 -30
  235. package/src/utils/ObligationType.ts +6 -0
  236. package/src/utils/managerTypes.ts +1 -0
  237. package/src/utils/pubkey.ts +2 -0
  238. package/src/utils/rpc.ts +3 -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 = 'InstructionMissing';
61
- readonly msg = '8 byte instruction identifier not provided';
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('100: 8 byte instruction identifier not provided');
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 = 'InstructionFallbackNotFound';
72
- readonly msg = 'Fallback functions are not supported';
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('101: Fallback functions are not supported');
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 = 'InstructionDidNotDeserialize';
83
- readonly msg = 'The program could not deserialize the given instruction';
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('102: The program could not deserialize the given instruction');
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 = 'InstructionDidNotSerialize';
94
- readonly msg = 'The program could not serialize the given instruction';
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('103: The program could not serialize the given instruction');
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 = 'IdlInstructionStub';
105
- readonly msg = 'The program was compiled without idl instructions';
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('1000: The program was compiled without idl instructions');
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 = 'IdlInstructionInvalidProgram';
116
- readonly msg = 'The transaction was given an invalid program for the IDL instruction';
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('1001: The transaction was given an invalid program for the IDL instruction');
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 = 'ConstraintMut';
127
- readonly msg = 'A mut constraint was violated';
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('2000: A mut constraint was violated');
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 = 'ConstraintHasOne';
138
- readonly msg = 'A has one constraint was violated';
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('2001: A has one constraint was violated');
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 = 'ConstraintSigner';
149
- readonly msg = 'A signer constraint was violated';
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('2002: A signer constraint was violated');
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 = 'ConstraintRaw';
160
- readonly msg = 'A raw constraint was violated';
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('2003: A raw constraint was violated');
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 = 'ConstraintOwner';
171
- readonly msg = 'An owner constraint was violated';
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('2004: An owner constraint was violated');
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 = 'ConstraintRentExempt';
182
- readonly msg = 'A rent exemption constraint was violated';
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('2005: A rent exemption constraint was violated');
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 = 'ConstraintSeeds';
193
- readonly msg = 'A seeds constraint was violated';
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('2006: A seeds constraint was violated');
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 = 'ConstraintExecutable';
204
- readonly msg = 'An executable constraint was violated';
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('2007: An executable constraint was violated');
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 = 'ConstraintState';
215
- readonly msg = 'Deprecated Error, feel free to replace with something else';
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('2008: Deprecated Error, feel free to replace with something else');
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 = 'ConstraintAssociated';
226
- readonly msg = 'An associated constraint was violated';
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('2009: An associated constraint was violated');
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 = 'ConstraintAssociatedInit';
237
- readonly msg = 'An associated init constraint was violated';
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('2010: An associated init constraint was violated');
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 = 'ConstraintClose';
248
- readonly msg = 'A close constraint was violated';
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('2011: A close constraint was violated');
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 = 'ConstraintAddress';
259
- readonly msg = 'An address constraint was violated';
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('2012: An address constraint was violated');
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 = 'ConstraintZero';
270
- readonly msg = 'Expected zero account discriminant';
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('2013: Expected zero account discriminant');
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 = 'ConstraintTokenMint';
281
- readonly msg = 'A token mint constraint was violated';
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('2014: A token mint constraint was violated');
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 = 'ConstraintTokenOwner';
292
- readonly msg = 'A token owner constraint was violated';
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('2015: A token owner constraint was violated');
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 = 'ConstraintMintMintAuthority';
303
- readonly msg = 'A mint mint authority constraint was violated';
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('2016: A mint mint authority constraint was violated');
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 = 'ConstraintMintFreezeAuthority';
314
- readonly msg = 'A mint freeze authority constraint was violated';
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('2017: A mint freeze authority constraint was violated');
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 = 'ConstraintMintDecimals';
325
- readonly msg = 'A mint decimals constraint was violated';
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('2018: A mint decimals constraint was violated');
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 = 'ConstraintSpace';
336
- readonly msg = 'A space constraint was violated';
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('2019: A space constraint was violated');
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 = 'ConstraintAccountIsNone';
347
- readonly msg = 'A required account for the constraint is None';
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('2020: A required account for the constraint is None');
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 = 'RequireViolated';
358
- readonly msg = 'A require expression was violated';
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('2500: A require expression was violated');
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 = 'RequireEqViolated';
369
- readonly msg = 'A require_eq expression was violated';
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('2501: A require_eq expression was violated');
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 = 'RequireKeysEqViolated';
380
- readonly msg = 'A require_keys_eq expression was violated';
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('2502: A require_keys_eq expression was violated');
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 = 'RequireNeqViolated';
391
- readonly msg = 'A require_neq expression was violated';
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('2503: A require_neq expression was violated');
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 = 'RequireKeysNeqViolated';
402
- readonly msg = 'A require_keys_neq expression was violated';
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('2504: A require_keys_neq expression was violated');
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 = 'RequireGtViolated';
413
- readonly msg = 'A require_gt expression was violated';
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('2505: A require_gt expression was violated');
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 = 'RequireGteViolated';
424
- readonly msg = 'A require_gte expression was violated';
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('2506: A require_gte expression was violated');
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 = 'AccountDiscriminatorAlreadySet';
435
- readonly msg = 'The account discriminator was already set on this account';
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('3000: The account discriminator was already set on this account');
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 = 'AccountDiscriminatorNotFound';
446
- readonly msg = 'No 8 byte discriminator was found on the account';
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('3001: No 8 byte discriminator was found on the account');
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 = 'AccountDiscriminatorMismatch';
457
- readonly msg = '8 byte discriminator did not match what was expected';
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('3002: 8 byte discriminator did not match what was expected');
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 = 'AccountDidNotDeserialize';
468
- readonly msg = 'Failed to deserialize the account';
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('3003: Failed to deserialize the account');
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 = 'AccountDidNotSerialize';
479
- readonly msg = 'Failed to serialize the account';
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('3004: Failed to serialize the account');
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 = 'AccountNotEnoughKeys';
490
- readonly msg = 'Not enough account keys given to the instruction';
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('3005: Not enough account keys given to the instruction');
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 = 'AccountNotMutable';
501
- readonly msg = 'The given account is not mutable';
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('3006: The given account is not mutable');
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 = 'AccountOwnedByWrongProgram';
512
- readonly msg = 'The given account is owned by a different program than expected';
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('3007: The given account is owned by a different program than expected');
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 = 'InvalidProgramId';
523
- readonly msg = 'Program ID was not as expected';
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('3008: Program ID was not as expected');
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 = 'InvalidProgramExecutable';
534
- readonly msg = 'Program account is not executable';
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('3009: Program account is not executable');
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 = 'AccountNotSigner';
545
- readonly msg = 'The given account did not sign';
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('3010: The given account did not sign');
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 = 'AccountNotSystemOwned';
556
- readonly msg = 'The given account is not owned by the system program';
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('3011: The given account is not owned by the system program');
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 = 'AccountNotInitialized';
567
- readonly msg = 'The program expected this account to be already initialized';
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('3012: The program expected this account to be already initialized');
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 = 'AccountNotProgramData';
578
- readonly msg = 'The given account is not a program data account';
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('3013: The given account is not a program data account');
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 = 'AccountNotAssociatedTokenAccount';
589
- readonly msg = 'The given account is not the associated token account';
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('3014: The given account is not the associated token account');
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 = 'AccountSysvarMismatch';
600
- readonly msg = 'The given public key does not match the required sysvar';
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('3015: The given public key does not match the required sysvar');
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 = 'AccountReallocExceedsLimit';
611
- readonly msg = 'The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit';
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('3016: The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit');
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 = 'AccountDuplicateReallocs';
622
- readonly msg = 'The account was duplicated for more than one reallocation';
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('3017: The account was duplicated for more than one reallocation');
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 = 'DeclaredProgramIdMismatch';
633
- readonly msg = 'The declared program id does not match the actual program id';
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('4100: The declared program id does not match the actual program id');
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 = 'Deprecated';
644
- readonly msg = 'The API being used is deprecated and should no longer be used';
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('5000: The API being used is deprecated and should no longer be used');
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
  }