Skip to content

blockfrost/blockfrost-dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

blockfrost-dart


Dart SDK for Blockfrost.io API.

Getting startedUsage


Getting started

To use this SDK, you first need login into to blockfrost.io create your project to retrive your API token.


Usage

Using the SDK is pretty straight-forward as you can see from the following example.

Cardano

import 'package:blockfrost_api/blockfrost_api.dart';

void main() async  {

	String projectId = "<insert project id>";
		
	String out;
	
	try
	{
		BlockService service = BlockService(Service.networkCardanoMainnet, projectId);
    	
		BlockContent block = await service.getLatestBlock();
			  	
		out = block.hash;
	}	
	
	catch(e)
	{
		out = e.toString();
	}
	
	print(out);

}

About

Dart SDK for the Blockfrost.io API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages