UNPKG

casper-js-sdk

Version:
22 lines (21 loc) 2.52 kB
import { BigNumber } from '@ethersproject/bignumber'; import { InfoGetTransactionResult, PurseIdentifier, PutDeployResult, PutTransactionResult, RpcClient } from '../rpc'; import { Args, PublicKey, Transaction, TransactionHash, Hash } from '../types'; export declare class CasperNetwork { private rpcClient; private apiVersion; constructor(rpcClient: RpcClient, apiVersion: number); static create(rpcClient: RpcClient, apiVersion?: number): Promise<CasperNetwork>; createDelegateTransaction(delegatorPublicKey: PublicKey, validatorPublicKey: PublicKey, networkName: string, amountMotes: string | BigNumber, deployCost: number, ttl: number, auctionContractHash?: string, gasPriceTolerance?: number): Transaction; createUndelegateTransaction(delegatorPublicKey: PublicKey, validatorPublicKey: PublicKey, networkName: string, amountMotes: string | BigNumber, deployCost: number, ttl: number, auctionContractHash?: string, gasPriceTolerance?: number): Transaction; createRedelegateTransaction(delegatorPublicKey: PublicKey, validatorPublicKey: PublicKey, newValidatorPublicKey: PublicKey, networkName: string, amountMotes: string | BigNumber, deployCost: number, ttl: number, auctionContractHash?: string, gasPriceTolerance?: number): Transaction; createTransferTransaction(senderPublicKey: PublicKey, recipientPublicKey: PublicKey, networkName: string, amountMotes: string, deployCost: number, ttl: number, id: number, gasPriceTolerance?: number): Transaction; createContractCallTransaction(senderPublicKey: PublicKey, contractHash: string, entryPoint: string, networkName: string, deployCost: number, ttl: number, args: Args, gasPriceTolerance?: number): Transaction; createContractPackageCallTransaction(senderPublicKey: PublicKey, contractPackageHash: string, entryPoint: string, networkName: string, deployCost: number, args: Args, ttl: number, contractVersion?: number, gasPriceTolerance?: number): Transaction; createSessionWasmTransaction(senderPublicKey: PublicKey, networkName: string, deployCost: number, ttl: number, bytes: Uint8Array, args: Args, gasPriceTolerance?: number): Transaction; putTransaction(transaction: Transaction): Promise<PutTransactionResult | PutDeployResult>; getTransaction(hash: TransactionHash | Hash | string): Promise<InfoGetTransactionResult>; private getTransactionOnCasper2x; private getTransactionOnCasper1x; queryLatestBalance(identifier: PurseIdentifier): Promise<import("../rpc").QueryBalanceResult | undefined>; }