@lightprotocol/compressed-token 0.17.0 → 0.17.1

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.
@@ -2019,7 +2019,10 @@ class CompressedTokenProgram {
2019
2019
  return address;
2020
2020
  }
2021
2021
  /**
2022
- * Construct createMint instruction for compressed tokens
2022
+ * Construct createMint instruction for compressed tokens.
2023
+ * @returns [createMintAccountInstruction, initializeMintInstruction, createTokenPoolInstruction]
2024
+ *
2025
+ * Note that `createTokenPoolInstruction` must be executed after `initializeMintInstruction`.
2023
2026
  */
2024
2027
  static async createMint(params) {
2025
2028
  const { mint, authority, feePayer, rentExemptBalance, tokenProgramId, freezeAuthority, mintSize, } = params;
@@ -2033,12 +2036,16 @@ class CompressedTokenProgram {
2033
2036
  space: mintSize ?? MINT_SIZE,
2034
2037
  });
2035
2038
  const initializeMintInstruction = createInitializeMint2Instruction(mint, params.decimals, authority, freezeAuthority, tokenProgram);
2036
- const ix = await this.createTokenPool({
2039
+ const createTokenPoolInstruction = await this.createTokenPool({
2037
2040
  feePayer,
2038
2041
  mint,
2039
2042
  tokenProgramId: tokenProgram,
2040
2043
  });
2041
- return [createMintAccountInstruction, initializeMintInstruction, ix];
2044
+ return [
2045
+ createMintAccountInstruction,
2046
+ initializeMintInstruction,
2047
+ createTokenPoolInstruction,
2048
+ ];
2042
2049
  }
2043
2050
  /**
2044
2051
  * Enable compression for an existing SPL mint, creating an omnibus account.