Common types

Types used throughout the docs

You don't have to read through this section to start using GatewayJS or RenJS - specific definitions will be linked to from the docs as they are used.

NumberInput

Used by GatewayJS and RenJS to accept number inputs that may not be representable by JavaScript's float values.

TypeScript definition
TypeScript definition
type NumberInput = number | string | BigNumber | BN;

TransactionConfig

Passed by GatewayJS and RenJS to Web3 to configure Ethereum transactions.

TypeScript definition
TypeScript definition
interface TransactionConfig {
from?: string | number;
to?: string; //
value?: number | string | BN;
gas?: number | string;
gasPrice?: number | string | BN;
data?: string;
nonce?: number;
chainId?: number;
}
Examples
Examples
{ gas: 500000 }
{
from: "0xD5B5b26521665Cb37623DCA0E49c553b41dbF076",
to: "0xD5B5b26521665Cb37623DCA0E49c553b41dbF076",
value: "10000000000000000", // 0.01 ETH
gas: 500000,
gasPrice: 21000,
data: "0x1234",
nonce: 53,
chainId: 1,
}