@lightprotocol/compressed-token 0.15.2 → 0.15.3

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.
@@ -6709,6 +6709,20 @@ class CompressedTokenProgram {
6709
6709
  * @internal
6710
6710
  */
6711
6711
  constructor() { }
6712
+ /**
6713
+ * Set a custom programId via PublicKey or base58 encoded string.
6714
+ * This method is not required for regular usage.
6715
+ *
6716
+ * Use this only if you know what you are doing.
6717
+ */
6718
+ static setProgramId(programId) {
6719
+ this.programId =
6720
+ typeof programId === 'string'
6721
+ ? new web3_js.PublicKey(programId)
6722
+ : programId;
6723
+ // Reset program when programId changes
6724
+ this._program = null;
6725
+ }
6712
6726
  /** @internal */
6713
6727
  static get program() {
6714
6728
  if (!this._program) {
@@ -7069,24 +7083,6 @@ class CompressedTokenProgram {
7069
7083
  }
7070
7084
  static async compressSplTokenAccount(params) {
7071
7085
  const { feePayer, authority, tokenAccount, mint, remainingAmount, outputStateTree, } = params;
7072
- // const outputData: TokenTransferOutputData[] = [
7073
- // {
7074
- // owner: authority,
7075
- // amount: remainingAmount ?? new BN(0),
7076
- // lamports: bn(subremainingAmount),
7077
- // tlv: null,
7078
- // },
7079
- // ];
7080
- // const {
7081
- // inputTokenDataWithContext,
7082
- // packedOutputTokenData,
7083
- // remainingAccountMetas,
7084
- // } = packCompressedTokenAccounts({
7085
- // inputCompressedTokenAccounts: [],
7086
- // outputStateTrees: outputStateTree,
7087
- // rootIndices: [],
7088
- // tokenTransferOutputs,
7089
- // });
7090
7086
  const remainingAccountMetas = [
7091
7087
  {
7092
7088
  pubkey: outputStateTree,