@macalinao/clients-mpl-bubblegum 0.3.0 → 0.3.2

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 (324) hide show
  1. package/dist/generated/accounts/index.d.ts +2 -1
  2. package/dist/generated/accounts/treeConfig.d.ts +22 -7
  3. package/dist/generated/accounts/treeConfig.d.ts.map +1 -1
  4. package/dist/generated/accounts/treeConfig.js +7 -0
  5. package/dist/generated/accounts/treeConfig.js.map +1 -1
  6. package/dist/generated/accounts/voucher.d.ts +14 -7
  7. package/dist/generated/accounts/voucher.d.ts.map +1 -1
  8. package/dist/generated/accounts/voucher.js +7 -0
  9. package/dist/generated/accounts/voucher.js.map +1 -1
  10. package/dist/generated/errors/bubblegum.d.ts +0 -1
  11. package/dist/generated/errors/bubblegum.d.ts.map +1 -1
  12. package/dist/generated/errors/bubblegum.js +66 -59
  13. package/dist/generated/errors/bubblegum.js.map +1 -1
  14. package/dist/generated/errors/index.d.ts +2 -1
  15. package/dist/generated/index.d.ts +8 -1
  16. package/dist/generated/instructions/burn.d.ts +141 -17
  17. package/dist/generated/instructions/burn.d.ts.map +1 -1
  18. package/dist/generated/instructions/burn.js +23 -0
  19. package/dist/generated/instructions/burn.js.map +1 -1
  20. package/dist/generated/instructions/burnV2.d.ts +179 -31
  21. package/dist/generated/instructions/burnV2.d.ts.map +1 -1
  22. package/dist/generated/instructions/burnV2.js +21 -0
  23. package/dist/generated/instructions/burnV2.js.map +1 -1
  24. package/dist/generated/instructions/cancelRedeem.d.ts +99 -13
  25. package/dist/generated/instructions/cancelRedeem.d.ts.map +1 -1
  26. package/dist/generated/instructions/cancelRedeem.js +19 -0
  27. package/dist/generated/instructions/cancelRedeem.js.map +1 -1
  28. package/dist/generated/instructions/closeTreeV2.d.ts +85 -19
  29. package/dist/generated/instructions/closeTreeV2.d.ts.map +1 -1
  30. package/dist/generated/instructions/closeTreeV2.js +21 -0
  31. package/dist/generated/instructions/closeTreeV2.js.map +1 -1
  32. package/dist/generated/instructions/collectV2.d.ts +20 -7
  33. package/dist/generated/instructions/collectV2.d.ts.map +1 -1
  34. package/dist/generated/instructions/collectV2.js +10 -0
  35. package/dist/generated/instructions/collectV2.js.map +1 -1
  36. package/dist/generated/instructions/compress.d.ts +119 -9
  37. package/dist/generated/instructions/compress.d.ts.map +1 -1
  38. package/dist/generated/instructions/compress.js +21 -0
  39. package/dist/generated/instructions/compress.js.map +1 -1
  40. package/dist/generated/instructions/createTree.d.ts +117 -11
  41. package/dist/generated/instructions/createTree.d.ts.map +1 -1
  42. package/dist/generated/instructions/createTree.js +23 -0
  43. package/dist/generated/instructions/createTree.js.map +1 -1
  44. package/dist/generated/instructions/createTreeV2.d.ts +109 -14
  45. package/dist/generated/instructions/createTreeV2.d.ts.map +1 -1
  46. package/dist/generated/instructions/createTreeV2.js +23 -0
  47. package/dist/generated/instructions/createTreeV2.js.map +1 -1
  48. package/dist/generated/instructions/decompressV1.d.ts +106 -11
  49. package/dist/generated/instructions/decompressV1.d.ts.map +1 -1
  50. package/dist/generated/instructions/decompressV1.js +25 -0
  51. package/dist/generated/instructions/decompressV1.js.map +1 -1
  52. package/dist/generated/instructions/delegate.d.ts +140 -17
  53. package/dist/generated/instructions/delegate.d.ts.map +1 -1
  54. package/dist/generated/instructions/delegate.js +19 -0
  55. package/dist/generated/instructions/delegate.js.map +1 -1
  56. package/dist/generated/instructions/delegateAndFreezeV2.d.ts +171 -27
  57. package/dist/generated/instructions/delegateAndFreezeV2.d.ts.map +1 -1
  58. package/dist/generated/instructions/delegateAndFreezeV2.js +17 -0
  59. package/dist/generated/instructions/delegateAndFreezeV2.js.map +1 -1
  60. package/dist/generated/instructions/delegateV2.d.ts +169 -27
  61. package/dist/generated/instructions/delegateV2.d.ts.map +1 -1
  62. package/dist/generated/instructions/delegateV2.js +15 -0
  63. package/dist/generated/instructions/delegateV2.js.map +1 -1
  64. package/dist/generated/instructions/freezeV2.d.ts +174 -28
  65. package/dist/generated/instructions/freezeV2.d.ts.map +1 -1
  66. package/dist/generated/instructions/freezeV2.js +23 -0
  67. package/dist/generated/instructions/freezeV2.js.map +1 -1
  68. package/dist/generated/instructions/index.d.ts +2 -1
  69. package/dist/generated/instructions/mintToCollectionV1.d.ts +171 -20
  70. package/dist/generated/instructions/mintToCollectionV1.d.ts.map +1 -1
  71. package/dist/generated/instructions/mintToCollectionV1.js +23 -0
  72. package/dist/generated/instructions/mintToCollectionV1.js.map +1 -1
  73. package/dist/generated/instructions/mintV1.d.ts +109 -11
  74. package/dist/generated/instructions/mintV1.d.ts.map +1 -1
  75. package/dist/generated/instructions/mintV1.js +21 -0
  76. package/dist/generated/instructions/mintV1.js.map +1 -1
  77. package/dist/generated/instructions/mintV2.d.ts +163 -17
  78. package/dist/generated/instructions/mintV2.d.ts.map +1 -1
  79. package/dist/generated/instructions/mintV2.js +45 -0
  80. package/dist/generated/instructions/mintV2.js.map +1 -1
  81. package/dist/generated/instructions/redeem.d.ts +153 -17
  82. package/dist/generated/instructions/redeem.d.ts.map +1 -1
  83. package/dist/generated/instructions/redeem.js +23 -0
  84. package/dist/generated/instructions/redeem.js.map +1 -1
  85. package/dist/generated/instructions/setAndVerifyCollection.d.ts +222 -38
  86. package/dist/generated/instructions/setAndVerifyCollection.d.ts.map +1 -1
  87. package/dist/generated/instructions/setAndVerifyCollection.js +21 -0
  88. package/dist/generated/instructions/setAndVerifyCollection.js.map +1 -1
  89. package/dist/generated/instructions/setCollectionV2.d.ts +186 -39
  90. package/dist/generated/instructions/setCollectionV2.d.ts.map +1 -1
  91. package/dist/generated/instructions/setCollectionV2.js +21 -0
  92. package/dist/generated/instructions/setCollectionV2.js.map +1 -1
  93. package/dist/generated/instructions/setDecompressableState.d.ts +40 -9
  94. package/dist/generated/instructions/setDecompressableState.d.ts.map +1 -1
  95. package/dist/generated/instructions/setDecompressableState.js +13 -0
  96. package/dist/generated/instructions/setDecompressableState.js.map +1 -1
  97. package/dist/generated/instructions/setDecompressibleState.d.ts +41 -9
  98. package/dist/generated/instructions/setDecompressibleState.d.ts.map +1 -1
  99. package/dist/generated/instructions/setDecompressibleState.js +14 -0
  100. package/dist/generated/instructions/setDecompressibleState.js.map +1 -1
  101. package/dist/generated/instructions/setNonTransferableV2.d.ts +166 -31
  102. package/dist/generated/instructions/setNonTransferableV2.d.ts.map +1 -1
  103. package/dist/generated/instructions/setNonTransferableV2.js +23 -0
  104. package/dist/generated/instructions/setNonTransferableV2.js.map +1 -1
  105. package/dist/generated/instructions/setTreeDelegate.d.ts +65 -9
  106. package/dist/generated/instructions/setTreeDelegate.d.ts.map +1 -1
  107. package/dist/generated/instructions/setTreeDelegate.js +21 -0
  108. package/dist/generated/instructions/setTreeDelegate.js.map +1 -1
  109. package/dist/generated/instructions/thawAndRevokeV2.d.ts +158 -24
  110. package/dist/generated/instructions/thawAndRevokeV2.d.ts.map +1 -1
  111. package/dist/generated/instructions/thawAndRevokeV2.js +17 -0
  112. package/dist/generated/instructions/thawAndRevokeV2.js.map +1 -1
  113. package/dist/generated/instructions/thawV2.d.ts +166 -28
  114. package/dist/generated/instructions/thawV2.d.ts.map +1 -1
  115. package/dist/generated/instructions/thawV2.js +15 -0
  116. package/dist/generated/instructions/thawV2.js.map +1 -1
  117. package/dist/generated/instructions/transfer.d.ts +140 -17
  118. package/dist/generated/instructions/transfer.d.ts.map +1 -1
  119. package/dist/generated/instructions/transfer.js +19 -0
  120. package/dist/generated/instructions/transfer.js.map +1 -1
  121. package/dist/generated/instructions/transferV2.d.ts +167 -31
  122. package/dist/generated/instructions/transferV2.d.ts.map +1 -1
  123. package/dist/generated/instructions/transferV2.js +21 -0
  124. package/dist/generated/instructions/transferV2.js.map +1 -1
  125. package/dist/generated/instructions/unverifyCollection.d.ts +215 -38
  126. package/dist/generated/instructions/unverifyCollection.d.ts.map +1 -1
  127. package/dist/generated/instructions/unverifyCollection.js +19 -0
  128. package/dist/generated/instructions/unverifyCollection.js.map +1 -1
  129. package/dist/generated/instructions/unverifyCreator.d.ts +161 -17
  130. package/dist/generated/instructions/unverifyCreator.d.ts.map +1 -1
  131. package/dist/generated/instructions/unverifyCreator.js +19 -0
  132. package/dist/generated/instructions/unverifyCreator.js.map +1 -1
  133. package/dist/generated/instructions/unverifyCreatorV2.d.ts +143 -21
  134. package/dist/generated/instructions/unverifyCreatorV2.d.ts.map +1 -1
  135. package/dist/generated/instructions/unverifyCreatorV2.js +19 -0
  136. package/dist/generated/instructions/unverifyCreatorV2.js.map +1 -1
  137. package/dist/generated/instructions/updateAssetDataV2.d.ts +180 -28
  138. package/dist/generated/instructions/updateAssetDataV2.d.ts.map +1 -1
  139. package/dist/generated/instructions/updateAssetDataV2.js +21 -0
  140. package/dist/generated/instructions/updateAssetDataV2.js.map +1 -1
  141. package/dist/generated/instructions/updateMetadata.d.ts +183 -28
  142. package/dist/generated/instructions/updateMetadata.d.ts.map +1 -1
  143. package/dist/generated/instructions/updateMetadata.js +21 -0
  144. package/dist/generated/instructions/updateMetadata.js.map +1 -1
  145. package/dist/generated/instructions/updateMetadataV2.d.ts +162 -27
  146. package/dist/generated/instructions/updateMetadataV2.d.ts.map +1 -1
  147. package/dist/generated/instructions/updateMetadataV2.js +19 -0
  148. package/dist/generated/instructions/updateMetadataV2.js.map +1 -1
  149. package/dist/generated/instructions/verifyCollection.d.ts +215 -38
  150. package/dist/generated/instructions/verifyCollection.d.ts.map +1 -1
  151. package/dist/generated/instructions/verifyCollection.js +19 -0
  152. package/dist/generated/instructions/verifyCollection.js.map +1 -1
  153. package/dist/generated/instructions/verifyCreator.d.ts +161 -17
  154. package/dist/generated/instructions/verifyCreator.d.ts.map +1 -1
  155. package/dist/generated/instructions/verifyCreator.js +19 -0
  156. package/dist/generated/instructions/verifyCreator.js.map +1 -1
  157. package/dist/generated/instructions/verifyCreatorV2.d.ts +143 -21
  158. package/dist/generated/instructions/verifyCreatorV2.d.ts.map +1 -1
  159. package/dist/generated/instructions/verifyCreatorV2.js +19 -0
  160. package/dist/generated/instructions/verifyCreatorV2.js.map +1 -1
  161. package/dist/generated/pdas/assetId.d.ts +2 -3
  162. package/dist/generated/pdas/assetId.d.ts.map +1 -1
  163. package/dist/generated/pdas/assetId.js +7 -0
  164. package/dist/generated/pdas/assetId.js.map +1 -1
  165. package/dist/generated/pdas/bubblegumSigner.d.ts +0 -1
  166. package/dist/generated/pdas/bubblegumSigner.d.ts.map +1 -1
  167. package/dist/generated/pdas/bubblegumSigner.js +7 -0
  168. package/dist/generated/pdas/bubblegumSigner.js.map +1 -1
  169. package/dist/generated/pdas/index.d.ts +2 -1
  170. package/dist/generated/pdas/masterEdition.d.ts +2 -3
  171. package/dist/generated/pdas/masterEdition.d.ts.map +1 -1
  172. package/dist/generated/pdas/masterEdition.js +7 -0
  173. package/dist/generated/pdas/masterEdition.js.map +1 -1
  174. package/dist/generated/pdas/metadata.d.ts +2 -3
  175. package/dist/generated/pdas/metadata.d.ts.map +1 -1
  176. package/dist/generated/pdas/metadata.js +7 -0
  177. package/dist/generated/pdas/metadata.js.map +1 -1
  178. package/dist/generated/pdas/mintAuthority.d.ts +2 -3
  179. package/dist/generated/pdas/mintAuthority.d.ts.map +1 -1
  180. package/dist/generated/pdas/mintAuthority.js +7 -0
  181. package/dist/generated/pdas/mintAuthority.js.map +1 -1
  182. package/dist/generated/pdas/treeConfig.d.ts +2 -3
  183. package/dist/generated/pdas/treeConfig.d.ts.map +1 -1
  184. package/dist/generated/pdas/treeConfig.js +7 -0
  185. package/dist/generated/pdas/treeConfig.js.map +1 -1
  186. package/dist/generated/pdas/voucher.d.ts +2 -3
  187. package/dist/generated/pdas/voucher.d.ts.map +1 -1
  188. package/dist/generated/pdas/voucher.js +7 -0
  189. package/dist/generated/pdas/voucher.js.map +1 -1
  190. package/dist/generated/programs/bubblegum.d.ts +17 -12
  191. package/dist/generated/programs/bubblegum.d.ts.map +1 -1
  192. package/dist/generated/programs/bubblegum.js +11 -1
  193. package/dist/generated/programs/bubblegum.js.map +1 -1
  194. package/dist/generated/programs/index.d.ts +2 -1
  195. package/dist/generated/programs/mplTokenMetadata.d.ts +8 -8
  196. package/dist/generated/programs/mplTokenMetadata.d.ts.map +1 -1
  197. package/dist/generated/programs/mplTokenMetadata.js +7 -0
  198. package/dist/generated/programs/mplTokenMetadata.js.map +1 -1
  199. package/dist/generated/types/assetDataSchema.d.ts +4 -1
  200. package/dist/generated/types/assetDataSchema.d.ts.map +1 -1
  201. package/dist/generated/types/assetDataSchema.js +11 -0
  202. package/dist/generated/types/assetDataSchema.js.map +1 -1
  203. package/dist/generated/types/bubblegumEventType.d.ts +4 -1
  204. package/dist/generated/types/bubblegumEventType.d.ts.map +1 -1
  205. package/dist/generated/types/bubblegumEventType.js +11 -0
  206. package/dist/generated/types/bubblegumEventType.js.map +1 -1
  207. package/dist/generated/types/collection.d.ts +9 -3
  208. package/dist/generated/types/collection.d.ts.map +1 -1
  209. package/dist/generated/types/collection.js +7 -0
  210. package/dist/generated/types/collection.js.map +1 -1
  211. package/dist/generated/types/creator.d.ts +9 -7
  212. package/dist/generated/types/creator.d.ts.map +1 -1
  213. package/dist/generated/types/creator.js +7 -0
  214. package/dist/generated/types/creator.js.map +1 -1
  215. package/dist/generated/types/decompressibleState.d.ts +5 -1
  216. package/dist/generated/types/decompressibleState.d.ts.map +1 -1
  217. package/dist/generated/types/decompressibleState.js +12 -0
  218. package/dist/generated/types/decompressibleState.js.map +1 -1
  219. package/dist/generated/types/index.d.ts +2 -1
  220. package/dist/generated/types/instructionName.d.ts +4 -1
  221. package/dist/generated/types/instructionName.d.ts.map +1 -1
  222. package/dist/generated/types/instructionName.js +11 -0
  223. package/dist/generated/types/instructionName.js.map +1 -1
  224. package/dist/generated/types/leafSchema.d.ts +51 -13
  225. package/dist/generated/types/leafSchema.d.ts.map +1 -1
  226. package/dist/generated/types/leafSchema.js +7 -0
  227. package/dist/generated/types/leafSchema.js.map +1 -1
  228. package/dist/generated/types/metadataArgs.d.ts +19 -7
  229. package/dist/generated/types/metadataArgs.d.ts.map +1 -1
  230. package/dist/generated/types/metadataArgs.js +7 -0
  231. package/dist/generated/types/metadataArgs.js.map +1 -1
  232. package/dist/generated/types/metadataArgsV2.d.ts +14 -7
  233. package/dist/generated/types/metadataArgsV2.d.ts.map +1 -1
  234. package/dist/generated/types/metadataArgsV2.js +7 -0
  235. package/dist/generated/types/metadataArgsV2.js.map +1 -1
  236. package/dist/generated/types/tokenProgramVersion.d.ts +1 -1
  237. package/dist/generated/types/tokenProgramVersion.d.ts.map +1 -1
  238. package/dist/generated/types/tokenProgramVersion.js +8 -0
  239. package/dist/generated/types/tokenProgramVersion.js.map +1 -1
  240. package/dist/generated/types/tokenStandard.d.ts +5 -1
  241. package/dist/generated/types/tokenStandard.d.ts.map +1 -1
  242. package/dist/generated/types/tokenStandard.js +12 -0
  243. package/dist/generated/types/tokenStandard.js.map +1 -1
  244. package/dist/generated/types/updateArgs.d.ts +26 -7
  245. package/dist/generated/types/updateArgs.d.ts.map +1 -1
  246. package/dist/generated/types/updateArgs.js +7 -0
  247. package/dist/generated/types/updateArgs.js.map +1 -1
  248. package/dist/generated/types/useMethod.d.ts +1 -1
  249. package/dist/generated/types/useMethod.d.ts.map +1 -1
  250. package/dist/generated/types/useMethod.js +8 -0
  251. package/dist/generated/types/useMethod.js.map +1 -1
  252. package/dist/generated/types/uses.d.ts +16 -5
  253. package/dist/generated/types/uses.d.ts.map +1 -1
  254. package/dist/generated/types/uses.js +7 -0
  255. package/dist/generated/types/uses.js.map +1 -1
  256. package/dist/generated/types/version.d.ts +5 -1
  257. package/dist/generated/types/version.d.ts.map +1 -1
  258. package/dist/generated/types/version.js +12 -0
  259. package/dist/generated/types/version.js.map +1 -1
  260. package/dist/index.d.ts +1 -0
  261. package/package.json +8 -12
  262. package/src/generated/accounts/treeConfig.ts +36 -27
  263. package/src/generated/accounts/voucher.ts +30 -23
  264. package/src/generated/errors/bubblegum.ts +121 -154
  265. package/src/generated/instructions/burn.ts +163 -44
  266. package/src/generated/instructions/burnV2.ts +205 -64
  267. package/src/generated/instructions/cancelRedeem.ts +122 -41
  268. package/src/generated/instructions/closeTreeV2.ts +102 -44
  269. package/src/generated/instructions/collectV2.ts +34 -23
  270. package/src/generated/instructions/compress.ts +146 -45
  271. package/src/generated/instructions/createTree.ts +143 -42
  272. package/src/generated/instructions/createTreeV2.ts +134 -45
  273. package/src/generated/instructions/decompressV1.ts +136 -49
  274. package/src/generated/instructions/delegate.ts +165 -47
  275. package/src/generated/instructions/delegateAndFreezeV2.ts +197 -60
  276. package/src/generated/instructions/delegateV2.ts +195 -60
  277. package/src/generated/instructions/freezeV2.ts +199 -58
  278. package/src/generated/instructions/mintToCollectionV1.ts +196 -52
  279. package/src/generated/instructions/mintV1.ts +133 -40
  280. package/src/generated/instructions/mintV2.ts +192 -57
  281. package/src/generated/instructions/redeem.ts +178 -47
  282. package/src/generated/instructions/setAndVerifyCollection.ts +246 -69
  283. package/src/generated/instructions/setCollectionV2.ts +212 -73
  284. package/src/generated/instructions/setDecompressableState.ts +59 -31
  285. package/src/generated/instructions/setDecompressibleState.ts +60 -31
  286. package/src/generated/instructions/setNonTransferableV2.ts +190 -61
  287. package/src/generated/instructions/setTreeDelegate.ts +84 -31
  288. package/src/generated/instructions/thawAndRevokeV2.ts +185 -57
  289. package/src/generated/instructions/thawV2.ts +191 -58
  290. package/src/generated/instructions/transfer.ts +162 -44
  291. package/src/generated/instructions/transferV2.ts +191 -61
  292. package/src/generated/instructions/unverifyCollection.ts +239 -69
  293. package/src/generated/instructions/unverifyCreator.ts +187 -48
  294. package/src/generated/instructions/unverifyCreatorV2.ts +170 -55
  295. package/src/generated/instructions/updateAssetDataV2.ts +206 -59
  296. package/src/generated/instructions/updateMetadata.ts +210 -67
  297. package/src/generated/instructions/updateMetadataV2.ts +189 -63
  298. package/src/generated/instructions/verifyCollection.ts +239 -69
  299. package/src/generated/instructions/verifyCreator.ts +187 -48
  300. package/src/generated/instructions/verifyCreatorV2.ts +170 -55
  301. package/src/generated/pdas/assetId.ts +4 -3
  302. package/src/generated/pdas/bubblegumSigner.ts +6 -2
  303. package/src/generated/pdas/masterEdition.ts +4 -3
  304. package/src/generated/pdas/metadata.ts +4 -3
  305. package/src/generated/pdas/mintAuthority.ts +8 -4
  306. package/src/generated/pdas/treeConfig.ts +8 -4
  307. package/src/generated/pdas/voucher.ts +4 -3
  308. package/src/generated/programs/bubblegum.ts +146 -144
  309. package/src/generated/programs/mplTokenMetadata.ts +5 -10
  310. package/src/generated/types/assetDataSchema.ts +14 -8
  311. package/src/generated/types/bubblegumEventType.ts +13 -7
  312. package/src/generated/types/collection.ts +13 -8
  313. package/src/generated/types/creator.ts +11 -10
  314. package/src/generated/types/decompressibleState.ts +14 -7
  315. package/src/generated/types/instructionName.ts +46 -40
  316. package/src/generated/types/leafSchema.ts +59 -22
  317. package/src/generated/types/metadataArgs.ts +35 -27
  318. package/src/generated/types/metadataArgsV2.ts +23 -20
  319. package/src/generated/types/tokenProgramVersion.ts +10 -7
  320. package/src/generated/types/tokenStandard.ts +16 -9
  321. package/src/generated/types/updateArgs.ts +36 -15
  322. package/src/generated/types/useMethod.ts +11 -8
  323. package/src/generated/types/uses.ts +24 -11
  324. package/src/generated/types/version.ts +14 -7
@@ -1 +1 @@
1
- {"version":3,"file":"unverifyCreator.js","names":[],"sources":["../../../src/generated/instructions/unverifyCreator.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport type {\n AccountMeta,\n AccountSignerMeta,\n Address,\n Codec,\n Decoder,\n Encoder,\n Instruction,\n InstructionWithAccounts,\n InstructionWithData,\n ReadonlyAccount,\n ReadonlySignerAccount,\n ReadonlyUint8Array,\n TransactionSigner,\n WritableAccount,\n} from \"@solana/kit\";\nimport type { ResolvedInstructionAccount } from \"@solana/program-client-core\";\nimport type { MetadataArgs, MetadataArgsArgs } from \"../types/index.js\";\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n} from \"@solana/kit\";\nimport {\n getAccountMetaFactory,\n getAddressFromResolvedInstructionAccount,\n} from \"@solana/program-client-core\";\nimport { findTreeConfigPda } from \"../pdas/index.js\";\nimport { BUBBLEGUM_PROGRAM_ADDRESS } from \"../programs/index.js\";\nimport {\n getMetadataArgsDecoder,\n getMetadataArgsEncoder,\n} from \"../types/index.js\";\n\nexport const UNVERIFY_CREATOR_DISCRIMINATOR: ReadonlyUint8Array =\n new Uint8Array([107, 178, 57, 39, 105, 115, 112, 152]);\n\nexport function getUnverifyCreatorDiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UNVERIFY_CREATOR_DISCRIMINATOR,\n );\n}\n\nexport type UnverifyCreatorInstruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountLeafOwner extends string | AccountMeta<string> = string,\n TAccountLeafDelegate extends string | AccountMeta<string> = string,\n TAccountMerkleTree extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountLogWrapper extends\n | string\n | AccountMeta<string> = \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\",\n TAccountCompressionProgram extends\n | string\n | AccountMeta<string> = \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\",\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? ReadonlyAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountLeafOwner extends string\n ? ReadonlyAccount<TAccountLeafOwner>\n : TAccountLeafOwner,\n TAccountLeafDelegate extends string\n ? ReadonlyAccount<TAccountLeafDelegate>\n : TAccountLeafDelegate,\n TAccountMerkleTree extends string\n ? WritableAccount<TAccountMerkleTree>\n : TAccountMerkleTree,\n TAccountPayer extends string\n ? ReadonlySignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountCreator extends string\n ? ReadonlySignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountLogWrapper extends string\n ? ReadonlyAccount<TAccountLogWrapper>\n : TAccountLogWrapper,\n TAccountCompressionProgram extends string\n ? ReadonlyAccount<TAccountCompressionProgram>\n : TAccountCompressionProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport interface UnverifyCreatorInstructionData {\n discriminator: ReadonlyUint8Array;\n root: number[];\n dataHash: number[];\n creatorHash: number[];\n nonce: bigint;\n index: number;\n message: MetadataArgs;\n}\n\nexport interface UnverifyCreatorInstructionDataArgs {\n root: number[];\n dataHash: number[];\n creatorHash: number[];\n nonce: number | bigint;\n index: number;\n message: MetadataArgsArgs;\n}\n\nexport function getUnverifyCreatorInstructionDataEncoder(): Encoder<UnverifyCreatorInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"root\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"dataHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"creatorHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"nonce\", getU64Encoder()],\n [\"index\", getU32Encoder()],\n [\"message\", getMetadataArgsEncoder()],\n ]),\n (value) => ({ ...value, discriminator: UNVERIFY_CREATOR_DISCRIMINATOR }),\n );\n}\n\nexport function getUnverifyCreatorInstructionDataDecoder(): Decoder<UnverifyCreatorInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"root\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"dataHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"creatorHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"nonce\", getU64Decoder()],\n [\"index\", getU32Decoder()],\n [\"message\", getMetadataArgsDecoder()],\n ]);\n}\n\nexport function getUnverifyCreatorInstructionDataCodec(): Codec<\n UnverifyCreatorInstructionDataArgs,\n UnverifyCreatorInstructionData\n> {\n return combineCodec(\n getUnverifyCreatorInstructionDataEncoder(),\n getUnverifyCreatorInstructionDataDecoder(),\n );\n}\n\nexport interface UnverifyCreatorAsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountPayer extends string = string,\n TAccountCreator extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> {\n treeAuthority?: Address<TAccountTreeAuthority>;\n leafOwner: Address<TAccountLeafOwner>;\n leafDelegate: Address<TAccountLeafDelegate>;\n merkleTree: Address<TAccountMerkleTree>;\n payer: TransactionSigner<TAccountPayer>;\n creator: TransactionSigner<TAccountCreator>;\n logWrapper?: Address<TAccountLogWrapper>;\n compressionProgram?: Address<TAccountCompressionProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n root: UnverifyCreatorInstructionDataArgs[\"root\"];\n dataHash: UnverifyCreatorInstructionDataArgs[\"dataHash\"];\n creatorHash: UnverifyCreatorInstructionDataArgs[\"creatorHash\"];\n nonce: UnverifyCreatorInstructionDataArgs[\"nonce\"];\n index: UnverifyCreatorInstructionDataArgs[\"index\"];\n message: UnverifyCreatorInstructionDataArgs[\"message\"];\n}\n\nexport async function getUnverifyCreatorInstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountPayer extends string,\n TAccountCreator extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: UnverifyCreatorAsyncInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UnverifyCreatorInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: false },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: false },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.treeAuthority.value) {\n accounts.treeAuthority.value = await findTreeConfigPda({\n merkleTree: getAddressFromResolvedInstructionAccount(\n \"merkleTree\",\n accounts.merkleTree.value,\n ),\n });\n }\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"creator\", accounts.creator),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getUnverifyCreatorInstructionDataEncoder().encode(\n args as UnverifyCreatorInstructionDataArgs,\n ),\n programAddress,\n } as UnverifyCreatorInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport interface UnverifyCreatorInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountPayer extends string = string,\n TAccountCreator extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> {\n treeAuthority: Address<TAccountTreeAuthority>;\n leafOwner: Address<TAccountLeafOwner>;\n leafDelegate: Address<TAccountLeafDelegate>;\n merkleTree: Address<TAccountMerkleTree>;\n payer: TransactionSigner<TAccountPayer>;\n creator: TransactionSigner<TAccountCreator>;\n logWrapper?: Address<TAccountLogWrapper>;\n compressionProgram?: Address<TAccountCompressionProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n root: UnverifyCreatorInstructionDataArgs[\"root\"];\n dataHash: UnverifyCreatorInstructionDataArgs[\"dataHash\"];\n creatorHash: UnverifyCreatorInstructionDataArgs[\"creatorHash\"];\n nonce: UnverifyCreatorInstructionDataArgs[\"nonce\"];\n index: UnverifyCreatorInstructionDataArgs[\"index\"];\n message: UnverifyCreatorInstructionDataArgs[\"message\"];\n}\n\nexport function getUnverifyCreatorInstruction<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountPayer extends string,\n TAccountCreator extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: UnverifyCreatorInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): UnverifyCreatorInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: false },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: false },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"creator\", accounts.creator),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getUnverifyCreatorInstructionDataEncoder().encode(\n args as UnverifyCreatorInstructionDataArgs,\n ),\n programAddress,\n } as UnverifyCreatorInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport interface ParsedUnverifyCreatorInstruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> {\n programAddress: Address<TProgram>;\n accounts: {\n treeAuthority: TAccountMetas[0];\n leafOwner: TAccountMetas[1];\n leafDelegate: TAccountMetas[2];\n merkleTree: TAccountMetas[3];\n payer: TAccountMetas[4];\n creator: TAccountMetas[5];\n logWrapper: TAccountMetas[6];\n compressionProgram: TAccountMetas[7];\n systemProgram: TAccountMetas[8];\n };\n data: UnverifyCreatorInstructionData;\n}\n\nexport function parseUnverifyCreatorInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUnverifyCreatorInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 9,\n },\n );\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n leafOwner: getNextAccount(),\n leafDelegate: getNextAccount(),\n merkleTree: getNextAccount(),\n payer: getNextAccount(),\n creator: getNextAccount(),\n logWrapper: getNextAccount(),\n compressionProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getUnverifyCreatorInstructionDataDecoder().decode(instruction.data),\n };\n}\n"],"mappings":";;;;;;AAyDA,MAAa,iCACX,IAAI,WAAW;CAAC;CAAK;CAAK;CAAI;CAAI;CAAK;CAAK;CAAK;AAAG,CAAC;AAEvD,SAAgB,uCAA2D;CACzE,OAAO,eAAe,gBAAgB,GAAG,CAAC,CAAC,CAAC,OAC1C,8BACF;AACF;AA4EA,SAAgB,2CAAwF;CACtG,OAAO,iBACL,iBAAiB;EACf,CAAC,iBAAiB,eAAe,gBAAgB,GAAG,CAAC,CAAC;EACtD,CAAC,QAAQ,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EACtD,CAAC,YAAY,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC1D,CAAC,eAAe,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC7D,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,WAAW,uBAAuB,CAAC;CACtC,CAAC,IACA,WAAW;EAAE,GAAG;EAAO,eAAe;CAA+B,EACxE;AACF;AAEA,SAAgB,2CAAoF;CAClG,OAAO,iBAAiB;EACtB,CAAC,iBAAiB,eAAe,gBAAgB,GAAG,CAAC,CAAC;EACtD,CAAC,QAAQ,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EACtD,CAAC,YAAY,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC1D,CAAC,eAAe,gBAAgB,aAAa,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;EAC7D,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,SAAS,cAAc,CAAC;EACzB,CAAC,WAAW,uBAAuB,CAAC;CACtC,CAAC;AACH;AAE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SAAS,KAAK;GACtC,eAAe,WAAW,SAAS,OAAO;GAC1C,eAAe,cAAc,SAAS,UAAU;GAChD,eAAe,sBAAsB,SAAS,kBAAkB;GAChE,eAAe,iBAAiB,SAAS,aAAa;EACxD;EACA,MAAM,yCAAyC,CAAC,CAAC,OAC/C,IACF;EACA;CACF,CAWC;AACH;AAqBA,SAAgB,gCAId,aAG2D;CAC3D,IAAI,YAAY,SAAS,SAAS,GAChC,MAAM,IAAI,YACR,2DACA;EACE,oBAAoB,YAAY,SAAS;EACzC,sBAAsB;CACxB,CACF;CAEF,IAAI,eAAe;CACnB,MAAM,uBAAuB;EAC3B,MAAM,cAAe,YAAY,SAA2B;EAC5D,gBAAgB;EAChB,OAAO;CACT;CACA,OAAO;EACL,gBAAgB,YAAY;EAC5B,UAAU;GACR,eAAe,eAAe;GAC9B,WAAW,eAAe;GAC1B,cAAc,eAAe;GAC7B,YAAY,eAAe;GAC3B,OAAO,eAAe;GACtB,SAAS,eAAe;GACxB,YAAY,eAAe;GAC3B,oBAAoB,eAAe;GACnC,eAAe,eAAe;EAChC;EACA,MAAM,yCAAyC,CAAC,CAAC,OAAO,YAAY,IAAI;CAC1E;AACF"}
1
+ {"version":3,"file":"unverifyCreator.js","names":[],"sources":["../../../src/generated/instructions/unverifyCreator.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"@solana/kit\";\nimport {\n getAccountMetaFactory,\n getAddressFromResolvedInstructionAccount,\n type ResolvedInstructionAccount,\n} from \"@solana/program-client-core\";\nimport { findTreeConfigPda } from \"../pdas/index.js\";\nimport { BUBBLEGUM_PROGRAM_ADDRESS } from \"../programs/index.js\";\nimport {\n getMetadataArgsDecoder,\n getMetadataArgsEncoder,\n type MetadataArgs,\n type MetadataArgsArgs,\n} from \"../types/index.js\";\n\nexport const UNVERIFY_CREATOR_DISCRIMINATOR: ReadonlyUint8Array =\n new Uint8Array([107, 178, 57, 39, 105, 115, 112, 152]);\n\nexport function getUnverifyCreatorDiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UNVERIFY_CREATOR_DISCRIMINATOR,\n );\n}\n\nexport type UnverifyCreatorInstruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountLeafOwner extends string | AccountMeta<string> = string,\n TAccountLeafDelegate extends string | AccountMeta<string> = string,\n TAccountMerkleTree extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountLogWrapper extends string | AccountMeta<string> =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\",\n TAccountCompressionProgram extends string | AccountMeta<string> =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\",\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? ReadonlyAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountLeafOwner extends string\n ? ReadonlyAccount<TAccountLeafOwner>\n : TAccountLeafOwner,\n TAccountLeafDelegate extends string\n ? ReadonlyAccount<TAccountLeafDelegate>\n : TAccountLeafDelegate,\n TAccountMerkleTree extends string\n ? WritableAccount<TAccountMerkleTree>\n : TAccountMerkleTree,\n TAccountPayer extends string\n ? ReadonlySignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountCreator extends string\n ? ReadonlySignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountLogWrapper extends string\n ? ReadonlyAccount<TAccountLogWrapper>\n : TAccountLogWrapper,\n TAccountCompressionProgram extends string\n ? ReadonlyAccount<TAccountCompressionProgram>\n : TAccountCompressionProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UnverifyCreatorInstructionData = {\n discriminator: ReadonlyUint8Array;\n /**\n * Current Merkle root of the tree, used together with the Merkle proof\n * (passed as remaining accounts) to verify the leaf being operated on.\n */\n root: Array<number>;\n /**\n * Keccak256 hash of the leaf's metadata, used together with `root` to\n * verify the leaf before it is modified.\n */\n dataHash: Array<number>;\n /**\n * Keccak256 hash of the leaf's creators array, used together with\n * `root` to verify the leaf before it is modified.\n */\n creatorHash: Array<number>;\n /**\n * Tree-scoped nonce identifying the leaf, equal to the tree's\n * `numMinted` at the time the leaf was minted. Combined with the tree\n * address to derive the leaf's asset id.\n */\n nonce: bigint;\n /**\n * Position of the leaf within the Merkle tree, used with the Merkle\n * proof to locate and verify the leaf.\n */\n index: number;\n /**\n * The leaf's current metadata args, verified against `dataHash` before\n * `creator` is marked unverified.\n */\n message: MetadataArgs;\n};\n\nexport type UnverifyCreatorInstructionDataArgs = {\n /**\n * Current Merkle root of the tree, used together with the Merkle proof\n * (passed as remaining accounts) to verify the leaf being operated on.\n */\n root: Array<number>;\n /**\n * Keccak256 hash of the leaf's metadata, used together with `root` to\n * verify the leaf before it is modified.\n */\n dataHash: Array<number>;\n /**\n * Keccak256 hash of the leaf's creators array, used together with\n * `root` to verify the leaf before it is modified.\n */\n creatorHash: Array<number>;\n /**\n * Tree-scoped nonce identifying the leaf, equal to the tree's\n * `numMinted` at the time the leaf was minted. Combined with the tree\n * address to derive the leaf's asset id.\n */\n nonce: number | bigint;\n /**\n * Position of the leaf within the Merkle tree, used with the Merkle\n * proof to locate and verify the leaf.\n */\n index: number;\n /**\n * The leaf's current metadata args, verified against `dataHash` before\n * `creator` is marked unverified.\n */\n message: MetadataArgsArgs;\n};\n\nexport function getUnverifyCreatorInstructionDataEncoder(): Encoder<UnverifyCreatorInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"root\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"dataHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"creatorHash\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\"nonce\", getU64Encoder()],\n [\"index\", getU32Encoder()],\n [\"message\", getMetadataArgsEncoder()],\n ]),\n (value) => ({ ...value, discriminator: UNVERIFY_CREATOR_DISCRIMINATOR }),\n );\n}\n\nexport function getUnverifyCreatorInstructionDataDecoder(): Decoder<UnverifyCreatorInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"root\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"dataHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"creatorHash\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\"nonce\", getU64Decoder()],\n [\"index\", getU32Decoder()],\n [\"message\", getMetadataArgsDecoder()],\n ]);\n}\n\nexport function getUnverifyCreatorInstructionDataCodec(): Codec<\n UnverifyCreatorInstructionDataArgs,\n UnverifyCreatorInstructionData\n> {\n return combineCodec(\n getUnverifyCreatorInstructionDataEncoder(),\n getUnverifyCreatorInstructionDataDecoder(),\n );\n}\n\nexport type UnverifyCreatorAsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountPayer extends string = string,\n TAccountCreator extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority?: Address<TAccountTreeAuthority>;\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: Address<TAccountLeafOwner>;\n /**\n * Delegate authority for the leaf; defaults to the leaf owner when no\n * delegate is set.\n */\n leafDelegate: Address<TAccountLeafDelegate>;\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: Address<TAccountMerkleTree>;\n /** Account that pays for the transaction and any account rent. */\n payer: TransactionSigner<TAccountPayer>;\n /**\n * One of the leaf's creators, whose verified flag is being changed by\n * this instruction. Must sign to (un)verify itself.\n */\n creator: TransactionSigner<TAccountCreator>;\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper?: Address<TAccountLogWrapper>;\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram?: Address<TAccountCompressionProgram>;\n /** The Solana System program. */\n systemProgram?: Address<TAccountSystemProgram>;\n root: UnverifyCreatorInstructionDataArgs[\"root\"];\n dataHash: UnverifyCreatorInstructionDataArgs[\"dataHash\"];\n creatorHash: UnverifyCreatorInstructionDataArgs[\"creatorHash\"];\n nonce: UnverifyCreatorInstructionDataArgs[\"nonce\"];\n index: UnverifyCreatorInstructionDataArgs[\"index\"];\n message: UnverifyCreatorInstructionDataArgs[\"message\"];\n};\n\n/**\n * Unverifies a creator from a leaf node.\n *\n * The named `creator` must sign to remove their own verified flag from\n * the leaf's creators array.\n */\nexport async function getUnverifyCreatorInstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountPayer extends string,\n TAccountCreator extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: UnverifyCreatorAsyncInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UnverifyCreatorInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: false },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: false },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.treeAuthority.value) {\n accounts.treeAuthority.value = await findTreeConfigPda({\n merkleTree: getAddressFromResolvedInstructionAccount(\n \"merkleTree\",\n accounts.merkleTree.value,\n ),\n });\n }\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"creator\", accounts.creator),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getUnverifyCreatorInstructionDataEncoder().encode(\n args as UnverifyCreatorInstructionDataArgs,\n ),\n programAddress,\n } as UnverifyCreatorInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type UnverifyCreatorInput<\n TAccountTreeAuthority extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountPayer extends string = string,\n TAccountCreator extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority: Address<TAccountTreeAuthority>;\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: Address<TAccountLeafOwner>;\n /**\n * Delegate authority for the leaf; defaults to the leaf owner when no\n * delegate is set.\n */\n leafDelegate: Address<TAccountLeafDelegate>;\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: Address<TAccountMerkleTree>;\n /** Account that pays for the transaction and any account rent. */\n payer: TransactionSigner<TAccountPayer>;\n /**\n * One of the leaf's creators, whose verified flag is being changed by\n * this instruction. Must sign to (un)verify itself.\n */\n creator: TransactionSigner<TAccountCreator>;\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper?: Address<TAccountLogWrapper>;\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram?: Address<TAccountCompressionProgram>;\n /** The Solana System program. */\n systemProgram?: Address<TAccountSystemProgram>;\n root: UnverifyCreatorInstructionDataArgs[\"root\"];\n dataHash: UnverifyCreatorInstructionDataArgs[\"dataHash\"];\n creatorHash: UnverifyCreatorInstructionDataArgs[\"creatorHash\"];\n nonce: UnverifyCreatorInstructionDataArgs[\"nonce\"];\n index: UnverifyCreatorInstructionDataArgs[\"index\"];\n message: UnverifyCreatorInstructionDataArgs[\"message\"];\n};\n\n/**\n * Unverifies a creator from a leaf node.\n *\n * The named `creator` must sign to remove their own verified flag from\n * the leaf's creators array.\n */\nexport function getUnverifyCreatorInstruction<\n TAccountTreeAuthority extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountPayer extends string,\n TAccountCreator extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: UnverifyCreatorInput<\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): UnverifyCreatorInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: false },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: false },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"creator\", accounts.creator),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getUnverifyCreatorInstructionDataEncoder().encode(\n args as UnverifyCreatorInstructionDataArgs,\n ),\n programAddress,\n } as UnverifyCreatorInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountPayer,\n TAccountCreator,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedUnverifyCreatorInstruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority: TAccountMetas[0];\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: TAccountMetas[1];\n /**\n * Delegate authority for the leaf; defaults to the leaf owner when no\n * delegate is set.\n */\n leafDelegate: TAccountMetas[2];\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: TAccountMetas[3];\n /** Account that pays for the transaction and any account rent. */\n payer: TAccountMetas[4];\n /**\n * One of the leaf's creators, whose verified flag is being changed by\n * this instruction. Must sign to (un)verify itself.\n */\n creator: TAccountMetas[5];\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper: TAccountMetas[6];\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram: TAccountMetas[7];\n /** The Solana System program. */\n systemProgram: TAccountMetas[8];\n };\n data: UnverifyCreatorInstructionData;\n};\n\nexport function parseUnverifyCreatorInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUnverifyCreatorInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 9,\n },\n );\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n leafOwner: getNextAccount(),\n leafDelegate: getNextAccount(),\n merkleTree: getNextAccount(),\n payer: getNextAccount(),\n creator: getNextAccount(),\n logWrapper: getNextAccount(),\n compressionProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getUnverifyCreatorInstructionDataDecoder().decode(instruction.data),\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAwDA,MAAa,iCACX,IAAI,WAAW;CAAC;CAAK;CAAK;CAAI;CAAI;CAAK;CAAK;CAAK;AAAG,CAAC;AAEvD,SAAgB,uCAA2D;CACzE,OAAO,eAAe,gBAAgB,G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,2DACA;EACE,oBAAoB,YAAY,SAAS;EACzC,sBAAsB;CACxB,CACF;CAEF,IAAI,eAAe;CACnB,MAAM,uBAAuB;EAC3B,MAAM,cAAe,YAAY,SAA2B;EAC5D,gBAAgB;EAChB,OAAO;CACT;CACA,OAAO;EACL,gBAAgB,YAAY;EAC5B,UAAU;GACR,eAAe,eAAe;GAC9B,WAAW,eAAe;GAC1B,cAAc,eAAe;GAC7B,YAAY,eAAe;GAC3B,OAAO,eAAe;GACtB,SAAS,eAAe;GACxB,YAAY,eAAe;GAC3B,oBAAoB,eAAe;GACnC,eAAe,eAAe;EAChC;EACA,MAAM,yCAAyC,CAAC,CAAC,OAAO,YAAY,IAAI;CAC1E;AACF"}
@@ -1,42 +1,112 @@
1
1
  import { MetadataArgsV2, MetadataArgsV2Args } from "../types/metadataArgsV2.js";
2
+ import "../types/index.js";
2
3
  import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/bubblegum.js";
4
+ import "../programs/index.js";
3
5
  import { AccountMeta, AccountSignerMeta, Address, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, Option, OptionOrNullable, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from "@solana/kit";
4
-
5
6
  //#region src/generated/instructions/unverifyCreatorV2.d.ts
6
7
  declare const UNVERIFY_CREATOR_V2_DISCRIMINATOR: ReadonlyUint8Array;
7
8
  declare function getUnverifyCreatorV2DiscriminatorBytes(): ReadonlyUint8Array;
8
9
  type UnverifyCreatorV2Instruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountTreeAuthority extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountCreator extends string | AccountMeta<string> = string, TAccountLeafOwner extends string | AccountMeta<string> = string, TAccountLeafDelegate extends string | AccountMeta<string> = string, TAccountMerkleTree extends string | AccountMeta<string> = string, TAccountLogWrapper extends string | AccountMeta<string> = "mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3", TAccountCompressionProgram extends string | AccountMeta<string> = "mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountTreeAuthority extends string ? WritableAccount<TAccountTreeAuthority> : TAccountTreeAuthority, TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountCreator extends string ? ReadonlySignerAccount<TAccountCreator> & AccountSignerMeta<TAccountCreator> : TAccountCreator, TAccountLeafOwner extends string ? ReadonlyAccount<TAccountLeafOwner> : TAccountLeafOwner, TAccountLeafDelegate extends string ? ReadonlyAccount<TAccountLeafDelegate> : TAccountLeafDelegate, TAccountMerkleTree extends string ? WritableAccount<TAccountMerkleTree> : TAccountMerkleTree, TAccountLogWrapper extends string ? ReadonlyAccount<TAccountLogWrapper> : TAccountLogWrapper, TAccountCompressionProgram extends string ? ReadonlyAccount<TAccountCompressionProgram> : TAccountCompressionProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts]>;
9
- interface UnverifyCreatorV2InstructionData {
10
+ type UnverifyCreatorV2InstructionData = {
10
11
  discriminator: ReadonlyUint8Array;
11
- root: number[];
12
- assetDataHash: Option<number[]>;
12
+ /**
13
+ * Current Merkle root of the tree, used together with the Merkle proof
14
+ * (passed as remaining accounts) to verify the leaf being operated on.
15
+ */
16
+ root: Array<number>;
17
+ /**
18
+ * Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
19
+ * carried through unchanged by this instruction.
20
+ */
21
+ assetDataHash: Option<Array<number>>;
22
+ /**
23
+ * Expected current status flags (e.g. frozen, non-transferable) of the
24
+ * `LeafSchema` V2 leaf, verified before this instruction updates them.
25
+ */
13
26
  flags: Option<number>;
27
+ /**
28
+ * Tree-scoped nonce identifying the leaf, equal to the tree's
29
+ * `numMinted` at the time the leaf was minted. Combined with the tree
30
+ * address to derive the leaf's asset id.
31
+ */
14
32
  nonce: bigint;
33
+ /**
34
+ * Position of the leaf within the Merkle tree, used with the Merkle
35
+ * proof to locate and verify the leaf.
36
+ */
15
37
  index: number;
38
+ /**
39
+ * The leaf's current `MetadataArgsV2`, used to reconstruct and verify
40
+ * the leaf before `creator` is marked unverified.
41
+ */
16
42
  message: MetadataArgsV2;
17
- }
18
- interface UnverifyCreatorV2InstructionDataArgs {
19
- root: number[];
20
- assetDataHash: OptionOrNullable<number[]>;
43
+ };
44
+ type UnverifyCreatorV2InstructionDataArgs = {
45
+ /**
46
+ * Current Merkle root of the tree, used together with the Merkle proof
47
+ * (passed as remaining accounts) to verify the leaf being operated on.
48
+ */
49
+ root: Array<number>;
50
+ /**
51
+ * Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
52
+ * carried through unchanged by this instruction.
53
+ */
54
+ assetDataHash: OptionOrNullable<Array<number>>;
55
+ /**
56
+ * Expected current status flags (e.g. frozen, non-transferable) of the
57
+ * `LeafSchema` V2 leaf, verified before this instruction updates them.
58
+ */
21
59
  flags: OptionOrNullable<number>;
60
+ /**
61
+ * Tree-scoped nonce identifying the leaf, equal to the tree's
62
+ * `numMinted` at the time the leaf was minted. Combined with the tree
63
+ * address to derive the leaf's asset id.
64
+ */
22
65
  nonce: number | bigint;
66
+ /**
67
+ * Position of the leaf within the Merkle tree, used with the Merkle
68
+ * proof to locate and verify the leaf.
69
+ */
23
70
  index: number;
71
+ /**
72
+ * The leaf's current `MetadataArgsV2`, used to reconstruct and verify
73
+ * the leaf before `creator` is marked unverified.
74
+ */
24
75
  message: MetadataArgsV2Args;
25
- }
76
+ };
26
77
  declare function getUnverifyCreatorV2InstructionDataEncoder(): Encoder<UnverifyCreatorV2InstructionDataArgs>;
27
78
  declare function getUnverifyCreatorV2InstructionDataDecoder(): Decoder<UnverifyCreatorV2InstructionData>;
28
79
  declare function getUnverifyCreatorV2InstructionDataCodec(): Codec<UnverifyCreatorV2InstructionDataArgs, UnverifyCreatorV2InstructionData>;
29
- interface UnverifyCreatorV2AsyncInput<TAccountTreeAuthority extends string = string, TAccountPayer extends string = string, TAccountCreator extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountSystemProgram extends string = string> {
80
+ type UnverifyCreatorV2AsyncInput<TAccountTreeAuthority extends string = string, TAccountPayer extends string = string, TAccountCreator extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountSystemProgram extends string = string> = {
81
+ /**
82
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
83
+ * as the tree's authority for CPIs into the compression program.
84
+ */
30
85
  treeAuthority?: Address<TAccountTreeAuthority>;
86
+ /** Account that pays for the transaction and any account rent. */
31
87
  payer: TransactionSigner<TAccountPayer>;
32
- /** Optional creator, defaults to `payer` */
88
+ /** Optional creator, defaults to `payer`. */
33
89
  creator?: TransactionSigner<TAccountCreator>;
90
+ /** Owner of the compressed NFT leaf being operated on. */
34
91
  leafOwner: Address<TAccountLeafOwner>;
35
- /** Defaults to `leaf_owner` */
92
+ /** Defaults to `leafOwner`. */
36
93
  leafDelegate?: Address<TAccountLeafDelegate>;
94
+ /**
95
+ * The concurrent Merkle tree account storing the compressed leaves,
96
+ * owned by the account compression program.
97
+ */
37
98
  merkleTree: Address<TAccountMerkleTree>;
99
+ /**
100
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
101
+ * can reconstruct the tree.
102
+ */
38
103
  logWrapper?: Address<TAccountLogWrapper>;
104
+ /**
105
+ * The SPL/MPL Account Compression program that owns and manages the
106
+ * Merkle tree.
107
+ */
39
108
  compressionProgram?: Address<TAccountCompressionProgram>;
109
+ /** The Solana System program. */
40
110
  systemProgram?: Address<TAccountSystemProgram>;
41
111
  root: UnverifyCreatorV2InstructionDataArgs["root"];
42
112
  assetDataHash: UnverifyCreatorV2InstructionDataArgs["assetDataHash"];
@@ -44,21 +114,46 @@ interface UnverifyCreatorV2AsyncInput<TAccountTreeAuthority extends string = str
44
114
  nonce: UnverifyCreatorV2InstructionDataArgs["nonce"];
45
115
  index: UnverifyCreatorV2InstructionDataArgs["index"];
46
116
  message: UnverifyCreatorV2InstructionDataArgs["message"];
47
- }
117
+ };
118
+ /**
119
+ * Unverifies a creator from a `LeafSchema` V2 leaf node.
120
+ *
121
+ * The named `creator` must sign to remove their own verified flag from
122
+ * the leaf's `MetadataArgsV2` creators array.
123
+ */
48
124
  declare function getUnverifyCreatorV2InstructionAsync<TAccountTreeAuthority extends string, TAccountPayer extends string, TAccountCreator extends string, TAccountLeafOwner extends string, TAccountLeafDelegate extends string, TAccountMerkleTree extends string, TAccountLogWrapper extends string, TAccountCompressionProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: UnverifyCreatorV2AsyncInput<TAccountTreeAuthority, TAccountPayer, TAccountCreator, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>, config?: {
49
125
  programAddress?: TProgramAddress;
50
126
  }): Promise<UnverifyCreatorV2Instruction<TProgramAddress, TAccountTreeAuthority, TAccountPayer, TAccountCreator, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>>;
51
- interface UnverifyCreatorV2Input<TAccountTreeAuthority extends string = string, TAccountPayer extends string = string, TAccountCreator extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountSystemProgram extends string = string> {
127
+ type UnverifyCreatorV2Input<TAccountTreeAuthority extends string = string, TAccountPayer extends string = string, TAccountCreator extends string = string, TAccountLeafOwner extends string = string, TAccountLeafDelegate extends string = string, TAccountMerkleTree extends string = string, TAccountLogWrapper extends string = string, TAccountCompressionProgram extends string = string, TAccountSystemProgram extends string = string> = {
128
+ /**
129
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
130
+ * as the tree's authority for CPIs into the compression program.
131
+ */
52
132
  treeAuthority: Address<TAccountTreeAuthority>;
133
+ /** Account that pays for the transaction and any account rent. */
53
134
  payer: TransactionSigner<TAccountPayer>;
54
- /** Optional creator, defaults to `payer` */
135
+ /** Optional creator, defaults to `payer`. */
55
136
  creator?: TransactionSigner<TAccountCreator>;
137
+ /** Owner of the compressed NFT leaf being operated on. */
56
138
  leafOwner: Address<TAccountLeafOwner>;
57
- /** Defaults to `leaf_owner` */
139
+ /** Defaults to `leafOwner`. */
58
140
  leafDelegate?: Address<TAccountLeafDelegate>;
141
+ /**
142
+ * The concurrent Merkle tree account storing the compressed leaves,
143
+ * owned by the account compression program.
144
+ */
59
145
  merkleTree: Address<TAccountMerkleTree>;
146
+ /**
147
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
148
+ * can reconstruct the tree.
149
+ */
60
150
  logWrapper?: Address<TAccountLogWrapper>;
151
+ /**
152
+ * The SPL/MPL Account Compression program that owns and manages the
153
+ * Merkle tree.
154
+ */
61
155
  compressionProgram?: Address<TAccountCompressionProgram>;
156
+ /** The Solana System program. */
62
157
  systemProgram?: Address<TAccountSystemProgram>;
63
158
  root: UnverifyCreatorV2InstructionDataArgs["root"];
64
159
  assetDataHash: UnverifyCreatorV2InstructionDataArgs["assetDataHash"];
@@ -66,25 +161,52 @@ interface UnverifyCreatorV2Input<TAccountTreeAuthority extends string = string,
66
161
  nonce: UnverifyCreatorV2InstructionDataArgs["nonce"];
67
162
  index: UnverifyCreatorV2InstructionDataArgs["index"];
68
163
  message: UnverifyCreatorV2InstructionDataArgs["message"];
69
- }
164
+ };
165
+ /**
166
+ * Unverifies a creator from a `LeafSchema` V2 leaf node.
167
+ *
168
+ * The named `creator` must sign to remove their own verified flag from
169
+ * the leaf's `MetadataArgsV2` creators array.
170
+ */
70
171
  declare function getUnverifyCreatorV2Instruction<TAccountTreeAuthority extends string, TAccountPayer extends string, TAccountCreator extends string, TAccountLeafOwner extends string, TAccountLeafDelegate extends string, TAccountMerkleTree extends string, TAccountLogWrapper extends string, TAccountCompressionProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS>(input: UnverifyCreatorV2Input<TAccountTreeAuthority, TAccountPayer, TAccountCreator, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>, config?: {
71
172
  programAddress?: TProgramAddress;
72
173
  }): UnverifyCreatorV2Instruction<TProgramAddress, TAccountTreeAuthority, TAccountPayer, TAccountCreator, TAccountLeafOwner, TAccountLeafDelegate, TAccountMerkleTree, TAccountLogWrapper, TAccountCompressionProgram, TAccountSystemProgram>;
73
- interface ParsedUnverifyCreatorV2Instruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> {
174
+ type ParsedUnverifyCreatorV2Instruction<TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
74
175
  programAddress: Address<TProgram>;
75
176
  accounts: {
177
+ /**
178
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
179
+ * as the tree's authority for CPIs into the compression program.
180
+ */
76
181
  treeAuthority: TAccountMetas[0];
77
- payer: TAccountMetas[1]; /** Optional creator, defaults to `payer` */
182
+ /** Account that pays for the transaction and any account rent. */
183
+ payer: TAccountMetas[1];
184
+ /** Optional creator, defaults to `payer`. */
78
185
  creator?: TAccountMetas[2] | undefined;
79
- leafOwner: TAccountMetas[3]; /** Defaults to `leaf_owner` */
186
+ /** Owner of the compressed NFT leaf being operated on. */
187
+ leafOwner: TAccountMetas[3];
188
+ /** Defaults to `leafOwner`. */
80
189
  leafDelegate?: TAccountMetas[4] | undefined;
190
+ /**
191
+ * The concurrent Merkle tree account storing the compressed leaves,
192
+ * owned by the account compression program.
193
+ */
81
194
  merkleTree: TAccountMetas[5];
195
+ /**
196
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
197
+ * can reconstruct the tree.
198
+ */
82
199
  logWrapper: TAccountMetas[6];
200
+ /**
201
+ * The SPL/MPL Account Compression program that owns and manages the
202
+ * Merkle tree.
203
+ */
83
204
  compressionProgram: TAccountMetas[7];
205
+ /** The Solana System program. */
84
206
  systemProgram: TAccountMetas[8];
85
207
  };
86
208
  data: UnverifyCreatorV2InstructionData;
87
- }
209
+ };
88
210
  declare function parseUnverifyCreatorV2Instruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedUnverifyCreatorV2Instruction<TProgram, TAccountMetas>;
89
211
  //#endregion
90
212
  export { ParsedUnverifyCreatorV2Instruction, UNVERIFY_CREATOR_V2_DISCRIMINATOR, UnverifyCreatorV2AsyncInput, UnverifyCreatorV2Input, UnverifyCreatorV2Instruction, UnverifyCreatorV2InstructionData, UnverifyCreatorV2InstructionDataArgs, getUnverifyCreatorV2DiscriminatorBytes, getUnverifyCreatorV2Instruction, getUnverifyCreatorV2InstructionAsync, getUnverifyCreatorV2InstructionDataCodec, getUnverifyCreatorV2InstructionDataDecoder, getUnverifyCreatorV2InstructionDataEncoder, parseUnverifyCreatorV2Instruction };
@@ -1 +1 @@
1
- {"version":3,"file":"unverifyCreatorV2.d.ts","names":[],"sources":["../../../src/generated/instructions/unverifyCreatorV2.ts"],"mappings":";;;;;cA8Da,iCAAA,EAAmC,kBAAA;AAAA,iBAG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7B,aAAA,GAAgB,OAAA,CAAQ,qBAAA;EACxB,IAAA,EAAM,oCAAA;EACN,aAAA,EAAe,oCAAA;EACf,KAAA,EAAO,oCAAA;EACP,KAAA,EAAO,oCAAA;EACP,KAAA,EAAO,oCAAA;EACP,OAAA,EAAS,oCAAA;AAAA;AAAA,iBAGK,+BAAA,2VAUU,OAAA,UAAiB,yBAAA,EAEzC,KAAA,EAAO,sBAAA,CACL,qBAAA,EACA,aAAA,EACA,eAAA,EACA,iBAAA,EACA,oBAAA,EACA,kBAAA,EACA,kBAAA,EACA,0BAAA,EACA,qBAAA,GAEF,MAAA;EAAW,cAAA,GAAiB,eAAA;AAAA,IAC3B,4BAAA,CACD,eAAA,EACA,qBAAA,EACA,aAAA,EACA,eAAA,EACA,iBAAA,EACA,oBAAA,EACA,kBAAA,EACA,kBAAA,EACA,0BAAA,EACA,qBAAA;AAAA,UAyEe,kCAAA,kCACkB,yBAAA,iCACF,WAAA,cAAyB,WAAA;EAExD,cAAA,EAAgB,OAAA,CAAQ,QAAA;EACxB,QAAA;IACE,aAAA,EAAe,aAAA;IACf,KAAA,EAAO,aAAA,KA1WD;IA4WN,OAAA,GAAU,aAAA;IACV,SAAA,EAAW,aAAA,KA3WT;IA6WF,YAAA,GAAe,aAAA;IACf,UAAA,EAAY,aAAA;IACZ,UAAA,EAAY,aAAA;IACZ,kBAAA,EAAoB,aAAA;IACpB,aAAA,EAAe,aAAA;EAAA;EAEjB,IAAA,EAAM,gCAAA;AAAA;AAAA,iBAGQ,iCAAA,yDAEiB,WAAA,IAE/B,WAAA,EAAa,WAAA,CAAY,QAAA,IACvB,uBAAA,CAAwB,aAAA,IACxB,mBAAA,CAAoB,kBAAA,IACrB,kCAAA,CAAmC,QAAA,EAAU,aAAA"}
1
+ {"version":3,"file":"unverifyCreatorV2.d.ts","names":[],"sources":["../../../src/generated/instructions/unverifyCreatorV2.ts"],"mappings":";;;;;;cA6Da,mCAAmC;iBAGhC,0CAA0C;KAM9C,6BACV,i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,2BAEzC,OAAO,4BACL,uBACA,eACA,iBACA,mBACA,sBACA,oBACA,oBACA,4BACA,wBAEF;EAAW,iBAAiB;IAC3B,QACD,6BACE,iBACA,uBACA,eACA,iBACA,mBACA,sBACA,oBACA,oBACA,4BACA;KAkFQ,uBACV,+CACA,uCACA,yCACA,2CACA,8CACA,4CACA,4CACA,oDACA;;;;;EAMA,eAAe,QAAQ;;EAEvB,OAAO,kBAAkB;;EAEzB,UAAU,kBAAkB;;EAE5B,WAAW,QAAQ;;EAEnB,eAAe,QAAQ;;;;;EAKvB,YAAY,QAAQ;;;;;EAKpB,aAAa,QAAQ;;;;;EAKrB,qBAAqB,QAAQ;;EAE7B,gBAAgB,QAAQ;EACxB,MAAM;EACN,eAAe;EACf,OAAO;EACP,OAAO;EACP,OAAO;EACP,SAAS;;;;;;;;iBASK,gCACd,sCACA,8BACA,gCACA,kCACA,qCACA,mCACA,mCACA,2CACA,sCACA,wBAAwB,iBAAiB,2BAEzC,OAAO,uBACL,uBACA,eACA,iBACA,mBACA,sBACA,oBACA,oBACA,4BACA,wBAEF;EAAW,iBAAiB;IAC3B,6BACD,iBACA,uBACA,eACA,iBACA,mBACA,sBACA,oBACA,oBACA,4BACA;KAyEU,mCACV,iCAAiC,2BACjC,+BAA+B,yBAAyB;EAExD,gBAAgB,QAAQ;EACxB;;;;;IAKE,eAAe;;IAEf,OAAO;;IAEP,UAAU;;IAEV,WAAW;;IAEX,eAAe;;;;;IAKf,YAAY;;;;;IAKZ,YAAY;;;;;IAKZ,oBAAoB;;IAEpB,eAAe;;EAEjB,MAAM;;iBAGQ,kCACd,yBACA,+BAA+B,eAE/B,aAAa,YAAY,YACvB,wBAAwB,iBACxB,oBAAoB,sBACrB,mCAAmC,UAAU"}
@@ -4,6 +4,13 @@ import "../programs/bubblegum.js";
4
4
  import { SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, combineCodec, fixDecoderSize, fixEncoderSize, getArrayDecoder, getArrayEncoder, getBytesDecoder, getBytesEncoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder } from "@solana/kit";
5
5
  import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount } from "@solana/program-client-core";
6
6
  //#region src/generated/instructions/unverifyCreatorV2.ts
7
+ /**
8
+ * This code was AUTOGENERATED using the Codama library.
9
+ * Please DO NOT EDIT THIS FILE, instead use visitors
10
+ * to add features, then rerun Codama to update it.
11
+ *
12
+ * @see https://github.com/codama-idl/codama
13
+ */
7
14
  const UNVERIFY_CREATOR_V2_DISCRIMINATOR = new Uint8Array([
8
15
  174,
9
16
  112,
@@ -45,6 +52,12 @@ function getUnverifyCreatorV2InstructionDataDecoder() {
45
52
  function getUnverifyCreatorV2InstructionDataCodec() {
46
53
  return combineCodec(getUnverifyCreatorV2InstructionDataEncoder(), getUnverifyCreatorV2InstructionDataDecoder());
47
54
  }
55
+ /**
56
+ * Unverifies a creator from a `LeafSchema` V2 leaf node.
57
+ *
58
+ * The named `creator` must sign to remove their own verified flag from
59
+ * the leaf's `MetadataArgsV2` creators array.
60
+ */
48
61
  async function getUnverifyCreatorV2InstructionAsync(input, config) {
49
62
  const programAddress = config?.programAddress ?? "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
50
63
  const accounts = {
@@ -107,6 +120,12 @@ async function getUnverifyCreatorV2InstructionAsync(input, config) {
107
120
  programAddress
108
121
  });
109
122
  }
123
+ /**
124
+ * Unverifies a creator from a `LeafSchema` V2 leaf node.
125
+ *
126
+ * The named `creator` must sign to remove their own verified flag from
127
+ * the leaf's `MetadataArgsV2` creators array.
128
+ */
110
129
  function getUnverifyCreatorV2Instruction(input, config) {
111
130
  const programAddress = config?.programAddress ?? "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
112
131
  const accounts = {
@@ -1 +1 @@
1
- {"version":3,"file":"unverifyCreatorV2.js","names":[],"sources":["../../../src/generated/instructions/unverifyCreatorV2.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport type {\n AccountMeta,\n AccountSignerMeta,\n Address,\n Codec,\n Decoder,\n Encoder,\n Instruction,\n InstructionWithAccounts,\n InstructionWithData,\n Option,\n OptionOrNullable,\n ReadonlyAccount,\n ReadonlySignerAccount,\n ReadonlyUint8Array,\n TransactionSigner,\n WritableAccount,\n WritableSignerAccount,\n} from \"@solana/kit\";\nimport type { ResolvedInstructionAccount } from \"@solana/program-client-core\";\nimport type { MetadataArgsV2, MetadataArgsV2Args } from \"../types/index.js\";\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n} from \"@solana/kit\";\nimport {\n getAccountMetaFactory,\n getAddressFromResolvedInstructionAccount,\n} from \"@solana/program-client-core\";\nimport { findTreeConfigPda } from \"../pdas/index.js\";\nimport { BUBBLEGUM_PROGRAM_ADDRESS } from \"../programs/index.js\";\nimport {\n getMetadataArgsV2Decoder,\n getMetadataArgsV2Encoder,\n} from \"../types/index.js\";\n\nexport const UNVERIFY_CREATOR_V2_DISCRIMINATOR: ReadonlyUint8Array =\n new Uint8Array([174, 112, 29, 142, 230, 100, 239, 7]);\n\nexport function getUnverifyCreatorV2DiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UNVERIFY_CREATOR_V2_DISCRIMINATOR,\n );\n}\n\nexport type UnverifyCreatorV2Instruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountLeafOwner extends string | AccountMeta<string> = string,\n TAccountLeafDelegate extends string | AccountMeta<string> = string,\n TAccountMerkleTree extends string | AccountMeta<string> = string,\n TAccountLogWrapper extends\n | string\n | AccountMeta<string> = \"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\",\n TAccountCompressionProgram extends\n | string\n | AccountMeta<string> = \"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\",\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? WritableAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountCreator extends string\n ? ReadonlySignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountLeafOwner extends string\n ? ReadonlyAccount<TAccountLeafOwner>\n : TAccountLeafOwner,\n TAccountLeafDelegate extends string\n ? ReadonlyAccount<TAccountLeafDelegate>\n : TAccountLeafDelegate,\n TAccountMerkleTree extends string\n ? WritableAccount<TAccountMerkleTree>\n : TAccountMerkleTree,\n TAccountLogWrapper extends string\n ? ReadonlyAccount<TAccountLogWrapper>\n : TAccountLogWrapper,\n TAccountCompressionProgram extends string\n ? ReadonlyAccount<TAccountCompressionProgram>\n : TAccountCompressionProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport interface UnverifyCreatorV2InstructionData {\n discriminator: ReadonlyUint8Array;\n root: number[];\n assetDataHash: Option<number[]>;\n flags: Option<number>;\n nonce: bigint;\n index: number;\n message: MetadataArgsV2;\n}\n\nexport interface UnverifyCreatorV2InstructionDataArgs {\n root: number[];\n assetDataHash: OptionOrNullable<number[]>;\n flags: OptionOrNullable<number>;\n nonce: number | bigint;\n index: number;\n message: MetadataArgsV2Args;\n}\n\nexport function getUnverifyCreatorV2InstructionDataEncoder(): Encoder<UnverifyCreatorV2InstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"root\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\n \"assetDataHash\",\n getOptionEncoder(getArrayEncoder(getU8Encoder(), { size: 32 })),\n ],\n [\"flags\", getOptionEncoder(getU8Encoder())],\n [\"nonce\", getU64Encoder()],\n [\"index\", getU32Encoder()],\n [\"message\", getMetadataArgsV2Encoder()],\n ]),\n (value) => ({ ...value, discriminator: UNVERIFY_CREATOR_V2_DISCRIMINATOR }),\n );\n}\n\nexport function getUnverifyCreatorV2InstructionDataDecoder(): Decoder<UnverifyCreatorV2InstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"root\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\n \"assetDataHash\",\n getOptionDecoder(getArrayDecoder(getU8Decoder(), { size: 32 })),\n ],\n [\"flags\", getOptionDecoder(getU8Decoder())],\n [\"nonce\", getU64Decoder()],\n [\"index\", getU32Decoder()],\n [\"message\", getMetadataArgsV2Decoder()],\n ]);\n}\n\nexport function getUnverifyCreatorV2InstructionDataCodec(): Codec<\n UnverifyCreatorV2InstructionDataArgs,\n UnverifyCreatorV2InstructionData\n> {\n return combineCodec(\n getUnverifyCreatorV2InstructionDataEncoder(),\n getUnverifyCreatorV2InstructionDataDecoder(),\n );\n}\n\nexport interface UnverifyCreatorV2AsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountPayer extends string = string,\n TAccountCreator extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> {\n treeAuthority?: Address<TAccountTreeAuthority>;\n payer: TransactionSigner<TAccountPayer>;\n /** Optional creator, defaults to `payer` */\n creator?: TransactionSigner<TAccountCreator>;\n leafOwner: Address<TAccountLeafOwner>;\n /** Defaults to `leaf_owner` */\n leafDelegate?: Address<TAccountLeafDelegate>;\n merkleTree: Address<TAccountMerkleTree>;\n logWrapper?: Address<TAccountLogWrapper>;\n compressionProgram?: Address<TAccountCompressionProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n root: UnverifyCreatorV2InstructionDataArgs[\"root\"];\n assetDataHash: UnverifyCreatorV2InstructionDataArgs[\"assetDataHash\"];\n flags: UnverifyCreatorV2InstructionDataArgs[\"flags\"];\n nonce: UnverifyCreatorV2InstructionDataArgs[\"nonce\"];\n index: UnverifyCreatorV2InstructionDataArgs[\"index\"];\n message: UnverifyCreatorV2InstructionDataArgs[\"message\"];\n}\n\nexport async function getUnverifyCreatorV2InstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountPayer extends string,\n TAccountCreator extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: UnverifyCreatorV2AsyncInput<\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UnverifyCreatorV2Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: false },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.treeAuthority.value) {\n accounts.treeAuthority.value = await findTreeConfigPda({\n merkleTree: getAddressFromResolvedInstructionAccount(\n \"merkleTree\",\n accounts.merkleTree.value,\n ),\n });\n }\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\" as Address<\"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\" as Address<\"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"creator\", accounts.creator),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getUnverifyCreatorV2InstructionDataEncoder().encode(\n args as UnverifyCreatorV2InstructionDataArgs,\n ),\n programAddress,\n } as UnverifyCreatorV2Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport interface UnverifyCreatorV2Input<\n TAccountTreeAuthority extends string = string,\n TAccountPayer extends string = string,\n TAccountCreator extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> {\n treeAuthority: Address<TAccountTreeAuthority>;\n payer: TransactionSigner<TAccountPayer>;\n /** Optional creator, defaults to `payer` */\n creator?: TransactionSigner<TAccountCreator>;\n leafOwner: Address<TAccountLeafOwner>;\n /** Defaults to `leaf_owner` */\n leafDelegate?: Address<TAccountLeafDelegate>;\n merkleTree: Address<TAccountMerkleTree>;\n logWrapper?: Address<TAccountLogWrapper>;\n compressionProgram?: Address<TAccountCompressionProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n root: UnverifyCreatorV2InstructionDataArgs[\"root\"];\n assetDataHash: UnverifyCreatorV2InstructionDataArgs[\"assetDataHash\"];\n flags: UnverifyCreatorV2InstructionDataArgs[\"flags\"];\n nonce: UnverifyCreatorV2InstructionDataArgs[\"nonce\"];\n index: UnverifyCreatorV2InstructionDataArgs[\"index\"];\n message: UnverifyCreatorV2InstructionDataArgs[\"message\"];\n}\n\nexport function getUnverifyCreatorV2Instruction<\n TAccountTreeAuthority extends string,\n TAccountPayer extends string,\n TAccountCreator extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: UnverifyCreatorV2Input<\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): UnverifyCreatorV2Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: false },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\" as Address<\"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\" as Address<\"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"creator\", accounts.creator),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getUnverifyCreatorV2InstructionDataEncoder().encode(\n args as UnverifyCreatorV2InstructionDataArgs,\n ),\n programAddress,\n } as UnverifyCreatorV2Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport interface ParsedUnverifyCreatorV2Instruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> {\n programAddress: Address<TProgram>;\n accounts: {\n treeAuthority: TAccountMetas[0];\n payer: TAccountMetas[1];\n /** Optional creator, defaults to `payer` */\n creator?: TAccountMetas[2] | undefined;\n leafOwner: TAccountMetas[3];\n /** Defaults to `leaf_owner` */\n leafDelegate?: TAccountMetas[4] | undefined;\n merkleTree: TAccountMetas[5];\n logWrapper: TAccountMetas[6];\n compressionProgram: TAccountMetas[7];\n systemProgram: TAccountMetas[8];\n };\n data: UnverifyCreatorV2InstructionData;\n}\n\nexport function parseUnverifyCreatorV2Instruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUnverifyCreatorV2Instruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 9,\n },\n );\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === BUBBLEGUM_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n payer: getNextAccount(),\n creator: getNextOptionalAccount(),\n leafOwner: getNextAccount(),\n leafDelegate: getNextOptionalAccount(),\n merkleTree: getNextAccount(),\n logWrapper: getNextAccount(),\n compressionProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getUnverifyCreatorV2InstructionDataDecoder().decode(instruction.data),\n };\n}\n"],"mappings":";;;;;;AA8DA,MAAa,oCACX,IAAI,WAAW;CAAC;CAAK;CAAK;CAAI;C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,IAAI,YAAY,SAAS,SAAS,GAChC,MAAM,IAAI,YACR,2DACA;EACE,oBAAoB,YAAY,SAAS;EACzC,sBAAsB;CACxB,CACF;CAEF,IAAI,eAAe;CACnB,MAAM,uBAAuB;EAC3B,MAAM,cAAe,YAAY,SAA2B;EAC5D,gBAAgB;EAChB,OAAO;CACT;CACA,MAAM,+BAA+B;EACnC,MAAM,cAAc,eAAe;EACnC,OAAO,YAAY,YAAA,iDACf,KAAA,IACA;CACN;CACA,OAAO;EACL,gBAAgB,YAAY;EAC5B,UAAU;GACR,eAAe,eAAe;GAC9B,OAAO,eAAe;GACtB,SAAS,uBAAuB;GAChC,WAAW,eAAe;GAC1B,cAAc,uBAAuB;GACrC,YAAY,eAAe;GAC3B,YAAY,eAAe;GAC3B,oBAAoB,eAAe;GACnC,eAAe,eAAe;EAChC;EACA,MAAM,2CAA2C,CAAC,CAAC,OAAO,YAAY,IAAI;CAC5E;AACF"}
1
+ {"version":3,"file":"unverifyCreatorV2.js","names":[],"sources":["../../../src/generated/instructions/unverifyCreatorV2.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n SolanaError,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"@solana/kit\";\nimport {\n getAccountMetaFactory,\n getAddressFromResolvedInstructionAccount,\n type ResolvedInstructionAccount,\n} from \"@solana/program-client-core\";\nimport { findTreeConfigPda } from \"../pdas/index.js\";\nimport { BUBBLEGUM_PROGRAM_ADDRESS } from \"../programs/index.js\";\nimport {\n getMetadataArgsV2Decoder,\n getMetadataArgsV2Encoder,\n type MetadataArgsV2,\n type MetadataArgsV2Args,\n} from \"../types/index.js\";\n\nexport const UNVERIFY_CREATOR_V2_DISCRIMINATOR: ReadonlyUint8Array =\n new Uint8Array([174, 112, 29, 142, 230, 100, 239, 7]);\n\nexport function getUnverifyCreatorV2DiscriminatorBytes(): ReadonlyUint8Array {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UNVERIFY_CREATOR_V2_DISCRIMINATOR,\n );\n}\n\nexport type UnverifyCreatorV2Instruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountLeafOwner extends string | AccountMeta<string> = string,\n TAccountLeafDelegate extends string | AccountMeta<string> = string,\n TAccountMerkleTree extends string | AccountMeta<string> = string,\n TAccountLogWrapper extends string | AccountMeta<string> =\n \"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\",\n TAccountCompressionProgram extends string | AccountMeta<string> =\n \"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\",\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? WritableAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountCreator extends string\n ? ReadonlySignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountLeafOwner extends string\n ? ReadonlyAccount<TAccountLeafOwner>\n : TAccountLeafOwner,\n TAccountLeafDelegate extends string\n ? ReadonlyAccount<TAccountLeafDelegate>\n : TAccountLeafDelegate,\n TAccountMerkleTree extends string\n ? WritableAccount<TAccountMerkleTree>\n : TAccountMerkleTree,\n TAccountLogWrapper extends string\n ? ReadonlyAccount<TAccountLogWrapper>\n : TAccountLogWrapper,\n TAccountCompressionProgram extends string\n ? ReadonlyAccount<TAccountCompressionProgram>\n : TAccountCompressionProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UnverifyCreatorV2InstructionData = {\n discriminator: ReadonlyUint8Array;\n /**\n * Current Merkle root of the tree, used together with the Merkle proof\n * (passed as remaining accounts) to verify the leaf being operated on.\n */\n root: Array<number>;\n /**\n * Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,\n * carried through unchanged by this instruction.\n */\n assetDataHash: Option<Array<number>>;\n /**\n * Expected current status flags (e.g. frozen, non-transferable) of the\n * `LeafSchema` V2 leaf, verified before this instruction updates them.\n */\n flags: Option<number>;\n /**\n * Tree-scoped nonce identifying the leaf, equal to the tree's\n * `numMinted` at the time the leaf was minted. Combined with the tree\n * address to derive the leaf's asset id.\n */\n nonce: bigint;\n /**\n * Position of the leaf within the Merkle tree, used with the Merkle\n * proof to locate and verify the leaf.\n */\n index: number;\n /**\n * The leaf's current `MetadataArgsV2`, used to reconstruct and verify\n * the leaf before `creator` is marked unverified.\n */\n message: MetadataArgsV2;\n};\n\nexport type UnverifyCreatorV2InstructionDataArgs = {\n /**\n * Current Merkle root of the tree, used together with the Merkle proof\n * (passed as remaining accounts) to verify the leaf being operated on.\n */\n root: Array<number>;\n /**\n * Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,\n * carried through unchanged by this instruction.\n */\n assetDataHash: OptionOrNullable<Array<number>>;\n /**\n * Expected current status flags (e.g. frozen, non-transferable) of the\n * `LeafSchema` V2 leaf, verified before this instruction updates them.\n */\n flags: OptionOrNullable<number>;\n /**\n * Tree-scoped nonce identifying the leaf, equal to the tree's\n * `numMinted` at the time the leaf was minted. Combined with the tree\n * address to derive the leaf's asset id.\n */\n nonce: number | bigint;\n /**\n * Position of the leaf within the Merkle tree, used with the Merkle\n * proof to locate and verify the leaf.\n */\n index: number;\n /**\n * The leaf's current `MetadataArgsV2`, used to reconstruct and verify\n * the leaf before `creator` is marked unverified.\n */\n message: MetadataArgsV2Args;\n};\n\nexport function getUnverifyCreatorV2InstructionDataEncoder(): Encoder<UnverifyCreatorV2InstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"root\", getArrayEncoder(getU8Encoder(), { size: 32 })],\n [\n \"assetDataHash\",\n getOptionEncoder(getArrayEncoder(getU8Encoder(), { size: 32 })),\n ],\n [\"flags\", getOptionEncoder(getU8Encoder())],\n [\"nonce\", getU64Encoder()],\n [\"index\", getU32Encoder()],\n [\"message\", getMetadataArgsV2Encoder()],\n ]),\n (value) => ({ ...value, discriminator: UNVERIFY_CREATOR_V2_DISCRIMINATOR }),\n );\n}\n\nexport function getUnverifyCreatorV2InstructionDataDecoder(): Decoder<UnverifyCreatorV2InstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"root\", getArrayDecoder(getU8Decoder(), { size: 32 })],\n [\n \"assetDataHash\",\n getOptionDecoder(getArrayDecoder(getU8Decoder(), { size: 32 })),\n ],\n [\"flags\", getOptionDecoder(getU8Decoder())],\n [\"nonce\", getU64Decoder()],\n [\"index\", getU32Decoder()],\n [\"message\", getMetadataArgsV2Decoder()],\n ]);\n}\n\nexport function getUnverifyCreatorV2InstructionDataCodec(): Codec<\n UnverifyCreatorV2InstructionDataArgs,\n UnverifyCreatorV2InstructionData\n> {\n return combineCodec(\n getUnverifyCreatorV2InstructionDataEncoder(),\n getUnverifyCreatorV2InstructionDataDecoder(),\n );\n}\n\nexport type UnverifyCreatorV2AsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountPayer extends string = string,\n TAccountCreator extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority?: Address<TAccountTreeAuthority>;\n /** Account that pays for the transaction and any account rent. */\n payer: TransactionSigner<TAccountPayer>;\n /** Optional creator, defaults to `payer`. */\n creator?: TransactionSigner<TAccountCreator>;\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: Address<TAccountLeafOwner>;\n /** Defaults to `leafOwner`. */\n leafDelegate?: Address<TAccountLeafDelegate>;\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: Address<TAccountMerkleTree>;\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper?: Address<TAccountLogWrapper>;\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram?: Address<TAccountCompressionProgram>;\n /** The Solana System program. */\n systemProgram?: Address<TAccountSystemProgram>;\n root: UnverifyCreatorV2InstructionDataArgs[\"root\"];\n assetDataHash: UnverifyCreatorV2InstructionDataArgs[\"assetDataHash\"];\n flags: UnverifyCreatorV2InstructionDataArgs[\"flags\"];\n nonce: UnverifyCreatorV2InstructionDataArgs[\"nonce\"];\n index: UnverifyCreatorV2InstructionDataArgs[\"index\"];\n message: UnverifyCreatorV2InstructionDataArgs[\"message\"];\n};\n\n/**\n * Unverifies a creator from a `LeafSchema` V2 leaf node.\n *\n * The named `creator` must sign to remove their own verified flag from\n * the leaf's `MetadataArgsV2` creators array.\n */\nexport async function getUnverifyCreatorV2InstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountPayer extends string,\n TAccountCreator extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: UnverifyCreatorV2AsyncInput<\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UnverifyCreatorV2Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: false },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.treeAuthority.value) {\n accounts.treeAuthority.value = await findTreeConfigPda({\n merkleTree: getAddressFromResolvedInstructionAccount(\n \"merkleTree\",\n accounts.merkleTree.value,\n ),\n });\n }\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\" as Address<\"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\" as Address<\"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"creator\", accounts.creator),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getUnverifyCreatorV2InstructionDataEncoder().encode(\n args as UnverifyCreatorV2InstructionDataArgs,\n ),\n programAddress,\n } as UnverifyCreatorV2Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type UnverifyCreatorV2Input<\n TAccountTreeAuthority extends string = string,\n TAccountPayer extends string = string,\n TAccountCreator extends string = string,\n TAccountLeafOwner extends string = string,\n TAccountLeafDelegate extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority: Address<TAccountTreeAuthority>;\n /** Account that pays for the transaction and any account rent. */\n payer: TransactionSigner<TAccountPayer>;\n /** Optional creator, defaults to `payer`. */\n creator?: TransactionSigner<TAccountCreator>;\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: Address<TAccountLeafOwner>;\n /** Defaults to `leafOwner`. */\n leafDelegate?: Address<TAccountLeafDelegate>;\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: Address<TAccountMerkleTree>;\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper?: Address<TAccountLogWrapper>;\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram?: Address<TAccountCompressionProgram>;\n /** The Solana System program. */\n systemProgram?: Address<TAccountSystemProgram>;\n root: UnverifyCreatorV2InstructionDataArgs[\"root\"];\n assetDataHash: UnverifyCreatorV2InstructionDataArgs[\"assetDataHash\"];\n flags: UnverifyCreatorV2InstructionDataArgs[\"flags\"];\n nonce: UnverifyCreatorV2InstructionDataArgs[\"nonce\"];\n index: UnverifyCreatorV2InstructionDataArgs[\"index\"];\n message: UnverifyCreatorV2InstructionDataArgs[\"message\"];\n};\n\n/**\n * Unverifies a creator from a `LeafSchema` V2 leaf node.\n *\n * The named `creator` must sign to remove their own verified flag from\n * the leaf's `MetadataArgsV2` creators array.\n */\nexport function getUnverifyCreatorV2Instruction<\n TAccountTreeAuthority extends string,\n TAccountPayer extends string,\n TAccountCreator extends string,\n TAccountLeafOwner extends string,\n TAccountLeafDelegate extends string,\n TAccountMerkleTree extends string,\n TAccountLogWrapper extends string,\n TAccountCompressionProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n>(\n input: UnverifyCreatorV2Input<\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): UnverifyCreatorV2Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? BUBBLEGUM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: false },\n leafOwner: { value: input.leafOwner ?? null, isWritable: false },\n leafDelegate: { value: input.leafDelegate ?? null, isWritable: false },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n logWrapper: { value: input.logWrapper ?? null, isWritable: false },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedInstructionAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\" as Address<\"mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3\">;\n }\n if (!accounts.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\" as Address<\"mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(\"treeAuthority\", accounts.treeAuthority),\n getAccountMeta(\"payer\", accounts.payer),\n getAccountMeta(\"creator\", accounts.creator),\n getAccountMeta(\"leafOwner\", accounts.leafOwner),\n getAccountMeta(\"leafDelegate\", accounts.leafDelegate),\n getAccountMeta(\"merkleTree\", accounts.merkleTree),\n getAccountMeta(\"logWrapper\", accounts.logWrapper),\n getAccountMeta(\"compressionProgram\", accounts.compressionProgram),\n getAccountMeta(\"systemProgram\", accounts.systemProgram),\n ],\n data: getUnverifyCreatorV2InstructionDataEncoder().encode(\n args as UnverifyCreatorV2InstructionDataArgs,\n ),\n programAddress,\n } as UnverifyCreatorV2Instruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountPayer,\n TAccountCreator,\n TAccountLeafOwner,\n TAccountLeafDelegate,\n TAccountMerkleTree,\n TAccountLogWrapper,\n TAccountCompressionProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedUnverifyCreatorV2Instruction<\n TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /**\n * The tree's `TreeConfig` PDA, which stores its configuration and acts\n * as the tree's authority for CPIs into the compression program.\n */\n treeAuthority: TAccountMetas[0];\n /** Account that pays for the transaction and any account rent. */\n payer: TAccountMetas[1];\n /** Optional creator, defaults to `payer`. */\n creator?: TAccountMetas[2] | undefined;\n /** Owner of the compressed NFT leaf being operated on. */\n leafOwner: TAccountMetas[3];\n /** Defaults to `leafOwner`. */\n leafDelegate?: TAccountMetas[4] | undefined;\n /**\n * The concurrent Merkle tree account storing the compressed leaves,\n * owned by the account compression program.\n */\n merkleTree: TAccountMetas[5];\n /**\n * The SPL/MPL Noop program, used to log leaf data so off-chain indexers\n * can reconstruct the tree.\n */\n logWrapper: TAccountMetas[6];\n /**\n * The SPL/MPL Account Compression program that owns and manages the\n * Merkle tree.\n */\n compressionProgram: TAccountMetas[7];\n /** The Solana System program. */\n systemProgram: TAccountMetas[8];\n };\n data: UnverifyCreatorV2InstructionData;\n};\n\nexport function parseUnverifyCreatorV2Instruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUnverifyCreatorV2Instruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n throw new SolanaError(\n SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n {\n actualAccountMetas: instruction.accounts.length,\n expectedAccountMetas: 9,\n },\n );\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === BUBBLEGUM_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n payer: getNextAccount(),\n creator: getNextOptionalAccount(),\n leafOwner: getNextAccount(),\n leafDelegate: getNextOptionalAccount(),\n merkleTree: getNextAccount(),\n logWrapper: getNextAccount(),\n compressionProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getUnverifyCreatorV2InstructionDataDecoder().decode(instruction.data),\n };\n}\n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