feat: add PublicKey.toBytes and fix buffer incompatibility
This commit is contained in:
committed by
Justin Starry
parent
abada56ba1
commit
a622198235
@@ -7,6 +7,7 @@ import type {Blockhash} from './blockhash';
|
||||
import * as Layout from './layout';
|
||||
import {PACKET_DATA_SIZE} from './transaction';
|
||||
import * as shortvec from './util/shortvec-encoding';
|
||||
import {toBuffer} from './util/to-buffer';
|
||||
|
||||
/**
|
||||
* The message header, identifying signed and read-only account
|
||||
@@ -160,7 +161,7 @@ export class Message {
|
||||
this.header.numReadonlyUnsignedAccounts,
|
||||
]),
|
||||
keyCount: Buffer.from(keyCount),
|
||||
keys: this.accountKeys.map(key => key.toBuffer()),
|
||||
keys: this.accountKeys.map(key => toBuffer(key.toBytes())),
|
||||
recentBlockhash: bs58.decode(this.recentBlockhash),
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user