| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Classes for high-level interaction with the Zilliqa blockchain.
export interface BlockchainInfo {
NumPeers: number;
NumTxBlocks: string;
NumDSBlocks: string;
NumTransactions: string;
TransactionRate: number;
TxBlockRate: number;
DSBlockRate: number;
CurrentMiniEpoch: string;
CurrentDSEpoch: string;
NumTxnsDSEpoch: string;
NumTxnsTxEpoch: number;
ShardingStructure: ShardingStructure;
}
export interface ShardingStructure {
NumPeers: number[];
}
export interface TransactionObj {
ID: string;
version: string;
nonce: number;
toAddr: string;
code: string;
data: string;
amount: string;
gasPrice: string;
gasLimit: string;
signature: string;
receipt: TransactionReceiptObj;
}
export interface DsBlockHeader {
blockNum: string;
difficulty: number;
leaderPubKey: string;
minerPubKey: string;
nonce: string;
prevhash: string;
// unix epoch
timestamp: string;
}
export interface DsBlockObj {
header: DsBlockHeader;
signature: string;
}
interface BlockShort {
BlockNum: number;
Hash: string;
}
export interface BlockList {
data: BlockShort[];
maxPages: number;
}
const enum TxBlockType {
MICRO,
FINAL,
}
export interface TxBlockHeader {
Type: TxBlockType;
Version: number;
GasLimit: string;
GasUsed: string;
Rewards: string;
PrevBlockHash: string;
BlockNum: string;
Timestamp: string;
TxnHash: string;
StateHash: string;
NumTxns: number;
NumMicroBlocks: number;
MinerPubKey: string;
DSBlockNum: string;
}
export interface TxBlockObj {
body: {
HeaderSign: string;
MicroBlockEmpty: number[];
MicroBlockHashes: string[];
};
header: TxBlockHeader;
}
export interface TxList {
number: number;
TxnHashes: string[];
}
export interface TransactionReceiptObj {
success: boolean;
cumulative_gas: string;
event_logs: EventLogEntry[];
}
export interface EventLogEntry {
address: string;
_eventname: string;
params: EventParam[];
}
export interface EventParam {
vname: string;
type: string;
value: string;
}Class that wraps http requests for blockchain-related RPC calls.
Parameters
Returns
Creates a transaction and polls the lookup node for a transaction receipt. The transaction is considered to be lost if it is not confirmed within the timeout period.
Parameters
Returns
Returns the validated transactions (in verbose form) included within a specified final transaction block.
Parameters
Returns
Note: This API is available for private seed nodes only. It is not accessible via the official public API services, i.e., https://api.zilliqa.com.
Retrieves generally blockchain information, such as the number of nodes per shard.
Parameters
None
Returns
Queries the blockchain for a specific DS block, by number.
Parameters
Returns
Gets the most recently confirmed DS block.
Parameters
None
Returns
Queries the blockchain for the number of confirmed DS blocks in the chain.
Parameters
None
Returns
Gets the ds blocks processed per second.
Parameters
None
Returns
Gets a paginated list of DS blocks.
Parameters
max: number - the maximum number of pages to retrieve
Returns
Retrieves a TxBlock by number.
Parameters
blockNum: number - the tx block to retrieve.
Returns
Gets the most recently confirmed Tx block.
Parameters
None
Returns
Queries the blockchain for the number of confirmed Tx blocks in the chain.
Parameters
None
Returns
Gets the Tx blocks processed per second.
Parameters
None
Returns
Gets a paginated list of Tx blocks.
Parameters
max: number - the maximum number of pages to retrieve
Returns
Queries the blockchain for the smart contract's state. Note that this method will return the entire state of the smart contract. As a result, if you have a large amount of data stored in a smart contract do not use this method on a client. Instead, use a server-side layer to cache and proxy such queries.
Parameters
Returns
Queries the blockchain for the smart contract's init (a.k.a. immutable variables of a contract)
Parameters
Returns
Queries the blockchain for the smart contract's state. Note that this method will return the entire state of the smart contract. As a result, if you have a large amount of data stored in a smart contract do not use this method on a client. Instead, use a server-side layer to cache and proxy such queries.
Parameters
Returns
Queries the contract state, filtered by the variable names. This function is the filtered version of getSmartContractState. As getSubState performs the filtering, variableName of a field is required.
If the subState is not found, this returns a null response.
Parameters
Returns
Retrieves all smart contracts deployed by a user, including the address and the state. The response object is large, and is not recommended on client-side.
Parameters
Returns
Retrieves a smart contract address from the transaction ID.
Parameters
Returns
| Back | FazBrowse Home | New Git URL |