feat: add API for decoding stake instructions

This commit is contained in:
Justin Starry
2020-03-02 23:58:10 +08:00
committed by Michael Vines
parent 01e65d2070
commit aba7e14f3a
6 changed files with 660 additions and 426 deletions

View File

@@ -112,11 +112,11 @@ test('use nonce', () => {
const stakeAccount = new Account();
const voteAccount = new Account();
const stakeTransaction = new Transaction({nonceInfo}).add(
StakeProgram.delegate(
stakeAccount.publicKey,
account1.publicKey,
voteAccount.publicKey,
),
StakeProgram.delegate({
stakePubkey: stakeAccount.publicKey,
authorizedPubkey: account1.publicKey,
votePubkey: voteAccount.publicKey,
}),
);
stakeTransaction.sign(account1);