Skip to content

Commit

Permalink
update: examples (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirvolek authored Jul 16, 2021
1 parent 586a718 commit 18318e4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,23 @@ yarn add @blockfrost/blockfrost-js
import { BlockfrostAPI } from '@blockfrost/blockfrost-js';

const API = new BlockFrostAPI({
projectId: 'YOUR API KEY HERE',
projectId: 'YOUR API KEY HERE', // see: https://blockfrost.io
});

try {
const latestBlock = await API.blocksLatest();
const assets = await API.assets();
const latestEpoch = await API.epochsLatest();
const health = await API.health();
const address = await API.addresses(
'addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz',
);

console.log(address, assets, latestBlock, health);
console.log('address', address);
console.log('latestEpoch', latestEpoch);
console.log('latestBlock', latestBlock);
console.log('health', health);
} catch (err) {
console.log(err);
console.log('error', err);
}
```

Expand All @@ -52,7 +55,7 @@ import { BlockfrostIPFS } from '@blockfrost/blockfrost-js';
import fs from 'fs';

const IPFS = new BlockFrostIPFS({
projectId: 'YOUR API KEY HERE', // see: https://blockfrost.io
projectId: 'YOUR IPFS KEY HERE', // see: https://blockfrost.io
});

try {
Expand Down

0 comments on commit 18318e4

Please sign in to comment.