Nano Api

A high-level API to the Nimiq nano client. This is intended to be the basis for nimiq wallet applications.

Setup

My Address

nimiq.address

My Balance

nimiq.balance

Send Funds

Events

Example event handler implementation:

class MyNimiqApi extends NanoApi{
	
	onInitialized() {
        console.log('Nimiq API ready to use')
    }

	onConsensusEstablished(){
		console.log('consensus established')
	}

	onBalanceChanged(balance){
		console.log('my new balance:', balance)
	}

	onTransactionReceived(sender, value, fee){
		console.log('transaction received from',sender, 'tx-value:',value,'fees payed',fee)
	}
} 
const nimiq = new MyNimiqApi();