NEOONEDataProvider

Class
Implements the methods required by the NEOONEProvider as well as the DeveloperProvider interface using a NEO•ONE node.
export class NEOONEDataProvider implements DeveloperProvider 

Constructor

constructor

public constructor({ network, rpcURL, iterBlocksFetchTimeoutMS, iterBlocksBatchSize }: NEOONEDataProviderOptions) 

Parameters

__0

Properties

Methods

setRPCURL

public setRPCURL(rpcURL: string): void 

Parameters

rpcURL
string

getUnclaimed

public async getUnclaimed(address: AddressString): Promise<BigNumber> 

Parameters

address
string

relayTransaction

public async relayTransaction(transaction: TransactionModel): Promise<RelayTransactionResult> 

Parameters

transaction
TransactionModel<AttributeModel, WitnessModel, SignerModel>

getTransactionReceipt

public async getTransactionReceipt(hash: Hash256String, options?: GetOptions): Promise<TransactionReceipt> 

Parameters

hash
string

getApplicationLogData

public async getApplicationLogData(hash: Hash256String): Promise<RawApplicationLogData> 

Parameters

hash
string

testInvoke

public async testInvoke(script: Buffer): Promise<RawCallReceipt> 

Parameters

script
Buffer

testTransaction

public async testTransaction(transaction: TransactionModel): Promise<RawCallReceipt> 

Parameters

transaction
TransactionModel<AttributeModel, WitnessModel, SignerModel>

getBlock

public async getBlock(hashOrIndex: Hash256String | number, options?: GetOptions): Promise<Block> 

Parameters

hashOrIndex
string | number

getFeePerByte

public async getFeePerByte(): Promise<BigNumber> 

getExecFeeFactor

public async getExecFeeFactor(): Promise<number> 

getVerificationCost

public async getVerificationCost( 
    hash: AddressString, 
    transaction: TransactionModel, 
  ): Promise<{ 
    readonly fee: BigNumber; 
    readonly size: number; 
  }> 

Parameters

hash
string
transaction
TransactionModel<AttributeModel, WitnessModel, SignerModel>

iterBlocks

public iterBlocks(options: IterOptions = {}): AsyncIterable<Block> 

Parameters

getBestBlockHash

public async getBestBlockHash(): Promise<Hash256String> 

getBlockCount

public async getBlockCount(): Promise<number> 

getContract

public async getContract(address: AddressString): Promise<Contract> 

Parameters

address
string

getMemPool

public async getMemPool(): Promise<{ readonly height: number; readonly verified: readonly Hash256String[] }> 

getTransaction

public async getTransaction(hash: Hash256String): Promise<Transaction> 

Parameters

hash
string

getConnectedPeers

public async getConnectedPeers(): Promise<readonly Peer[]> 

getNetworkSettings

public async getNetworkSettings(): Promise<NetworkSettings> 

call

public async call( 
    contract: UInt160Hex, 
    method: string, 
    params: ReadonlyArray<ScriptBuilderParam | undefined>, 
  ): Promise<RawCallReceipt> 

Parameters

contract
string
method
string
params
readonly any[]

runConsensusNow

public async runConsensusNow(): Promise<void> 

updateSettings

public async updateSettings(options: Partial<PrivateNetworkSettings>): Promise<void> 

Parameters

options

getSettings

public async getSettings(): Promise<PrivateNetworkSettings> 

fastForwardOffset

public async fastForwardOffset(seconds: number): Promise<void> 

Parameters

seconds
number

fastForwardToTime

public async fastForwardToTime(seconds: number): Promise<void> 

Parameters

seconds
number

reset

public async reset(): Promise<void> 

getNEOTrackerURL

public async getNEOTrackerURL(): Promise<string | undefined> 

resetProject

public async resetProject(): Promise<void> 

iterStorage

public iterStorage(address: AddressString): AsyncIterable<StorageItem> 

Parameters

address
string

getAccount

public async getAccount(address: AddressString): Promise<Account> 

Parameters

address
string
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitter
COPYRIGHT © 2021 NEO•ONE