@macalinao/clients-mpl-bubblegum 0.3.1 → 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 +6 -6
  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 +157 -35
  266. package/src/generated/instructions/burnV2.ts +197 -52
  267. package/src/generated/instructions/cancelRedeem.ts +116 -32
  268. package/src/generated/instructions/closeTreeV2.ts +96 -35
  269. package/src/generated/instructions/collectV2.ts +34 -23
  270. package/src/generated/instructions/compress.ts +136 -30
  271. package/src/generated/instructions/createTree.ts +137 -33
  272. package/src/generated/instructions/createTreeV2.ts +128 -36
  273. package/src/generated/instructions/decompressV1.ts +124 -31
  274. package/src/generated/instructions/delegate.ts +159 -38
  275. package/src/generated/instructions/delegateAndFreezeV2.ts +191 -51
  276. package/src/generated/instructions/delegateV2.ts +189 -51
  277. package/src/generated/instructions/freezeV2.ts +193 -49
  278. package/src/generated/instructions/mintToCollectionV1.ts +186 -37
  279. package/src/generated/instructions/mintV1.ts +127 -31
  280. package/src/generated/instructions/mintV2.ts +184 -45
  281. package/src/generated/instructions/redeem.ts +172 -38
  282. package/src/generated/instructions/setAndVerifyCollection.ts +236 -54
  283. package/src/generated/instructions/setCollectionV2.ts +202 -58
  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 +184 -52
  287. package/src/generated/instructions/setTreeDelegate.ts +82 -28
  288. package/src/generated/instructions/thawAndRevokeV2.ts +179 -48
  289. package/src/generated/instructions/thawV2.ts +185 -49
  290. package/src/generated/instructions/transfer.ts +156 -35
  291. package/src/generated/instructions/transferV2.ts +185 -52
  292. package/src/generated/instructions/unverifyCollection.ts +229 -54
  293. package/src/generated/instructions/unverifyCreator.ts +181 -39
  294. package/src/generated/instructions/unverifyCreatorV2.ts +164 -46
  295. package/src/generated/instructions/updateAssetDataV2.ts +200 -50
  296. package/src/generated/instructions/updateMetadata.ts +200 -52
  297. package/src/generated/instructions/updateMetadataV2.ts +183 -54
  298. package/src/generated/instructions/verifyCollection.ts +229 -54
  299. package/src/generated/instructions/verifyCreator.ts +181 -39
  300. package/src/generated/instructions/verifyCreatorV2.ts +164 -46
  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,23 +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
- FixedSizeCodec,
14
- FixedSizeDecoder,
15
- FixedSizeEncoder,
16
- Instruction,
17
- InstructionWithAccounts,
18
- InstructionWithData,
19
- ReadonlyAccount,
20
- ReadonlySignerAccount,
21
- ReadonlyUint8Array,
22
- TransactionSigner,
23
- WritableAccount,
24
- } from "@solana/kit";
25
- import type { ResolvedInstructionAccount } from "@solana/program-client-core";
26
9
  import {
27
10
  combineCodec,
28
11
  fixDecoderSize,
@@ -33,19 +16,34 @@ import {
33
16
  getBytesEncoder,
34
17
  getStructDecoder,
35
18
  getStructEncoder,
36
- getU8Decoder,
37
- getU8Encoder,
38
19
  getU32Decoder,
39
20
  getU32Encoder,
40
21
  getU64Decoder,
41
22
  getU64Encoder,
23
+ getU8Decoder,
24
+ getU8Encoder,
42
25
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
43
26
  SolanaError,
44
27
  transformEncoder,
28
+ type AccountMeta,
29
+ type AccountSignerMeta,
30
+ type Address,
31
+ type FixedSizeCodec,
32
+ type FixedSizeDecoder,
33
+ type FixedSizeEncoder,
34
+ type Instruction,
35
+ type InstructionWithAccounts,
36
+ type InstructionWithData,
37
+ type ReadonlyAccount,
38
+ type ReadonlySignerAccount,
39
+ type ReadonlyUint8Array,
40
+ type TransactionSigner,
41
+ type WritableAccount,
45
42
  } from "@solana/kit";
46
43
  import {
47
44
  getAccountMetaFactory,
48
45
  getAddressFromResolvedInstructionAccount,
46
+ type ResolvedInstructionAccount,
49
47
  } from "@solana/program-client-core";
50
48
  import { findTreeConfigPda } from "../pdas/index.js";
51
49
  import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
@@ -105,22 +103,64 @@ export type DelegateInstruction<
105
103
  ]
106
104
  >;
107
105
 
108
- export interface DelegateInstructionData {
106
+ export type DelegateInstructionData = {
109
107
  discriminator: ReadonlyUint8Array;
110
- root: number[];
111
- dataHash: number[];
112
- creatorHash: number[];
108
+ /**
109
+ * Current Merkle root of the tree, used together with the Merkle proof
110
+ * (passed as remaining accounts) to verify the leaf being operated on.
111
+ */
112
+ root: Array<number>;
113
+ /**
114
+ * Keccak256 hash of the leaf's metadata, used together with `root` to
115
+ * verify the leaf before it is modified.
116
+ */
117
+ dataHash: Array<number>;
118
+ /**
119
+ * Keccak256 hash of the leaf's creators array, used together with
120
+ * `root` to verify the leaf before it is modified.
121
+ */
122
+ creatorHash: Array<number>;
123
+ /**
124
+ * Tree-scoped nonce identifying the leaf, equal to the tree's
125
+ * `numMinted` at the time the leaf was minted. Combined with the tree
126
+ * address to derive the leaf's asset id.
127
+ */
113
128
  nonce: bigint;
129
+ /**
130
+ * Position of the leaf within the Merkle tree, used with the Merkle
131
+ * proof to locate and verify the leaf.
132
+ */
114
133
  index: number;
115
- }
134
+ };
116
135
 
117
- export interface DelegateInstructionDataArgs {
118
- root: number[];
119
- dataHash: number[];
120
- creatorHash: number[];
136
+ export type DelegateInstructionDataArgs = {
137
+ /**
138
+ * Current Merkle root of the tree, used together with the Merkle proof
139
+ * (passed as remaining accounts) to verify the leaf being operated on.
140
+ */
141
+ root: Array<number>;
142
+ /**
143
+ * Keccak256 hash of the leaf's metadata, used together with `root` to
144
+ * verify the leaf before it is modified.
145
+ */
146
+ dataHash: Array<number>;
147
+ /**
148
+ * Keccak256 hash of the leaf's creators array, used together with
149
+ * `root` to verify the leaf before it is modified.
150
+ */
151
+ creatorHash: Array<number>;
152
+ /**
153
+ * Tree-scoped nonce identifying the leaf, equal to the tree's
154
+ * `numMinted` at the time the leaf was minted. Combined with the tree
155
+ * address to derive the leaf's asset id.
156
+ */
121
157
  nonce: number | bigint;
158
+ /**
159
+ * Position of the leaf within the Merkle tree, used with the Merkle
160
+ * proof to locate and verify the leaf.
161
+ */
122
162
  index: number;
123
- }
163
+ };
124
164
 
125
165
  export function getDelegateInstructionDataEncoder(): FixedSizeEncoder<DelegateInstructionDataArgs> {
126
166
  return transformEncoder(
@@ -157,7 +197,7 @@ export function getDelegateInstructionDataCodec(): FixedSizeCodec<
157
197
  );
158
198
  }
159
199
 
160
- export interface DelegateAsyncInput<
200
+ export type DelegateAsyncInput<
161
201
  TAccountTreeAuthority extends string = string,
162
202
  TAccountLeafOwner extends string = string,
163
203
  TAccountPreviousLeafDelegate extends string = string,
@@ -166,22 +206,51 @@ export interface DelegateAsyncInput<
166
206
  TAccountLogWrapper extends string = string,
167
207
  TAccountCompressionProgram extends string = string,
168
208
  TAccountSystemProgram extends string = string,
169
- > {
209
+ > = {
210
+ /**
211
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
212
+ * as the tree's authority for CPIs into the compression program.
213
+ */
170
214
  treeAuthority?: Address<TAccountTreeAuthority>;
215
+ /** Owner of the compressed NFT leaf being operated on. */
171
216
  leafOwner: TransactionSigner<TAccountLeafOwner>;
217
+ /** The leaf's delegate before this instruction runs. */
172
218
  previousLeafDelegate: Address<TAccountPreviousLeafDelegate>;
219
+ /**
220
+ * Delegate to set on the leaf; pass the leaf owner to clear an
221
+ * existing delegate.
222
+ */
173
223
  newLeafDelegate: Address<TAccountNewLeafDelegate>;
224
+ /**
225
+ * The concurrent Merkle tree account storing the compressed leaves,
226
+ * owned by the account compression program.
227
+ */
174
228
  merkleTree: Address<TAccountMerkleTree>;
229
+ /**
230
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
231
+ * can reconstruct the tree.
232
+ */
175
233
  logWrapper?: Address<TAccountLogWrapper>;
234
+ /**
235
+ * The SPL/MPL Account Compression program that owns and manages the
236
+ * Merkle tree.
237
+ */
176
238
  compressionProgram?: Address<TAccountCompressionProgram>;
239
+ /** The Solana System program. */
177
240
  systemProgram?: Address<TAccountSystemProgram>;
178
241
  root: DelegateInstructionDataArgs["root"];
179
242
  dataHash: DelegateInstructionDataArgs["dataHash"];
180
243
  creatorHash: DelegateInstructionDataArgs["creatorHash"];
181
244
  nonce: DelegateInstructionDataArgs["nonce"];
182
245
  index: DelegateInstructionDataArgs["index"];
183
- }
246
+ };
184
247
 
248
+ /**
249
+ * Sets (or clears) the delegate authority for a compressed NFT leaf.
250
+ *
251
+ * The delegate may transfer or burn the leaf on the owner's behalf.
252
+ * Pass the leaf owner as `newLeafDelegate` to clear an existing delegate.
253
+ */
185
254
  export async function getDelegateInstructionAsync<
186
255
  TAccountTreeAuthority extends string,
187
256
  TAccountLeafOwner extends string,
@@ -299,7 +368,7 @@ export async function getDelegateInstructionAsync<
299
368
  >);
300
369
  }
301
370
 
302
- export interface DelegateInput<
371
+ export type DelegateInput<
303
372
  TAccountTreeAuthority extends string = string,
304
373
  TAccountLeafOwner extends string = string,
305
374
  TAccountPreviousLeafDelegate extends string = string,
@@ -308,22 +377,51 @@ export interface DelegateInput<
308
377
  TAccountLogWrapper extends string = string,
309
378
  TAccountCompressionProgram extends string = string,
310
379
  TAccountSystemProgram extends string = string,
311
- > {
380
+ > = {
381
+ /**
382
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
383
+ * as the tree's authority for CPIs into the compression program.
384
+ */
312
385
  treeAuthority: Address<TAccountTreeAuthority>;
386
+ /** Owner of the compressed NFT leaf being operated on. */
313
387
  leafOwner: TransactionSigner<TAccountLeafOwner>;
388
+ /** The leaf's delegate before this instruction runs. */
314
389
  previousLeafDelegate: Address<TAccountPreviousLeafDelegate>;
390
+ /**
391
+ * Delegate to set on the leaf; pass the leaf owner to clear an
392
+ * existing delegate.
393
+ */
315
394
  newLeafDelegate: Address<TAccountNewLeafDelegate>;
395
+ /**
396
+ * The concurrent Merkle tree account storing the compressed leaves,
397
+ * owned by the account compression program.
398
+ */
316
399
  merkleTree: Address<TAccountMerkleTree>;
400
+ /**
401
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
402
+ * can reconstruct the tree.
403
+ */
317
404
  logWrapper?: Address<TAccountLogWrapper>;
405
+ /**
406
+ * The SPL/MPL Account Compression program that owns and manages the
407
+ * Merkle tree.
408
+ */
318
409
  compressionProgram?: Address<TAccountCompressionProgram>;
410
+ /** The Solana System program. */
319
411
  systemProgram?: Address<TAccountSystemProgram>;
320
412
  root: DelegateInstructionDataArgs["root"];
321
413
  dataHash: DelegateInstructionDataArgs["dataHash"];
322
414
  creatorHash: DelegateInstructionDataArgs["creatorHash"];
323
415
  nonce: DelegateInstructionDataArgs["nonce"];
324
416
  index: DelegateInstructionDataArgs["index"];
325
- }
417
+ };
326
418
 
419
+ /**
420
+ * Sets (or clears) the delegate authority for a compressed NFT leaf.
421
+ *
422
+ * The delegate may transfer or burn the leaf on the owner's behalf.
423
+ * Pass the leaf owner as `newLeafDelegate` to clear an existing delegate.
424
+ */
327
425
  export function getDelegateInstruction<
328
426
  TAccountTreeAuthority extends string,
329
427
  TAccountLeafOwner extends string,
@@ -431,23 +529,46 @@ export function getDelegateInstruction<
431
529
  >);
432
530
  }
433
531
 
434
- export interface ParsedDelegateInstruction<
532
+ export type ParsedDelegateInstruction<
435
533
  TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
436
534
  TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
437
- > {
535
+ > = {
438
536
  programAddress: Address<TProgram>;
439
537
  accounts: {
538
+ /**
539
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
540
+ * as the tree's authority for CPIs into the compression program.
541
+ */
440
542
  treeAuthority: TAccountMetas[0];
543
+ /** Owner of the compressed NFT leaf being operated on. */
441
544
  leafOwner: TAccountMetas[1];
545
+ /** The leaf's delegate before this instruction runs. */
442
546
  previousLeafDelegate: TAccountMetas[2];
547
+ /**
548
+ * Delegate to set on the leaf; pass the leaf owner to clear an
549
+ * existing delegate.
550
+ */
443
551
  newLeafDelegate: TAccountMetas[3];
552
+ /**
553
+ * The concurrent Merkle tree account storing the compressed leaves,
554
+ * owned by the account compression program.
555
+ */
444
556
  merkleTree: TAccountMetas[4];
557
+ /**
558
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
559
+ * can reconstruct the tree.
560
+ */
445
561
  logWrapper: TAccountMetas[5];
562
+ /**
563
+ * The SPL/MPL Account Compression program that owns and manages the
564
+ * Merkle tree.
565
+ */
446
566
  compressionProgram: TAccountMetas[6];
567
+ /** The Solana System program. */
447
568
  systemProgram: TAccountMetas[7];
448
569
  };
449
570
  data: DelegateInstructionData;
450
- }
571
+ };
451
572
 
452
573
  export function parseDelegateInstruction<
453
574
  TProgram extends string,
@@ -6,26 +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
9
  import {
30
10
  combineCodec,
31
11
  fixDecoderSize,
@@ -38,19 +18,37 @@ import {
38
18
  getOptionEncoder,
39
19
  getStructDecoder,
40
20
  getStructEncoder,
41
- getU8Decoder,
42
- getU8Encoder,
43
21
  getU32Decoder,
44
22
  getU32Encoder,
45
23
  getU64Decoder,
46
24
  getU64Encoder,
25
+ getU8Decoder,
26
+ getU8Encoder,
47
27
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
48
28
  SolanaError,
49
29
  transformEncoder,
30
+ type AccountMeta,
31
+ type AccountSignerMeta,
32
+ type Address,
33
+ type Codec,
34
+ type Decoder,
35
+ type Encoder,
36
+ type Instruction,
37
+ type InstructionWithAccounts,
38
+ type InstructionWithData,
39
+ type Option,
40
+ type OptionOrNullable,
41
+ type ReadonlyAccount,
42
+ type ReadonlySignerAccount,
43
+ type ReadonlyUint8Array,
44
+ type TransactionSigner,
45
+ type WritableAccount,
46
+ type WritableSignerAccount,
50
47
  } from "@solana/kit";
51
48
  import {
52
49
  getAccountMetaFactory,
53
50
  getAddressFromResolvedInstructionAccount,
51
+ type ResolvedInstructionAccount,
54
52
  } from "@solana/program-client-core";
55
53
  import { findTreeConfigPda } from "../pdas/index.js";
56
54
  import { BUBBLEGUM_PROGRAM_ADDRESS } from "../programs/index.js";
@@ -116,28 +114,94 @@ export type DelegateAndFreezeV2Instruction<
116
114
  ]
117
115
  >;
118
116
 
119
- export interface DelegateAndFreezeV2InstructionData {
117
+ export type DelegateAndFreezeV2InstructionData = {
120
118
  discriminator: ReadonlyUint8Array;
121
- root: number[];
122
- dataHash: number[];
123
- creatorHash: number[];
124
- collectionHash: Option<number[]>;
125
- assetDataHash: Option<number[]>;
119
+ /**
120
+ * Current Merkle root of the tree, used together with the Merkle proof
121
+ * (passed as remaining accounts) to verify the leaf being operated on.
122
+ */
123
+ root: Array<number>;
124
+ /**
125
+ * Keccak256 hash of the leaf's metadata, used together with `root` to
126
+ * verify the leaf before it is modified.
127
+ */
128
+ dataHash: Array<number>;
129
+ /**
130
+ * Keccak256 hash of the leaf's creators array, used together with
131
+ * `root` to verify the leaf before it is modified.
132
+ */
133
+ creatorHash: Array<number>;
134
+ /**
135
+ * Expected current `collectionHash` of the `LeafSchema` V2 leaf, if
136
+ * any, verified before this instruction updates the leaf.
137
+ */
138
+ collectionHash: Option<Array<number>>;
139
+ /**
140
+ * Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
141
+ * carried through unchanged by this instruction.
142
+ */
143
+ assetDataHash: Option<Array<number>>;
144
+ /**
145
+ * Expected current status flags (e.g. frozen, non-transferable) of the
146
+ * `LeafSchema` V2 leaf, verified before this instruction updates them.
147
+ */
126
148
  flags: Option<number>;
149
+ /**
150
+ * Tree-scoped nonce identifying the leaf, equal to the tree's
151
+ * `numMinted` at the time the leaf was minted. Combined with the tree
152
+ * address to derive the leaf's asset id.
153
+ */
127
154
  nonce: bigint;
155
+ /**
156
+ * Position of the leaf within the Merkle tree, used with the Merkle
157
+ * proof to locate and verify the leaf.
158
+ */
128
159
  index: number;
129
- }
160
+ };
130
161
 
131
- export interface DelegateAndFreezeV2InstructionDataArgs {
132
- root: number[];
133
- dataHash: number[];
134
- creatorHash: number[];
135
- collectionHash: OptionOrNullable<number[]>;
136
- assetDataHash: OptionOrNullable<number[]>;
162
+ export type DelegateAndFreezeV2InstructionDataArgs = {
163
+ /**
164
+ * Current Merkle root of the tree, used together with the Merkle proof
165
+ * (passed as remaining accounts) to verify the leaf being operated on.
166
+ */
167
+ root: Array<number>;
168
+ /**
169
+ * Keccak256 hash of the leaf's metadata, used together with `root` to
170
+ * verify the leaf before it is modified.
171
+ */
172
+ dataHash: Array<number>;
173
+ /**
174
+ * Keccak256 hash of the leaf's creators array, used together with
175
+ * `root` to verify the leaf before it is modified.
176
+ */
177
+ creatorHash: Array<number>;
178
+ /**
179
+ * Expected current `collectionHash` of the `LeafSchema` V2 leaf, if
180
+ * any, verified before this instruction updates the leaf.
181
+ */
182
+ collectionHash: OptionOrNullable<Array<number>>;
183
+ /**
184
+ * Expected current `assetDataHash` of the `LeafSchema` V2 leaf, if any,
185
+ * carried through unchanged by this instruction.
186
+ */
187
+ assetDataHash: OptionOrNullable<Array<number>>;
188
+ /**
189
+ * Expected current status flags (e.g. frozen, non-transferable) of the
190
+ * `LeafSchema` V2 leaf, verified before this instruction updates them.
191
+ */
137
192
  flags: OptionOrNullable<number>;
193
+ /**
194
+ * Tree-scoped nonce identifying the leaf, equal to the tree's
195
+ * `numMinted` at the time the leaf was minted. Combined with the tree
196
+ * address to derive the leaf's asset id.
197
+ */
138
198
  nonce: number | bigint;
199
+ /**
200
+ * Position of the leaf within the Merkle tree, used with the Merkle
201
+ * proof to locate and verify the leaf.
202
+ */
139
203
  index: number;
140
- }
204
+ };
141
205
 
142
206
  export function getDelegateAndFreezeV2InstructionDataEncoder(): Encoder<DelegateAndFreezeV2InstructionDataArgs> {
143
207
  return transformEncoder(
@@ -195,7 +259,7 @@ export function getDelegateAndFreezeV2InstructionDataCodec(): Codec<
195
259
  );
196
260
  }
197
261
 
198
- export interface DelegateAndFreezeV2AsyncInput<
262
+ export type DelegateAndFreezeV2AsyncInput<
199
263
  TAccountTreeAuthority extends string = string,
200
264
  TAccountPayer extends string = string,
201
265
  TAccountLeafOwner extends string = string,
@@ -205,17 +269,39 @@ export interface DelegateAndFreezeV2AsyncInput<
205
269
  TAccountLogWrapper extends string = string,
206
270
  TAccountCompressionProgram extends string = string,
207
271
  TAccountSystemProgram extends string = string,
208
- > {
272
+ > = {
273
+ /**
274
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
275
+ * as the tree's authority for CPIs into the compression program.
276
+ */
209
277
  treeAuthority?: Address<TAccountTreeAuthority>;
278
+ /** Account that pays for the transaction and any account rent. */
210
279
  payer: TransactionSigner<TAccountPayer>;
211
- /** Optional leaf owner, defaults to `payer` */
280
+ /** Optional leaf owner, defaults to `payer`. */
212
281
  leafOwner?: TransactionSigner<TAccountLeafOwner>;
213
- /** Defaults to `leaf_owner` */
282
+ /** Defaults to `leafOwner`. */
214
283
  previousLeafDelegate?: Address<TAccountPreviousLeafDelegate>;
284
+ /**
285
+ * Delegate to set on the leaf; pass the leaf owner to clear an
286
+ * existing delegate.
287
+ */
215
288
  newLeafDelegate: Address<TAccountNewLeafDelegate>;
289
+ /**
290
+ * The concurrent Merkle tree account storing the compressed leaves,
291
+ * owned by the account compression program.
292
+ */
216
293
  merkleTree: Address<TAccountMerkleTree>;
294
+ /**
295
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
296
+ * can reconstruct the tree.
297
+ */
217
298
  logWrapper?: Address<TAccountLogWrapper>;
299
+ /**
300
+ * The SPL/MPL Account Compression program that owns and manages the
301
+ * Merkle tree.
302
+ */
218
303
  compressionProgram?: Address<TAccountCompressionProgram>;
304
+ /** The Solana System program. */
219
305
  systemProgram?: Address<TAccountSystemProgram>;
220
306
  root: DelegateAndFreezeV2InstructionDataArgs["root"];
221
307
  dataHash: DelegateAndFreezeV2InstructionDataArgs["dataHash"];
@@ -225,8 +311,13 @@ export interface DelegateAndFreezeV2AsyncInput<
225
311
  flags: DelegateAndFreezeV2InstructionDataArgs["flags"];
226
312
  nonce: DelegateAndFreezeV2InstructionDataArgs["nonce"];
227
313
  index: DelegateAndFreezeV2InstructionDataArgs["index"];
228
- }
314
+ };
229
315
 
316
+ /**
317
+ * Delegates and freezes a `LeafSchema` V2 leaf node in a single
318
+ * instruction, preventing it from being transferred or burned while
319
+ * frozen.
320
+ */
230
321
  export async function getDelegateAndFreezeV2InstructionAsync<
231
322
  TAccountTreeAuthority extends string,
232
323
  TAccountPayer extends string,
@@ -350,7 +441,7 @@ export async function getDelegateAndFreezeV2InstructionAsync<
350
441
  >);
351
442
  }
352
443
 
353
- export interface DelegateAndFreezeV2Input<
444
+ export type DelegateAndFreezeV2Input<
354
445
  TAccountTreeAuthority extends string = string,
355
446
  TAccountPayer extends string = string,
356
447
  TAccountLeafOwner extends string = string,
@@ -360,17 +451,39 @@ export interface DelegateAndFreezeV2Input<
360
451
  TAccountLogWrapper extends string = string,
361
452
  TAccountCompressionProgram extends string = string,
362
453
  TAccountSystemProgram extends string = string,
363
- > {
454
+ > = {
455
+ /**
456
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
457
+ * as the tree's authority for CPIs into the compression program.
458
+ */
364
459
  treeAuthority: Address<TAccountTreeAuthority>;
460
+ /** Account that pays for the transaction and any account rent. */
365
461
  payer: TransactionSigner<TAccountPayer>;
366
- /** Optional leaf owner, defaults to `payer` */
462
+ /** Optional leaf owner, defaults to `payer`. */
367
463
  leafOwner?: TransactionSigner<TAccountLeafOwner>;
368
- /** Defaults to `leaf_owner` */
464
+ /** Defaults to `leafOwner`. */
369
465
  previousLeafDelegate?: Address<TAccountPreviousLeafDelegate>;
466
+ /**
467
+ * Delegate to set on the leaf; pass the leaf owner to clear an
468
+ * existing delegate.
469
+ */
370
470
  newLeafDelegate: Address<TAccountNewLeafDelegate>;
471
+ /**
472
+ * The concurrent Merkle tree account storing the compressed leaves,
473
+ * owned by the account compression program.
474
+ */
371
475
  merkleTree: Address<TAccountMerkleTree>;
476
+ /**
477
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
478
+ * can reconstruct the tree.
479
+ */
372
480
  logWrapper?: Address<TAccountLogWrapper>;
481
+ /**
482
+ * The SPL/MPL Account Compression program that owns and manages the
483
+ * Merkle tree.
484
+ */
373
485
  compressionProgram?: Address<TAccountCompressionProgram>;
486
+ /** The Solana System program. */
374
487
  systemProgram?: Address<TAccountSystemProgram>;
375
488
  root: DelegateAndFreezeV2InstructionDataArgs["root"];
376
489
  dataHash: DelegateAndFreezeV2InstructionDataArgs["dataHash"];
@@ -380,8 +493,13 @@ export interface DelegateAndFreezeV2Input<
380
493
  flags: DelegateAndFreezeV2InstructionDataArgs["flags"];
381
494
  nonce: DelegateAndFreezeV2InstructionDataArgs["nonce"];
382
495
  index: DelegateAndFreezeV2InstructionDataArgs["index"];
383
- }
496
+ };
384
497
 
498
+ /**
499
+ * Delegates and freezes a `LeafSchema` V2 leaf node in a single
500
+ * instruction, preventing it from being transferred or burned while
501
+ * frozen.
502
+ */
385
503
  export function getDelegateAndFreezeV2Instruction<
386
504
  TAccountTreeAuthority extends string,
387
505
  TAccountPayer extends string,
@@ -495,26 +613,48 @@ export function getDelegateAndFreezeV2Instruction<
495
613
  >);
496
614
  }
497
615
 
498
- export interface ParsedDelegateAndFreezeV2Instruction<
616
+ export type ParsedDelegateAndFreezeV2Instruction<
499
617
  TProgram extends string = typeof BUBBLEGUM_PROGRAM_ADDRESS,
500
618
  TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
501
- > {
619
+ > = {
502
620
  programAddress: Address<TProgram>;
503
621
  accounts: {
622
+ /**
623
+ * The tree's `TreeConfig` PDA, which stores its configuration and acts
624
+ * as the tree's authority for CPIs into the compression program.
625
+ */
504
626
  treeAuthority: TAccountMetas[0];
627
+ /** Account that pays for the transaction and any account rent. */
505
628
  payer: TAccountMetas[1];
506
- /** Optional leaf owner, defaults to `payer` */
629
+ /** Optional leaf owner, defaults to `payer`. */
507
630
  leafOwner?: TAccountMetas[2] | undefined;
508
- /** Defaults to `leaf_owner` */
631
+ /** Defaults to `leafOwner`. */
509
632
  previousLeafDelegate?: TAccountMetas[3] | undefined;
633
+ /**
634
+ * Delegate to set on the leaf; pass the leaf owner to clear an
635
+ * existing delegate.
636
+ */
510
637
  newLeafDelegate: TAccountMetas[4];
638
+ /**
639
+ * The concurrent Merkle tree account storing the compressed leaves,
640
+ * owned by the account compression program.
641
+ */
511
642
  merkleTree: TAccountMetas[5];
643
+ /**
644
+ * The SPL/MPL Noop program, used to log leaf data so off-chain indexers
645
+ * can reconstruct the tree.
646
+ */
512
647
  logWrapper: TAccountMetas[6];
648
+ /**
649
+ * The SPL/MPL Account Compression program that owns and manages the
650
+ * Merkle tree.
651
+ */
513
652
  compressionProgram: TAccountMetas[7];
653
+ /** The Solana System program. */
514
654
  systemProgram: TAccountMetas[8];
515
655
  };
516
656
  data: DelegateAndFreezeV2InstructionData;
517
- }
657
+ };
518
658
 
519
659
  export function parseDelegateAndFreezeV2Instruction<
520
660
  TProgram extends string,