node_modules/@velas/solana-web3/lib/index.browser.esm.js
/**
   * Generate a Transaction that authorizes a new PublicKey as Staker
   * or Withdrawer on the Stake account.
   */
Generate a Transaction that authorizes a new PublicKey as Staker
or Withdrawer on the Stake account.
Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account .
static authorize(params) {
    const {
      stakePubkey,
      authorizedPubkey,
      newAuthorizedPubkey,
      stakeAuthorizationType,
      custodianPubkey
    } = params;
    const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;
    const data = encodeData(type, {
      newAuthorized: newAuthorizedPubkey.toBuffer(),
      stakeAuthorizationType: stakeAuthorizationType.index
    });
    const keys = [{
      pubkey: stakePubkey,
      isSigner: false,
      isWritable: true
    }, {
      pubkey: SYSVAR_CLOCK_PUBKEY,
      isSigner: false,
      isWritable: true
    }, {
      pubkey: authorizedPubkey,
      isSigner: true,
      isWritable: false
    }];
    if (custodianPubkey) {
      keys.push({
        pubkey: custodianPubkey,
        isSigner: false,
        isWritable: false
      });
    }
    return new Transaction().add({
      keys,
      programId: this.programId,
      data
    });
  }
static authorize ( params ) { const { stakePubkey , authorizedPubkey , newAuthorizedPubkey , stakeAuthorizationType , custodianPubkey } = params ; const type = STAKE_INSTRUCTION_LAYOUTS . Authorize ; const data = encodeData ( type , { newAuthorized : newAuthorizedPubkey . toBuffer ( ) , stakeAuthorizationType : stakeAuthorizationType . index } ) ; const keys = [ { pubkey : stakePubkey , isSigner : false , isWritable : true } , { pubkey : SYSVAR_CLOCK_PUBKEY , isSigner : false , isWritable : true } , { pubkey : authorizedPubkey , isSigner : true , isWritable : false } ] ; if ( custodianPubkey ) { keys . push ( { pubkey : custodianPubkey , isSigner : false , isWritable : false } ) ; } return new Transaction ( ) . add ( { keys , programId : this . programId , data } ) ; }
Generate a Transaction that authorizes a new PublicKey as Staker
 or Withdrawer on the Stake account.
Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account .