import { JSONObject , OmitStrict } from '@neo-one/utils' ; import BigNumber from 'bignumber.js' ; import { BN } from 'bn.js' ; import { Observable } from 'rxjs' ; import { RawSourceMap } from 'source-map' ; import { ECPoint , UInt160 , UInt160Hex , UInt256 } from './common' ; import { AccountContract , AttributeTypeModel , CallFlags , OracleResponseCode , TriggerTypeJSON , VerifyResultModel , Wildcard , } from './models' ; example example export type AddressString = string ; example export type Hash256String = string ; example export type BufferString = string ; example export type Base64String = string ; example export type PublicKeyString = string ; example example export type PrivateKeyString = string ; example export type SignatureString = string ; /**
 * Implementation defined string for selecting the network to use. `'main'` refers to the NEO MainNet and `'test'` refers to the NEO TestNet. `'local'` is typically used to indicate a local development network.
 */ export type NetworkType = 'main' | 'test' | string ; see Attribute export interface AttributeBase { /**
     * `type` specifies the `Attribute` type
     */ readonly type : AttributeTypeModel ; } /**
 * `Attribute` whose transaction is \"high priority\".
 */ export interface HighPriorityAttribute extends AttributeBase { readonly type : AttributeTypeModel . HighPriority ; } export interface OracleResponse extends AttributeBase { readonly type : AttributeTypeModel . OracleResponse ; readonly id : BigNumber ; readonly code : OracleResponseCode ; readonly result : BufferString ; } /**
 * `Attribute`s are used to store additional data on `Transaction`s.
 */ export type Attribute = HighPriorityAttribute | OracleResponse ; export type WitnessScope = 'None' | 'CalledByEntry' | 'CustomContracts' | 'CustomGroups' | 'Global' | 'CalledByEntryAndCustomContracts' | 'CalledByEntryAndCustomGroups' | 'CalledByEntryAndCustomGroupsAndCustomContracts' | 'CustomContractsAndCustomGroups' ; /**
 * `Witness` is just that, a 'witness' to the transaction, meaning they have approved the transaction. Can vary from a simple signature of the transaction for a given `Address`' private key or a 'witness' being a smart contract and the way it's verified is by executing the smart contract code.
 */ export interface Witness { /**
     * Sets up the stack for the `verification` script.
     */ readonly invocation : BufferString ; /**
     * A script that should leave either a `true` value on the stack if the `Witness` is valid, or `false` otherwise.
     */ readonly verification : BufferString ; } /**
 * `Signer` is the description of an `Address` and `WitnessScope` that \"signs\" a transaction.
 */ export interface Signer { /**
     * Hash160 Address of the `Signer`.
     */ readonly account : AddressString ; /**
     * Scope of the witness.
     */ readonly scopes : WitnessScope ; /**
     * Array of contracts this address can verify;.
     */ readonly allowedContracts ? : readonly AddressString [ ] ; /**
     * Array of contract groups that this address can verify.
     */ readonly allowedGroups ? : readonly PublicKeyString [ ] ; } /**
 * Interface for `Transaction`s
 */ export interface Transaction { /**
     * NEO protocol version.
     */ readonly version : number ; /**
     * Unique number in order to ensure the hash for this contract is unique.
     */ readonly nonce : number ; /**
     * `Hash160` of the transaction sender.
     */ readonly sender ? : AddressString ; /**
     * `Hash256` of this `Transaction`.
     */ readonly hash : Hash256String ; /**
     * Byte size of this `Transaction`.
     */ readonly size : number ; /**
     * Block expiration time.
     */ readonly validUntilBlock : number ; /**
     * `Attribute`s attached to the `Transaction`.
     */ readonly attributes : readonly Attribute [ ] ; /**
     * GAS execution fee for the transaction.
     */ readonly systemFee : BigNumber ; /**
     * GAS network priority fee for the transaction.
     */ readonly networkFee : BigNumber ; /**
     * Scope where the `Witness`es are valid.
     */ readonly signers : readonly Signer [ ] ; /**
     * Contract script of the `Transaction`.
     */ readonly script : BufferString ; /**
     * `Witness`es to the `Transaction`, i.e. the `Address`es that have signed the `Transaction`.
     */ readonly witnesses : readonly Witness [ ] ; } /**
 * `Transaction` that has been confirmed on the blockchain. Includes all of the same properties as a `Transaction` as well as the `TransactionReceipt` of the confirmation.
 */ export interface ConfirmedTransaction extends Transaction { /**
     * 'Receipt' of the confirmed transaction on the blockchain. This contains properties like the block the `Transaction` was included in.
     */ readonly transactionData : RawTransactionData ; } /**
 * All of the properties of a `Block` except the `Transaction`s themselves.
 */ export interface Header { /**
     * NEO blockchain version.
     */ readonly version : number ; /**
     * Previous `Block` hash.
     */ readonly previousBlockHash : Hash256String ; /**
     * Merkle Root of the `Transaction`s of this `Block`.
     */ readonly merkleRoot : Hash256String ; /**
     * `Block` time persisted in milliseconds.
     */ readonly time : BigNumber ; /**
     * `Block` time persisted in seconds.
     */ readonly timeSeconds : number ; /**
     * `Block` nonce.
     */ readonly nonce : BigNumber ; /**
     * `Block` index.
     */ readonly index : number ; /**
     * The primary index of the consensus node that generated this `Block`.
     */ readonly primaryIndex : number ; /**
     * Next consensus address.
     */ readonly nextConsensus : AddressString ; /**
     * `Witness`es to the `Block`'s validity.
     */ readonly witnesses : readonly Witness [ ] ; /**
     * `Block` hash.
     */ readonly hash : Hash256String ; /**
     * 'Witness' to the `Block`'s validity.
     */ readonly witness : Witness ; /**
     * Size in bytes of the `Block`.
     */ readonly size : number ; } export interface Block extends Header { /**
     * `Transaction`s contained in the `Block`.
     */ readonly transactions : readonly ConfirmedTransaction [ ] ; /**
     * Extra block data produced by persisting the `Block`.
     */ readonly blockData : RawBlockData ; } export interface RawBlockData { /**
     * Actions produced by the `onPersist` and `postPersist` scrips run when persisting the `Block`.
     */ readonly blockActions : readonly RawAction [ ] ; } /**
 * A vote for a Neo council member.
 */ export interface RawVote { /**
     * The account that made the vote update.
     */ readonly account : AddressString ; /**
     * The validator that this vote was made to.
     */ readonly voteTo ? : PublicKeyString ; /**
     * The NEO balance of the account when the vote was made and thus the amount of votes.
     */ readonly balance : BigNumber ; /**
     * The index which corresponds to the vote's globally unique global action index.
     */ readonly index : BigNumber ; } /**
 * The base of a policy change.
 */ export interface RawPolicyChangeBase { /**
     * The type of policy change.
     */ readonly type : RawPolicyChange [ 'type' ] ; /**
     * The index which corresponds to the policy change's globally unique global action index.
     */ readonly index : BigNumber ; } /**
 * A change to the GasPerBlock policy.
 */ export interface RawGasPerBlockPolicyChange extends RawPolicyChangeBase { readonly type : 'GasPerBlock' ; readonly value : BigNumber ; } /**
 * A change to the RegisterPrice policy.
 */ export interface RawRegisterPricePolicyChange extends RawPolicyChangeBase { readonly type : 'RegisterPrice' ; readonly value : BigNumber ; } /**
 * A change to the UnregisterCandidate policy.
 */ export interface RawUnregisterCandidatePolicyChange extends RawPolicyChangeBase { readonly type : 'UnregisterCandidate' ; readonly value : PublicKeyString ; } /**
 * A change to the RegisterCandidate policy.
 */ export interface RawRegisterCandidatePolicyChange extends RawPolicyChangeBase { readonly type : 'RegisterCandidate' ; readonly value : PublicKeyString ; } /**
 * A change to the RoleDesignation policy.
 */ export interface RawRoleDesignationPolicyChange extends RawPolicyChangeBase { readonly type : 'RoleDesignation' ; readonly value : 'StateValidator' | 'Oracle' | 'NeoFSAlphabetNode' ; } /**
 * A change to the FeePerByte policy.
 */ export interface RawFeePerBytePolicyChange extends RawPolicyChangeBase { readonly type : 'FeePerByte' ; readonly value : BigNumber ; } /**
 * A change to the ExecFeeFactor policy.
 */ export interface RawExecFeeFactorPolicyChange extends RawPolicyChangeBase { readonly type : 'ExecFeeFactor' ; readonly value : number ; } /**
 * A change to the StoragePrice policy.
 */ export interface RawStoragePricePolicyChange extends RawPolicyChangeBase { readonly type : 'StoragePrice' ; readonly value : number ; } /**
 * A change to the BlockAccount policy.
 */ export interface RawBlockAccountPolicyChange extends RawPolicyChangeBase { readonly type : 'BlockAccount' ; readonly value : AddressString ; } /**
 * A change to the UnblockAccount policy.
 */ export interface RawUnblockAccountPolicyChange extends RawPolicyChangeBase { readonly type : 'UnblockAccount' ; readonly value : AddressString ; } /**
 * A change to the MinimumDeploymentFee policy.
 */ export interface RawMinimumDeploymentFeePolicyChange extends RawPolicyChangeBase { readonly type : 'MinimumDeploymentFee' ; readonly value : BigNumber ; } export type RawPolicyChange = RawGasPerBlockPolicyChange | RawRegisterPricePolicyChange | RawUnregisterCandidatePolicyChange | RawRegisterCandidatePolicyChange | RawRoleDesignationPolicyChange | RawFeePerBytePolicyChange | RawExecFeeFactorPolicyChange | RawStoragePricePolicyChange | RawBlockAccountPolicyChange | RawUnblockAccountPolicyChange | RawMinimumDeploymentFeePolicyChange ; /**
 * Additional raw data that is typically processed by client APIs.
 */ export interface RawTransactionData extends TransactionReceipt { /**
     * The NeoToken governance votes produced by this transaction.
     */ readonly votes : readonly RawVote [ ] ; /**
     * The policy change produced by this transaction.
     */ readonly policyChanges : readonly RawPolicyChange [ ] ; /**
     * The `AddressString`s of contracts destroyed by the transaction execution.
     */ readonly deletedContractHashes : readonly UInt160Hex [ ] ; /**
     * `Contract`s created by the transaction execution.
     */ readonly deployedContracts : readonly Contract [ ] ; /**
     * `Contract`s updated by the transaction execution.
     */ readonly updatedContracts : readonly Contract [ ] ; /**
     * Raw result of an transaction execution.
     */ readonly executionResult : RawExecutionResult ; /**
     * Raw actions emitted by the transaction execution.
     */ readonly actions : readonly RawAction [ ] ; } /**
 * Receipt of a confirmed `Transaction` which contains data about the confirmation such as the `Block` index and the index of the `Transaction` within the block.
 */ export interface TransactionReceipt { /**
     * `Block` index of the `Transaction` for this receipt.
     */ readonly blockIndex : number ; /**
     * `Block` hash of the `Transaction` for this receipt.
     */ readonly blockHash : Hash256String ; /**
     * Transaction index of the `Transaction` within the `Block` for this receipt.
     */ readonly transactionIndex : number ; /**
     * Ordered globally unique index of the transaction.
     */ readonly globalIndex : BigNumber ; } /**
 * The result of a successful relay of a `Transaction`.
 */ export interface TransactionResult < TTransactionReceipt extends TransactionReceipt = TransactionReceipt > { /**
     * `Transaction` that was relayed.
     */ readonly transaction : Transaction ; param options returns readonly confirmed : ( options ? : GetOptions ) => Promise < TTransactionReceipt > ; } export interface RawInvocationResultBase { /**
     * GAS consumed by the operation.
     */ readonly gasConsumed : BigNumber ; } /**
 * Result of a successful invocation.
 */ export interface InvocationResultSuccess < TValue > extends RawInvocationResultBase { /**
     * Indicates a successful invocation.
     */ readonly state : 'HALT' ; /**
     * The return value of the invocation.
     */ readonly value : TValue ; } /**
 * Result of a failed invocation.
 */ export interface InvocationResultError extends RawInvocationResultBase { /**
     * Indicates a failed invocation.
     */ readonly state : 'FAULT' ; /**
     * Failure reason.
     */ readonly message : string ; } /**
 * Either a successful or error result, `InvocationResultSuccess` and `InvocationResultError`, respectively.
 */ export type InvocationResult < TValue > = InvocationResultSuccess < TValue > | InvocationResultError ; /**
 * The receipt for a smart contract method invocation.
 */ export interface InvokeReceipt < TReturn extends Return = Return , TEvent extends Event < string , any > = Event > extends TransactionReceipt { /**
     * The result of the invocation.
     */ readonly result : InvocationResult < TReturn > ; /**
     * The events emitted by the smart contract during the invocation.
     */ readonly events : readonly TEvent [ ] ; /**
     * The logs emitted by the smart contract during the invocation.
     */ readonly logs : readonly Log [ ] ; /**
     * The original, unprocessed, raw invoke receipt. The `RawInvokeReceipt` is transformed into this object (the `InvokeReceipt`) using the `ContractABI` to parse out the `Event`s and `InvocationResult`.
     */ readonly raw : RawInvokeReceipt ; } /**
 * Represents a transfer of assets.
 */ export interface Transfer { /**
     * Amount to be transferred
     */ readonly amount : BigNumber ; /**
     * `Hash160` in string format of the address of the `Contract` to call to make the transfer.
     */ readonly asset : AddressString ; /**
     * Destination address.
     */ readonly to : AddressString ; /**
     * Additional data to be attached to the transaction. Typed as `any` but should be used cautiously since it will need to be converted.
     */ readonly data ? : any ; } /**
 * Uniquely identifies a `UserAccount` by its address and the network its used on.
 */ export interface UserAccountID { /**
     * Network that this address is used on.
     */ readonly network : NetworkType ; /**
     * The NEO address.
     */ readonly address : AddressString ; } /**
 * `UserAccount` is the base abstraction on which all of the @neo-one/client APIs work with.
 */ export interface UserAccount { /**
     * Uniquely identifies a `UserAccount` by its address and the network its used on.
     */ readonly id : UserAccountID ; /**
     * The name to use when displaying this account in a user-facing UI. Can be a user configured name or just the address.
     */ readonly name : string ; /**
     * The public key for the address.
     */ readonly publicKey : PublicKeyString ; /**
     * The signature redemption contract of the account.
     */ readonly contract : AccountContract ; } /**
 * `UserAccountProvider`s power `Client` instances. Multiple `UserAccountProvider`s may be provided, and the `Client` abstracts over them to provide a common layer of functionality independent of the underlying `UserAccountProvider`s.
 */ export interface UserAccountProvider { /**
     * An `Observable` that emits the currently selected `UserAccount`
     */ readonly currentUserAccount$ : Observable < UserAccount | undefined > ; /**
     * An `Observable` that emits the available `UserAccount`s
     */ readonly userAccounts$ : Observable < readonly UserAccount [ ] > ; /**
     * An `Observable` that emits the available networks this `UserAccountProvider` knows how to function with.
     */ readonly networks$ : Observable < readonly NetworkType [ ] > ; returns readonly getCurrentUserAccount : ( ) => UserAccount | undefined ; returns readonly getUserAccounts : ( ) => readonly UserAccount [ ] ; returns readonly getNetworks : ( ) => readonly NetworkType [ ] ; /**
     * Set the given `UserAccountID` as the selected `UserAccount`.
     *
     * If the `UserAccountProvider` does not support programatically selecting a `UserAccountID`, it should only ever expose one available `UserAccount` and manage selecting other `UserAccount`s outside of the application.
     */ readonly selectUserAccount : ( id ? : UserAccountID ) => Promise < void > ; /**
     * Optional support for deleting a `UserAccount`
     */ readonly deleteUserAccount ? : ( id : UserAccountID ) => Promise < void > ; /**
     * Optional support for updating the name of a `UserAccount`
     */ readonly updateUserAccountName ? : ( options : UpdateAccountNameOptions ) => Promise < void > ; returns readonly getBlockCount : ( network : NetworkType ) => Promise < number > ; returns readonly getAccount : ( network : NetworkType , address : AddressString ) => Promise < Account > ; returns readonly iterBlocks : ( network : NetworkType , options ? : IterOptions ) => AsyncIterable < Block > ; returns readonly iterActionsRaw ? : ( network : NetworkType , options ? : IterOptions ) => AsyncIterable < RawAction > ; /**
     * Transfers native assets.
     */ readonly transfer : ( transfers : readonly Transfer [ ] , options ? : TransactionOptions ) => Promise < TransactionResult > ; /**
     * Claim all claimable GAS.
     */ readonly claim : ( options ? : TransactionOptions ) => Promise < TransactionResult > ; /**
     * Vote for a specified public key for governance.
     */ readonly vote : ( publicKey : PublicKeyString , options ? : TransactionOptions ) => Promise < TransactionResult > ; /**
     * Invoke the specified `method` with the given `params` on `contract`.
     *
     * `paramsZipped` contains the original parameters before processing with the ABI and are typically suitable for displaying to a user.
     *
     * `verify` will be true if the transaction should trigger verification for the `contract`
     *
     * `options` may specify additional native asset transfers to include with the transaction (either to or from the contract address).
     */ readonly invoke : ( contract : AddressString , method : string , params : ReadonlyArray < ScriptBuilderParam | undefined > , paramsZipped : ReadonlyArray < readonly [ string , Param | undefined ] > , verify : boolean , options ? : TransactionOptions , sourceMaps ? : SourceMaps ) => Promise < TransactionResult < RawInvokeReceipt > > ; /**
     * Invokes the constant `method` on `contract` with `params` on `network`.
     */ readonly call : ( network : NetworkType , contract : AddressString , method : string , params : ReadonlyArray < ScriptBuilderParam | undefined > ) => Promise < RawCallReceipt > ; } /**
 * An object of `UserAccountProvider`s.
 */ export interface UserAccountProviders < TUserAccountProvider extends UserAccountProvider = UserAccountProvider > { /**
     * Key index may be arbitrary and is primarily intended to allow for a more specific `Client` TypeScript type to enable direct access to the underlying providers, if needed.
     */ readonly [ type ] : TUserAccountProvider ; } /**
 * Settings that may be modified on a local NEO•ONE private network.
 */ export interface PrivateNetworkSettings { /**
     * Time until the next block starts to be produced.
     */ readonly millisecondsPerBlock : number ; } /**
 * Provides the core functionality required by the `DeveloperClient`.
 */ export interface DeveloperProvider { /**
     * Network the `DeveloperProvider` is acting on.
     */ readonly network : NetworkType ; /**
     * Trigger consensus to run immediately.
     */ readonly runConsensusNow : ( ) => Promise < void > ; /**
     * Update the network's settings.
     */ readonly updateSettings : ( options : Partial < PrivateNetworkSettings > ) => Promise < void > ; returns readonly getSettings : ( ) => Promise < PrivateNetworkSettings > ; param seconds readonly fastForwardOffset : ( seconds : number ) => Promise < void > ; param seconds readonly fastForwardToTime : ( seconds : number ) => Promise < void > ; /**
     * Reset the network to it's initial state, restarting from the genesis `Block`.
     */ readonly reset : ( ) => Promise < void > ; /**
     * Fetch the NEO Tracker URL for the project.
     */ readonly getNEOTrackerURL : ( ) => Promise < string | undefined > ; /**
     * Reset the project this network is associated with to it's initial state.
     */ readonly resetProject : ( ) => Promise < void > ; } /**
 * An `Account` represents the balances of NEO, GAS an other NEP17 assets at a given `Address`.
 */ export interface Account { /**
     * The address of this `Account`.
     */ readonly address : AddressString ; /**
     * A mapping from an `AddressString` of a contract to the value of the held by the `address` for this `Account`.
     */ readonly balances : { /**
         * May be `undefined` if the `address` has 0 balance.
         */ readonly [ asset ] : BigNumber ; } ; } /**
 * The base type of the `Event` parameters. This type is specialized automatically with the generated NEO•ONE smart contract APIs.
 */ export interface EventParameters { /**
     * Note that arbitrary string indices are not supported - the exact indices are implementation defined for a particular `Event` name.
     */ readonly [ name ] : Param ; } /**
 * Structured data emitted by a smart contract during a method invocation. Typically emitted in response to state changes within the contract and to notify contract listeners of an action happening within the contract.
 */ export interface Event < TName extends string = string , TEventParameters = EventParameters > extends RawActionBase { /**
     * `type` differentiates the `Event` object from other `Action` objects, i.e. `Log`.
     */ readonly type : 'Event' ; example example readonly name : TName ; example readonly parameters : TEventParameters ; } /**
 * Unstructured string emitted by a smart contract during a method invocation.
 */ export interface Log extends RawActionBase { /**
     * `type` differentiates the `Log` object from other `Action` objects, i.e. `Event`.
     */ readonly type : 'Log' ; /**
     * An implementation defined string representing a log message.
     */ readonly message : string ; } /**
 * An `Action` is either an `Event` or `Log` emitted by the smart contract during a method invocation.
 */ export type Action = Event | Log ; /**
 * Network specific smart contract configuration
 */ export interface SmartContractNetworkDefinition { /**
     * `AddressString` of the smart contract on the network.
     */ readonly address : AddressString ; } /**
 * Configuration for the smart contract by network.
 */ export interface SmartContractNetworksDefinition { /**
     * Network specific smart contract configuration
     */ readonly [ networkType ] : SmartContractNetworkDefinition ; } /**
 * Used to generate the smart contract APIs.
 */ export interface SmartContractDefinition { /**
     * Configuration for the smart contract by network.
     */ readonly networks : SmartContractNetworksDefinition ; /**
     * `Manifest` of the smart contract
     */ readonly manifest : ContractManifestClient ; /**
     * `SourceMaps` associated with the smart contract.
     */ readonly sourceMaps ? : SourceMaps ; } /**
 * Additional optional options for methods that read data from a smart contract.
 */ export interface SmartContractReadOptions { /**
     * The network to read the smart contract data for. By default this is the network of the currently selected user account.
     */ readonly network ? : NetworkType ; } /**
 * Additional optional options for methods that iterate over data from a smart contract.
 */ export interface SmartContractIterOptions extends SmartContractReadOptions , BlockFilter { } /**
 * Filter that specifies (optionally) a block index to start at and (optionally) a block index to end at.
 */ export interface BlockFilter { /**
     * The inclusive start index for the first block to include. Leaving `undefined` means start from the beginning of the blockchain, i.e. index 0.
     */ readonly indexStart ? : number ; /**
     * The exclusive end index for the block to start at. Leaving `undefined` means continue indefinitely, waiting for new blocks to come in.
     */ readonly indexStop ? : number ; } /**
 * Additional optional options for methods that iterate over data by block index.
 */ export interface IterOptions extends BlockFilter { } /**
 * Common options for operations that fetch data from the blockchain.
 */ export interface GetOptions { /**
     * Time in milliseconds before timing out the operation.
     */ readonly timeoutMS ? : number ; } /**
 * Common options for all methods in the client APIs that create transactions.
 */ export interface TransactionOptions { /**
     * 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.
     */ from ? : UserAccountID ; /**
     * Additional attributes to include with the transaction.
     */ attributes ? : readonly Attribute [ ] ; /**
     * 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.
     */ maxNetworkFee ? : 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.
     */ maxSystemFee ? : BigNumber ; /**
     * 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.
     */ validBlockCount ? : number ; /**
     * `Transfer`s that specify native assets to send to the contract.
     */ sendTo ? : ReadonlyArray < OmitStrict < Transfer , 'to' > > ; /**
     * `Transfer`s that specify native assets to send from the contract.
     */ sendFrom ? : readonly Transfer [ ] ; } /**
 * Additional options that are automatically provided by the `forward<method>Args` method. In particular, this object provides the event specification when forwarding values.
 */ export interface ForwardOptions < TEvent extends Event < string , any > = Event > { /**
     * Additional events that may be emitted due to forwarding arguments to another smart contract method.
     */ readonly events ? : readonly ContractEventDescriptorClient [ ] ; readonly __tag ? : TEvent ; } /**
 * Additional parameters available to methods that support unsafely sending native `Asset`s from the smart contract, i.e. they have been annotated with `@sendUnsafe`.
 */ export interface InvokeSendUnsafeTransactionOptions extends TransactionOptions { } /**
 * Additional parameters available to methods that support receiving native `Asset`s to the smart contract, i.e. they have been annotated with `@receive`.
 */ export interface InvokeReceiveTransactionOptions extends TransactionOptions { } /**
 * Additional parameters available to methods that support unsafely sending native `Asset`s from the smart contract and receiving native `Asset`s to the smart contract, i.e. they have been annotated with both `@sendUnsafe` and `@receive`.
 */ export interface InvokeSendUnsafeReceiveTransactionOptions extends InvokeSendUnsafeTransactionOptions , InvokeReceiveTransactionOptions { } /**
 * Options for the `UserAccountProvider#updateAccountName` method.
 */ export interface UpdateAccountNameOptions { /**
     * `UserAccountID` of the `UserAccount` to update.
     */ readonly id : UserAccountID ; /**
     * New name of the `UserAccount`.
     */ readonly name : string ; } see ABIReturn export interface ABIReturnBase { /**
     * `true` if the value can be `undefined`
     */ readonly optional ? : boolean ; /**
     * `true` if the smart contract expects this value to be forwarded by another smart contract.
     */ readonly forwardedValue ? : boolean ; } see ABIReturn export interface AnyABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `AnyABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Any' ; } see ABIReturn see AddressString export interface Hash160ABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `Hash160ABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Hash160' ; } see ABIReturn see AddressString export interface AddressABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `AddressABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Address' ; } /**
 * `Array` return type.
 */ export interface ArrayABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `ArrayABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Array' ; /**
     * Value type of the `Array`.
     */ readonly value : ABIReturn ; } see ABIReturn export interface BooleanABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `BooleanABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Boolean' ; } see ABIReturn see BufferString export interface BufferABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `BufferABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Buffer' ; } /**
 * `ForwardValue` return type.
 */ export interface ForwardValueABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `ForwardValueABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'ForwardValue' ; } see ABIReturn see Hash256String export interface Hash256ABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `Hash256ABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Hash256' ; } see Fixed export interface IntegerABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `IntegerABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Integer' ; /**
     * Number of decimals values of this type represent.
     */ readonly decimals : number ; } /**
 * `Map` return type.
 */ export interface MapABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `MapABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Map' ; /**
     * Key type of the `Map`.
     */ readonly key : ABIReturn ; /**
     * Value type of the `Map`.
     */ readonly value : ABIReturn ; } /**
 * `Object` return type.
 */ export interface ObjectABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `ObjectABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Object' ; /**
     * Properties of the `Object`.
     */ readonly properties : { readonly [ key ] : ABIReturn ; } ; } see ABIReturn see PublicKeyString export interface PublicKeyABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `PublicKeyABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'PublicKey' ; } see ABIReturn see SignatureString export interface SignatureABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `SignatureABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Signature' ; } see ABIReturn export interface StringABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `StringABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'String' ; } /**
 * `void` return type.
 */ export interface VoidABIReturn extends ABIReturnBase { /**
     * `type` differentiates the `VoidABIReturn` object from other `ABIReturn` objects.
     */ readonly type : 'Void' ; } /**
 * Default value is the `Transaction` sender `Address`
 */ export interface SenderAddressABIDefault { /**
     * `type` differentiates the `SenderAddressABIDefault` object from other `ABIDefault` objects.
     */ readonly type : 'sender' ; } /**
 * Default value for the constructor/deploy parameter.
 */ export type ABIDefault = SenderAddressABIDefault ; /**
 * All possible `ABIDefault#type` fields.
 */ export type ABIDefaultType = ABIDefault [ 'type' ] ; /**
 * Base interface for all `ABIParameter`s
 */ export interface ABIParameterBase { /**
     * Name of the parameter.
     */ readonly name : string ; /**
     * Runtime default value.
     */ readonly default ? : ABIDefault ; /**
     * Represents a rest parameter.
     */ readonly rest ? : boolean ; } see ABIParameter see AnyABIReturn export interface AnyABIParameter extends ABIParameterBase , AnyABIReturn { } see ABIParameter see Hash160ABIReturn see AddressString export interface Hash160ABIParameter extends ABIParameterBase , Hash160ABIReturn { } see ABIParameter see AddressABIReturn see AddressString export interface AddressABIParameter extends ABIParameterBase , AddressABIReturn { } see ABIParameter see ArrayABIReturn export interface ArrayABIParameter extends ABIParameterBase , ArrayABIReturn { } see ABIParameter see BooleanABIReturn export interface BooleanABIParameter extends ABIParameterBase , BooleanABIReturn { } see ABIParameter see BufferABIReturn see BufferString export interface BufferABIParameter extends ABIParameterBase , BufferABIReturn { } see ABIParameter see Hash256ABIReturn see Hash256String export interface Hash256ABIParameter extends ABIParameterBase , Hash256ABIReturn { } see ABIParameter see IntegerABIReturn see Fixed export interface IntegerABIParameter extends ABIParameterBase , IntegerABIReturn { } see ABIParameter see ForwardValueABIReturn export interface ForwardValueABIParameter extends ABIParameterBase , ForwardValueABIReturn { } see ABIParameter see MapABIReturn export interface MapABIParameter extends ABIParameterBase , MapABIReturn { } see ABIParameter see ObjectABIReturn export interface ObjectABIParameter extends ABIParameterBase , ObjectABIReturn { } see ABIParameter see PublicKeyABIReturn see PublicKeyString export interface PublicKeyABIParameter extends ABIParameterBase , PublicKeyABIReturn { } see ABIParameter see SignatureABIReturn see SignatureString export interface SignatureABIParameter extends ABIParameterBase , SignatureABIReturn { } see ABIParameter see StringABIReturn export interface StringABIParameter extends ABIParameterBase , StringABIReturn { } see ABIParameter see VoidABIReturn export interface VoidABIParameter extends ABIParameterBase , VoidABIReturn { } /**
 * Return type specification of a function in the `ContractABI` of a smart contract.
 */ export type ABIReturn = AnyABIReturn | SignatureABIReturn | BooleanABIReturn | Hash160ABIReturn | AddressABIReturn | Hash256ABIReturn | BufferABIReturn | PublicKeyABIReturn | StringABIReturn | ArrayABIReturn | MapABIReturn | ObjectABIReturn | VoidABIReturn | IntegerABIReturn | ForwardValueABIReturn ; /**
 * Parameter specification of a function or event in the `ContractABI` of a smart contract.
 */ export type ABIParameter = AnyABIParameter | SignatureABIParameter | BooleanABIParameter | Hash160ABIParameter | AddressABIParameter | Hash256ABIParameter | BufferABIParameter | PublicKeyABIParameter | StringABIParameter | ArrayABIParameter | MapABIParameter | ObjectABIParameter | VoidABIParameter | IntegerABIParameter | ForwardValueABIParameter ; export type AnyABI = AnyABIParameter | AnyABIReturn ; export type ArrayABI = ArrayABIParameter | ArrayABIReturn ; export type MapABI = MapABIParameter | MapABIReturn ; export type ObjectABI = ObjectABIParameter | ObjectABIReturn ; export type SignatureABI = SignatureABIParameter | SignatureABIReturn ; export type BooleanABI = BooleanABIParameter | BooleanABIReturn ; export type AddressABI = AddressABIParameter | AddressABIReturn ; export type Hash160ABI = Hash160ABIParameter | Hash160ABIReturn ; export type Hash256ABI = Hash256ABIParameter | Hash256ABIReturn ; export type BufferABI = BufferABIParameter | BufferABIReturn ; export type PublicKeyABI = PublicKeyABIParameter | PublicKeyABIReturn ; export type StringABI = StringABIParameter | StringABIReturn ; export type VoidABI = VoidABIParameter | VoidABIReturn ; export type IntegerABI = IntegerABIParameter | IntegerABIReturn ; export type ForwardValueABI = ForwardValueABIParameter | ForwardValueABIReturn ; /**
 * Describes the details of a contract parameter.
 */ export interface ContractParameterDefinitionBase { /**
     * The type of the contract parameter. @see `ContractParameterType` for information on possible contract parameter types.
     */ readonly type : ContractParameterDefinition [ 'type' ] ; /**
     * The name of the contract parameter.
     */ readonly name : string ; } see ContractParameterDefinition export interface AnyContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `AnyContractParemeter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Any' ; } see ContractParameterDefinition see SignatureString export interface SignatureContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `SignatureContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Signature' ; } see ContractParameterDefinition export interface BooleanContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `BooleanContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Boolean' ; } see ContractParameterDefinition export interface IntegerContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `IntegerContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Integer' ; } see ContractParameterDefinition see UInt160 export interface Hash160ContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `Hash160ContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Hash160' ; } see ContractParameterDefinition see UInt160 export interface AddressContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `AddressContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Address' ; } see ContractParameterDefinition see Hash256String export interface Hash256ContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `Hash256ContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Hash256' ; } see ContractParameterDefinition see BufferString export interface BufferContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `BufferContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Buffer' ; } see ContractParameterDefinition see PublicKeyString export interface PublicKeyContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `PublicKeyContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'PublicKey' ; } see ContractParameterDefinition export interface StringContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `StringContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'String' ; } see ContractParameterDefinition export interface ArrayContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `ArrayContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Array' ; } see ContractParameterDefinition export interface MapContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `MapContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Map' ; } see ContractParameterDefinition export interface InteropInterfaceContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `InteropInterfaceContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'InteropInterface' ; } see ContractParameterDefinition export interface VoidContractParameterDefinition extends ContractParameterDefinitionBase { /**
     * `type` distinguishes `VoidContractParameter` from other `ContractParameterDefinition` object types.
     */ readonly type : 'Void' ; } /**
 * Describes the parameters that a contract method expects as arguments.
 */ export type ContractParameterDefinition = AnyContractParameterDefinition | SignatureContractParameterDefinition | BooleanContractParameterDefinition | IntegerContractParameterDefinition | Hash160ContractParameterDefinition | AddressContractParameterDefinition | Hash256ContractParameterDefinition | BufferContractParameterDefinition | PublicKeyContractParameterDefinition | StringContractParameterDefinition | ArrayContractParameterDefinition | MapContractParameterDefinition | InteropInterfaceContractParameterDefinition | VoidContractParameterDefinition ; /**
 * All of the possible `type`s that a `ContractParameterDefinition` may have.
 * Can be either: `Any`, `Boolean`, `Integer`, `Buffer`, `String`, `Hash160`, `Hash256`, `PublicKey`, `Signature`,
 * `Array`, `Map`, `InteropInterface`, or `Void`.
 */ export type ContractParameterDefinitionType = ContractParameterDefinition [ 'type' ] ; /**
 * Method specification in the `ContractABI` of a smart contract generated by the NEO•ONE compiler and
 * for use in Client APIs. `ContractMethodDescriptClient` provides extra information for use in
 * the NEO•ONE Client.
 */ export interface ContractMethodDescriptorClient { /**
     * Name of the method.
     */ readonly name : string ; /**
     * Parameters of the method.
     */ readonly parameters ? : readonly ABIParameter [ ] ; /**
     * Return type of the method.
     */ readonly returnType : ABIReturn ; /**
     * Used to set the instruction pointer before executing the method.
     */ readonly offset : number ; /**
     * `true` if the function is \"safe\" to be called by any other contract
     */ readonly safe : boolean ; /**
     * `true` if the function is constant or read-only.
     */ readonly constant ? : boolean ; /**
     * `true` if the function is marked for receiving tokens.
     */ readonly receive ? : boolean ; } /**
 * Method specification in the `ContractABI` of a smart contract.
 */ export interface ContractMethodDescriptor { /**
     * Name of the method.
     */ readonly name : string ; /**
     * Parameters of the method.
     */ readonly parameters ? : readonly ContractParameterDefinition [ ] ; /**
     * Return type of the method.
     */ readonly returnType : ContractParameterType ; /**
     * Used to set the instruction pointer before executing the method.
     */ readonly offset : number ; /**
     * Indicates whether the method is safe to be called by other contracts.
     */ readonly safe : boolean ; } /**
 * Event specification in the `ContractABIClient` of a smart contract generated by the NEO•ONE compiler
 * for use with NEO•ONE Client APIs.
 */ export interface ContractEventDescriptorClient { /**
     * Name of the event.
     */ readonly name : string ; /**
     * Parameters of the event.
     */ readonly parameters : readonly ABIParameter [ ] ; } /**
 * Event specification in the `ContractABI` of a smart contract.
 */ export interface ContractEventDescriptor { /**
     * Name of the event.
     */ readonly name : string ; /**
     * Parameters of the event.
     */ readonly parameters : readonly ContractParameterDefinition [ ] ; } /**
 * Full specification of the methods and events of a smart contract. Used by the client APIs to generate the smart contract interface.
 *
 * See the [Smart Contract APIs](https://neo-one.io/docs/smart-contract-apis) chapter of the main guide for more information.
 */ export interface ContractABIClient { /**
     * Specification of the smart contract methods.
     */ readonly methods : readonly ContractMethodDescriptorClient [ ] ; /**
     * Specification of the smart contract events.
     */ readonly events : readonly ContractEventDescriptorClient [ ] ; } /**
 * Full specification of the functions and events of a smart contract. Used by the client APIs to generate the smart contract interface.
 *
 * See the [Smart Contract APIs](https://neo-one.io/docs/smart-contract-apis) chapter of the main guide for more information.
 */ export interface ContractABI { /**
     * Specification of the smart contract methods.
     */ readonly methods : readonly ContractMethodDescriptor [ ] ; /**
     * Specification of the smart contract events.
     */ readonly events : readonly ContractEventDescriptor [ ] ; } /**
 * A `ContractGroup` represents a set of mutually trusted contracts. A contract will allow any contract in the same
 * group to invoke it, and the user interface will not give any warnings. A group is identified by a public key
 * and must be accompanied by a signature for the contract hash to prove the contract is included in the group.
 */ export interface ContractGroup { /**
     * The public key identifying the group.
     */ readonly publicKey : PublicKeyString ; /**
     * Signature of the contract hash.
     */ readonly signature : BufferString ; } export type WildcardContainer < T > = readonly T [ ] | Wildcard ; /**
 * Describes the contract to be invoked. Can be a contract hash, the public key of a group, or a wildcard.
 * If it specifies a contract hash, then that contract will be invoked. If it specifies the public key of a group,
 * then any contract in that group will be invoked. If it specifies a wildcard, then any contract will be invoked.
 */ export interface ContractPermissionDescriptor { /**
     * If defined then this permission descriptor is for a contract.
     */ readonly hash ? : UInt160Hex ; /**
     * If defined then this permission descriptor is for a contract group.
     */ readonly group ? : PublicKeyString ; } /**
 * Describes which contracts may be invoked and which methods are called.
 */ export interface ContractPermission { /**
     * Indicates the contract to be invoked. Can be either a contract hash, the public key of a group, or a wildcard.
     */ readonly contract : ContractPermissionDescriptor ; /**
     * An array containing a set of methods to be called. If it is a wildcard then any method can be called.
     * If a contract invokes a contract or method that is not declared in the manifest at runtime, the invocation will fail.
     */ readonly methods : WildcardContainer < string > ; } /**
 * A manifest explicitly declares the permissions a Contract will use. Once deployed,
 * it will be limited by its declared list of permissions. `ContractManifestClient`
 * specifically contains extra contract information for use in the NEO•ONE Client
 */ export interface ContractManifestClient { /**
     * The name of the contract.
     */ readonly name : string ; /**
     * A group represents a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings.
     */ readonly groups : readonly ContractGroup [ ] ; /**
     * The Neo Enhancement Proposals (NEPs) and other standards that this smart contract supports.
     */ readonly supportedStandards : readonly string [ ] ; /**
     * Full specification of the functions and events of a smart contract. Used by the Client APIs
     * to generate the smart contract interface.
     */ readonly abi : ContractABIClient ; /**
     * The permissions field is an array containing a set of `ContractPermission` objects. It describes which contracts may be invoked and which methods are called.
     */ readonly permissions : readonly ContractPermission [ ] ; /**
     * The trusts field is an array containing a set of contract hashes or group public keys. It can also be assigned with a wildcard *. If it is a wildcard *, then it means that it trusts any contract.
     * If a contract is trusted, the user interface will not give any warnings when called by the contract.
     */ readonly trusts : WildcardContainer < ContractPermissionDescriptor > ; /**
     * Custom user-defined JSON object.
     */ readonly extra ? : JSONObject ; } /**
 * A manifest explicitly declares the permissions a Contract will use. Once deployed,
 * it will be limited by its declared list of permissions.
 */ export interface ContractManifest { /**
     * The name of the contract.
     */ readonly name : string ; /**
     * A group represents a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings.
     */ readonly groups : readonly ContractGroup [ ] ; /**
     * The Neo Enhancement Proposals (NEPs) and other standards that this smart contract supports.
     */ readonly supportedStandards : readonly string [ ] ; /**
     * Full specification of the functions and events of a smart contract. Used by the Client APIs
     * to generate the smart contract interface.
     */ readonly abi : ContractABI ; /**
     * The permissions field is an array containing a set of `ContractPermission` objects. It describes which contracts may be invoked and which methods are called.
     */ readonly permissions : readonly ContractPermission [ ] ; /**
     * The trusts field is an array containing a set of contract hashes or group public keys. It can also be assigned with a wildcard *. If it is a wildcard *, then it means that it trusts any contract.
     * If a contract is trusted, the user interface will not give any warnings when called by the contract.
     */ readonly trusts : WildcardContainer < ContractPermissionDescriptor > ; /**
     * Custom user-defined JSON object.
     */ readonly extra ? : JSONObject ; } /**
 * A token that represents the method that a contract will call statically.
 */ export interface MethodToken { /**
     * The hash of the contract to be called.
     */ readonly hash : string ; /**
     * The name of the method to be called.
     */ readonly method : string ; /**
     * The number of parameters that the method expects.
     */ readonly paramCount : number ; /**
     * Indicates if the method to be called has a return value.
     */ readonly hasReturnValue : boolean ; /**
     * The `CallFlags` to be used to call the contract.
     */ readonly callFlags : CallFlags ; } /**
 * The structure of a Neo Executable Format (NEF) file.
 */ export interface NefFile { /**
     * NEO Executable Format 3 (NEF3) magic number.
     */ readonly magic : number ; /**
     * The name and version of the compiler that created this NEF file.
     */ readonly compiler : string ; /**
     * The URL of the source files.
     */ readonly source : string ; /**
     * The script of the contract.
     */ readonly script : BufferString ; /**
     * The methods to be called statically.
     */ readonly tokens : readonly MethodToken [ ] ; /**
     * The NEF checksum.
     */ readonly checksum : number ; } declare const OpaqueTagSymbol ; /**
 * `ForwardValue` represents a value that's intended to be forwarded to another smart contract method. This object is not meant to be directly constructued, instead one should produce them via the automatically generated `forward<method>Args` methods.
 *
 * See the [Forward Values](https://neo-one.io/docs/forward-values) chapter of the advanced guide for more information.
 */ export interface ForwardValue { readonly name : string ; readonly converted : ScriptBuilderParam | undefined ; readonly param : Param | undefined ; readonly [ OpaqueTagSymbol ] : unique symbol ; } export interface ScriptBuilderParamArray extends Array < ScriptBuilderParam > { } export interface ScriptBuilderParamMap extends Map < ScriptBuilderParam , ScriptBuilderParam > { } export interface ScriptBuilderParamObject { readonly [ key ] : ScriptBuilderParam ; } /**
 * `Param` is converted internally via the `ContractABI` definition into a `ScriptBuilderParam` which is used to actually invoke the method on the smart contract.
 */ export type ScriptBuilderParam = undefined | BN | number | UInt160 | UInt256 | ECPoint | string | Buffer | boolean | ScriptBuilderParamArray | ScriptBuilderParamMap | ScriptBuilderParamObject ; export interface ScriptBuilderParamToCallbacks < T > { readonly undefined : ( ) => T ; readonly array : ( param : ScriptBuilderParamArray ) => T ; readonly map : ( param : ScriptBuilderParamMap ) => T ; readonly uInt160 : ( param : UInt160 ) => T ; readonly uInt256 : ( param : UInt256 ) => T ; readonly ecPoint : ( param : ECPoint ) => T ; readonly bn : ( param : BN ) => T ; readonly number : ( param : number ) => T ; readonly string : ( param : string ) => T ; readonly boolean : ( param : boolean ) => T ; readonly buffer : ( param : Buffer ) => T ; readonly object : ( param : ScriptBuilderParamObject ) => T ; } export interface ParamArray extends Array < Param > { } export interface ParamMap extends Map < Param , Param > { } export interface ParamObject { readonly [ key ] : Param ; } /**
 * Valid parameter types for a smart contract method.
 */ export type Param = undefined | BigNumber | string | BufferString | AddressString | Hash256String | PublicKeyString | boolean | ParamArray | ParamMap | ParamObject | ForwardValue ; export interface ParamToCallbacks < T > { readonly undefined : ( ) => T ; readonly bigNumber : ( param : BigNumber ) => T ; readonly string : ( param : string ) => T ; readonly boolean : ( param : boolean ) => T ; readonly array : ( param : ParamArray ) => T ; readonly map : ( param : ParamMap ) => T ; readonly object : ( param : ParamObject ) => T ; readonly forwardValue : ( param : ForwardValue ) => T ; } export interface ReturnArray extends ReadonlyArray < Return > { } export interface ReturnMap extends ReadonlyMap < Return , Return > { } export interface ReturnObject { readonly [ key ] : Return ; } /**
 * Possible return types for a smart contract method.
 */ export type Return = undefined | BigNumber | BufferString | AddressString | Hash256String | PublicKeyString | boolean | ReturnArray | ReturnMap | ReturnObject | ContractParameter ; /**
 * Attributes of a deployed smart contract.
 */ export interface Contract { /**
     * The `Contract`s ID.
     */ readonly id : number ; /**
     * The number of times the `Contract` has been updated.
     */ readonly updateCounter : number ; /**
     * The NEO Executable Format (NEF) file of the `Contract`.
     */ readonly nef : NefFile ; /**
     * The `Contract`'s script hash.
     */ readonly hash : UInt160Hex ; /**
     * The `Contract`'s manifest.
     */ readonly manifest : ContractManifest ; } see ContractParameter export interface AnyContractParameter { /**
     * `type` distinguishes `AnyContractParemeter` from other `ContractParameter` object types.
     */ readonly type : 'Any' ; /**
     * Value is not defined.
     */ readonly value : undefined ; } see ContractParameter see SignatureString export interface SignatureContractParameter { /**
     * `type` distinguishes `SignatureContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Signature' ; /**
     * Raw signature string.
     */ readonly value : SignatureString ; } see ContractParameter export interface BooleanContractParameter { /**
     * `type` distinguishes `BooleanContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Boolean' ; /**
     * Raw boolean value.
     */ readonly value : boolean ; } see ContractParameter export interface IntegerContractParameter { /**
     * `type` distinguishes `IntegerContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Integer' ; /**
     * Always an integer. This value is processed using the ABI's `decimals` specification into a corresponding `BigNumber`.
     */ readonly value : BN ; } see ContractParameter see UInt160 export interface AddressContractParameter { /**
     * `type` distinguishes `AddressContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Address' ; /**
     * NEO address in base58 encoded string format.
     */ readonly value : AddressString ; } see ContractParameter see UInt160 export interface Hash160ContractParameter { /**
     * `type` distinguishes `Hash160ContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Hash160' ; /**
     * NEO address in base58 encoded string format.
     */ readonly value : AddressString ; } see ContractParameter see Hash256String export interface Hash256ContractParameter { /**
     * `type` distinguishes `Hash256ContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Hash256' ; /**
     * NEO `Hash256` encoded as a string.
     */ readonly value : Hash256String ; } see ContractParameter see BufferString export interface BufferContractParameter { /**
     * `type` distinguishes `BufferContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Buffer' ; /**
     * Hex encoded `Buffer` string.
     */ readonly value : BufferString ; } see ContractParameter see PublicKeyString export interface PublicKeyContractParameter { /**
     * `type` distinguishes `PublicKeyContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'PublicKey' ; /**
     * String format of a public key.
     */ readonly value : PublicKeyString ; } see ContractParameter export interface StringContractParameter { /**
     * `type` distinguishes `StringContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'String' ; /**
     * Raw string value.
     */ readonly value : string ; } see ContractParameter export interface ArrayContractParameter { /**
     * `type` distinguishes `ArrayContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Array' ; /**
     * An array of `ContractParameter`s.
     */ readonly value : readonly ContractParameter [ ] ; } see ContractParameter export interface MapContractParameter { /**
     * `type` distinguishes `MapContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Map' ; /**
     * A map of `ContractParameter` to `ContractParameter`. Represented as an array of pairs because JavaScript `Map` keys do not have the same semantics as the NEO VM.
     */ readonly value : ReadonlyArray < readonly [ ContractParameter , ContractParameter ] > ; } see ContractParameter export interface InteropInterfaceContractParameter { /**
     * `type` distinguishes `InteropInterfaceContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'InteropInterface' ; } see ContractParameter export interface VoidContractParameter { /**
     * `type` distinguishes `VoidContractParameter` from other `ContractParameter` object types.
     */ readonly type : 'Void' ; } /**
 * `ContractParameter`s are the serialized stack items of an invocation. These are typically the raw results of an invocation, but they may appear in other raw contexts.
 *
 * Low-level API for advanced usage only.
 */ export type ContractParameter = AnyContractParameter | SignatureContractParameter | BooleanContractParameter | IntegerContractParameter | AddressContractParameter | Hash160ContractParameter | Hash256ContractParameter | BufferContractParameter | PublicKeyContractParameter | StringContractParameter | ArrayContractParameter | MapContractParameter | InteropInterfaceContractParameter | VoidContractParameter ; /**
 * All of the possible `type`s that a `ContractParameter` may have.
 * Can be either: `Any`, `Boolean`, `Integer`, `Buffer`, `String`, `Hash160`, `Hash256`, `PublicKey`, `Signature`,
 * `Array`, `Map`, `InteropInterface`, or `Void`.
 */ export type ContractParameterType = ContractParameter [ 'type' ] ; export type RawExecutionResult = RawExecutionResultSuccess | RawExecutionResultError ; interface RawExecutionResultBase { /**
     * The state of the NEO VM after execution. Typically has one `ContractParameter` which is the return value of the method invoked.
     */ readonly stack : readonly ContractParameter [ ] ; /**
     * Total GAS consumed by the operation.
     */ readonly gasConsumed : BigNumber ; } export interface RawExecutionResultSuccess extends RawExecutionResultBase { /**
     * Result of transaction execution. Indicates a successful execution.
     */ readonly state : 'HALT' ; } export interface RawExecutionResultError extends RawExecutionResultBase { /**
     * Result of transaction execution. Indicates a failed execution.
     */ readonly state : 'FAULT' ; /**
     * Failure reason.
     */ readonly message : string ; } /**
 * Base properties of `Event`s and `Log`s as well as their raw counterparts, `RawNotification` and `RawLog`, respectively.
 */ export interface RawActionBase { /**
     * Indicates whether the action was produced by a `Transaction` or a `Block`.
     */ readonly source : 'Block' | 'Transaction' ; /**
     * NEO network version number.
     */ readonly version : number ; /**
     * Index of the block this action was emitted in.
     */ readonly blockIndex : number ; /**
     * Hash of the block this action was emitted in.
     */ readonly blockHash : Hash256String ; /**
     * Index of the transaction within the block this action was emitted in.
     */ readonly transactionIndex : number ; /**
     * Hash of the transaction within the block this action was emitted in.
     */ readonly transactionHash : Hash256String ; /**
     * Ordered index of the action of when it occurred within the transaction.
     */ readonly index : number ; /**
     * Ordered globally unique index of the action.
     */ readonly globalIndex : BigNumber ; /**
     * Address of the smart contract that this action occurred in.
     */ readonly address : AddressString ; } /**
 * Raw action emitted during an invocation.
 *
 * Low-level API for advanced usage only.
 */ export type RawAction = RawNotification | RawLog ; /**
 * Raw notification emitted during an invocation. This is the unprocessed counterpart to an `Event`.
 *
 * Low-level API for advanced usage only.
 */ export interface RawNotification extends RawActionBase { /**
     * `type` differentiates the `RawNotification` object from other `RawAction` objects, i.e. `RawLog`.
     */ readonly type : 'Notification' ; /**
     * The raw arguments of the notifications. These are processed into the `parameters` parameter of the `Event` object using the `ABI`.
     */ readonly args : readonly ContractParameter [ ] ; /**
     * The name of the notification.
     */ readonly eventName : string ; } /**
 * Raw log emitted during an invocation.
 *
 * Low-level API for advanced usage only.
 */ export interface RawLog extends RawActionBase { /**
     * `type` differentiates the `RawLog` object from other `RawAction` objects, i.e. `RawNotification`.
     */ readonly type : 'Log' ; /**
     * The raw message. This is unprocessed in the `message`.
     */ readonly message : string ; /**
     * The position of the instruction pointer at the point of the log.
     */ readonly position : number ; } /**
 * Raw action emitted during an invocation.
 *
 * Low-level API for advanced usage only.
 */ export type RawVMAction = RawVMNotification | RawVMLog ; /**
 * Raw notification from VM execution.
 *
 * Low-level API for advanced usage only.
 */ export interface RawVMNotification { /**
     * `type` differentiates the `RawNotification` object from other `RawAction` objects, i.e. `RawLog`.
     */ readonly type : 'Notification' ; /**
     * The script hash of the contract that created the notification.
     */ readonly scriptHash : UInt160Hex ; /**
     * The event name of the notification.
     */ readonly eventName : string ; /**
     * The raw arguments of the notification.
     */ readonly state : readonly ContractParameter [ ] | string ; } /**
 * Raw log emitted from VM execution.
 *
 * Low-level API for advanced usage only.
 */ export interface RawVMLog { /**
     * `type` differentiates the `RawLog` object from other `RawAction` objects, i.e. `RawNotification`.
     */ readonly type : 'Log' ; /**
     * The hash of the container that emitted the log.
     */ readonly containerHash ? : Hash256String ; /**
     * The script hash of the transaction that called the invocation that emitted the log.
     */ readonly callingScriptHash : UInt160Hex ; /**
     * The raw message. This is unprocessed in the `message`.
     */ readonly message : string ; /**
     * The position of the instruction pointer when the log was emitted.
     */ readonly position : number ; } /**
 * Raw receipt of an invocation.
 *
 * Low-level API for advanced usage only.
 */ export interface RawCallReceipt { readonly result : RawExecutionResult ; readonly actions : readonly RawAction [ ] ; } /**
 * Raw receipt of an invocation.
 *
 * Low-level API for advanced usage only.
 */ export interface RawInvokeReceipt extends TransactionReceipt { readonly result : RawExecutionResult ; readonly actions : readonly RawAction [ ] ; } /**
 * Smart contract source maps.
 */ export interface SourceMaps { /**
     * `RawSourceMap` for the contract at `address`
     */ readonly [ address ] : RawSourceMap ; } /**
 * Encodes an error returned by the JSONRPC server.
 */ export interface JSONRPCErrorResponse { /**
     * Error code.
     */ readonly code : number ; /**
     * Error message.
     */ readonly message : string ; /**
     * Additional data, typically `undefined`.
     */ readonly data ? : any ; } /**
 * Raw result of relaying a `Transaction`. Further consumed and processed by `LocalUserAccountProvider` and `ContractABI`.
 */ export interface RelayTransactionResult { /**
     * Relayed `Transaction`
     */ readonly transaction : Transaction ; /**
     * Verification result.
     */ readonly verifyResult ? : VerifyResultModel ; /**
     * Optional additional failure message for debugging transaction relay failure.
     */ readonly failureMessage ? : string ; } export interface RawExecutionData { /**
     * The `Transaction`'s trigger type.
     */ readonly trigger : TriggerTypeJSON ; /**
     * The `Transaction` script's resultant VM state.
     */ readonly vmState : 'HALT' | 'FAULT' ; /**
     * The exception message if FAULT result.
     */ readonly exception ? : string ; /**
     * The GAS consumed by the `Transaction`'s script execution.
     */ readonly gasConsumed : BigNumber ; /**
     * The resulting stack from `Transaction`'s script execution or the error that resulted.
     */ readonly stack : readonly ContractParameter [ ] | string ; /**
     * The `Notification`s that came from the `Transaction`'s script execution.
     */ readonly notifications : readonly RawVMNotification [ ] ; /**
     * The `Log`s that came from the `Transaction`'s script execution.
     */ readonly logs : readonly RawVMLog [ ] ; } /**
 * Additional raw data that is typically used for the client APIs.
 */ export interface RawApplicationLogData { /**
     * The `Transaction`'s ID.
     */ readonly txId ? : string ; /**
     * The hash of the block that the `Transaction` is in.
     */ readonly blockHash ? : string ; /**
     * The `RawExecutionData` provided by the transaction execution.
     */ readonly executions : readonly RawExecutionData [ ] ; } export interface ParamJSONArray extends ReadonlyArray < ParamJSON > { } /**
 * JSON format of `Param`s that are added as an `Attribute` tag.
 */ export type ParamJSON = undefined | string | BufferString | AddressString | Hash256String | PublicKeyString | boolean | ParamJSONArray ; /**
 * Constant settings used to initialize the client APIs.
 */ export interface NetworkSettings { readonly blockCount : number ; readonly decrementInterval : number ; readonly generationAmount : readonly number [ ] ; readonly privateKeyVersion : number ; readonly standbyvalidators : readonly string [ ] ; readonly network : number ; readonly maxValidUntilBlockIncrement : number ; readonly addressVersion : number ; readonly standbyCommittee : readonly string [ ] ; readonly committeeMemberscount : number ; readonly validatorsCount : number ; readonly millisecondsPerBlock : number ; readonly memoryPoolMaxTransactions : number ; } /**
 * Peers connected to the node.
 */ export interface Peer { readonly address : string ; readonly port : number ; } /**
 * Raw storage value
 */ export interface StorageItem { readonly key : BufferString ; readonly value : BufferString ; }