unmarshal 1.0.0 copy "unmarshal: ^1.0.0" to clipboard
unmarshal: ^1.0.0 copied to clipboard

A Future-based wrapper around the Unmarshal APIs, providing comprehensive data on wallets, tokens, prices and protocols across 16+ blockchains for your decentralized applications.

example/example.dart

import 'dart:convert';
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.nfts.getNftsByAddress(
      address: 'vitalik.eth',
      chain: 'ethereum',
      offset: 0,
      pageSize: 25,
    );

    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();
}
4
likes
160
pub points
0%
popularity

Publisher

verified publisher0xdir.com

A Future-based wrapper around the Unmarshal APIs, providing comprehensive data on wallets, tokens, prices and protocols across 16+ blockchains for your decentralized applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http

More

Packages that depend on unmarshal