casper-js-sdk
Version:
SDK to interact with the Casper blockchain
38 lines (37 loc) • 1.7 kB
TypeScript
import { ContractHash, ContractPackageHash } from './key';
import { NamedEntryPoint } from './AddressableEntity';
import { NamedKey } from './NamedKey';
/**
* Represents a smart contract on the blockchain, including its unique identifiers, entry points, named keys, and protocol version.
*/
export declare class Contract {
/**
* The unique hash representing the contract package.
*/
contractPackageHash: ContractPackageHash;
/**
* The unique hash representing the WebAssembly (Wasm) code of the contract.
*/
contractWasmHash: ContractHash;
/**
* The list of entry points (functions) that can be called on this contract.
*/
entryPoints: NamedEntryPoint[];
/**
* The named keys associated with the contract, providing access to specific values or data stored by the contract.
*/
namedKeys: NamedKey[];
/**
* The protocol version of the contract, indicating compatibility with specific blockchain protocol versions.
*/
protocolVersion: string;
/**
* Constructs a new `Contract` instance.
* @param contractPackageHash - The unique hash for the contract package.
* @param contractWasmHash - The unique hash for the Wasm code of the contract.
* @param entryPoints - An array of entry points defining functions available in the contract.
* @param namedKeys - Named keys providing access to specific stored data within the contract.
* @param protocolVersion - The protocol version for this contract.
*/
constructor(contractPackageHash: ContractPackageHash, contractWasmHash: ContractHash, entryPoints: NamedEntryPoint[], namedKeys: NamedKey[], protocolVersion: string);
}