NEOONEProvider

Class
Implements the Provider interface expected by a LocalUserAccountProvider using a NEO•ONE node.
export class NEOONEProvider implements Provider 

Constructor

constructor

public constructor(options: ReadonlyArray<NEOONEDataProviderOptions | NEOONEDataProvider> = []) 

Parameters

options

Properties

networks$
Observable<readonly NetworkType[]>

Methods

getNetworks

public getNetworks(): readonly NetworkType[] 

addNetwork

public addNetwork(options: { readonly network: NetworkType; readonly rpcURL: string }): void 

Parameters

options
{ readonly network: string; readonly rpcURL: string; }

getUnclaimed

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

Parameters

network
string
address
string

relayTransaction

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

Parameters

network
string
transaction
TransactionModel<AttributeModel, WitnessModel, SignerModel>

getTransactionReceipt

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

Parameters

network
string
hash
string

getTransactionData

public async getTransactionData(network: NetworkType, hash: Hash256String): Promise<RawTransactionData> 

Parameters

network
string
hash
string

getApplicationLogData

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

Parameters

network
string
hash
string

testInvoke

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

Parameters

network
string
script
Buffer

getFeePerByte

public async getFeePerByte(network: NetworkType): Promise<BigNumber> 

Parameters

network
string

getExecFeeFactor

public async getExecFeeFactor(network: NetworkType): Promise<number> 

Parameters

network
string

getVerificationCost

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

Parameters

network
string
hash
string
transaction
TransactionModel<AttributeModel, WitnessModel, SignerModel>

testTransaction

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

Parameters

network
string
transaction
TransactionModel<AttributeModel, WitnessModel, SignerModel>

call

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

Parameters

network
string
contract
string
method
string
params
readonly any[]

getNetworkSettings

public async getNetworkSettings(network: NetworkType): Promise<NetworkSettings> 

Parameters

network
string

getBlockCount

public async getBlockCount(network: NetworkType): Promise<number> 

Parameters

network
string

getTransaction

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

Parameters

network
string
hash
string

read

public read(network: NetworkType): NEOONEDataProvider 

Parameters

network
string

getAccount

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

Parameters

network
string
address
string

getContract

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

Parameters

network
string
address
string

iterBlocks

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

Parameters

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