TransactionOptions

Interface
Common options for all methods in the client APIs that create transactions.
export interface TransactionOptions { 
  from?: UserAccountID; 
  attributes?: readonly Attribute[]; 
  maxNetworkFee?: BigNumber; 
  maxSystemFee?: BigNumber; 
  validBlockCount?: number; 
  sendTo?: ReadonlyArray<OmitStrict<Transfer, 'to'>>; 
  sendFrom?: readonly Transfer[]; 
} 

Properties

from
UserAccountID
The UserAccount that the transaction is 'from', i.e. the one that will be used for native asset transfers, claims, and signing the transaction. If unspecified, the currently selected UserAccount is used as the from address. dApp developers will typically want to leave this unspecified.
attributes
readonly Attribute[]
Additional attributes to include with the transaction.
maxNetworkFee
BigNumber
A maximum network fee to include with the transaction. Note that this is a maximum, the client APIs will automatically calculate and add a system fee to the transaction up to the value specified here. Leaving maxNetworkFee undefined is equivalent to new BigNumber(0), i.e. no network fee. A maxNetworkFee of -1, i.e. new BigNumber(-1) indicates no limit on the fee. This is typically used only during development. Network fee is a required fee that depends on the size of the transaction.
maxSystemFee
BigNumber
A maximum system fee to include with the transaction. Note that this is a maximum, the client APIs will automatically calculate and add a system fee to the transaction up to the value specified here. Leaving maxSystemFee undefined is equivalent to new BigNumber(0), i.e. no system fee. A maxSystemFee of -1, i.e. new BigNumber(-1) indicates no limit on the fee. This is typically used only during development.
validBlockCount
number
The maximum number of blocks from the current block this transaction should stay valid until. Defaults to the network's maxValidBlockIncrement minus 1. Useful for when there is high traffic on the network and automatic re-sending of transactions takes place but you want more control.
sendTo
ReadonlyArray<OmitStrict<Transfer, 'to'>>
Transfers that specify native assets to send to the contract.
sendFrom
readonly Transfer[]
Transfers that specify native assets to send from the contract.
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE