@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
@@ -6,27 +6,6 @@
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
8
 
9
- import type {
10
- AccountMeta,
11
- AccountSignerMeta,
12
- Address,
13
- Codec,
14
- Decoder,
15
- Encoder,
16
- Instruction,
17
- InstructionWithAccounts,
18
- InstructionWithData,
19
- Option,
20
- OptionOrNullable,
21
- ReadonlyAccount,
22
- ReadonlySignerAccount,
23
- ReadonlyUint8Array,
24
- TransactionSigner,
25
- WritableAccount,
26
- WritableSignerAccount,
27
- } from "@solana/kit";
28
- import type { ResolvedInstructionAccount } from "@solana/program-client-core";
29
- import type { AssetDataSchema, AssetDataSchemaArgs } from "../types/index.js";
30
9
  import {
31
10
  addDecoderSizePrefix,
32
11
  addEncoderSizePrefix,
@@ -41,25 +20,45 @@ import {
41
20
  getOptionEncoder,
42
21
  getStructDecoder,
43
22
  getStructEncoder,
44
- getU8Decoder,
45
- getU8Encoder,
46
23
  getU32Decoder,
47
24
  getU32Encoder,
48
25
  getU64Decoder,
49
26
  getU64Encoder,
27
+ getU8Decoder,
28
+ getU8Encoder,
50
29
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
51
30
  SolanaError,
52
31
  transformEncoder,
32
+ type AccountMeta,
33
+ type AccountSignerMeta,
34
+ type Address,
35
+ type Codec,
36
+ type Decoder,
37
+ type Encoder,
38
+ type Instruction,
39
+ type InstructionWithAccounts,
40
+ type InstructionWithData,
41
+ type Option,
42
+ type OptionOrNullable,
43
+ type ReadonlyAccount,
44
+ type ReadonlySignerAccount,
45
+ type ReadonlyUint8Array,
46
+ type TransactionSigner,
47
+ type WritableAccount,
48
+ type WritableSignerAccount,
53
49
  } from "@solana/kit";
54
50
  import {
55
51
  getAccountMetaFactory,
56
52
  getAddressFromResolvedInstructionAccount,
53
+ type ResolvedInstructionAccount,
57
54
  } from "@solana/program-client-core";
58
55
  import { findTreeConfigPda } from "../pdas/index.js";
59
56
  import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
60
57
  import {
61
58
  getAssetDataSchemaDecoder,
62
59
  getAssetDataSchemaEncoder,
60
+ type AssetDataSchema,
61
+ type AssetDataSchemaArgs,
63
62
  } from "../types/index.js";
64
63
 
65
64
  export const UPDATE_ASSET_DATA_V2_DISCRIMINATOR: ReadonlyUint8Array =
@@ -80,15 +79,12 @@ export type UpdateAssetDataV2Instruction<
80
79
  TAccountLeafDelegate extends string | AccountMeta<string> = string,
81
80
  TAccountMerkleTree extends string | AccountMeta<string> = string,
82
81
  TAccountCoreCollection extends string | AccountMeta<string> = string,
83
- TAccountLogWrapper extends
84
- | string
85
- | AccountMeta<string> = "mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3",
86
- TAccountCompressionProgram extends
87
- | string
88
- | AccountMeta<string> = "mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW",
89
- TAccountSystemProgram extends
90
- | string
91
- | AccountMeta<string> = "11111111111111111111111111111111",
82
+ TAccountLogWrapper extends string | AccountMeta<string> =
83
+ "mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3",
84
+ TAccountCompressionProgram extends string | AccountMeta<string> =
85
+ "mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW",
86
+ TAccountSystemProgram extends string | AccountMeta<string> =
87
+ "11111111111111111111111111111111",
92
88
  TRemainingAccounts extends readonly AccountMeta<string>[] = [],
93
89
  > = Instruction<TProgram> &
94
90
  InstructionWithData<ReadonlyUint8Array> &
@@ -130,30 +126,92 @@ export type UpdateAssetDataV2Instruction<
130
126
  ]
131
127
  >;
132
128
 
133
- export interface UpdateAssetDataV2InstructionData {
129
+ export type UpdateAssetDataV2InstructionData = {
134
130
  discriminator: ReadonlyUint8Array;
135
- root: number[];
136
- dataHash: number[];
137
- creatorHash: number[];
138
- previousAssetDataHash: Option<number[]>;
131
+ /**
132
+ * Current Merkle root of the tree, used together with the Merkle proof
133
+ * (passed as remaining accounts) to verify the leaf being operated on.
134
+ */
135
+ root: Array<number>;
136
+ /**
137
+ * Keccak256 hash of the leaf's metadata, used together with `root` to
138
+ * verify the leaf before it is modified.
139
+ */
140
+ dataHash: Array<number>;
141
+ /**
142
+ * Keccak256 hash of the leaf's creators array, used together with
143
+ * `root` to verify the leaf before it is modified.
144
+ */
145
+ creatorHash: Array<number>;
146
+ /**
147
+ * Expected current `assetDataHash` of the leaf, if any, verified before
148
+ * it is replaced by `newAssetData`.
149
+ */
150
+ previousAssetDataHash: Option<Array<number>>;
151
+ /**
152
+ * Expected current status flags (e.g. frozen, non-transferable) of the
153
+ * `LeafSchema` V2 leaf, verified before this instruction updates them.
154
+ */
139
155
  flags: Option<number>;
156
+ /**
157
+ * Tree-scoped nonce identifying the leaf, equal to the tree's
158
+ * `numMinted` at the time the leaf was minted. Combined with the tree
159
+ * address to derive the leaf's asset id.
160
+ */
140
161
  nonce: bigint;
162
+ /**
163
+ * Position of the leaf within the Merkle tree, used with the Merkle
164
+ * proof to locate and verify the leaf.
165
+ */
141
166
  index: number;
167
+ /** Optional raw asset data blob to associate with the asset. */
142
168
  newAssetData: Option<ReadonlyUint8Array>;
169
+ /** Schema describing the format of `newAssetData`. */
143
170
  newAssetDataSchema: Option<AssetDataSchema>;
144
- }
171
+ };
145
172
 
146
- export interface UpdateAssetDataV2InstructionDataArgs {
147
- root: number[];
148
- dataHash: number[];
149
- creatorHash: number[];
150
- previousAssetDataHash: OptionOrNullable<number[]>;
173
+ export type UpdateAssetDataV2InstructionDataArgs = {
174
+ /**
175
+ * Current Merkle root of the tree, used together with the Merkle proof
176
+ * (passed as remaining accounts) to verify the leaf being operated on.
177
+ */
178
+ root: Array<number>;
179
+ /**
180
+ * Keccak256 hash of the leaf's metadata, used together with `root` to
181
+ * verify the leaf before it is modified.
182
+ */
183
+ dataHash: Array<number>;
184
+ /**
185
+ * Keccak256 hash of the leaf's creators array, used together with
186
+ * `root` to verify the leaf before it is modified.
187
+ */
188
+ creatorHash: Array<number>;
189
+ /**
190
+ * Expected current `assetDataHash` of the leaf, if any, verified before
191
+ * it is replaced by `newAssetData`.
192
+ */
193
+ previousAssetDataHash: OptionOrNullable<Array<number>>;
194
+ /**
195
+ * Expected current status flags (e.g. frozen, non-transferable) of the
196
+ * `LeafSchema` V2 leaf, verified before this instruction updates them.
197
+ */
151
198
  flags: OptionOrNullable<number>;
199
+ /**
200
+ * Tree-scoped nonce identifying the leaf, equal to the tree's
201
+ * `numMinted` at the time the leaf was minted. Combined with the tree
202
+ * address to derive the leaf's asset id.
203
+ */
152
204
  nonce: number | bigint;
205
+ /**
206
+ * Position of the leaf within the Merkle tree, used with the Merkle
207
+ * proof to locate and verify the leaf.
208
+ */
153
209
  index: number;
210
+ /** Optional raw asset data blob to associate with the asset. */
154
211
  newAssetData: OptionOrNullable<ReadonlyUint8Array>;
212
+ /** Schema describing the format of `newAssetData`. */
155
213
  newAssetDataSchema: OptionOrNullable<AssetDataSchemaArgs>;
156
- }
214
+ };
157
215
 
158
216
  export function getUpdateAssetDataV2InstructionDataEncoder(): Encoder<UpdateAssetDataV2InstructionDataArgs> {
159
217
  return transformEncoder(
@@ -217,7 +275,7 @@ export function getUpdateAssetDataV2InstructionDataCodec(): Codec<
217
275
  );
218
276
  }
219
277
 
220
- export interface UpdateAssetDataV2AsyncInput<
278
+ export type UpdateAssetDataV2AsyncInput<
221
279
  TAccountTreeAuthority extends string = string,
222
280
  TAccountPayer extends string = string,
223
281
  TAccountAuthority extends string = string,
@@ -228,20 +286,45 @@ export interface UpdateAssetDataV2AsyncInput<
228
286
  TAccountLogWrapper extends string = string,
229
287
  TAccountCompressionProgram extends string = string,
230
288
  TAccountSystemProgram extends string = string,
231
- > {
289
+ > = {
290
+ /**
291
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
292
+ * as the tree's authority for CPIs into the compression program.
293
+ */
232
294
  treeAuthority?: Address<TAccountTreeAuthority>;
295
+ /** Account that pays for the transaction and any account rent. */
233
296
  payer: TransactionSigner<TAccountPayer>;
234
297
  /**
235
- * Either collection authority or tree owner/delegate, depending on
236
- * whether the item is in a verified collection. Defaults to `payer`
298
+ * Either the collection authority or the tree owner/delegate,
299
+ * depending on whether the asset is in a verified collection.
300
+ * Defaults to `payer`.
237
301
  */
238
302
  authority?: TransactionSigner<TAccountAuthority>;
303
+ /** Owner of the compressed NFT leaf being operated on. */
239
304
  leafOwner: Address<TAccountLeafOwner>;
305
+ /**
306
+ * Delegate authority for the leaf; defaults to the leaf owner when no
307
+ * delegate is set.
308
+ */
240
309
  leafDelegate?: Address<TAccountLeafDelegate>;
310
+ /**
311
+ * The concurrent Merkle tree account storing the compressed leaves,
312
+ * owned by the account compression program.
313
+ */
241
314
  merkleTree: Address<TAccountMerkleTree>;
315
+ /** MPL Core collection account the asset belongs to (V2 collections). */
242
316
  coreCollection?: Address<TAccountCoreCollection>;
317
+ /**
318
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
319
+ * can reconstruct the tree.
320
+ */
243
321
  logWrapper?: Address<TAccountLogWrapper>;
322
+ /**
323
+ * The SPL/MPL Account Compression program that owns and manages the
324
+ * Merkle tree.
325
+ */
244
326
  compressionProgram?: Address<TAccountCompressionProgram>;
327
+ /** The Solana System program. */
245
328
  systemProgram?: Address<TAccountSystemProgram>;
246
329
  root: UpdateAssetDataV2InstructionDataArgs["root"];
247
330
  dataHash: UpdateAssetDataV2InstructionDataArgs["dataHash"];
@@ -252,8 +335,15 @@ export interface UpdateAssetDataV2AsyncInput<
252
335
  index: UpdateAssetDataV2InstructionDataArgs["index"];
253
336
  newAssetData: UpdateAssetDataV2InstructionDataArgs["newAssetData"];
254
337
  newAssetDataSchema: UpdateAssetDataV2InstructionDataArgs["newAssetDataSchema"];
255
- }
338
+ };
256
339
 
340
+ /**
341
+ * Updates the off-chain asset data hash and status flags of a
342
+ * `LeafSchema` V2 leaf node.
343
+ *
344
+ * Callable by the collection authority, or the tree owner/delegate for
345
+ * assets not in a verified collection.
346
+ */
257
347
  export async function getUpdateAssetDataV2InstructionAsync<
258
348
  TAccountTreeAuthority extends string,
259
349
  TAccountPayer extends string,
@@ -377,7 +467,7 @@ export async function getUpdateAssetDataV2InstructionAsync<
377
467
  >);
378
468
  }
379
469
 
380
- export interface UpdateAssetDataV2Input<
470
+ export type UpdateAssetDataV2Input<
381
471
  TAccountTreeAuthority extends string = string,
382
472
  TAccountPayer extends string = string,
383
473
  TAccountAuthority extends string = string,
@@ -388,20 +478,45 @@ export interface UpdateAssetDataV2Input<
388
478
  TAccountLogWrapper extends string = string,
389
479
  TAccountCompressionProgram extends string = string,
390
480
  TAccountSystemProgram extends string = string,
391
- > {
481
+ > = {
482
+ /**
483
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
484
+ * as the tree's authority for CPIs into the compression program.
485
+ */
392
486
  treeAuthority: Address<TAccountTreeAuthority>;
487
+ /** Account that pays for the transaction and any account rent. */
393
488
  payer: TransactionSigner<TAccountPayer>;
394
489
  /**
395
- * Either collection authority or tree owner/delegate, depending on
396
- * whether the item is in a verified collection. Defaults to `payer`
490
+ * Either the collection authority or the tree owner/delegate,
491
+ * depending on whether the asset is in a verified collection.
492
+ * Defaults to `payer`.
397
493
  */
398
494
  authority?: TransactionSigner<TAccountAuthority>;
495
+ /** Owner of the compressed NFT leaf being operated on. */
399
496
  leafOwner: Address<TAccountLeafOwner>;
497
+ /**
498
+ * Delegate authority for the leaf; defaults to the leaf owner when no
499
+ * delegate is set.
500
+ */
400
501
  leafDelegate?: Address<TAccountLeafDelegate>;
502
+ /**
503
+ * The concurrent Merkle tree account storing the compressed leaves,
504
+ * owned by the account compression program.
505
+ */
401
506
  merkleTree: Address<TAccountMerkleTree>;
507
+ /** MPL Core collection account the asset belongs to (V2 collections). */
402
508
  coreCollection?: Address<TAccountCoreCollection>;
509
+ /**
510
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
511
+ * can reconstruct the tree.
512
+ */
403
513
  logWrapper?: Address<TAccountLogWrapper>;
514
+ /**
515
+ * The SPL/MPL Account Compression program that owns and manages the
516
+ * Merkle tree.
517
+ */
404
518
  compressionProgram?: Address<TAccountCompressionProgram>;
519
+ /** The Solana System program. */
405
520
  systemProgram?: Address<TAccountSystemProgram>;
406
521
  root: UpdateAssetDataV2InstructionDataArgs["root"];
407
522
  dataHash: UpdateAssetDataV2InstructionDataArgs["dataHash"];
@@ -412,8 +527,15 @@ export interface UpdateAssetDataV2Input<
412
527
  index: UpdateAssetDataV2InstructionDataArgs["index"];
413
528
  newAssetData: UpdateAssetDataV2InstructionDataArgs["newAssetData"];
414
529
  newAssetDataSchema: UpdateAssetDataV2InstructionDataArgs["newAssetDataSchema"];
415
- }
530
+ };
416
531
 
532
+ /**
533
+ * Updates the off-chain asset data hash and status flags of a
534
+ * `LeafSchema` V2 leaf node.
535
+ *
536
+ * Callable by the collection authority, or the tree owner/delegate for
537
+ * assets not in a verified collection.
538
+ */
417
539
  export function getUpdateAssetDataV2Instruction<
418
540
  TAccountTreeAuthority extends string,
419
541
  TAccountPayer extends string,
@@ -527,29 +649,54 @@ export function getUpdateAssetDataV2Instruction<
527
649
  >);
528
650
  }
529
651
 
530
- export interface ParsedUpdateAssetDataV2Instruction<
652
+ export type ParsedUpdateAssetDataV2Instruction<
531
653
  TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
532
654
  TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
533
- > {
655
+ > = {
534
656
  programAddress: Address<TProgram>;
535
657
  accounts: {
658
+ /**
659
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
660
+ * as the tree's authority for CPIs into the compression program.
661
+ */
536
662
  treeAuthority: TAccountMetas[0];
663
+ /** Account that pays for the transaction and any account rent. */
537
664
  payer: TAccountMetas[1];
538
665
  /**
539
- * Either collection authority or tree owner/delegate, depending on
540
- * whether the item is in a verified collection. Defaults to `payer`
666
+ * Either the collection authority or the tree owner/delegate,
667
+ * depending on whether the asset is in a verified collection.
668
+ * Defaults to `payer`.
541
669
  */
542
670
  authority?: TAccountMetas[2] | undefined;
671
+ /** Owner of the compressed NFT leaf being operated on. */
543
672
  leafOwner: TAccountMetas[3];
673
+ /**
674
+ * Delegate authority for the leaf; defaults to the leaf owner when no
675
+ * delegate is set.
676
+ */
544
677
  leafDelegate?: TAccountMetas[4] | undefined;
678
+ /**
679
+ * The concurrent Merkle tree account storing the compressed leaves,
680
+ * owned by the account compression program.
681
+ */
545
682
  merkleTree: TAccountMetas[5];
683
+ /** MPL Core collection account the asset belongs to (V2 collections). */
546
684
  coreCollection?: TAccountMetas[6] | undefined;
685
+ /**
686
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
687
+ * can reconstruct the tree.
688
+ */
547
689
  logWrapper: TAccountMetas[7];
690
+ /**
691
+ * The SPL/MPL Account Compression program that owns and manages the
692
+ * Merkle tree.
693
+ */
548
694
  compressionProgram: TAccountMetas[8];
695
+ /** The Solana System program. */
549
696
  systemProgram: TAccountMetas[9];
550
697
  };
551
698
  data: UpdateAssetDataV2InstructionData;
552
- }
699
+ };
553
700
 
554
701
  export function parseUpdateAssetDataV2Instruction<
555
702
  TProgram extends string,