node_modules/@velas/solana-web3/lib/index.browser.esm.js
/**
   * Generate a transaction instruction that allocates space in an account without funding
   */
Generate a transaction instruction that allocates space in an account without funding
Generate a transaction instruction that allocates space in an account without funding
static allocate(params) {
    let data;
    let keys;
    if ('basePubkey' in params) {
      const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;
      data = encodeData(type, {
        base: params.basePubkey.toBuffer(),
        seed: params.seed,
        space: params.space,
        programId: params.programId.toBuffer()
      });
      keys = [{
        pubkey: params.accountPubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: params.basePubkey,
        isSigner: true,
        isWritable: false
      }];
    } else {
      const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;
      data = encodeData(type, {
        space: params.space
      });
      keys = [{
        pubkey: params.accountPubkey,
        isSigner: true,
        isWritable: true
      }];
    }
    return new TransactionInstruction({
      keys,
      programId: this.programId,
      data
    });
  }
static allocate ( params ) { let data ; let keys ; if ( 'basePubkey' in params ) { const type = SYSTEM_INSTRUCTION_LAYOUTS . AllocateWithSeed ; data = encodeData ( type , { base : params . basePubkey . toBuffer ( ) , seed : params . seed , space : params . space , programId : params . programId . toBuffer ( ) } ) ; keys = [ { pubkey : params . accountPubkey , isSigner : false , isWritable : true } , { pubkey : params . basePubkey , isSigner : true , isWritable : false } ] ; } else { const type = SYSTEM_INSTRUCTION_LAYOUTS . Allocate ; data = encodeData ( type , { space : params . space } ) ; keys = [ { pubkey : params . accountPubkey , isSigner : true , isWritable : true } ] ; } return new TransactionInstruction ( { keys , programId : this . programId , data } ) ; }
Generate a transaction instruction that allocates space in an account without funding
Generate a transaction instruction that allocates space in an account without funding