cardano-api
Wrapper for the Cardano Explorer API.
const cardano = const address = 'DdzFFzCqrht8iQ2utWYssBnfGvSqkGfM7fxHXZWoB57ormT17td1CY4Eye7bADF6HpeGC57vwV5ZPzmVjiZRQEkAD9Rc4P8LDF7FfYne' // promisecardano // async/awaitconst myCardanoFunc = async { try const data = await cardano console catcherr console }
Endpoints
/api/addresses/summary/{address}
cardano.address() -// Get summary information about an addressconst query = address: 'Ae2tdP...fQwGpm' // Required, wallet address to check cardano
/api/blocks/summary/{hash}
cardano.block() -// Get block's summary informationconst query = hash: '52659d...195a70' // Required, block hash to check cardano
/api/blocks/txs/{hash}
cardano.blockTransaction() -// Get brief information about transaction based on blocks// For info on specific transactions use cardano.transaction()const query = hash: '52659d...195a70' // Required, block hash to check limit: 10 // Optional offset: 2 // Optional cardano
/api/blocks/pages/total
cardano.blocksTotal() -// Get the list of total blocksconst query = pageSize: 3 // Optional cardano
/api/genesis/address/pages
cardano.genesisAddress() -const query = page: 1 // Optional pageSize: 3 // Optional redeemed: true // Optional cardano
/api/genesis/address/pages/total
cardano.genesisPagesTotal() -const query = pageSize: 3 // Optional redeemed: true // Optional cardano
/api/genesis/summary
cardano.genesisSummary() -cardano
/api/search/epoch/{epoch}
cardano.epoch() -// Search the blocks by epoch and slotconst query = epoch: 3 // Required, epoch to check slot: 24 // Optional cardano
/api/txs/summary/{txid}
cardano.transaction() -// Get summary information about a transactionconst query = txid: 'f3d468...3ac99b' // Required, transaction to check cardano
/api/txs/last
cardano.transactionLast() -// Get information about the 20 latest transactionscardano
Issues
Something not working? Please open an issue
Test
npm test