fix: fix static properties in flow type declaration
This commit is contained in:
committed by
Justin Starry
parent
5f46ef7adc
commit
a6b7dcb3c6
@ -10,6 +10,13 @@ import {sleep} from './util/sleep';
|
|||||||
import type {Connection} from './connection';
|
import type {Connection} from './connection';
|
||||||
import {SystemProgram} from './system-program';
|
import {SystemProgram} from './system-program';
|
||||||
|
|
||||||
|
// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the
|
||||||
|
// rest of the Transaction fields
|
||||||
|
//
|
||||||
|
// TODO: replace 300 with a proper constant for the size of the other
|
||||||
|
// Transaction fields
|
||||||
|
const CHUNK_SIZE = PACKET_DATA_SIZE - 300;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Program loader interface
|
* Program loader interface
|
||||||
*/
|
*/
|
||||||
@ -22,14 +29,7 @@ export class Loader {
|
|||||||
/**
|
/**
|
||||||
* Amount of program data placed in each load Transaction
|
* Amount of program data placed in each load Transaction
|
||||||
*/
|
*/
|
||||||
static get chunkSize(): number {
|
static chunkSize: number = CHUNK_SIZE;
|
||||||
// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the
|
|
||||||
// rest of the Transaction fields
|
|
||||||
//
|
|
||||||
// TODO: replace 300 with a proper constant for the size of the other
|
|
||||||
// Transaction fields
|
|
||||||
return PACKET_DATA_SIZE - 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimum number of signatures required to load a program not including
|
* Minimum number of signatures required to load a program not including
|
||||||
|
@ -79,9 +79,9 @@ export class Secp256k1Program {
|
|||||||
/**
|
/**
|
||||||
* Public key that identifies the secp256k1 program
|
* Public key that identifies the secp256k1 program
|
||||||
*/
|
*/
|
||||||
static get programId(): PublicKey {
|
static programId: PublicKey = new PublicKey(
|
||||||
return new PublicKey('KeccakSecp256k11111111111111111111111111111');
|
'KeccakSecp256k11111111111111111111111111111',
|
||||||
}
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct an Ethereum address from a secp256k1 public key buffer.
|
* Construct an Ethereum address from a secp256k1 public key buffer.
|
||||||
|
@ -485,9 +485,9 @@ export class StakeProgram {
|
|||||||
/**
|
/**
|
||||||
* Public key that identifies the Stake program
|
* Public key that identifies the Stake program
|
||||||
*/
|
*/
|
||||||
static get programId(): PublicKey {
|
static programId: PublicKey = new PublicKey(
|
||||||
return new PublicKey('Stake11111111111111111111111111111111111111');
|
'Stake11111111111111111111111111111111111111',
|
||||||
}
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Max space of a Stake account
|
* Max space of a Stake account
|
||||||
@ -496,9 +496,7 @@ export class StakeProgram {
|
|||||||
* `std::mem::size_of::<StakeState>()`:
|
* `std::mem::size_of::<StakeState>()`:
|
||||||
* https://docs.rs/solana-stake-program/1.4.4/solana_stake_program/stake_state/enum.StakeState.html
|
* https://docs.rs/solana-stake-program/1.4.4/solana_stake_program/stake_state/enum.StakeState.html
|
||||||
*/
|
*/
|
||||||
static get space(): number {
|
static space: number = 200;
|
||||||
return 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate an Initialize instruction to add to a Stake Create transaction
|
* Generate an Initialize instruction to add to a Stake Create transaction
|
||||||
|
@ -659,9 +659,9 @@ export class SystemProgram {
|
|||||||
/**
|
/**
|
||||||
* Public key that identifies the System program
|
* Public key that identifies the System program
|
||||||
*/
|
*/
|
||||||
static get programId(): PublicKey {
|
static programId: PublicKey = new PublicKey(
|
||||||
return new PublicKey('11111111111111111111111111111111');
|
'11111111111111111111111111111111',
|
||||||
}
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a transaction instruction that creates a new account
|
* Generate a transaction instruction that creates a new account
|
||||||
|
Reference in New Issue
Block a user