Methods
getAccount
- getAccount(query: AccountQuery): Promise<Account | undefined>
-
Parameters
Returns Promise<Account | undefined>
getAllTokens
- getAllTokens(): Promise<keyof Token[]>
-
Returns Promise<keyof Token[]>
getBlockHeader
- getBlockHeader(height: number): Promise<BlockHeader>
-
Parameters
Returns Promise<BlockHeader>
Protected getDefaultFee
- getDefaultFee(): Promise<Amount | undefined>
-
Returns Promise<Amount | undefined>
getElectionRules
- getElectionRules(): Promise<keyof ElectionRule[]>
-
Returns Promise<keyof ElectionRule[]>
getElectorates
- getElectorates(): Promise<keyof Electorate[]>
-
Returns Promise<keyof Electorate[]>
getFeeQuote
- getFeeQuote(transaction: UnsignedTransaction): Promise<Fee>
-
Parameters
-
transaction: UnsignedTransaction
Returns Promise<Fee>
getNonce
- getNonce(query: AddressQuery | PubkeyQuery): Promise<Nonce>
-
Parameters
-
query: AddressQuery | PubkeyQuery
Returns Promise<Nonce>
getNonces
- getNonces(query: AddressQuery | PubkeyQuery, count: number): Promise<keyof Nonce[]>
-
Parameters
-
query: AddressQuery | PubkeyQuery
-
count: number
Returns Promise<keyof Nonce[]>
Protected getProductFee
- getProductFee(transaction: BnsTx): Promise<Amount | undefined>
-
Parameters
Returns Promise<Amount | undefined>
getProposals
- getProposals(): Promise<keyof Proposal[]>
-
Returns Promise<keyof Proposal[]>
getSwaps
- getSwaps(query: AtomicSwapQuery): Promise<keyof AtomicSwap[]>
-
Parameters
Returns Promise<keyof AtomicSwap[]>
getSwapsFromState
- getSwapsFromState(query: AtomicSwapQuery): Promise<keyof AtomicSwap[]>
-
Parameters
Returns Promise<keyof AtomicSwap[]>
getToken
- getToken(ticker: TokenTicker): Promise<Token | undefined>
-
Parameters
Returns Promise<Token | undefined>
getTx
- getTx(id: TransactionId): Promise<ConfirmedAndSignedTransaction<UnsignedTransaction> | FailedTransaction>
-
Parameters
Returns Promise<ConfirmedAndSignedTransaction<UnsignedTransaction> | FailedTransaction>
getUsernames
-
Parameters
Returns Promise<keyof BnsUsernameNft[]>
getValidators
- getValidators(): Promise<keyof Validator[]>
-
Returns Promise<keyof Validator[]>
getVotes
- getVotes(voter: Address): Promise<keyof Vote[]>
-
Parameters
Returns Promise<keyof Vote[]>
height
- height(): Promise<number>
listenTx
- listenTx(query: TransactionQuery): Stream<ConfirmedTransaction<LightTransaction> | FailedTransaction>
-
Parameters
Returns Stream<ConfirmedTransaction<LightTransaction> | FailedTransaction>
liveTx
- liveTx(query: TransactionQuery): Stream<ConfirmedTransaction<LightTransaction> | FailedTransaction>
-
Parameters
Returns Stream<ConfirmedTransaction<LightTransaction> | FailedTransaction>
postTx
- postTx(tx: PostableBytes): Promise<PostTxResponse>
-
Parameters
Returns Promise<PostTxResponse>
Protected query
-
Parameters
-
path: string
-
data: Uint8Array
searchTx
- searchTx(query: TransactionQuery): Promise<keyof (FailedTransaction | ConfirmedTransaction<LightTransaction>)[]>
-
Parameters
Returns Promise<keyof (FailedTransaction | ConfirmedTransaction<LightTransaction>)[]>
Protected updateSwapAmounts
- updateSwapAmounts<T>(swap: T): Promise<T>
-
Type parameters
Parameters
Returns Promise<T>
watchAccount
- watchAccount(query: AccountQuery): Stream<Account | undefined>
-
Parameters
Returns Stream<Account | undefined>
watchBlockHeaders
- watchBlockHeaders(): Stream<BlockHeader>
-
Returns Stream<BlockHeader>
watchSwaps
- watchSwaps(query: AtomicSwapQuery): Stream<AtomicSwap>
-
Parameters
Returns Stream<AtomicSwap>
withDefaultFee
- withDefaultFee<T>(transaction: T): Promise<T>
-
Type parameters
Parameters
Returns Promise<T>
Talks directly to the BNS blockchain and exposes the same interface we have with the BCP protocol.
We can embed in iov-core process or use this in a BCP-relay