@macalinao/clients-mpl-bubblegum 0.0.0 → 0.2.0

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 (313) hide show
  1. package/README.md +15 -1
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/generated/accounts/index.d.ts +10 -0
  4. package/dist/generated/accounts/index.d.ts.map +1 -0
  5. package/dist/generated/accounts/index.js +10 -0
  6. package/dist/generated/accounts/index.js.map +1 -0
  7. package/dist/generated/accounts/treeConfig.d.ts +44 -0
  8. package/dist/generated/accounts/treeConfig.d.ts.map +1 -0
  9. package/dist/generated/accounts/treeConfig.js +67 -0
  10. package/dist/generated/accounts/treeConfig.js.map +1 -0
  11. package/dist/generated/accounts/voucher.d.ts +36 -0
  12. package/dist/generated/accounts/voucher.d.ts.map +1 -0
  13. package/dist/generated/accounts/voucher.js +59 -0
  14. package/dist/generated/accounts/voucher.js.map +1 -0
  15. package/dist/generated/errors/bubblegum.d.ts +134 -0
  16. package/dist/generated/errors/bubblegum.d.ts.map +1 -0
  17. package/dist/generated/errors/bubblegum.js +195 -0
  18. package/dist/generated/errors/bubblegum.js.map +1 -0
  19. package/dist/generated/errors/index.d.ts +9 -0
  20. package/dist/generated/errors/index.d.ts.map +1 -0
  21. package/dist/generated/errors/index.js +9 -0
  22. package/dist/generated/errors/index.js.map +1 -0
  23. package/dist/generated/index.d.ts +13 -0
  24. package/dist/generated/index.d.ts.map +1 -0
  25. package/dist/generated/index.js +13 -0
  26. package/dist/generated/index.js.map +1 -0
  27. package/dist/generated/instructions/burn.d.ts +71 -0
  28. package/dist/generated/instructions/burn.d.ts.map +1 -0
  29. package/dist/generated/instructions/burn.js +106 -0
  30. package/dist/generated/instructions/burn.js.map +1 -0
  31. package/dist/generated/instructions/burnV2.d.ts +102 -0
  32. package/dist/generated/instructions/burnV2.d.ts.map +1 -0
  33. package/dist/generated/instructions/burnV2.js +144 -0
  34. package/dist/generated/instructions/burnV2.js.map +1 -0
  35. package/dist/generated/instructions/cancelRedeem.d.ts +59 -0
  36. package/dist/generated/instructions/cancelRedeem.d.ts.map +1 -0
  37. package/dist/generated/instructions/cancelRedeem.js +98 -0
  38. package/dist/generated/instructions/cancelRedeem.js.map +1 -0
  39. package/dist/generated/instructions/closeTreeV2.d.ts +65 -0
  40. package/dist/generated/instructions/closeTreeV2.d.ts.map +1 -0
  41. package/dist/generated/instructions/closeTreeV2.js +92 -0
  42. package/dist/generated/instructions/closeTreeV2.js.map +1 -0
  43. package/dist/generated/instructions/collectV2.d.ts +40 -0
  44. package/dist/generated/instructions/collectV2.d.ts.map +1 -0
  45. package/dist/generated/instructions/collectV2.js +69 -0
  46. package/dist/generated/instructions/collectV2.js.map +1 -0
  47. package/dist/generated/instructions/compress.d.ts +76 -0
  48. package/dist/generated/instructions/compress.d.ts.map +1 -0
  49. package/dist/generated/instructions/compress.js +124 -0
  50. package/dist/generated/instructions/compress.js.map +1 -0
  51. package/dist/generated/instructions/createTree.d.ts +65 -0
  52. package/dist/generated/instructions/createTree.d.ts.map +1 -0
  53. package/dist/generated/instructions/createTree.js +102 -0
  54. package/dist/generated/instructions/createTree.js.map +1 -0
  55. package/dist/generated/instructions/createTreeV2.d.ts +67 -0
  56. package/dist/generated/instructions/createTreeV2.d.ts.map +1 -0
  57. package/dist/generated/instructions/createTreeV2.js +108 -0
  58. package/dist/generated/instructions/createTreeV2.js.map +1 -0
  59. package/dist/generated/instructions/decompressV1.d.ts +78 -0
  60. package/dist/generated/instructions/decompressV1.d.ts.map +1 -0
  61. package/dist/generated/instructions/decompressV1.js +136 -0
  62. package/dist/generated/instructions/decompressV1.js.map +1 -0
  63. package/dist/generated/instructions/delegate.d.ts +74 -0
  64. package/dist/generated/instructions/delegate.d.ts.map +1 -0
  65. package/dist/generated/instructions/delegate.js +115 -0
  66. package/dist/generated/instructions/delegate.js.map +1 -0
  67. package/dist/generated/instructions/delegateAndFreezeV2.d.ts +90 -0
  68. package/dist/generated/instructions/delegateAndFreezeV2.d.ts.map +1 -0
  69. package/dist/generated/instructions/delegateAndFreezeV2.js +143 -0
  70. package/dist/generated/instructions/delegateAndFreezeV2.js.map +1 -0
  71. package/dist/generated/instructions/delegateV2.d.ts +90 -0
  72. package/dist/generated/instructions/delegateV2.d.ts.map +1 -0
  73. package/dist/generated/instructions/delegateV2.js +142 -0
  74. package/dist/generated/instructions/delegateV2.js.map +1 -0
  75. package/dist/generated/instructions/freezeV2.d.ts +94 -0
  76. package/dist/generated/instructions/freezeV2.d.ts.map +1 -0
  77. package/dist/generated/instructions/freezeV2.js +131 -0
  78. package/dist/generated/instructions/freezeV2.js.map +1 -0
  79. package/dist/generated/instructions/index.d.ts +44 -0
  80. package/dist/generated/instructions/index.d.ts.map +1 -0
  81. package/dist/generated/instructions/index.js +44 -0
  82. package/dist/generated/instructions/index.js.map +1 -0
  83. package/dist/generated/instructions/mintToCollectionV1.d.ts +95 -0
  84. package/dist/generated/instructions/mintToCollectionV1.d.ts.map +1 -0
  85. package/dist/generated/instructions/mintToCollectionV1.js +146 -0
  86. package/dist/generated/instructions/mintToCollectionV1.js.map +1 -0
  87. package/dist/generated/instructions/mintV1.d.ts +66 -0
  88. package/dist/generated/instructions/mintV1.d.ts.map +1 -0
  89. package/dist/generated/instructions/mintV1.js +105 -0
  90. package/dist/generated/instructions/mintV1.js.map +1 -0
  91. package/dist/generated/instructions/mintV2.d.ts +88 -0
  92. package/dist/generated/instructions/mintV2.d.ts.map +1 -0
  93. package/dist/generated/instructions/mintV2.js +143 -0
  94. package/dist/generated/instructions/mintV2.js.map +1 -0
  95. package/dist/generated/instructions/redeem.d.ts +74 -0
  96. package/dist/generated/instructions/redeem.d.ts.map +1 -0
  97. package/dist/generated/instructions/redeem.js +109 -0
  98. package/dist/generated/instructions/redeem.js.map +1 -0
  99. package/dist/generated/instructions/setAndVerifyCollection.d.ts +123 -0
  100. package/dist/generated/instructions/setAndVerifyCollection.d.ts.map +1 -0
  101. package/dist/generated/instructions/setAndVerifyCollection.js +158 -0
  102. package/dist/generated/instructions/setAndVerifyCollection.js.map +1 -0
  103. package/dist/generated/instructions/setCollectionV2.d.ts +116 -0
  104. package/dist/generated/instructions/setCollectionV2.d.ts.map +1 -0
  105. package/dist/generated/instructions/setCollectionV2.js +153 -0
  106. package/dist/generated/instructions/setCollectionV2.js.map +1 -0
  107. package/dist/generated/instructions/setDecompressableState.d.ts +45 -0
  108. package/dist/generated/instructions/setDecompressableState.d.ts.map +1 -0
  109. package/dist/generated/instructions/setDecompressableState.js +77 -0
  110. package/dist/generated/instructions/setDecompressableState.js.map +1 -0
  111. package/dist/generated/instructions/setDecompressibleState.d.ts +45 -0
  112. package/dist/generated/instructions/setDecompressibleState.d.ts.map +1 -0
  113. package/dist/generated/instructions/setDecompressibleState.js +77 -0
  114. package/dist/generated/instructions/setDecompressibleState.js.map +1 -0
  115. package/dist/generated/instructions/setNonTransferableV2.d.ts +96 -0
  116. package/dist/generated/instructions/setNonTransferableV2.d.ts.map +1 -0
  117. package/dist/generated/instructions/setNonTransferableV2.js +132 -0
  118. package/dist/generated/instructions/setNonTransferableV2.js.map +1 -0
  119. package/dist/generated/instructions/setTreeDelegate.d.ts +49 -0
  120. package/dist/generated/instructions/setTreeDelegate.d.ts.map +1 -0
  121. package/dist/generated/instructions/setTreeDelegate.js +84 -0
  122. package/dist/generated/instructions/setTreeDelegate.js.map +1 -0
  123. package/dist/generated/instructions/thawAndRevokeV2.d.ts +85 -0
  124. package/dist/generated/instructions/thawAndRevokeV2.d.ts.map +1 -0
  125. package/dist/generated/instructions/thawAndRevokeV2.js +131 -0
  126. package/dist/generated/instructions/thawAndRevokeV2.js.map +1 -0
  127. package/dist/generated/instructions/thawV2.d.ts +94 -0
  128. package/dist/generated/instructions/thawV2.d.ts.map +1 -0
  129. package/dist/generated/instructions/thawV2.js +131 -0
  130. package/dist/generated/instructions/thawV2.js.map +1 -0
  131. package/dist/generated/instructions/transfer.d.ts +74 -0
  132. package/dist/generated/instructions/transfer.d.ts.map +1 -0
  133. package/dist/generated/instructions/transfer.js +109 -0
  134. package/dist/generated/instructions/transfer.js.map +1 -0
  135. package/dist/generated/instructions/transferV2.d.ts +99 -0
  136. package/dist/generated/instructions/transferV2.d.ts.map +1 -0
  137. package/dist/generated/instructions/transferV2.js +134 -0
  138. package/dist/generated/instructions/transferV2.js.map +1 -0
  139. package/dist/generated/instructions/unverifyCollection.d.ts +120 -0
  140. package/dist/generated/instructions/unverifyCollection.d.ts.map +1 -0
  141. package/dist/generated/instructions/unverifyCollection.js +153 -0
  142. package/dist/generated/instructions/unverifyCollection.js.map +1 -0
  143. package/dist/generated/instructions/unverifyCreator.d.ts +81 -0
  144. package/dist/generated/instructions/unverifyCreator.d.ts.map +1 -0
  145. package/dist/generated/instructions/unverifyCreator.js +113 -0
  146. package/dist/generated/instructions/unverifyCreator.js.map +1 -0
  147. package/dist/generated/instructions/unverifyCreatorV2.d.ts +85 -0
  148. package/dist/generated/instructions/unverifyCreatorV2.d.ts.map +1 -0
  149. package/dist/generated/instructions/unverifyCreatorV2.js +125 -0
  150. package/dist/generated/instructions/unverifyCreatorV2.js.map +1 -0
  151. package/dist/generated/instructions/updateAssetDataV2.d.ts +101 -0
  152. package/dist/generated/instructions/updateAssetDataV2.d.ts.map +1 -0
  153. package/dist/generated/instructions/updateAssetDataV2.js +143 -0
  154. package/dist/generated/instructions/updateAssetDataV2.js.map +1 -0
  155. package/dist/generated/instructions/updateMetadata.d.ts +102 -0
  156. package/dist/generated/instructions/updateMetadata.d.ts.map +1 -0
  157. package/dist/generated/instructions/updateMetadata.js +142 -0
  158. package/dist/generated/instructions/updateMetadata.js.map +1 -0
  159. package/dist/generated/instructions/updateMetadataV2.d.ts +97 -0
  160. package/dist/generated/instructions/updateMetadataV2.d.ts.map +1 -0
  161. package/dist/generated/instructions/updateMetadataV2.js +130 -0
  162. package/dist/generated/instructions/updateMetadataV2.js.map +1 -0
  163. package/dist/generated/instructions/verifyCollection.d.ts +120 -0
  164. package/dist/generated/instructions/verifyCollection.d.ts.map +1 -0
  165. package/dist/generated/instructions/verifyCollection.js +153 -0
  166. package/dist/generated/instructions/verifyCollection.js.map +1 -0
  167. package/dist/generated/instructions/verifyCreator.d.ts +81 -0
  168. package/dist/generated/instructions/verifyCreator.d.ts.map +1 -0
  169. package/dist/generated/instructions/verifyCreator.js +115 -0
  170. package/dist/generated/instructions/verifyCreator.js.map +1 -0
  171. package/dist/generated/instructions/verifyCreatorV2.d.ts +85 -0
  172. package/dist/generated/instructions/verifyCreatorV2.d.ts.map +1 -0
  173. package/dist/generated/instructions/verifyCreatorV2.js +125 -0
  174. package/dist/generated/instructions/verifyCreatorV2.js.map +1 -0
  175. package/dist/generated/programs/bubblegum.d.ts +189 -0
  176. package/dist/generated/programs/bubblegum.d.ts.map +1 -0
  177. package/dist/generated/programs/bubblegum.js +566 -0
  178. package/dist/generated/programs/bubblegum.js.map +1 -0
  179. package/dist/generated/programs/index.d.ts +9 -0
  180. package/dist/generated/programs/index.d.ts.map +1 -0
  181. package/dist/generated/programs/index.js +9 -0
  182. package/dist/generated/programs/index.js.map +1 -0
  183. package/dist/generated/types/assetDataSchema.d.ts +18 -0
  184. package/dist/generated/types/assetDataSchema.d.ts.map +1 -0
  185. package/dist/generated/types/assetDataSchema.js +24 -0
  186. package/dist/generated/types/assetDataSchema.js.map +1 -0
  187. package/dist/generated/types/bubblegumEventType.d.ts +17 -0
  188. package/dist/generated/types/bubblegumEventType.d.ts.map +1 -0
  189. package/dist/generated/types/bubblegumEventType.js +23 -0
  190. package/dist/generated/types/bubblegumEventType.js.map +1 -0
  191. package/dist/generated/types/collection.d.ts +17 -0
  192. package/dist/generated/types/collection.d.ts.map +1 -0
  193. package/dist/generated/types/collection.js +24 -0
  194. package/dist/generated/types/collection.js.map +1 -0
  195. package/dist/generated/types/creator.d.ts +23 -0
  196. package/dist/generated/types/creator.d.ts.map +1 -0
  197. package/dist/generated/types/creator.js +26 -0
  198. package/dist/generated/types/creator.js.map +1 -0
  199. package/dist/generated/types/decompressibleState.d.ts +17 -0
  200. package/dist/generated/types/decompressibleState.d.ts.map +1 -0
  201. package/dist/generated/types/decompressibleState.js +23 -0
  202. package/dist/generated/types/decompressibleState.js.map +1 -0
  203. package/dist/generated/types/index.d.ts +23 -0
  204. package/dist/generated/types/index.d.ts.map +1 -0
  205. package/dist/generated/types/index.js +23 -0
  206. package/dist/generated/types/index.js.map +1 -0
  207. package/dist/generated/types/instructionName.d.ts +50 -0
  208. package/dist/generated/types/instructionName.d.ts.map +1 -0
  209. package/dist/generated/types/instructionName.js +56 -0
  210. package/dist/generated/types/instructionName.js.map +1 -0
  211. package/dist/generated/types/leafSchema.d.ts +57 -0
  212. package/dist/generated/types/leafSchema.d.ts.map +1 -0
  213. package/dist/generated/types/leafSchema.js +78 -0
  214. package/dist/generated/types/leafSchema.js.map +1 -0
  215. package/dist/generated/types/metadataArgs.d.ts +61 -0
  216. package/dist/generated/types/metadataArgs.d.ts.map +1 -0
  217. package/dist/generated/types/metadataArgs.js +45 -0
  218. package/dist/generated/types/metadataArgs.js.map +1 -0
  219. package/dist/generated/types/metadataArgsV2.d.ts +53 -0
  220. package/dist/generated/types/metadataArgsV2.d.ts.map +1 -0
  221. package/dist/generated/types/metadataArgsV2.js +39 -0
  222. package/dist/generated/types/metadataArgsV2.js.map +1 -0
  223. package/dist/generated/types/tokenProgramVersion.d.ts +17 -0
  224. package/dist/generated/types/tokenProgramVersion.d.ts.map +1 -0
  225. package/dist/generated/types/tokenProgramVersion.js +23 -0
  226. package/dist/generated/types/tokenProgramVersion.js.map +1 -0
  227. package/dist/generated/types/tokenStandard.d.ts +19 -0
  228. package/dist/generated/types/tokenStandard.d.ts.map +1 -0
  229. package/dist/generated/types/tokenStandard.js +25 -0
  230. package/dist/generated/types/tokenStandard.js.map +1 -0
  231. package/dist/generated/types/updateArgs.d.ts +31 -0
  232. package/dist/generated/types/updateArgs.d.ts.map +1 -0
  233. package/dist/generated/types/updateArgs.js +53 -0
  234. package/dist/generated/types/updateArgs.js.map +1 -0
  235. package/dist/generated/types/useMethod.d.ts +18 -0
  236. package/dist/generated/types/useMethod.d.ts.map +1 -0
  237. package/dist/generated/types/useMethod.js +24 -0
  238. package/dist/generated/types/useMethod.js.map +1 -0
  239. package/dist/generated/types/uses.d.ts +23 -0
  240. package/dist/generated/types/uses.d.ts.map +1 -0
  241. package/dist/generated/types/uses.js +27 -0
  242. package/dist/generated/types/uses.js.map +1 -0
  243. package/dist/generated/types/version.d.ts +17 -0
  244. package/dist/generated/types/version.d.ts.map +1 -0
  245. package/dist/generated/types/version.js +23 -0
  246. package/dist/generated/types/version.js.map +1 -0
  247. package/dist/index.d.ts +8 -0
  248. package/dist/index.d.ts.map +1 -0
  249. package/dist/index.js +8 -0
  250. package/dist/index.js.map +1 -0
  251. package/package.json +51 -5
  252. package/src/generated/accounts/index.ts +10 -0
  253. package/src/generated/accounts/treeConfig.ts +175 -0
  254. package/src/generated/accounts/voucher.ts +144 -0
  255. package/src/generated/errors/bubblegum.ts +309 -0
  256. package/src/generated/errors/index.ts +9 -0
  257. package/src/generated/index.ts +13 -0
  258. package/src/generated/instructions/burn.ts +310 -0
  259. package/src/generated/instructions/burnV2.ts +431 -0
  260. package/src/generated/instructions/cancelRedeem.ts +292 -0
  261. package/src/generated/instructions/closeTreeV2.ts +285 -0
  262. package/src/generated/instructions/collectV2.ts +184 -0
  263. package/src/generated/instructions/compress.ts +388 -0
  264. package/src/generated/instructions/createTree.ts +306 -0
  265. package/src/generated/instructions/createTreeV2.ts +316 -0
  266. package/src/generated/instructions/decompressV1.ts +404 -0
  267. package/src/generated/instructions/delegate.ts +334 -0
  268. package/src/generated/instructions/delegateAndFreezeV2.ts +397 -0
  269. package/src/generated/instructions/delegateV2.ts +391 -0
  270. package/src/generated/instructions/freezeV2.ts +392 -0
  271. package/src/generated/instructions/index.ts +44 -0
  272. package/src/generated/instructions/mintToCollectionV1.ts +457 -0
  273. package/src/generated/instructions/mintV1.ts +320 -0
  274. package/src/generated/instructions/mintV2.ts +435 -0
  275. package/src/generated/instructions/redeem.ts +328 -0
  276. package/src/generated/instructions/setAndVerifyCollection.ts +506 -0
  277. package/src/generated/instructions/setCollectionV2.ts +477 -0
  278. package/src/generated/instructions/setDecompressableState.ts +218 -0
  279. package/src/generated/instructions/setDecompressibleState.ts +218 -0
  280. package/src/generated/instructions/setNonTransferableV2.ts +400 -0
  281. package/src/generated/instructions/setTreeDelegate.ts +246 -0
  282. package/src/generated/instructions/thawAndRevokeV2.ts +370 -0
  283. package/src/generated/instructions/thawV2.ts +392 -0
  284. package/src/generated/instructions/transfer.ts +324 -0
  285. package/src/generated/instructions/transferV2.ts +408 -0
  286. package/src/generated/instructions/unverifyCollection.ts +496 -0
  287. package/src/generated/instructions/unverifyCreator.ts +354 -0
  288. package/src/generated/instructions/unverifyCreatorV2.ts +375 -0
  289. package/src/generated/instructions/updateAssetDataV2.ts +423 -0
  290. package/src/generated/instructions/updateMetadata.ts +449 -0
  291. package/src/generated/instructions/updateMetadataV2.ts +407 -0
  292. package/src/generated/instructions/verifyCollection.ts +494 -0
  293. package/src/generated/instructions/verifyCreator.ts +355 -0
  294. package/src/generated/instructions/verifyCreatorV2.ts +375 -0
  295. package/src/generated/programs/bubblegum.ts +1466 -0
  296. package/src/generated/programs/index.ts +9 -0
  297. package/src/generated/types/assetDataSchema.ts +37 -0
  298. package/src/generated/types/bubblegumEventType.ts +39 -0
  299. package/src/generated/types/collection.ts +51 -0
  300. package/src/generated/types/creator.ts +58 -0
  301. package/src/generated/types/decompressibleState.ts +39 -0
  302. package/src/generated/types/index.ts +23 -0
  303. package/src/generated/types/instructionName.ts +69 -0
  304. package/src/generated/types/leafSchema.ts +166 -0
  305. package/src/generated/types/metadataArgs.ts +148 -0
  306. package/src/generated/types/metadataArgsV2.ts +126 -0
  307. package/src/generated/types/tokenProgramVersion.ts +39 -0
  308. package/src/generated/types/tokenStandard.ts +38 -0
  309. package/src/generated/types/updateArgs.ts +102 -0
  310. package/src/generated/types/useMethod.ts +34 -0
  311. package/src/generated/types/uses.ts +54 -0
  312. package/src/generated/types/version.ts +33 -0
  313. package/src/index.ts +8 -0
@@ -0,0 +1,566 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { assertIsInstructionWithAccounts, containsBytes, extendClient, fixEncoderSize, getBytesEncoder, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, SolanaError, } from "@solana/kit";
9
+ import { addSelfFetchFunctions, addSelfPlanAndSendFunctions, } from "@solana/program-client-core";
10
+ import { getTreeConfigCodec, getVoucherCodec } from "../accounts/index.js";
11
+ import { getBurnInstruction, getBurnV2Instruction, getCancelRedeemInstruction, getCloseTreeV2Instruction, getCollectV2Instruction, getCompressInstruction, getCreateTreeInstruction, getCreateTreeV2Instruction, getDecompressV1Instruction, getDelegateAndFreezeV2Instruction, getDelegateInstruction, getDelegateV2Instruction, getFreezeV2Instruction, getMintToCollectionV1Instruction, getMintV1Instruction, getMintV2Instruction, getRedeemInstruction, getSetAndVerifyCollectionInstruction, getSetCollectionV2Instruction, getSetDecompressableStateInstruction, getSetDecompressibleStateInstruction, getSetNonTransferableV2Instruction, getSetTreeDelegateInstruction, getThawAndRevokeV2Instruction, getThawV2Instruction, getTransferInstruction, getTransferV2Instruction, getUnverifyCollectionInstruction, getUnverifyCreatorInstruction, getUnverifyCreatorV2Instruction, getUpdateAssetDataV2Instruction, getUpdateMetadataInstruction, getUpdateMetadataV2Instruction, getVerifyCollectionInstruction, getVerifyCreatorInstruction, getVerifyCreatorV2Instruction, parseBurnInstruction, parseBurnV2Instruction, parseCancelRedeemInstruction, parseCloseTreeV2Instruction, parseCollectV2Instruction, parseCompressInstruction, parseCreateTreeInstruction, parseCreateTreeV2Instruction, parseDecompressV1Instruction, parseDelegateAndFreezeV2Instruction, parseDelegateInstruction, parseDelegateV2Instruction, parseFreezeV2Instruction, parseMintToCollectionV1Instruction, parseMintV1Instruction, parseMintV2Instruction, parseRedeemInstruction, parseSetAndVerifyCollectionInstruction, parseSetCollectionV2Instruction, parseSetDecompressableStateInstruction, parseSetDecompressibleStateInstruction, parseSetNonTransferableV2Instruction, parseSetTreeDelegateInstruction, parseThawAndRevokeV2Instruction, parseThawV2Instruction, parseTransferInstruction, parseTransferV2Instruction, parseUnverifyCollectionInstruction, parseUnverifyCreatorInstruction, parseUnverifyCreatorV2Instruction, parseUpdateAssetDataV2Instruction, parseUpdateMetadataInstruction, parseUpdateMetadataV2Instruction, parseVerifyCollectionInstruction, parseVerifyCreatorInstruction, parseVerifyCreatorV2Instruction, } from "../instructions/index.js";
12
+ export const BUBBLEGUM_PROGRAM_ADDRESS = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
13
+ export var BubblegumAccount;
14
+ (function (BubblegumAccount) {
15
+ BubblegumAccount[BubblegumAccount["TreeConfig"] = 0] = "TreeConfig";
16
+ BubblegumAccount[BubblegumAccount["Voucher"] = 1] = "Voucher";
17
+ })(BubblegumAccount || (BubblegumAccount = {}));
18
+ export function identifyBubblegumAccount(account) {
19
+ const data = "data" in account ? account.data : account;
20
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([122, 245, 175, 248, 171, 34, 0, 207])), 0)) {
21
+ return BubblegumAccount.TreeConfig;
22
+ }
23
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([191, 204, 149, 234, 213, 165, 13, 65])), 0)) {
24
+ return BubblegumAccount.Voucher;
25
+ }
26
+ throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT, { accountData: data, programName: "bubblegum" });
27
+ }
28
+ export var BubblegumInstruction;
29
+ (function (BubblegumInstruction) {
30
+ BubblegumInstruction[BubblegumInstruction["Burn"] = 0] = "Burn";
31
+ BubblegumInstruction[BubblegumInstruction["BurnV2"] = 1] = "BurnV2";
32
+ BubblegumInstruction[BubblegumInstruction["CancelRedeem"] = 2] = "CancelRedeem";
33
+ BubblegumInstruction[BubblegumInstruction["CloseTreeV2"] = 3] = "CloseTreeV2";
34
+ BubblegumInstruction[BubblegumInstruction["CollectV2"] = 4] = "CollectV2";
35
+ BubblegumInstruction[BubblegumInstruction["Compress"] = 5] = "Compress";
36
+ BubblegumInstruction[BubblegumInstruction["CreateTree"] = 6] = "CreateTree";
37
+ BubblegumInstruction[BubblegumInstruction["CreateTreeV2"] = 7] = "CreateTreeV2";
38
+ BubblegumInstruction[BubblegumInstruction["DecompressV1"] = 8] = "DecompressV1";
39
+ BubblegumInstruction[BubblegumInstruction["Delegate"] = 9] = "Delegate";
40
+ BubblegumInstruction[BubblegumInstruction["DelegateAndFreezeV2"] = 10] = "DelegateAndFreezeV2";
41
+ BubblegumInstruction[BubblegumInstruction["DelegateV2"] = 11] = "DelegateV2";
42
+ BubblegumInstruction[BubblegumInstruction["FreezeV2"] = 12] = "FreezeV2";
43
+ BubblegumInstruction[BubblegumInstruction["MintToCollectionV1"] = 13] = "MintToCollectionV1";
44
+ BubblegumInstruction[BubblegumInstruction["MintV1"] = 14] = "MintV1";
45
+ BubblegumInstruction[BubblegumInstruction["MintV2"] = 15] = "MintV2";
46
+ BubblegumInstruction[BubblegumInstruction["Redeem"] = 16] = "Redeem";
47
+ BubblegumInstruction[BubblegumInstruction["SetAndVerifyCollection"] = 17] = "SetAndVerifyCollection";
48
+ BubblegumInstruction[BubblegumInstruction["SetCollectionV2"] = 18] = "SetCollectionV2";
49
+ BubblegumInstruction[BubblegumInstruction["SetDecompressableState"] = 19] = "SetDecompressableState";
50
+ BubblegumInstruction[BubblegumInstruction["SetDecompressibleState"] = 20] = "SetDecompressibleState";
51
+ BubblegumInstruction[BubblegumInstruction["SetNonTransferableV2"] = 21] = "SetNonTransferableV2";
52
+ BubblegumInstruction[BubblegumInstruction["SetTreeDelegate"] = 22] = "SetTreeDelegate";
53
+ BubblegumInstruction[BubblegumInstruction["ThawAndRevokeV2"] = 23] = "ThawAndRevokeV2";
54
+ BubblegumInstruction[BubblegumInstruction["ThawV2"] = 24] = "ThawV2";
55
+ BubblegumInstruction[BubblegumInstruction["Transfer"] = 25] = "Transfer";
56
+ BubblegumInstruction[BubblegumInstruction["TransferV2"] = 26] = "TransferV2";
57
+ BubblegumInstruction[BubblegumInstruction["UnverifyCollection"] = 27] = "UnverifyCollection";
58
+ BubblegumInstruction[BubblegumInstruction["UnverifyCreator"] = 28] = "UnverifyCreator";
59
+ BubblegumInstruction[BubblegumInstruction["UnverifyCreatorV2"] = 29] = "UnverifyCreatorV2";
60
+ BubblegumInstruction[BubblegumInstruction["UpdateAssetDataV2"] = 30] = "UpdateAssetDataV2";
61
+ BubblegumInstruction[BubblegumInstruction["UpdateMetadata"] = 31] = "UpdateMetadata";
62
+ BubblegumInstruction[BubblegumInstruction["UpdateMetadataV2"] = 32] = "UpdateMetadataV2";
63
+ BubblegumInstruction[BubblegumInstruction["VerifyCollection"] = 33] = "VerifyCollection";
64
+ BubblegumInstruction[BubblegumInstruction["VerifyCreator"] = 34] = "VerifyCreator";
65
+ BubblegumInstruction[BubblegumInstruction["VerifyCreatorV2"] = 35] = "VerifyCreatorV2";
66
+ })(BubblegumInstruction || (BubblegumInstruction = {}));
67
+ export function identifyBubblegumInstruction(instruction) {
68
+ const data = "data" in instruction ? instruction.data : instruction;
69
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([116, 110, 29, 56, 107, 219, 42, 93])), 0)) {
70
+ return BubblegumInstruction.Burn;
71
+ }
72
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([115, 210, 34, 240, 232, 143, 183, 16])), 0)) {
73
+ return BubblegumInstruction.BurnV2;
74
+ }
75
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([111, 76, 232, 50, 39, 175, 48, 242])), 0)) {
76
+ return BubblegumInstruction.CancelRedeem;
77
+ }
78
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([45, 172, 6, 94, 28, 90, 157, 70])), 0)) {
79
+ return BubblegumInstruction.CloseTreeV2;
80
+ }
81
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([21, 11, 159, 47, 4, 195, 106, 56])), 0)) {
82
+ return BubblegumInstruction.CollectV2;
83
+ }
84
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([82, 193, 176, 117, 176, 21, 115, 253])), 0)) {
85
+ return BubblegumInstruction.Compress;
86
+ }
87
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([165, 83, 136, 142, 89, 202, 47, 220])), 0)) {
88
+ return BubblegumInstruction.CreateTree;
89
+ }
90
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([55, 99, 95, 215, 142, 203, 227, 205])), 0)) {
91
+ return BubblegumInstruction.CreateTreeV2;
92
+ }
93
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([54, 85, 76, 70, 228, 250, 164, 81])), 0)) {
94
+ return BubblegumInstruction.DecompressV1;
95
+ }
96
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([90, 147, 75, 178, 85, 88, 4, 137])), 0)) {
97
+ return BubblegumInstruction.Delegate;
98
+ }
99
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([17, 229, 35, 218, 190, 241, 250, 123])), 0)) {
100
+ return BubblegumInstruction.DelegateAndFreezeV2;
101
+ }
102
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([95, 87, 125, 140, 181, 131, 128, 227])), 0)) {
103
+ return BubblegumInstruction.DelegateV2;
104
+ }
105
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([200, 151, 244, 102, 16, 195, 255, 3])), 0)) {
106
+ return BubblegumInstruction.FreezeV2;
107
+ }
108
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([153, 18, 178, 47, 197, 158, 86, 15])), 0)) {
109
+ return BubblegumInstruction.MintToCollectionV1;
110
+ }
111
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([145, 98, 192, 118, 184, 147, 118, 104])), 0)) {
112
+ return BubblegumInstruction.MintV1;
113
+ }
114
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([120, 121, 23, 146, 173, 110, 199, 205])), 0)) {
115
+ return BubblegumInstruction.MintV2;
116
+ }
117
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([184, 12, 86, 149, 70, 196, 97, 225])), 0)) {
118
+ return BubblegumInstruction.Redeem;
119
+ }
120
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([235, 242, 121, 216, 158, 234, 180, 234])), 0)) {
121
+ return BubblegumInstruction.SetAndVerifyCollection;
122
+ }
123
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([229, 35, 61, 91, 15, 14, 99, 160])), 0)) {
124
+ return BubblegumInstruction.SetCollectionV2;
125
+ }
126
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([18, 135, 238, 168, 246, 195, 61, 115])), 0)) {
127
+ return BubblegumInstruction.SetDecompressableState;
128
+ }
129
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([82, 104, 152, 6, 149, 111, 100, 13])), 0)) {
130
+ return BubblegumInstruction.SetDecompressibleState;
131
+ }
132
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([181, 141, 206, 58, 242, 199, 152, 168])), 0)) {
133
+ return BubblegumInstruction.SetNonTransferableV2;
134
+ }
135
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([253, 118, 66, 37, 190, 49, 154, 102])), 0)) {
136
+ return BubblegumInstruction.SetTreeDelegate;
137
+ }
138
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([86, 214, 190, 37, 167, 4, 28, 116])), 0)) {
139
+ return BubblegumInstruction.ThawAndRevokeV2;
140
+ }
141
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([96, 133, 101, 93, 82, 220, 146, 191])), 0)) {
142
+ return BubblegumInstruction.ThawV2;
143
+ }
144
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([163, 52, 200, 231, 140, 3, 69, 186])), 0)) {
145
+ return BubblegumInstruction.Transfer;
146
+ }
147
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([119, 40, 6, 235, 234, 221, 248, 49])), 0)) {
148
+ return BubblegumInstruction.TransferV2;
149
+ }
150
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([250, 251, 42, 106, 41, 137, 186, 168])), 0)) {
151
+ return BubblegumInstruction.UnverifyCollection;
152
+ }
153
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([107, 178, 57, 39, 105, 115, 112, 152])), 0)) {
154
+ return BubblegumInstruction.UnverifyCreator;
155
+ }
156
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([174, 112, 29, 142, 230, 100, 239, 7])), 0)) {
157
+ return BubblegumInstruction.UnverifyCreatorV2;
158
+ }
159
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([59, 56, 111, 43, 95, 14, 11, 61])), 0)) {
160
+ return BubblegumInstruction.UpdateAssetDataV2;
161
+ }
162
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([170, 182, 43, 239, 97, 78, 225, 186])), 0)) {
163
+ return BubblegumInstruction.UpdateMetadata;
164
+ }
165
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([43, 103, 89, 42, 121, 242, 62, 72])), 0)) {
166
+ return BubblegumInstruction.UpdateMetadataV2;
167
+ }
168
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([56, 113, 101, 253, 79, 55, 122, 169])), 0)) {
169
+ return BubblegumInstruction.VerifyCollection;
170
+ }
171
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([52, 17, 96, 132, 71, 4, 85, 194])), 0)) {
172
+ return BubblegumInstruction.VerifyCreator;
173
+ }
174
+ if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([85, 138, 140, 42, 22, 241, 118, 102])), 0)) {
175
+ return BubblegumInstruction.VerifyCreatorV2;
176
+ }
177
+ throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, { instructionData: data, programName: "bubblegum" });
178
+ }
179
+ export function parseBubblegumInstruction(instruction) {
180
+ const instructionType = identifyBubblegumInstruction(instruction);
181
+ switch (instructionType) {
182
+ case BubblegumInstruction.Burn: {
183
+ assertIsInstructionWithAccounts(instruction);
184
+ return {
185
+ instructionType: BubblegumInstruction.Burn,
186
+ ...parseBurnInstruction(instruction),
187
+ };
188
+ }
189
+ case BubblegumInstruction.BurnV2: {
190
+ assertIsInstructionWithAccounts(instruction);
191
+ return {
192
+ instructionType: BubblegumInstruction.BurnV2,
193
+ ...parseBurnV2Instruction(instruction),
194
+ };
195
+ }
196
+ case BubblegumInstruction.CancelRedeem: {
197
+ assertIsInstructionWithAccounts(instruction);
198
+ return {
199
+ instructionType: BubblegumInstruction.CancelRedeem,
200
+ ...parseCancelRedeemInstruction(instruction),
201
+ };
202
+ }
203
+ case BubblegumInstruction.CloseTreeV2: {
204
+ assertIsInstructionWithAccounts(instruction);
205
+ return {
206
+ instructionType: BubblegumInstruction.CloseTreeV2,
207
+ ...parseCloseTreeV2Instruction(instruction),
208
+ };
209
+ }
210
+ case BubblegumInstruction.CollectV2: {
211
+ assertIsInstructionWithAccounts(instruction);
212
+ return {
213
+ instructionType: BubblegumInstruction.CollectV2,
214
+ ...parseCollectV2Instruction(instruction),
215
+ };
216
+ }
217
+ case BubblegumInstruction.Compress: {
218
+ assertIsInstructionWithAccounts(instruction);
219
+ return {
220
+ instructionType: BubblegumInstruction.Compress,
221
+ ...parseCompressInstruction(instruction),
222
+ };
223
+ }
224
+ case BubblegumInstruction.CreateTree: {
225
+ assertIsInstructionWithAccounts(instruction);
226
+ return {
227
+ instructionType: BubblegumInstruction.CreateTree,
228
+ ...parseCreateTreeInstruction(instruction),
229
+ };
230
+ }
231
+ case BubblegumInstruction.CreateTreeV2: {
232
+ assertIsInstructionWithAccounts(instruction);
233
+ return {
234
+ instructionType: BubblegumInstruction.CreateTreeV2,
235
+ ...parseCreateTreeV2Instruction(instruction),
236
+ };
237
+ }
238
+ case BubblegumInstruction.DecompressV1: {
239
+ assertIsInstructionWithAccounts(instruction);
240
+ return {
241
+ instructionType: BubblegumInstruction.DecompressV1,
242
+ ...parseDecompressV1Instruction(instruction),
243
+ };
244
+ }
245
+ case BubblegumInstruction.Delegate: {
246
+ assertIsInstructionWithAccounts(instruction);
247
+ return {
248
+ instructionType: BubblegumInstruction.Delegate,
249
+ ...parseDelegateInstruction(instruction),
250
+ };
251
+ }
252
+ case BubblegumInstruction.DelegateAndFreezeV2: {
253
+ assertIsInstructionWithAccounts(instruction);
254
+ return {
255
+ instructionType: BubblegumInstruction.DelegateAndFreezeV2,
256
+ ...parseDelegateAndFreezeV2Instruction(instruction),
257
+ };
258
+ }
259
+ case BubblegumInstruction.DelegateV2: {
260
+ assertIsInstructionWithAccounts(instruction);
261
+ return {
262
+ instructionType: BubblegumInstruction.DelegateV2,
263
+ ...parseDelegateV2Instruction(instruction),
264
+ };
265
+ }
266
+ case BubblegumInstruction.FreezeV2: {
267
+ assertIsInstructionWithAccounts(instruction);
268
+ return {
269
+ instructionType: BubblegumInstruction.FreezeV2,
270
+ ...parseFreezeV2Instruction(instruction),
271
+ };
272
+ }
273
+ case BubblegumInstruction.MintToCollectionV1: {
274
+ assertIsInstructionWithAccounts(instruction);
275
+ return {
276
+ instructionType: BubblegumInstruction.MintToCollectionV1,
277
+ ...parseMintToCollectionV1Instruction(instruction),
278
+ };
279
+ }
280
+ case BubblegumInstruction.MintV1: {
281
+ assertIsInstructionWithAccounts(instruction);
282
+ return {
283
+ instructionType: BubblegumInstruction.MintV1,
284
+ ...parseMintV1Instruction(instruction),
285
+ };
286
+ }
287
+ case BubblegumInstruction.MintV2: {
288
+ assertIsInstructionWithAccounts(instruction);
289
+ return {
290
+ instructionType: BubblegumInstruction.MintV2,
291
+ ...parseMintV2Instruction(instruction),
292
+ };
293
+ }
294
+ case BubblegumInstruction.Redeem: {
295
+ assertIsInstructionWithAccounts(instruction);
296
+ return {
297
+ instructionType: BubblegumInstruction.Redeem,
298
+ ...parseRedeemInstruction(instruction),
299
+ };
300
+ }
301
+ case BubblegumInstruction.SetAndVerifyCollection: {
302
+ assertIsInstructionWithAccounts(instruction);
303
+ return {
304
+ instructionType: BubblegumInstruction.SetAndVerifyCollection,
305
+ ...parseSetAndVerifyCollectionInstruction(instruction),
306
+ };
307
+ }
308
+ case BubblegumInstruction.SetCollectionV2: {
309
+ assertIsInstructionWithAccounts(instruction);
310
+ return {
311
+ instructionType: BubblegumInstruction.SetCollectionV2,
312
+ ...parseSetCollectionV2Instruction(instruction),
313
+ };
314
+ }
315
+ case BubblegumInstruction.SetDecompressableState: {
316
+ assertIsInstructionWithAccounts(instruction);
317
+ return {
318
+ instructionType: BubblegumInstruction.SetDecompressableState,
319
+ ...parseSetDecompressableStateInstruction(instruction),
320
+ };
321
+ }
322
+ case BubblegumInstruction.SetDecompressibleState: {
323
+ assertIsInstructionWithAccounts(instruction);
324
+ return {
325
+ instructionType: BubblegumInstruction.SetDecompressibleState,
326
+ ...parseSetDecompressibleStateInstruction(instruction),
327
+ };
328
+ }
329
+ case BubblegumInstruction.SetNonTransferableV2: {
330
+ assertIsInstructionWithAccounts(instruction);
331
+ return {
332
+ instructionType: BubblegumInstruction.SetNonTransferableV2,
333
+ ...parseSetNonTransferableV2Instruction(instruction),
334
+ };
335
+ }
336
+ case BubblegumInstruction.SetTreeDelegate: {
337
+ assertIsInstructionWithAccounts(instruction);
338
+ return {
339
+ instructionType: BubblegumInstruction.SetTreeDelegate,
340
+ ...parseSetTreeDelegateInstruction(instruction),
341
+ };
342
+ }
343
+ case BubblegumInstruction.ThawAndRevokeV2: {
344
+ assertIsInstructionWithAccounts(instruction);
345
+ return {
346
+ instructionType: BubblegumInstruction.ThawAndRevokeV2,
347
+ ...parseThawAndRevokeV2Instruction(instruction),
348
+ };
349
+ }
350
+ case BubblegumInstruction.ThawV2: {
351
+ assertIsInstructionWithAccounts(instruction);
352
+ return {
353
+ instructionType: BubblegumInstruction.ThawV2,
354
+ ...parseThawV2Instruction(instruction),
355
+ };
356
+ }
357
+ case BubblegumInstruction.Transfer: {
358
+ assertIsInstructionWithAccounts(instruction);
359
+ return {
360
+ instructionType: BubblegumInstruction.Transfer,
361
+ ...parseTransferInstruction(instruction),
362
+ };
363
+ }
364
+ case BubblegumInstruction.TransferV2: {
365
+ assertIsInstructionWithAccounts(instruction);
366
+ return {
367
+ instructionType: BubblegumInstruction.TransferV2,
368
+ ...parseTransferV2Instruction(instruction),
369
+ };
370
+ }
371
+ case BubblegumInstruction.UnverifyCollection: {
372
+ assertIsInstructionWithAccounts(instruction);
373
+ return {
374
+ instructionType: BubblegumInstruction.UnverifyCollection,
375
+ ...parseUnverifyCollectionInstruction(instruction),
376
+ };
377
+ }
378
+ case BubblegumInstruction.UnverifyCreator: {
379
+ assertIsInstructionWithAccounts(instruction);
380
+ return {
381
+ instructionType: BubblegumInstruction.UnverifyCreator,
382
+ ...parseUnverifyCreatorInstruction(instruction),
383
+ };
384
+ }
385
+ case BubblegumInstruction.UnverifyCreatorV2: {
386
+ assertIsInstructionWithAccounts(instruction);
387
+ return {
388
+ instructionType: BubblegumInstruction.UnverifyCreatorV2,
389
+ ...parseUnverifyCreatorV2Instruction(instruction),
390
+ };
391
+ }
392
+ case BubblegumInstruction.UpdateAssetDataV2: {
393
+ assertIsInstructionWithAccounts(instruction);
394
+ return {
395
+ instructionType: BubblegumInstruction.UpdateAssetDataV2,
396
+ ...parseUpdateAssetDataV2Instruction(instruction),
397
+ };
398
+ }
399
+ case BubblegumInstruction.UpdateMetadata: {
400
+ assertIsInstructionWithAccounts(instruction);
401
+ return {
402
+ instructionType: BubblegumInstruction.UpdateMetadata,
403
+ ...parseUpdateMetadataInstruction(instruction),
404
+ };
405
+ }
406
+ case BubblegumInstruction.UpdateMetadataV2: {
407
+ assertIsInstructionWithAccounts(instruction);
408
+ return {
409
+ instructionType: BubblegumInstruction.UpdateMetadataV2,
410
+ ...parseUpdateMetadataV2Instruction(instruction),
411
+ };
412
+ }
413
+ case BubblegumInstruction.VerifyCollection: {
414
+ assertIsInstructionWithAccounts(instruction);
415
+ return {
416
+ instructionType: BubblegumInstruction.VerifyCollection,
417
+ ...parseVerifyCollectionInstruction(instruction),
418
+ };
419
+ }
420
+ case BubblegumInstruction.VerifyCreator: {
421
+ assertIsInstructionWithAccounts(instruction);
422
+ return {
423
+ instructionType: BubblegumInstruction.VerifyCreator,
424
+ ...parseVerifyCreatorInstruction(instruction),
425
+ };
426
+ }
427
+ case BubblegumInstruction.VerifyCreatorV2: {
428
+ assertIsInstructionWithAccounts(instruction);
429
+ return {
430
+ instructionType: BubblegumInstruction.VerifyCreatorV2,
431
+ ...parseVerifyCreatorV2Instruction(instruction),
432
+ };
433
+ }
434
+ default:
435
+ throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, {
436
+ instructionType: instructionType,
437
+ programName: "bubblegum",
438
+ });
439
+ }
440
+ }
441
+ export function bubblegumProgram() {
442
+ return (client) => {
443
+ return extendClient(client, {
444
+ bubblegum: {
445
+ accounts: {
446
+ treeConfig: addSelfFetchFunctions(client, getTreeConfigCodec()),
447
+ voucher: addSelfFetchFunctions(client, getVoucherCodec()),
448
+ },
449
+ instructions: {
450
+ burn: (input) => addSelfPlanAndSendFunctions(client, getBurnInstruction(input)),
451
+ burnV2: (input) => addSelfPlanAndSendFunctions(client, getBurnV2Instruction({
452
+ ...input,
453
+ payer: input.payer ?? client.payer,
454
+ })),
455
+ cancelRedeem: (input) => addSelfPlanAndSendFunctions(client, getCancelRedeemInstruction(input)),
456
+ closeTreeV2: (input) => addSelfPlanAndSendFunctions(client, getCloseTreeV2Instruction(input)),
457
+ collectV2: (input) => addSelfPlanAndSendFunctions(client, getCollectV2Instruction(input)),
458
+ compress: (input) => addSelfPlanAndSendFunctions(client, getCompressInstruction({
459
+ ...input,
460
+ payer: input.payer ?? client.payer,
461
+ })),
462
+ createTree: (input) => addSelfPlanAndSendFunctions(client, getCreateTreeInstruction({
463
+ ...input,
464
+ payer: input.payer ?? client.payer,
465
+ })),
466
+ createTreeV2: (input) => addSelfPlanAndSendFunctions(client, getCreateTreeV2Instruction({
467
+ ...input,
468
+ payer: input.payer ?? client.payer,
469
+ })),
470
+ decompressV1: (input) => addSelfPlanAndSendFunctions(client, getDecompressV1Instruction(input)),
471
+ delegate: (input) => addSelfPlanAndSendFunctions(client, getDelegateInstruction(input)),
472
+ delegateAndFreezeV2: (input) => addSelfPlanAndSendFunctions(client, getDelegateAndFreezeV2Instruction({
473
+ ...input,
474
+ payer: input.payer ?? client.payer,
475
+ })),
476
+ delegateV2: (input) => addSelfPlanAndSendFunctions(client, getDelegateV2Instruction({
477
+ ...input,
478
+ payer: input.payer ?? client.payer,
479
+ })),
480
+ freezeV2: (input) => addSelfPlanAndSendFunctions(client, getFreezeV2Instruction({
481
+ ...input,
482
+ payer: input.payer ?? client.payer,
483
+ })),
484
+ mintToCollectionV1: (input) => addSelfPlanAndSendFunctions(client, getMintToCollectionV1Instruction({
485
+ ...input,
486
+ payer: input.payer ?? client.payer,
487
+ })),
488
+ mintV1: (input) => addSelfPlanAndSendFunctions(client, getMintV1Instruction({
489
+ ...input,
490
+ payer: input.payer ?? client.payer,
491
+ })),
492
+ mintV2: (input) => addSelfPlanAndSendFunctions(client, getMintV2Instruction({
493
+ ...input,
494
+ payer: input.payer ?? client.payer,
495
+ })),
496
+ redeem: (input) => addSelfPlanAndSendFunctions(client, getRedeemInstruction(input)),
497
+ setAndVerifyCollection: (input) => addSelfPlanAndSendFunctions(client, getSetAndVerifyCollectionInstruction({
498
+ ...input,
499
+ payer: input.payer ?? client.payer,
500
+ })),
501
+ setCollectionV2: (input) => addSelfPlanAndSendFunctions(client, getSetCollectionV2Instruction({
502
+ ...input,
503
+ payer: input.payer ?? client.payer,
504
+ })),
505
+ setDecompressableState: (input) => addSelfPlanAndSendFunctions(client, getSetDecompressableStateInstruction(input)),
506
+ setDecompressibleState: (input) => addSelfPlanAndSendFunctions(client, getSetDecompressibleStateInstruction(input)),
507
+ setNonTransferableV2: (input) => addSelfPlanAndSendFunctions(client, getSetNonTransferableV2Instruction({
508
+ ...input,
509
+ payer: input.payer ?? client.payer,
510
+ })),
511
+ setTreeDelegate: (input) => addSelfPlanAndSendFunctions(client, getSetTreeDelegateInstruction(input)),
512
+ thawAndRevokeV2: (input) => addSelfPlanAndSendFunctions(client, getThawAndRevokeV2Instruction({
513
+ ...input,
514
+ payer: input.payer ?? client.payer,
515
+ })),
516
+ thawV2: (input) => addSelfPlanAndSendFunctions(client, getThawV2Instruction({
517
+ ...input,
518
+ payer: input.payer ?? client.payer,
519
+ })),
520
+ transfer: (input) => addSelfPlanAndSendFunctions(client, getTransferInstruction(input)),
521
+ transferV2: (input) => addSelfPlanAndSendFunctions(client, getTransferV2Instruction({
522
+ ...input,
523
+ payer: input.payer ?? client.payer,
524
+ })),
525
+ unverifyCollection: (input) => addSelfPlanAndSendFunctions(client, getUnverifyCollectionInstruction({
526
+ ...input,
527
+ payer: input.payer ?? client.payer,
528
+ })),
529
+ unverifyCreator: (input) => addSelfPlanAndSendFunctions(client, getUnverifyCreatorInstruction({
530
+ ...input,
531
+ payer: input.payer ?? client.payer,
532
+ })),
533
+ unverifyCreatorV2: (input) => addSelfPlanAndSendFunctions(client, getUnverifyCreatorV2Instruction({
534
+ ...input,
535
+ payer: input.payer ?? client.payer,
536
+ })),
537
+ updateAssetDataV2: (input) => addSelfPlanAndSendFunctions(client, getUpdateAssetDataV2Instruction({
538
+ ...input,
539
+ payer: input.payer ?? client.payer,
540
+ })),
541
+ updateMetadata: (input) => addSelfPlanAndSendFunctions(client, getUpdateMetadataInstruction({
542
+ ...input,
543
+ payer: input.payer ?? client.payer,
544
+ })),
545
+ updateMetadataV2: (input) => addSelfPlanAndSendFunctions(client, getUpdateMetadataV2Instruction({
546
+ ...input,
547
+ payer: input.payer ?? client.payer,
548
+ })),
549
+ verifyCollection: (input) => addSelfPlanAndSendFunctions(client, getVerifyCollectionInstruction({
550
+ ...input,
551
+ payer: input.payer ?? client.payer,
552
+ })),
553
+ verifyCreator: (input) => addSelfPlanAndSendFunctions(client, getVerifyCreatorInstruction({
554
+ ...input,
555
+ payer: input.payer ?? client.payer,
556
+ })),
557
+ verifyCreatorV2: (input) => addSelfPlanAndSendFunctions(client, getVerifyCreatorV2Instruction({
558
+ ...input,
559
+ payer: input.payer ?? client.payer,
560
+ })),
561
+ },
562
+ },
563
+ });
564
+ };
565
+ }
566
+ //# sourceMappingURL=bubblegum.js.map