fix: add TypeScript buffer type to nonce-account.ts
This commit is contained in:
parent
477355df3b
commit
c73cdfd6ce
|
@ -13,12 +13,25 @@ import {toBuffer} from './util/to-buffer';
|
|||
*
|
||||
* @internal
|
||||
*/
|
||||
const NonceAccountLayout = BufferLayout.struct([
|
||||
const NonceAccountLayout = BufferLayout.struct<
|
||||
Readonly<{
|
||||
authorizedPubkey: Uint8Array;
|
||||
feeCalculator: Readonly<{
|
||||
lamportsPerSignature: number;
|
||||
}>;
|
||||
nonce: Uint8Array;
|
||||
state: number;
|
||||
version: number;
|
||||
}>
|
||||
>([
|
||||
BufferLayout.u32('version'),
|
||||
BufferLayout.u32('state'),
|
||||
Layout.publicKey('authorizedPubkey'),
|
||||
Layout.publicKey('nonce'),
|
||||
BufferLayout.struct([FeeCalculatorLayout], 'feeCalculator'),
|
||||
BufferLayout.struct<Readonly<{lamportsPerSignature: number}>>(
|
||||
[FeeCalculatorLayout],
|
||||
'feeCalculator',
|
||||
),
|
||||
]);
|
||||
|
||||
export const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;
|
||||
|
|
Loading…
Reference in New Issue