0 purchases
unmarshal
A Future-based library to interact with the Unmarshal API.
This package is a wrapper around the Unmarshal API, allowing easy data retrieval from
blockchain networks with Dart. It is multi-platform, with limited dependencies
for use in mobile, desktop, or browser apps.
This community package is designed to follow the Unmarshal API Documentation as closely
as possible.
Using #
The easiest way to use this library is via the top-level Unmarshal class.
import 'package:unmarshal/unmarshal.dart';
void main() async {
/// Load API keys using your preferred method
String authToken = 'YOUR_API_KEY';
/// Initialize the main object
Unmarshal api = Unmarshal(authToken: authToken);
try {
/// Call the api
Response response = await api.token.getAllTokens(
page: 1,
pageSize: 20,
);
if (response.statusCode == 200) {
/// Do stuff with the response
print(response.statusCode);
print(json.decode(response.body));
} else {
/// Handle the server error
print('Server Error: ${response.statusCode}:');
print(response.body);
}
} catch (e) {
/// Throws an exception if an error occurs
print(e);
}
/// Close the connection
api.close();
}
copied to clipboard
Available endpoints #
Implemented:
transaction
nft
protocol
price
token
traders
blocks
events
Not implemented:
notifications
If notification endpoints are needed, feel free to open a discussion on github.
Getting Help #
Submit an issue on github.
How to contribute #
All feedback and suggestions for improvements are welcome:
Open a discussion on github
Discuss proposed changes
Submit a PR (optional)
Support my work #
This package is possible thanks to the people and companies
who donate money, services or time to keep the project running.
If you're interested in becoming a Sponsor, Backer or Contributor
to expand the project, reach out to me on github.
Or buy me coffee at 0xdir.near.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.