phygital-token-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/__tests__/card-instance.test.d.ts +2 -0
  2. package/dist/__tests__/card-instance.test.d.ts.map +1 -0
  3. package/dist/__tests__/card-instance.test.js +38 -0
  4. package/dist/__tests__/card-instance.test.js.map +1 -0
  5. package/dist/__tests__/crypto-parity.test.d.ts +2 -0
  6. package/dist/__tests__/crypto-parity.test.d.ts.map +1 -0
  7. package/dist/__tests__/crypto-parity.test.js +60 -0
  8. package/dist/__tests__/crypto-parity.test.js.map +1 -0
  9. package/dist/__tests__/low-s-normalization.test.d.ts +2 -0
  10. package/dist/__tests__/low-s-normalization.test.d.ts.map +1 -0
  11. package/dist/__tests__/low-s-normalization.test.js +44 -0
  12. package/dist/__tests__/low-s-normalization.test.js.map +1 -0
  13. package/dist/__tests__/metadata-limits.test.d.ts +2 -0
  14. package/dist/__tests__/metadata-limits.test.d.ts.map +1 -0
  15. package/dist/__tests__/metadata-limits.test.js +33 -0
  16. package/dist/__tests__/metadata-limits.test.js.map +1 -0
  17. package/dist/consts.d.ts +19 -0
  18. package/dist/consts.d.ts.map +1 -0
  19. package/dist/consts.js +19 -0
  20. package/dist/consts.js.map +1 -0
  21. package/dist/generated/accounts/asset.d.ts +28 -0
  22. package/dist/generated/accounts/asset.d.ts.map +1 -0
  23. package/dist/generated/accounts/asset.js +52 -0
  24. package/dist/generated/accounts/asset.js.map +1 -0
  25. package/dist/generated/accounts/cardInstance.d.ts +35 -0
  26. package/dist/generated/accounts/cardInstance.d.ts.map +1 -0
  27. package/dist/generated/accounts/cardInstance.js +61 -0
  28. package/dist/generated/accounts/cardInstance.js.map +1 -0
  29. package/dist/generated/accounts/domainConfig.d.ts +28 -0
  30. package/dist/generated/accounts/domainConfig.d.ts.map +1 -0
  31. package/dist/generated/accounts/domainConfig.js +58 -0
  32. package/dist/generated/accounts/domainConfig.js.map +1 -0
  33. package/dist/generated/accounts/index.d.ts +3 -0
  34. package/dist/generated/accounts/index.d.ts.map +1 -0
  35. package/dist/generated/accounts/index.js +3 -0
  36. package/dist/generated/accounts/index.js.map +1 -0
  37. package/dist/generated/errors/index.d.ts +2 -0
  38. package/dist/generated/errors/index.d.ts.map +1 -0
  39. package/dist/generated/errors/index.js +2 -0
  40. package/dist/generated/errors/index.js.map +1 -0
  41. package/dist/generated/errors/phygitalNfts.d.ts +62 -0
  42. package/dist/generated/errors/phygitalNfts.d.ts.map +1 -0
  43. package/dist/generated/errors/phygitalNfts.js +87 -0
  44. package/dist/generated/errors/phygitalNfts.js.map +1 -0
  45. package/dist/generated/errors/phygitalToken.d.ts +34 -0
  46. package/dist/generated/errors/phygitalToken.d.ts.map +1 -0
  47. package/dist/generated/errors/phygitalToken.js +59 -0
  48. package/dist/generated/errors/phygitalToken.js.map +1 -0
  49. package/dist/generated/index.d.ts +7 -0
  50. package/dist/generated/index.d.ts.map +1 -0
  51. package/dist/generated/index.js +7 -0
  52. package/dist/generated/index.js.map +1 -0
  53. package/dist/generated/instructions/createCollectionMint.d.ts +108 -0
  54. package/dist/generated/instructions/createCollectionMint.d.ts.map +1 -0
  55. package/dist/generated/instructions/createCollectionMint.js +175 -0
  56. package/dist/generated/instructions/createCollectionMint.js.map +1 -0
  57. package/dist/generated/instructions/createDesignMint.d.ts +97 -0
  58. package/dist/generated/instructions/createDesignMint.d.ts.map +1 -0
  59. package/dist/generated/instructions/createDesignMint.js +164 -0
  60. package/dist/generated/instructions/createDesignMint.js.map +1 -0
  61. package/dist/generated/instructions/createDomainConfig.d.ts +46 -0
  62. package/dist/generated/instructions/createDomainConfig.d.ts.map +1 -0
  63. package/dist/generated/instructions/createDomainConfig.js +83 -0
  64. package/dist/generated/instructions/createDomainConfig.js.map +1 -0
  65. package/dist/generated/instructions/createGroupToken.d.ts +94 -0
  66. package/dist/generated/instructions/createGroupToken.d.ts.map +1 -0
  67. package/dist/generated/instructions/createGroupToken.js +150 -0
  68. package/dist/generated/instructions/createGroupToken.js.map +1 -0
  69. package/dist/generated/instructions/createMint.d.ts +77 -0
  70. package/dist/generated/instructions/createMint.d.ts.map +1 -0
  71. package/dist/generated/instructions/createMint.js +149 -0
  72. package/dist/generated/instructions/createMint.js.map +1 -0
  73. package/dist/generated/instructions/createToken.d.ts +88 -0
  74. package/dist/generated/instructions/createToken.d.ts.map +1 -0
  75. package/dist/generated/instructions/createToken.js +182 -0
  76. package/dist/generated/instructions/createToken.js.map +1 -0
  77. package/dist/generated/instructions/editDomainConfig.d.ts +50 -0
  78. package/dist/generated/instructions/editDomainConfig.d.ts.map +1 -0
  79. package/dist/generated/instructions/editDomainConfig.js +90 -0
  80. package/dist/generated/instructions/editDomainConfig.js.map +1 -0
  81. package/dist/generated/instructions/executeTransfer.d.ts +109 -0
  82. package/dist/generated/instructions/executeTransfer.d.ts.map +1 -0
  83. package/dist/generated/instructions/executeTransfer.js +243 -0
  84. package/dist/generated/instructions/executeTransfer.js.map +1 -0
  85. package/dist/generated/instructions/index.d.ts +7 -0
  86. package/dist/generated/instructions/index.d.ts.map +1 -0
  87. package/dist/generated/instructions/index.js +7 -0
  88. package/dist/generated/instructions/index.js.map +1 -0
  89. package/dist/generated/instructions/mintToken.d.ts +78 -0
  90. package/dist/generated/instructions/mintToken.d.ts.map +1 -0
  91. package/dist/generated/instructions/mintToken.js +167 -0
  92. package/dist/generated/instructions/mintToken.js.map +1 -0
  93. package/dist/generated/instructions/setLockState.d.ts +37 -0
  94. package/dist/generated/instructions/setLockState.d.ts.map +1 -0
  95. package/dist/generated/instructions/setLockState.js +62 -0
  96. package/dist/generated/instructions/setLockState.js.map +1 -0
  97. package/dist/generated/instructions/setTransferConfig.d.ts +88 -0
  98. package/dist/generated/instructions/setTransferConfig.d.ts.map +1 -0
  99. package/dist/generated/instructions/setTransferConfig.js +188 -0
  100. package/dist/generated/instructions/setTransferConfig.js.map +1 -0
  101. package/dist/generated/instructions/updateCounter.d.ts +45 -0
  102. package/dist/generated/instructions/updateCounter.d.ts.map +1 -0
  103. package/dist/generated/instructions/updateCounter.js +84 -0
  104. package/dist/generated/instructions/updateCounter.js.map +1 -0
  105. package/dist/generated/instructions/updateDomainConfig.d.ts +43 -0
  106. package/dist/generated/instructions/updateDomainConfig.d.ts.map +1 -0
  107. package/dist/generated/instructions/updateDomainConfig.js +81 -0
  108. package/dist/generated/instructions/updateDomainConfig.js.map +1 -0
  109. package/dist/generated/pdas/index.d.ts +2 -0
  110. package/dist/generated/pdas/index.d.ts.map +1 -0
  111. package/dist/generated/pdas/index.js +2 -0
  112. package/dist/generated/pdas/index.js.map +1 -0
  113. package/dist/generated/pdas/programAuthority.d.ts +5 -0
  114. package/dist/generated/pdas/programAuthority.d.ts.map +1 -0
  115. package/dist/generated/pdas/programAuthority.js +14 -0
  116. package/dist/generated/pdas/programAuthority.js.map +1 -0
  117. package/dist/generated/programs/index.d.ts +2 -0
  118. package/dist/generated/programs/index.d.ts.map +1 -0
  119. package/dist/generated/programs/index.js +2 -0
  120. package/dist/generated/programs/index.js.map +1 -0
  121. package/dist/generated/programs/phygitalNfts.d.ts +72 -0
  122. package/dist/generated/programs/phygitalNfts.d.ts.map +1 -0
  123. package/dist/generated/programs/phygitalNfts.js +136 -0
  124. package/dist/generated/programs/phygitalNfts.js.map +1 -0
  125. package/dist/generated/programs/phygitalToken.d.ts +65 -0
  126. package/dist/generated/programs/phygitalToken.d.ts.map +1 -0
  127. package/dist/generated/programs/phygitalToken.js +129 -0
  128. package/dist/generated/programs/phygitalToken.js.map +1 -0
  129. package/dist/generated/types/index.d.ts +2 -0
  130. package/dist/generated/types/index.d.ts.map +1 -0
  131. package/dist/generated/types/index.js +2 -0
  132. package/dist/generated/types/index.js.map +1 -0
  133. package/dist/generated/types/secp256r1Pubkey.d.ts +7 -0
  134. package/dist/generated/types/secp256r1Pubkey.d.ts.map +1 -0
  135. package/dist/generated/types/secp256r1Pubkey.js +11 -0
  136. package/dist/generated/types/secp256r1Pubkey.js.map +1 -0
  137. package/dist/generated/types/secp256r1VerifyArgs.d.ts +27 -0
  138. package/dist/generated/types/secp256r1VerifyArgs.d.ts.map +1 -0
  139. package/dist/generated/types/secp256r1VerifyArgs.js +24 -0
  140. package/dist/generated/types/secp256r1VerifyArgs.js.map +1 -0
  141. package/dist/index.d.ts +7 -0
  142. package/dist/index.d.ts.map +1 -0
  143. package/dist/index.js +7 -0
  144. package/dist/index.js.map +1 -0
  145. package/dist/instructions/collection.d.ts +14 -0
  146. package/dist/instructions/collection.d.ts.map +1 -0
  147. package/dist/instructions/collection.js +59 -0
  148. package/dist/instructions/collection.js.map +1 -0
  149. package/dist/instructions/index.d.ts +2 -0
  150. package/dist/instructions/index.d.ts.map +1 -0
  151. package/dist/instructions/index.js +2 -0
  152. package/dist/instructions/index.js.map +1 -0
  153. package/dist/instructions/internal/secp256r1Verify.d.ts +29 -0
  154. package/dist/instructions/internal/secp256r1Verify.d.ts.map +1 -0
  155. package/dist/instructions/internal/secp256r1Verify.js +132 -0
  156. package/dist/instructions/internal/secp256r1Verify.js.map +1 -0
  157. package/dist/instructions/mint.d.ts +33 -0
  158. package/dist/instructions/mint.d.ts.map +1 -0
  159. package/dist/instructions/mint.js +74 -0
  160. package/dist/instructions/mint.js.map +1 -0
  161. package/dist/instructions/secp256r1Verify.d.ts +29 -0
  162. package/dist/instructions/secp256r1Verify.d.ts.map +1 -0
  163. package/dist/instructions/secp256r1Verify.js +132 -0
  164. package/dist/instructions/secp256r1Verify.js.map +1 -0
  165. package/dist/instructions/setLockState.d.ts +19 -0
  166. package/dist/instructions/setLockState.d.ts.map +1 -0
  167. package/dist/instructions/setLockState.js +17 -0
  168. package/dist/instructions/setLockState.js.map +1 -0
  169. package/dist/instructions/setTransferConfig.d.ts +25 -0
  170. package/dist/instructions/setTransferConfig.d.ts.map +1 -0
  171. package/dist/instructions/setTransferConfig.js +20 -0
  172. package/dist/instructions/setTransferConfig.js.map +1 -0
  173. package/dist/instructions/transfer.d.ts +17 -0
  174. package/dist/instructions/transfer.d.ts.map +1 -0
  175. package/dist/instructions/transfer.js +67 -0
  176. package/dist/instructions/transfer.js.map +1 -0
  177. package/dist/instructions/updateCounter.d.ts +15 -0
  178. package/dist/instructions/updateCounter.d.ts.map +1 -0
  179. package/dist/instructions/updateCounter.js +20 -0
  180. package/dist/instructions/updateCounter.js.map +1 -0
  181. package/dist/mint-metadata.d.ts +13 -0
  182. package/dist/mint-metadata.d.ts.map +1 -0
  183. package/dist/mint-metadata.js +127 -0
  184. package/dist/mint-metadata.js.map +1 -0
  185. package/dist/passkeys/index.d.ts +18 -0
  186. package/dist/passkeys/index.d.ts.map +1 -0
  187. package/dist/passkeys/index.js +30 -0
  188. package/dist/passkeys/index.js.map +1 -0
  189. package/dist/passkeys/internal.d.ts +15 -0
  190. package/dist/passkeys/internal.d.ts.map +1 -0
  191. package/dist/passkeys/internal.js +113 -0
  192. package/dist/passkeys/internal.js.map +1 -0
  193. package/dist/secp256r1.d.ts +24 -0
  194. package/dist/secp256r1.d.ts.map +1 -0
  195. package/dist/secp256r1.js +38 -0
  196. package/dist/secp256r1.js.map +1 -0
  197. package/dist/transfer.d.ts +28 -0
  198. package/dist/transfer.d.ts.map +1 -0
  199. package/dist/transfer.js +109 -0
  200. package/dist/transfer.js.map +1 -0
  201. package/dist/utils/associatedToken.d.ts +3 -0
  202. package/dist/utils/associatedToken.d.ts.map +1 -0
  203. package/dist/utils/associatedToken.js +14 -0
  204. package/dist/utils/associatedToken.js.map +1 -0
  205. package/dist/utils/consts.d.ts +8 -0
  206. package/dist/utils/consts.d.ts.map +1 -0
  207. package/dist/utils/consts.js +9 -0
  208. package/dist/utils/consts.js.map +1 -0
  209. package/dist/utils/encoding.d.ts +3 -0
  210. package/dist/utils/encoding.d.ts.map +1 -0
  211. package/dist/utils/encoding.js +14 -0
  212. package/dist/utils/encoding.js.map +1 -0
  213. package/dist/utils/metadata.d.ts +48 -0
  214. package/dist/utils/metadata.d.ts.map +1 -0
  215. package/dist/utils/metadata.js +110 -0
  216. package/dist/utils/metadata.js.map +1 -0
  217. package/dist/utils/passkey/index.d.ts +17 -0
  218. package/dist/utils/passkey/index.d.ts.map +1 -0
  219. package/dist/utils/passkey/index.js +21 -0
  220. package/dist/utils/passkey/index.js.map +1 -0
  221. package/dist/utils/passkey/internal.d.ts +11 -0
  222. package/dist/utils/passkey/internal.d.ts.map +1 -0
  223. package/dist/utils/passkey/internal.js +115 -0
  224. package/dist/utils/passkey/internal.js.map +1 -0
  225. package/dist/utils/passkey/secp256r1.d.ts +26 -0
  226. package/dist/utils/passkey/secp256r1.d.ts.map +1 -0
  227. package/dist/utils/passkey/secp256r1.js +59 -0
  228. package/dist/utils/passkey/secp256r1.js.map +1 -0
  229. package/dist/utils/pdas/asset.d.ts +4 -0
  230. package/dist/utils/pdas/asset.d.ts.map +1 -0
  231. package/dist/utils/pdas/asset.js +14 -0
  232. package/dist/utils/pdas/asset.js.map +1 -0
  233. package/dist/utils/pdas/domainConfig.d.ts +3 -0
  234. package/dist/utils/pdas/domainConfig.d.ts.map +1 -0
  235. package/dist/utils/pdas/domainConfig.js +15 -0
  236. package/dist/utils/pdas/domainConfig.js.map +1 -0
  237. package/dist/utils/pdas/index.d.ts +3 -0
  238. package/dist/utils/pdas/index.d.ts.map +1 -0
  239. package/dist/utils/pdas/index.js +3 -0
  240. package/dist/utils/pdas/index.js.map +1 -0
  241. package/dist/utils/slotHash.d.ts +9 -0
  242. package/dist/utils/slotHash.d.ts.map +1 -0
  243. package/dist/utils/slotHash.js +39 -0
  244. package/dist/utils/slotHash.js.map +1 -0
  245. package/dist/utils/tokenOwner.d.ts +7 -0
  246. package/dist/utils/tokenOwner.d.ts.map +1 -0
  247. package/dist/utils/tokenOwner.js +24 -0
  248. package/dist/utils/tokenOwner.js.map +1 -0
  249. package/dist/utils/verify.d.ts +8 -0
  250. package/dist/utils/verify.d.ts.map +1 -0
  251. package/dist/utils/verify.js +45 -0
  252. package/dist/utils/verify.js.map +1 -0
  253. package/dist/utils.d.ts +10 -0
  254. package/dist/utils.d.ts.map +1 -0
  255. package/dist/utils.js +42 -0
  256. package/dist/utils.js.map +1 -0
  257. package/package.json +41 -0
@@ -0,0 +1,2 @@
1
+ export * from "./phygitalToken.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/index.ts"],"names":[],"mappings":"AAQA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./phygitalToken.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/errors/index.ts"],"names":[],"mappings":"AAQA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from "@solana/kit";
9
+ /** InvalidSecp256r1Instruction: The instruction preceding this program invocation is not a secp256r1 verification instruction */
10
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_INSTRUCTION = 6000;
11
+ /** SignatureIndexOutOfBounds: The signature index provided is out of bounds for the secp256r1 instruction */
12
+ export declare const PHYGITAL_TOKEN_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS = 6001;
13
+ /** InvalidSignatureOffsets: Failed to deserialize secp256r1 signature offsets from the instruction data */
14
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SIGNATURE_OFFSETS = 6002;
15
+ /** InvalidSecp256r1PublicKey: Invalid secp256r1 public key */
16
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_PUBLIC_KEY = 6003;
17
+ /** Secp256r1PubkeyMismatch: secp256r1 pubkey does not match token record */
18
+ export declare const PHYGITAL_TOKEN_ERROR__SECP256R1_PUBKEY_MISMATCH = 6004;
19
+ /** OwnerMismatch: Token owner mismatch */
20
+ export declare const PHYGITAL_TOKEN_ERROR__OWNER_MISMATCH = 6005;
21
+ /** ArithmeticOverflow: Arithmetic overflow */
22
+ export declare const PHYGITAL_TOKEN_ERROR__ARITHMETIC_OVERFLOW = 6006;
23
+ /** InvalidSlotHash: Slot not found in SlotHashes sysvar — signature has expired or is being replayed */
24
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SLOT_HASH = 6007;
25
+ /** StaleTransferSlot: Transfer slot must be greater than the last successful transfer slot */
26
+ export declare const PHYGITAL_TOKEN_ERROR__STALE_TRANSFER_SLOT = 6008;
27
+ /** ClientDataHashMismatch: Client data hash mismatch */
28
+ export declare const PHYGITAL_TOKEN_ERROR__CLIENT_DATA_HASH_MISMATCH = 6009;
29
+ /** MissingInstructionsSysvar: Missing instructions sysvar account */
30
+ export declare const PHYGITAL_TOKEN_ERROR__MISSING_INSTRUCTIONS_SYSVAR = 6010;
31
+ /** InvalidSysvarDataFormat: Invalid sysvar data format */
32
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SYSVAR_DATA_FORMAT = 6011;
33
+ /** MaxLengthExceeded: Max length exceeded */
34
+ export declare const PHYGITAL_TOKEN_ERROR__MAX_LENGTH_EXCEEDED = 6012;
35
+ /** AuthorityMismatch: Authority does not match */
36
+ export declare const PHYGITAL_TOKEN_ERROR__AUTHORITY_MISMATCH = 6013;
37
+ /** InvalidCustodyTokenAccount: Custody token account must be the canonical ATA for program_authority */
38
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_CUSTODY_TOKEN_ACCOUNT = 6014;
39
+ /** InvalidRecipient: Recipient cannot be program_authority */
40
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_RECIPIENT = 6015;
41
+ /** AssetIsCurrentlyLocked: The owner needs to unlock the asset to enable transfer. */
42
+ export declare const PHYGITAL_TOKEN_ERROR__ASSET_IS_CURRENTLY_LOCKED = 6016;
43
+ /** AssetIsNotConfigurable: This asset is not configurable. */
44
+ export declare const PHYGITAL_TOKEN_ERROR__ASSET_IS_NOT_CONFIGURABLE = 6017;
45
+ /** RpIdMismatch: Invalid rp id. */
46
+ export declare const PHYGITAL_TOKEN_ERROR__RP_ID_MISMATCH = 6018;
47
+ /** OriginMismatch: Invalid origin. */
48
+ export declare const PHYGITAL_TOKEN_ERROR__ORIGIN_MISMATCH = 6019;
49
+ /** DomainConfigMismatch: Invalid domain config. */
50
+ export declare const PHYGITAL_TOKEN_ERROR__DOMAIN_CONFIG_MISMATCH = 6020;
51
+ export type PhygitalTokenError = typeof PHYGITAL_TOKEN_ERROR__ARITHMETIC_OVERFLOW | typeof PHYGITAL_TOKEN_ERROR__ASSET_IS_CURRENTLY_LOCKED | typeof PHYGITAL_TOKEN_ERROR__ASSET_IS_NOT_CONFIGURABLE | typeof PHYGITAL_TOKEN_ERROR__AUTHORITY_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__CLIENT_DATA_HASH_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__DOMAIN_CONFIG_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__INVALID_CUSTODY_TOKEN_ACCOUNT | typeof PHYGITAL_TOKEN_ERROR__INVALID_RECIPIENT | typeof PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_INSTRUCTION | typeof PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_PUBLIC_KEY | typeof PHYGITAL_TOKEN_ERROR__INVALID_SIGNATURE_OFFSETS | typeof PHYGITAL_TOKEN_ERROR__INVALID_SLOT_HASH | typeof PHYGITAL_TOKEN_ERROR__INVALID_SYSVAR_DATA_FORMAT | typeof PHYGITAL_TOKEN_ERROR__MAX_LENGTH_EXCEEDED | typeof PHYGITAL_TOKEN_ERROR__MISSING_INSTRUCTIONS_SYSVAR | typeof PHYGITAL_TOKEN_ERROR__ORIGIN_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__OWNER_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__RP_ID_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__SECP256R1_PUBKEY_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS | typeof PHYGITAL_TOKEN_ERROR__STALE_TRANSFER_SLOT;
52
+ export declare function getPhygitalTokenErrorMessage(code: PhygitalTokenError): string;
53
+ export declare function isPhygitalTokenError<TProgramErrorCode extends PhygitalTokenError>(error: unknown, transactionMessage: {
54
+ instructions: Record<number, {
55
+ programAddress: Address;
56
+ }>;
57
+ }, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{
58
+ context: Readonly<{
59
+ code: TProgramErrorCode;
60
+ }>;
61
+ }>;
62
+ //# sourceMappingURL=phygitalToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phygitalNfts.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/phygitalNfts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,uCAAuC,EAC5C,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAGrB,iIAAiI;AACjI,eAAO,MAAM,kDAAkD,OAAS,CAAC;AACzE,6GAA6G;AAC7G,eAAO,MAAM,kDAAkD,OAAS,CAAC;AACzE,2GAA2G;AAC3G,eAAO,MAAM,8CAA8C,OAAS,CAAC;AACrE,8DAA8D;AAC9D,eAAO,MAAM,iDAAiD,OAAS,CAAC;AACxE,4EAA4E;AAC5E,eAAO,MAAM,8CAA8C,OAAS,CAAC;AACrE,0CAA0C;AAC1C,eAAO,MAAM,mCAAmC,OAAS,CAAC;AAC1D,8CAA8C;AAC9C,eAAO,MAAM,wCAAwC,OAAS,CAAC;AAC/D,wGAAwG;AACxG,eAAO,MAAM,sCAAsC,OAAS,CAAC;AAC7D,8FAA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E;AAED,wBAAgB,mBAAmB,CACjC,iBAAiB,SAAS,iBAAiB,EAE3C,KAAK,EAAE,OAAO,EACd,kBAAkB,EAAE;IAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC3D,EACD,IAAI,CAAC,EAAE,iBAAiB,GACvB,KAAK,IAAI,WAAW,CAAC,OAAO,uCAAuC,CAAC,GACrE,QAAQ,CAAC;IAAE,OAAO,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAO7D"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { isProgramError, } from "@solana/kit";
9
+ import { PHYGITAL_NFTS_PROGRAM_ADDRESS } from "../programs";
10
+ /** InvalidSecp256r1Instruction: The instruction preceding this program invocation is not a secp256r1 verification instruction */
11
+ export const PHYGITAL_NFTS_ERROR__INVALID_SECP256R1_INSTRUCTION = 0x1770; // 6000
12
+ /** SignatureIndexOutOfBounds: The signature index provided is out of bounds for the secp256r1 instruction */
13
+ export const PHYGITAL_NFTS_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS = 0x1771; // 6001
14
+ /** InvalidSignatureOffsets: Failed to deserialize secp256r1 signature offsets from the instruction data */
15
+ export const PHYGITAL_NFTS_ERROR__INVALID_SIGNATURE_OFFSETS = 0x1772; // 6002
16
+ /** InvalidSecp256r1PublicKey: Invalid secp256r1 public key */
17
+ export const PHYGITAL_NFTS_ERROR__INVALID_SECP256R1_PUBLIC_KEY = 0x1773; // 6003
18
+ /** Secp256r1PubkeyMismatch: secp256r1 pubkey does not match token record */
19
+ export const PHYGITAL_NFTS_ERROR__SECP256R1_PUBKEY_MISMATCH = 0x1774; // 6004
20
+ /** OwnerMismatch: Token owner mismatch */
21
+ export const PHYGITAL_NFTS_ERROR__OWNER_MISMATCH = 0x1775; // 6005
22
+ /** ArithmeticOverflow: Arithmetic overflow */
23
+ export const PHYGITAL_NFTS_ERROR__ARITHMETIC_OVERFLOW = 0x1776; // 6006
24
+ /** InvalidSlotHash: Slot not found in SlotHashes sysvar — signature has expired or is being replayed */
25
+ export const PHYGITAL_NFTS_ERROR__INVALID_SLOT_HASH = 0x1777; // 6007
26
+ /** StaleTransferSlot: Transfer slot must be greater than the last successful transfer slot */
27
+ export const PHYGITAL_NFTS_ERROR__STALE_TRANSFER_SLOT = 0x1778; // 6008
28
+ /** ClientDataHashMismatch: Client data hash mismatch */
29
+ export const PHYGITAL_NFTS_ERROR__CLIENT_DATA_HASH_MISMATCH = 0x1779; // 6009
30
+ /** MissingInstructionsSysvar: Missing instructions sysvar account */
31
+ export const PHYGITAL_NFTS_ERROR__MISSING_INSTRUCTIONS_SYSVAR = 0x177a; // 6010
32
+ /** InvalidSysvarDataFormat: Invalid sysvar data format */
33
+ export const PHYGITAL_NFTS_ERROR__INVALID_SYSVAR_DATA_FORMAT = 0x177b; // 6011
34
+ /** MaxLengthExceeded: Max length exceeded */
35
+ export const PHYGITAL_NFTS_ERROR__MAX_LENGTH_EXCEEDED = 0x177c; // 6012
36
+ /** AuthorityMismatch: Authority does not match */
37
+ export const PHYGITAL_NFTS_ERROR__AUTHORITY_MISMATCH = 0x177d; // 6013
38
+ /** InvalidCustodyTokenAccount: Custody token account must be the canonical ATA for program_authority */
39
+ export const PHYGITAL_NFTS_ERROR__INVALID_CUSTODY_TOKEN_ACCOUNT = 0x177e; // 6014
40
+ /** InvalidRecipient: Recipient cannot be program_authority */
41
+ export const PHYGITAL_NFTS_ERROR__INVALID_RECIPIENT = 0x177f; // 6015
42
+ /** AssetIsCurrentlyLocked: The owner needs to unlock the asset to enable transfer. */
43
+ export const PHYGITAL_NFTS_ERROR__ASSET_IS_CURRENTLY_LOCKED = 0x1780; // 6016
44
+ /** AssetIsNotConfigurable: This asset is not configurable. */
45
+ export const PHYGITAL_NFTS_ERROR__ASSET_IS_NOT_CONFIGURABLE = 0x1781; // 6017
46
+ /** RpIdMismatch: Invalid rp id. */
47
+ export const PHYGITAL_NFTS_ERROR__RP_ID_MISMATCH = 0x1782; // 6018
48
+ /** OriginMismatch: Invalid origin. */
49
+ export const PHYGITAL_NFTS_ERROR__ORIGIN_MISMATCH = 0x1783; // 6019
50
+ /** DomainConfigMismatch: Invalid domain config. */
51
+ export const PHYGITAL_NFTS_ERROR__DOMAIN_CONFIG_MISMATCH = 0x1784; // 6020
52
+ let phygitalNftsErrorMessages;
53
+ if (process.env["NODE_ENV"] !== "production") {
54
+ phygitalNftsErrorMessages = {
55
+ [PHYGITAL_NFTS_ERROR__ARITHMETIC_OVERFLOW]: `Arithmetic overflow`,
56
+ [PHYGITAL_NFTS_ERROR__ASSET_IS_CURRENTLY_LOCKED]: `The owner needs to unlock the asset to enable transfer.`,
57
+ [PHYGITAL_NFTS_ERROR__ASSET_IS_NOT_CONFIGURABLE]: `This asset is not configurable.`,
58
+ [PHYGITAL_NFTS_ERROR__AUTHORITY_MISMATCH]: `Authority does not match`,
59
+ [PHYGITAL_NFTS_ERROR__CLIENT_DATA_HASH_MISMATCH]: `Client data hash mismatch`,
60
+ [PHYGITAL_NFTS_ERROR__DOMAIN_CONFIG_MISMATCH]: `Invalid domain config.`,
61
+ [PHYGITAL_NFTS_ERROR__INVALID_CUSTODY_TOKEN_ACCOUNT]: `Custody token account must be the canonical ATA for program_authority`,
62
+ [PHYGITAL_NFTS_ERROR__INVALID_RECIPIENT]: `Recipient cannot be program_authority`,
63
+ [PHYGITAL_NFTS_ERROR__INVALID_SECP256R1_INSTRUCTION]: `The instruction preceding this program invocation is not a secp256r1 verification instruction`,
64
+ [PHYGITAL_NFTS_ERROR__INVALID_SECP256R1_PUBLIC_KEY]: `Invalid secp256r1 public key`,
65
+ [PHYGITAL_NFTS_ERROR__INVALID_SIGNATURE_OFFSETS]: `Failed to deserialize secp256r1 signature offsets from the instruction data`,
66
+ [PHYGITAL_NFTS_ERROR__INVALID_SLOT_HASH]: `Slot not found in SlotHashes sysvar — signature has expired or is being replayed`,
67
+ [PHYGITAL_NFTS_ERROR__INVALID_SYSVAR_DATA_FORMAT]: `Invalid sysvar data format`,
68
+ [PHYGITAL_NFTS_ERROR__MAX_LENGTH_EXCEEDED]: `Max length exceeded`,
69
+ [PHYGITAL_NFTS_ERROR__MISSING_INSTRUCTIONS_SYSVAR]: `Missing instructions sysvar account`,
70
+ [PHYGITAL_NFTS_ERROR__ORIGIN_MISMATCH]: `Invalid origin.`,
71
+ [PHYGITAL_NFTS_ERROR__OWNER_MISMATCH]: `Token owner mismatch`,
72
+ [PHYGITAL_NFTS_ERROR__RP_ID_MISMATCH]: `Invalid rp id.`,
73
+ [PHYGITAL_NFTS_ERROR__SECP256R1_PUBKEY_MISMATCH]: `secp256r1 pubkey does not match token record`,
74
+ [PHYGITAL_NFTS_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS]: `The signature index provided is out of bounds for the secp256r1 instruction`,
75
+ [PHYGITAL_NFTS_ERROR__STALE_TRANSFER_SLOT]: `Transfer slot must be greater than the last successful transfer slot`,
76
+ };
77
+ }
78
+ export function getPhygitalNftsErrorMessage(code) {
79
+ if (process.env["NODE_ENV"] !== "production") {
80
+ return phygitalNftsErrorMessages[code];
81
+ }
82
+ return "Error message not available in production bundles.";
83
+ }
84
+ export function isPhygitalNftsError(error, transactionMessage, code) {
85
+ return isProgramError(error, transactionMessage, PHYGITAL_NFTS_PROGRAM_ADDRESS, code);
86
+ }
87
+ //# sourceMappingURL=phygitalNfts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phygitalNfts.js","sourceRoot":"","sources":["../../../src/generated/errors/phygitalNfts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,GAIf,MAAM,aAAa,CAAC;AACrB,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iBAAiB;QACzD,CAAC,mCAAmC,CAAC,EAAE,sBAAsB;QAC7D,CAAC,mCAAmC,CAAC,EAAE,gBAAgB;QACvD,CAAC,8CAA8C,CAAC,EAAE,8CAA8C;QAChG,CAAC,kDAAkD,CAAC,EAAE,6EAA6E;QACnI,CAAC,wCAAwC,CAAC,EAAE,sEAAsE;KACnH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,IAAuB;IACjE,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,YAAY,EAAE,CAAC;QAC7C,OAAQ,yBAA+D,CACrE,IAAI,CACL,CAAC;IACJ,CAAC;IAED,OAAO,oDAAoD,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAGjC,KAAc,EACd,kBAEC,EACD,IAAwB;IAGxB,OAAO,cAAc,CACnB,KAAK,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,IAAI,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from "@solana/kit";
2
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_INSTRUCTION = 6000;
3
+ export declare const PHYGITAL_TOKEN_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS = 6001;
4
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SIGNATURE_OFFSETS = 6002;
5
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_PUBLIC_KEY = 6003;
6
+ export declare const PHYGITAL_TOKEN_ERROR__SECP256R1_PUBKEY_MISMATCH = 6004;
7
+ export declare const PHYGITAL_TOKEN_ERROR__OWNER_MISMATCH = 6005;
8
+ export declare const PHYGITAL_TOKEN_ERROR__ARITHMETIC_OVERFLOW = 6006;
9
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SLOT_HASH = 6007;
10
+ export declare const PHYGITAL_TOKEN_ERROR__STALE_TRANSFER_SLOT = 6008;
11
+ export declare const PHYGITAL_TOKEN_ERROR__CLIENT_DATA_HASH_MISMATCH = 6009;
12
+ export declare const PHYGITAL_TOKEN_ERROR__MISSING_INSTRUCTIONS_SYSVAR = 6010;
13
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_SYSVAR_DATA_FORMAT = 6011;
14
+ export declare const PHYGITAL_TOKEN_ERROR__MAX_LENGTH_EXCEEDED = 6012;
15
+ export declare const PHYGITAL_TOKEN_ERROR__AUTHORITY_MISMATCH = 6013;
16
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_CUSTODY_TOKEN_ACCOUNT = 6014;
17
+ export declare const PHYGITAL_TOKEN_ERROR__INVALID_RECIPIENT = 6015;
18
+ export declare const PHYGITAL_TOKEN_ERROR__ASSET_IS_CURRENTLY_LOCKED = 6016;
19
+ export declare const PHYGITAL_TOKEN_ERROR__ASSET_IS_NOT_CONFIGURABLE = 6017;
20
+ export declare const PHYGITAL_TOKEN_ERROR__RP_ID_MISMATCH = 6018;
21
+ export declare const PHYGITAL_TOKEN_ERROR__ORIGIN_MISMATCH = 6019;
22
+ export declare const PHYGITAL_TOKEN_ERROR__DOMAIN_CONFIG_MISMATCH = 6020;
23
+ export type PhygitalTokenError = typeof PHYGITAL_TOKEN_ERROR__ARITHMETIC_OVERFLOW | typeof PHYGITAL_TOKEN_ERROR__ASSET_IS_CURRENTLY_LOCKED | typeof PHYGITAL_TOKEN_ERROR__ASSET_IS_NOT_CONFIGURABLE | typeof PHYGITAL_TOKEN_ERROR__AUTHORITY_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__CLIENT_DATA_HASH_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__DOMAIN_CONFIG_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__INVALID_CUSTODY_TOKEN_ACCOUNT | typeof PHYGITAL_TOKEN_ERROR__INVALID_RECIPIENT | typeof PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_INSTRUCTION | typeof PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_PUBLIC_KEY | typeof PHYGITAL_TOKEN_ERROR__INVALID_SIGNATURE_OFFSETS | typeof PHYGITAL_TOKEN_ERROR__INVALID_SLOT_HASH | typeof PHYGITAL_TOKEN_ERROR__INVALID_SYSVAR_DATA_FORMAT | typeof PHYGITAL_TOKEN_ERROR__MAX_LENGTH_EXCEEDED | typeof PHYGITAL_TOKEN_ERROR__MISSING_INSTRUCTIONS_SYSVAR | typeof PHYGITAL_TOKEN_ERROR__ORIGIN_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__OWNER_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__RP_ID_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__SECP256R1_PUBKEY_MISMATCH | typeof PHYGITAL_TOKEN_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS | typeof PHYGITAL_TOKEN_ERROR__STALE_TRANSFER_SLOT;
24
+ export declare function getPhygitalTokenErrorMessage(code: PhygitalTokenError): string;
25
+ export declare function isPhygitalTokenError<TProgramErrorCode extends PhygitalTokenError>(error: unknown, transactionMessage: {
26
+ instructions: Record<number, {
27
+ programAddress: Address;
28
+ }>;
29
+ }, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{
30
+ context: Readonly<{
31
+ code: TProgramErrorCode;
32
+ }>;
33
+ }>;
34
+ //# sourceMappingURL=phygitalToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phygitalToken.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/phygitalToken.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,uCAAuC,EAC5C,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAIrB,eAAO,MAAM,mDAAmD,OAAS,CAAC;AAE1E,eAAO,MAAM,mDAAmD,OAAS,CAAC;AAE1E,eAAO,MAAM,+CAA+C,OAAS,CAAC;AAE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AkB,GAAG,MAAM,CAQ7E;AAED,wBAAgB,oBAAoB,CAClC,iBAAiB,SAAS,kBAAkB,EAE5C,KAAK,EAAE,OAAO,EACd,kBAAkB,EAAE;IAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC3D,EACD,IAAI,CAAC,EAAE,iBAAiB,GACvB,KAAK,IAAI,WAAW,CAAC,OAAO,uCAAuC,CAAC,GACrE,QAAQ,CAAC;IAAE,OAAO,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAO7D"}
@@ -0,0 +1,59 @@
1
+ import { isProgramError, } from "@solana/kit";
2
+ import { PHYGITAL_TOKEN_PROGRAM_ADDRESS } from "../programs/index.js";
3
+ export const PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_INSTRUCTION = 0x1770;
4
+ export const PHYGITAL_TOKEN_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS = 0x1771;
5
+ export const PHYGITAL_TOKEN_ERROR__INVALID_SIGNATURE_OFFSETS = 0x1772;
6
+ export const PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_PUBLIC_KEY = 0x1773;
7
+ export const PHYGITAL_TOKEN_ERROR__SECP256R1_PUBKEY_MISMATCH = 0x1774;
8
+ export const PHYGITAL_TOKEN_ERROR__OWNER_MISMATCH = 0x1775;
9
+ export const PHYGITAL_TOKEN_ERROR__ARITHMETIC_OVERFLOW = 0x1776;
10
+ export const PHYGITAL_TOKEN_ERROR__INVALID_SLOT_HASH = 0x1777;
11
+ export const PHYGITAL_TOKEN_ERROR__STALE_TRANSFER_SLOT = 0x1778;
12
+ export const PHYGITAL_TOKEN_ERROR__CLIENT_DATA_HASH_MISMATCH = 0x1779;
13
+ export const PHYGITAL_TOKEN_ERROR__MISSING_INSTRUCTIONS_SYSVAR = 0x177a;
14
+ export const PHYGITAL_TOKEN_ERROR__INVALID_SYSVAR_DATA_FORMAT = 0x177b;
15
+ export const PHYGITAL_TOKEN_ERROR__MAX_LENGTH_EXCEEDED = 0x177c;
16
+ export const PHYGITAL_TOKEN_ERROR__AUTHORITY_MISMATCH = 0x177d;
17
+ export const PHYGITAL_TOKEN_ERROR__INVALID_CUSTODY_TOKEN_ACCOUNT = 0x177e;
18
+ export const PHYGITAL_TOKEN_ERROR__INVALID_RECIPIENT = 0x177f;
19
+ export const PHYGITAL_TOKEN_ERROR__ASSET_IS_CURRENTLY_LOCKED = 0x1780;
20
+ export const PHYGITAL_TOKEN_ERROR__ASSET_IS_NOT_CONFIGURABLE = 0x1781;
21
+ export const PHYGITAL_TOKEN_ERROR__RP_ID_MISMATCH = 0x1782;
22
+ export const PHYGITAL_TOKEN_ERROR__ORIGIN_MISMATCH = 0x1783;
23
+ export const PHYGITAL_TOKEN_ERROR__DOMAIN_CONFIG_MISMATCH = 0x1784;
24
+ let phygitalTokenErrorMessages;
25
+ if (process.env["NODE_ENV"] !== "production") {
26
+ phygitalTokenErrorMessages = {
27
+ [PHYGITAL_TOKEN_ERROR__ARITHMETIC_OVERFLOW]: `Arithmetic overflow`,
28
+ [PHYGITAL_TOKEN_ERROR__ASSET_IS_CURRENTLY_LOCKED]: `The owner needs to unlock the asset to enable transfer.`,
29
+ [PHYGITAL_TOKEN_ERROR__ASSET_IS_NOT_CONFIGURABLE]: `This asset is not configurable.`,
30
+ [PHYGITAL_TOKEN_ERROR__AUTHORITY_MISMATCH]: `Authority does not match`,
31
+ [PHYGITAL_TOKEN_ERROR__CLIENT_DATA_HASH_MISMATCH]: `Client data hash mismatch`,
32
+ [PHYGITAL_TOKEN_ERROR__DOMAIN_CONFIG_MISMATCH]: `Invalid domain config.`,
33
+ [PHYGITAL_TOKEN_ERROR__INVALID_CUSTODY_TOKEN_ACCOUNT]: `Custody token account must be the canonical ATA for program_authority`,
34
+ [PHYGITAL_TOKEN_ERROR__INVALID_RECIPIENT]: `Recipient cannot be program_authority`,
35
+ [PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_INSTRUCTION]: `The instruction preceding this program invocation is not a secp256r1 verification instruction`,
36
+ [PHYGITAL_TOKEN_ERROR__INVALID_SECP256R1_PUBLIC_KEY]: `Invalid secp256r1 public key`,
37
+ [PHYGITAL_TOKEN_ERROR__INVALID_SIGNATURE_OFFSETS]: `Failed to deserialize secp256r1 signature offsets from the instruction data`,
38
+ [PHYGITAL_TOKEN_ERROR__INVALID_SLOT_HASH]: `Slot not found in SlotHashes sysvar — signature has expired or is being replayed`,
39
+ [PHYGITAL_TOKEN_ERROR__INVALID_SYSVAR_DATA_FORMAT]: `Invalid sysvar data format`,
40
+ [PHYGITAL_TOKEN_ERROR__MAX_LENGTH_EXCEEDED]: `Max length exceeded`,
41
+ [PHYGITAL_TOKEN_ERROR__MISSING_INSTRUCTIONS_SYSVAR]: `Missing instructions sysvar account`,
42
+ [PHYGITAL_TOKEN_ERROR__ORIGIN_MISMATCH]: `Invalid origin.`,
43
+ [PHYGITAL_TOKEN_ERROR__OWNER_MISMATCH]: `Token owner mismatch`,
44
+ [PHYGITAL_TOKEN_ERROR__RP_ID_MISMATCH]: `Invalid rp id.`,
45
+ [PHYGITAL_TOKEN_ERROR__SECP256R1_PUBKEY_MISMATCH]: `secp256r1 pubkey does not match token record`,
46
+ [PHYGITAL_TOKEN_ERROR__SIGNATURE_INDEX_OUT_OF_BOUNDS]: `The signature index provided is out of bounds for the secp256r1 instruction`,
47
+ [PHYGITAL_TOKEN_ERROR__STALE_TRANSFER_SLOT]: `Transfer slot must be greater than the last successful transfer slot`,
48
+ };
49
+ }
50
+ export function getPhygitalTokenErrorMessage(code) {
51
+ if (process.env["NODE_ENV"] !== "production") {
52
+ return phygitalTokenErrorMessages[code];
53
+ }
54
+ return "Error message not available in production bundles.";
55
+ }
56
+ export function isPhygitalTokenError(error, transactionMessage, code) {
57
+ return isProgramError(error, transactionMessage, PHYGITAL_TOKEN_PROGRAM_ADDRESS, code);
58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,0BAAiE,CACvE,IAAI,CACL,CAAC;IACJ,CAAC;IAED,OAAO,oDAAoD,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,oBAAoB,CAGlC,KAAc,EACd,kBAEC,EACD,IAAwB;IAGxB,OAAO,cAAc,CACnB,KAAK,EACL,kBAAkB,EAClB,8BAA8B,EAC9B,IAAI,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./accounts/index.js";
2
+ export * from "./errors/index.js";
3
+ export * from "./instructions/index.js";
4
+ export * from "./pdas/index.js";
5
+ export * from "./programs/index.js";
6
+ export * from "./types/index.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAQA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./accounts/index.js";
2
+ export * from "./errors/index.js";
3
+ export * from "./instructions/index.js";
4
+ export * from "./pdas/index.js";
5
+ export * from "./programs/index.js";
6
+ export * from "./types/index.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAQA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
9
+ import { PHYGITAL_TOKEN_PROGRAM_ADDRESS } from "../programs";
10
+ export declare const CREATE_COLLECTION_MINT_DISCRIMINATOR: ReadonlyUint8Array;
11
+ export declare function getCreateCollectionMintDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type CreateCollectionMintInstruction<TProgram extends string = typeof PHYGITAL_TOKEN_PROGRAM_ADDRESS, TAccountPayer extends string | AccountMeta<string> = string, TAccountOwner extends string | AccountMeta<string> = string, TAccountGroupMint extends string | AccountMeta<string> = string, TAccountGroupTokenMint extends string | AccountMeta<string> = string, TAccountGroupUpdateAuthority extends string | AccountMeta<string> = string, TAccountProgramAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
+ TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer,
14
+ TAccountOwner extends string ? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
15
+ TAccountGroupMint extends string ? WritableAccount<TAccountGroupMint> : TAccountGroupMint,
16
+ TAccountGroupTokenMint extends string ? WritableAccount<TAccountGroupTokenMint> : TAccountGroupTokenMint,
17
+ TAccountGroupUpdateAuthority extends string ? ReadonlySignerAccount<TAccountGroupUpdateAuthority> & AccountSignerMeta<TAccountGroupUpdateAuthority> : TAccountGroupUpdateAuthority,
18
+ TAccountProgramAuthority extends string ? ReadonlyAccount<TAccountProgramAuthority> : TAccountProgramAuthority,
19
+ TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
20
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
21
+ ...TRemainingAccounts
22
+ ]>;
23
+ export type CreateCollectionMintInstructionData = {
24
+ discriminator: ReadonlyUint8Array;
25
+ name: string;
26
+ symbol: string;
27
+ uri: string;
28
+ /** Maximum number of NFTs that can join this collection. */
29
+ maxSize: bigint;
30
+ /** Unique collection identifier — part of the group mint PDA seeds. */
31
+ uniqueId: Address;
32
+ };
33
+ export type CreateCollectionMintInstructionDataArgs = {
34
+ name: string;
35
+ symbol: string;
36
+ uri: string;
37
+ /** Maximum number of NFTs that can join this collection. */
38
+ maxSize: number | bigint;
39
+ /** Unique collection identifier — part of the group mint PDA seeds. */
40
+ uniqueId: Address;
41
+ };
42
+ export declare function getCreateCollectionMintInstructionDataEncoder(): Encoder<CreateCollectionMintInstructionDataArgs>;
43
+ export declare function getCreateCollectionMintInstructionDataDecoder(): Decoder<CreateCollectionMintInstructionData>;
44
+ export declare function getCreateCollectionMintInstructionDataCodec(): Codec<CreateCollectionMintInstructionDataArgs, CreateCollectionMintInstructionData>;
45
+ export type CreateCollectionMintAsyncInput<TAccountPayer extends string = string, TAccountOwner extends string = string, TAccountGroupMint extends string = string, TAccountGroupTokenMint extends string = string, TAccountGroupUpdateAuthority extends string = string, TAccountProgramAuthority extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
46
+ payer: TransactionSigner<TAccountPayer>;
47
+ /** Collection mint authority. */
48
+ owner: TransactionSigner<TAccountOwner>;
49
+ /** Collection mint PDA — account created in the handler via `create_account` + signer seeds. */
50
+ groupMint: Address<TAccountGroupMint>;
51
+ /** Parent Token-2022 group mint. When set, the new collection joins this group. */
52
+ groupTokenMint?: Address<TAccountGroupTokenMint>;
53
+ /** Must sign when `group_token_mint` is present; must match the parent group's update authority. */
54
+ groupUpdateAuthority?: TransactionSigner<TAccountGroupUpdateAuthority>;
55
+ programAuthority?: Address<TAccountProgramAuthority>;
56
+ tokenProgram?: Address<TAccountTokenProgram>;
57
+ systemProgram?: Address<TAccountSystemProgram>;
58
+ name: CreateCollectionMintInstructionDataArgs["name"];
59
+ symbol: CreateCollectionMintInstructionDataArgs["symbol"];
60
+ uri: CreateCollectionMintInstructionDataArgs["uri"];
61
+ maxSize: CreateCollectionMintInstructionDataArgs["maxSize"];
62
+ uniqueId: CreateCollectionMintInstructionDataArgs["uniqueId"];
63
+ };
64
+ export declare function getCreateCollectionMintInstructionAsync<TAccountPayer extends string, TAccountOwner extends string, TAccountGroupMint extends string, TAccountGroupTokenMint extends string, TAccountGroupUpdateAuthority extends string, TAccountProgramAuthority extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof PHYGITAL_TOKEN_PROGRAM_ADDRESS>(input: CreateCollectionMintAsyncInput<TAccountPayer, TAccountOwner, TAccountGroupMint, TAccountGroupTokenMint, TAccountGroupUpdateAuthority, TAccountProgramAuthority, TAccountTokenProgram, TAccountSystemProgram>, config?: {
65
+ programAddress?: TProgramAddress;
66
+ }): Promise<CreateCollectionMintInstruction<TProgramAddress, TAccountPayer, TAccountOwner, TAccountGroupMint, TAccountGroupTokenMint, TAccountGroupUpdateAuthority, TAccountProgramAuthority, TAccountTokenProgram, TAccountSystemProgram>>;
67
+ export type CreateCollectionMintInput<TAccountPayer extends string = string, TAccountOwner extends string = string, TAccountGroupMint extends string = string, TAccountGroupTokenMint extends string = string, TAccountGroupUpdateAuthority extends string = string, TAccountProgramAuthority extends string = string, TAccountTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
68
+ payer: TransactionSigner<TAccountPayer>;
69
+ /** Collection mint authority. */
70
+ owner: TransactionSigner<TAccountOwner>;
71
+ /** Collection mint PDA — account created in the handler via `create_account` + signer seeds. */
72
+ groupMint: Address<TAccountGroupMint>;
73
+ /** Parent Token-2022 group mint. When set, the new collection joins this group. */
74
+ groupTokenMint?: Address<TAccountGroupTokenMint>;
75
+ /** Must sign when `group_token_mint` is present; must match the parent group's update authority. */
76
+ groupUpdateAuthority?: TransactionSigner<TAccountGroupUpdateAuthority>;
77
+ programAuthority: Address<TAccountProgramAuthority>;
78
+ tokenProgram?: Address<TAccountTokenProgram>;
79
+ systemProgram?: Address<TAccountSystemProgram>;
80
+ name: CreateCollectionMintInstructionDataArgs["name"];
81
+ symbol: CreateCollectionMintInstructionDataArgs["symbol"];
82
+ uri: CreateCollectionMintInstructionDataArgs["uri"];
83
+ maxSize: CreateCollectionMintInstructionDataArgs["maxSize"];
84
+ uniqueId: CreateCollectionMintInstructionDataArgs["uniqueId"];
85
+ };
86
+ export declare function getCreateCollectionMintInstruction<TAccountPayer extends string, TAccountOwner extends string, TAccountGroupMint extends string, TAccountGroupTokenMint extends string, TAccountGroupUpdateAuthority extends string, TAccountProgramAuthority extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof PHYGITAL_TOKEN_PROGRAM_ADDRESS>(input: CreateCollectionMintInput<TAccountPayer, TAccountOwner, TAccountGroupMint, TAccountGroupTokenMint, TAccountGroupUpdateAuthority, TAccountProgramAuthority, TAccountTokenProgram, TAccountSystemProgram>, config?: {
87
+ programAddress?: TProgramAddress;
88
+ }): CreateCollectionMintInstruction<TProgramAddress, TAccountPayer, TAccountOwner, TAccountGroupMint, TAccountGroupTokenMint, TAccountGroupUpdateAuthority, TAccountProgramAuthority, TAccountTokenProgram, TAccountSystemProgram>;
89
+ export type ParsedCreateCollectionMintInstruction<TProgram extends string = typeof PHYGITAL_TOKEN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
90
+ programAddress: Address<TProgram>;
91
+ accounts: {
92
+ payer: TAccountMetas[0];
93
+ /** Collection mint authority. */
94
+ owner: TAccountMetas[1];
95
+ /** Collection mint PDA — account created in the handler via `create_account` + signer seeds. */
96
+ groupMint: TAccountMetas[2];
97
+ /** Parent Token-2022 group mint. When set, the new collection joins this group. */
98
+ groupTokenMint?: TAccountMetas[3] | undefined;
99
+ /** Must sign when `group_token_mint` is present; must match the parent group's update authority. */
100
+ groupUpdateAuthority?: TAccountMetas[4] | undefined;
101
+ programAuthority: TAccountMetas[5];
102
+ tokenProgram: TAccountMetas[6];
103
+ systemProgram: TAccountMetas[7];
104
+ };
105
+ data: CreateCollectionMintInstructionData;
106
+ };
107
+ export declare function parseCreateCollectionMintInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCreateCollectionMintInstruction<TProgram, TAccountMetas>;
108
+ //# sourceMappingURL=createCollectionMint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCollectionMint.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/createCollectionMint.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAqBL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,oCAAoC,EAAE,kBACG,CAAC;AAEvD,wBAAgB,yCAAyC,IAAI,kBAAkB,CAI9E;AAED,MAAM,MAAM,+BAA+B,CACzC,QAAQ,SAAS,MAAM,GAAG,OAAO,6BAA6B,EAC9D,aAAa,SAAS,MAAM,GAAG,WAAW,CAAC,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CAAC,CAAC,CAAC;QACnC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC/B,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KACjC,CAAC;IACF,IAAI,EAAE,mCAAmC,CAAC;CAC3C,CAAC;AAEF,wBAAgB,oCAAoC,CAClD,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,qCAAqC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAsChE"}
@@ -0,0 +1,175 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { addDecoderSizePrefix, addEncoderSizePrefix, combineCodec, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, getUtf8Decoder, getUtf8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, } from "@solana/kit";
9
+ import { getAccountMetaFactory, } from "@solana/program-client-core";
10
+ import { findProgramAuthorityPda } from "../pdas/index.js";
11
+ import { PHYGITAL_NFTS_PROGRAM_ADDRESS } from "../programs/index.js";
12
+ export const CREATE_COLLECTION_MINT_DISCRIMINATOR = new Uint8Array([234, 185, 122, 10, 65, 167, 91, 11]);
13
+ export function getCreateCollectionMintDiscriminatorBytes() {
14
+ return fixEncoderSize(getBytesEncoder(), 8).encode(CREATE_COLLECTION_MINT_DISCRIMINATOR);
15
+ }
16
+ export function getCreateCollectionMintInstructionDataEncoder() {
17
+ return transformEncoder(getStructEncoder([
18
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
19
+ ["name", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
20
+ ["symbol", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
21
+ ["uri", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
22
+ ["maxSize", getU64Encoder()],
23
+ ["uniqueId", getAddressEncoder()],
24
+ ]), (value) => ({
25
+ ...value,
26
+ discriminator: CREATE_COLLECTION_MINT_DISCRIMINATOR,
27
+ }));
28
+ }
29
+ export function getCreateCollectionMintInstructionDataDecoder() {
30
+ return getStructDecoder([
31
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
32
+ ["name", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
33
+ ["symbol", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
34
+ ["uri", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
35
+ ["maxSize", getU64Decoder()],
36
+ ["uniqueId", getAddressDecoder()],
37
+ ]);
38
+ }
39
+ export function getCreateCollectionMintInstructionDataCodec() {
40
+ return combineCodec(getCreateCollectionMintInstructionDataEncoder(), getCreateCollectionMintInstructionDataDecoder());
41
+ }
42
+ export async function getCreateCollectionMintInstructionAsync(input, config) {
43
+ // Program address.
44
+ const programAddress = config?.programAddress ?? PHYGITAL_NFTS_PROGRAM_ADDRESS;
45
+ // Original accounts.
46
+ const originalAccounts = {
47
+ payer: { value: input.payer ?? null, isWritable: true },
48
+ owner: { value: input.owner ?? null, isWritable: false },
49
+ groupMint: { value: input.groupMint ?? null, isWritable: true },
50
+ groupTokenMint: { value: input.groupTokenMint ?? null, isWritable: true },
51
+ groupUpdateAuthority: {
52
+ value: input.groupUpdateAuthority ?? null,
53
+ isWritable: false,
54
+ },
55
+ programAuthority: {
56
+ value: input.programAuthority ?? null,
57
+ isWritable: false,
58
+ },
59
+ tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
60
+ systemProgram: { value: input.systemProgram ?? null, isWritable: false },
61
+ };
62
+ const accounts = originalAccounts;
63
+ // Original args.
64
+ const args = { ...input };
65
+ // Resolve default values.
66
+ if (!accounts.programAuthority.value) {
67
+ accounts.programAuthority.value = await findProgramAuthorityPda();
68
+ }
69
+ if (!accounts.tokenProgram.value) {
70
+ accounts.tokenProgram.value =
71
+ "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
72
+ }
73
+ if (!accounts.systemProgram.value) {
74
+ accounts.systemProgram.value =
75
+ "11111111111111111111111111111111";
76
+ }
77
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
78
+ return Object.freeze({
79
+ accounts: [
80
+ getAccountMeta("payer", accounts.payer),
81
+ getAccountMeta("owner", accounts.owner),
82
+ getAccountMeta("groupMint", accounts.groupMint),
83
+ getAccountMeta("groupTokenMint", accounts.groupTokenMint),
84
+ getAccountMeta("groupUpdateAuthority", accounts.groupUpdateAuthority),
85
+ getAccountMeta("programAuthority", accounts.programAuthority),
86
+ getAccountMeta("tokenProgram", accounts.tokenProgram),
87
+ getAccountMeta("systemProgram", accounts.systemProgram),
88
+ ],
89
+ data: getCreateCollectionMintInstructionDataEncoder().encode(args),
90
+ programAddress,
91
+ });
92
+ }
93
+ export function getCreateCollectionMintInstruction(input, config) {
94
+ // Program address.
95
+ const programAddress = config?.programAddress ?? PHYGITAL_NFTS_PROGRAM_ADDRESS;
96
+ // Original accounts.
97
+ const originalAccounts = {
98
+ payer: { value: input.payer ?? null, isWritable: true },
99
+ owner: { value: input.owner ?? null, isWritable: false },
100
+ groupMint: { value: input.groupMint ?? null, isWritable: true },
101
+ groupTokenMint: { value: input.groupTokenMint ?? null, isWritable: true },
102
+ groupUpdateAuthority: {
103
+ value: input.groupUpdateAuthority ?? null,
104
+ isWritable: false,
105
+ },
106
+ programAuthority: {
107
+ value: input.programAuthority ?? null,
108
+ isWritable: false,
109
+ },
110
+ tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
111
+ systemProgram: { value: input.systemProgram ?? null, isWritable: false },
112
+ };
113
+ const accounts = originalAccounts;
114
+ // Original args.
115
+ const args = { ...input };
116
+ // Resolve default values.
117
+ if (!accounts.tokenProgram.value) {
118
+ accounts.tokenProgram.value =
119
+ "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
120
+ }
121
+ if (!accounts.systemProgram.value) {
122
+ accounts.systemProgram.value =
123
+ "11111111111111111111111111111111";
124
+ }
125
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
126
+ return Object.freeze({
127
+ accounts: [
128
+ getAccountMeta("payer", accounts.payer),
129
+ getAccountMeta("owner", accounts.owner),
130
+ getAccountMeta("groupMint", accounts.groupMint),
131
+ getAccountMeta("groupTokenMint", accounts.groupTokenMint),
132
+ getAccountMeta("groupUpdateAuthority", accounts.groupUpdateAuthority),
133
+ getAccountMeta("programAuthority", accounts.programAuthority),
134
+ getAccountMeta("tokenProgram", accounts.tokenProgram),
135
+ getAccountMeta("systemProgram", accounts.systemProgram),
136
+ ],
137
+ data: getCreateCollectionMintInstructionDataEncoder().encode(args),
138
+ programAddress,
139
+ });
140
+ }
141
+ export function parseCreateCollectionMintInstruction(instruction) {
142
+ if (instruction.accounts.length < 8) {
143
+ throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
144
+ actualAccountMetas: instruction.accounts.length,
145
+ expectedAccountMetas: 8,
146
+ });
147
+ }
148
+ let accountIndex = 0;
149
+ const getNextAccount = () => {
150
+ const accountMeta = instruction.accounts[accountIndex];
151
+ accountIndex += 1;
152
+ return accountMeta;
153
+ };
154
+ const getNextOptionalAccount = () => {
155
+ const accountMeta = getNextAccount();
156
+ return accountMeta.address === PHYGITAL_NFTS_PROGRAM_ADDRESS
157
+ ? undefined
158
+ : accountMeta;
159
+ };
160
+ return {
161
+ programAddress: instruction.programAddress,
162
+ accounts: {
163
+ payer: getNextAccount(),
164
+ owner: getNextAccount(),
165
+ groupMint: getNextAccount(),
166
+ groupTokenMint: getNextOptionalAccount(),
167
+ groupUpdateAuthority: getNextOptionalAccount(),
168
+ programAuthority: getNextAccount(),
169
+ tokenProgram: getNextAccount(),
170
+ systemProgram: getNextAccount(),
171
+ },
172
+ data: getCreateCollectionMintInstructionDataDecoder().decode(instruction.data),
173
+ };
174
+ }
175
+ //# sourceMappingURL=createCollectionMint.js.map