node_modules/@velas/solana-web3/lib/index.browser.esm.js
/**
   * Generate a Transaction that splits Stake tokens into another stake account
   */
Generate a Transaction that splits Stake tokens into another stake account
Generate a Transaction that splits Stake tokens into another stake account
static splitWithSeed(params) {
    const {
      stakePubkey,
      authorizedPubkey,
      splitStakePubkey,
      lamports,
      seed,
      basePubkey
    } = params;
    const transaction = new Transaction();
    transaction.add(SystemProgram.createAccountWithSeed({
      fromPubkey: authorizedPubkey,
      newAccountPubkey: splitStakePubkey,
      lamports: 0,
      seed: seed,
      space: this.space,
      programId: this.programId,
      basePubkey: basePubkey
    }));
    const type = STAKE_INSTRUCTION_LAYOUTS.Split;
    const data = encodeData(type, {
      lamports
    });
    return transaction.add(new TransactionInstruction({
      keys: [{
        pubkey: stakePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: splitStakePubkey,
        isSigner: false,
        isWritable: true
      }, {
        pubkey: authorizedPubkey,
        isSigner: true,
        isWritable: false
      }],
      programId: this.programId,
      data
    }));
  }
static splitWithSeed ( params ) { const { stakePubkey , authorizedPubkey , splitStakePubkey , lamports , seed , basePubkey } = params ; const transaction = new Transaction ( ) ; transaction . add ( SystemProgram . createAccountWithSeed ( { fromPubkey : authorizedPubkey , newAccountPubkey : splitStakePubkey , lamports : 0 , seed : seed , space : this . space , programId : this . programId , basePubkey : basePubkey } ) ) ; const type = STAKE_INSTRUCTION_LAYOUTS . Split ; const data = encodeData ( type , { lamports } ) ; return transaction . add ( new TransactionInstruction ( { keys : [ { pubkey : stakePubkey , isSigner : false , isWritable : true } , { pubkey : splitStakePubkey , isSigner : false , isWritable : true } , { pubkey : authorizedPubkey , isSigner : true , isWritable : false } ] , programId : this . programId , data } ) ) ; }
Generate a Transaction that splits Stake tokens into another stake account
Generate a Transaction that splits Stake tokens into another stake account