Skip to content

Latest commit

 

History

History
383 lines (273 loc) · 15.7 KB

CardanoAssetsApi.md

File metadata and controls

383 lines (273 loc) · 15.7 KB

blockfrost.api.CardanoAssetsApi

Load the API package

import 'package:blockfrost/api.dart';

All URIs are relative to https://cardano-mainnet.blockfrost.io/api/v0

Method HTTP request Description
assetsAssetAddressesGet GET /assets/{asset}/addresses Asset addresses
assetsAssetGet GET /assets/{asset} Specific asset
assetsAssetHistoryGet GET /assets/{asset}/history Asset history
assetsAssetTransactionsGet GET /assets/{asset}/transactions Asset transactions
assetsAssetTxsGet GET /assets/{asset}/txs Asset transactions
assetsGet GET /assets Assets
assetsPolicyPolicyIdGet GET /assets/policy/{policy_id} Assets of a specific policy

assetsAssetAddressesGet

BuiltList assetsAssetAddressesGet(asset, count, page, order)

Asset addresses

List of a addresses containing a specific asset

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getCardanoAssetsApi();
final String asset = b0d07d45fe9514f80213f4020e5a61241458be626841cde717cb38a76e7574636f696e; // String | Concatenation of the policy_id and hex-encoded asset_name
final int count = 56; // int | The number of results displayed on one page.
final int page = 56; // int | The page number for listing the results.
final String order = order_example; // String | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. 

try {
    final response = api.assetsAssetAddressesGet(asset, count, page, order);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CardanoAssetsApi->assetsAssetAddressesGet: $e\n');
}

Parameters

Name Type Description Notes
asset String Concatenation of the policy_id and hex-encoded asset_name
count int The number of results displayed on one page. [optional] [default to 100]
page int The page number for listing the results. [optional] [default to 1]
order String The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. [optional] [default to 'asc']

Return type

BuiltList<AssetAddressesInner>

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

assetsAssetGet

Asset assetsAssetGet(asset)

Specific asset

Information about a specific asset

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getCardanoAssetsApi();
final String asset = b0d07d45fe9514f80213f4020e5a61241458be626841cde717cb38a76e7574636f696e; // String | Concatenation of the policy_id and hex-encoded asset_name

try {
    final response = api.assetsAssetGet(asset);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CardanoAssetsApi->assetsAssetGet: $e\n');
}

Parameters

Name Type Description Notes
asset String Concatenation of the policy_id and hex-encoded asset_name

Return type

Asset

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

assetsAssetHistoryGet

BuiltList assetsAssetHistoryGet(asset, count, page, order)

Asset history

History of a specific asset

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getCardanoAssetsApi();
final String asset = b0d07d45fe9514f80213f4020e5a61241458be626841cde717cb38a76e7574636f696e; // String | Concatenation of the policy_id and hex-encoded asset_name
final int count = 56; // int | The number of results displayed on one page.
final int page = 56; // int | The page number for listing the results.
final String order = order_example; // String | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. 

try {
    final response = api.assetsAssetHistoryGet(asset, count, page, order);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CardanoAssetsApi->assetsAssetHistoryGet: $e\n');
}

Parameters

Name Type Description Notes
asset String Concatenation of the policy_id and hex-encoded asset_name
count int The number of results displayed on one page. [optional] [default to 100]
page int The page number for listing the results. [optional] [default to 1]
order String The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. [optional] [default to 'asc']

Return type

BuiltList<AssetHistoryInner>

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

assetsAssetTransactionsGet

BuiltList assetsAssetTransactionsGet(asset, count, page, order)

Asset transactions

List of a specific asset transactions

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getCardanoAssetsApi();
final String asset = b0d07d45fe9514f80213f4020e5a61241458be626841cde717cb38a76e7574636f696e; // String | Concatenation of the policy_id and hex-encoded asset_name
final int count = 56; // int | The number of results displayed on one page.
final int page = 56; // int | The page number for listing the results.
final String order = order_example; // String | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. 

try {
    final response = api.assetsAssetTransactionsGet(asset, count, page, order);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CardanoAssetsApi->assetsAssetTransactionsGet: $e\n');
}

Parameters

Name Type Description Notes
asset String Concatenation of the policy_id and hex-encoded asset_name
count int The number of results displayed on one page. [optional] [default to 100]
page int The page number for listing the results. [optional] [default to 1]
order String The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. [optional] [default to 'asc']

Return type

BuiltList<AssetTransactionsInner>

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

assetsAssetTxsGet

BuiltList assetsAssetTxsGet(asset, count, page, order)

Asset transactions

List of a specific asset transactions

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getCardanoAssetsApi();
final String asset = b0d07d45fe9514f80213f4020e5a61241458be626841cde717cb38a76e7574636f696e; // String | Concatenation of the policy_id and hex-encoded asset_name
final int count = 56; // int | The number of results displayed on one page.
final int page = 56; // int | The page number for listing the results.
final String order = order_example; // String | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. 

try {
    final response = api.assetsAssetTxsGet(asset, count, page, order);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CardanoAssetsApi->assetsAssetTxsGet: $e\n');
}

Parameters

Name Type Description Notes
asset String Concatenation of the policy_id and hex-encoded asset_name
count int The number of results displayed on one page. [optional] [default to 100]
page int The page number for listing the results. [optional] [default to 1]
order String The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. [optional] [default to 'asc']

Return type

BuiltList<String>

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

assetsGet

BuiltList assetsGet(count, page, order)

Assets

List of assets. If an asset is completely burned, it will stay on the list with quantity 0 (order of assets is immutable).

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getCardanoAssetsApi();
final int count = 56; // int | The number of results displayed on one page.
final int page = 56; // int | The page number for listing the results.
final String order = order_example; // String | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. Ordering in this case is based on the time of the first mint transaction. 

try {
    final response = api.assetsGet(count, page, order);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CardanoAssetsApi->assetsGet: $e\n');
}

Parameters

Name Type Description Notes
count int The number of results displayed on one page. [optional] [default to 100]
page int The page number for listing the results. [optional] [default to 1]
order String The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. Ordering in this case is based on the time of the first mint transaction. [optional] [default to 'asc']

Return type

BuiltList<AssetsInner>

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

assetsPolicyPolicyIdGet

BuiltList assetsPolicyPolicyIdGet(policyId, count, page, order)

Assets of a specific policy

List of asset minted under a specific policy

Example

import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';

final api = Blockfrost().getCardanoAssetsApi();
final String policyId = 476039a0949cf0b22f6a800f56780184c44533887ca6e821007840c3; // String | Specific policy_id
final int count = 56; // int | The number of results displayed on one page.
final int page = 56; // int | The page number for listing the results.
final String order = order_example; // String | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. 

try {
    final response = api.assetsPolicyPolicyIdGet(policyId, count, page, order);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CardanoAssetsApi->assetsPolicyPolicyIdGet: $e\n');
}

Parameters

Name Type Description Notes
policyId String Specific policy_id
count int The number of results displayed on one page. [optional] [default to 100]
page int The page number for listing the results. [optional] [default to 1]
order String The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. [optional] [default to 'asc']

Return type

BuiltList<AssetPolicyInner>

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]