All URIs are relative to https://api.blockchainapi.com/v1
Method | HTTP request | Description |
---|---|---|
getBlockchainIdentifierFromName | POST /{blockchain}/{network}/name_service/name_to_blockchain_identifier | Get the identifier |
getNameForBlockchainIdentifier | POST /{blockchain}/{network}/name_service/blockchain_identifier_to_name | Get the name |
InputBlockchainIdentifier getBlockchainIdentifierFromName(blockchain, network, opts)
Get the identifier
<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/name-service/name-to-blockchain-identifier\" target="_blank">See examples (Python, JavaScript) [Coming Soon]</a>. Get the blockchain identifier from a name. e.g., Input `vitalik.eth` and output `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045` `Cost: 0.25 Credit` (<a href="#section/Pricing">See Pricing</a>)
import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';
let apiInstance = new theblockchainapi.NameServiceApi();
let blockchain = "blockchain_example"; // String | The blockchain you want to use
let network = ropsten; // String | The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`
let opts = {
'inputName': new theblockchainapi.InputName() // InputName |
};
apiInstance.getBlockchainIdentifierFromName(blockchain, network, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
blockchain | String | The blockchain you want to use | |
network | String | The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten` | |
inputName | InputName | [optional] |
- Content-Type: application/json
- Accept: application/json
InputName getNameForBlockchainIdentifier(blockchain, network, opts)
Get the name
<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/name-service/blockchain-identifier-to-name\" target="_blank">See examples (Python, JavaScript) [Coming Soon]</a>. Get the name from a blockchain identifier. e.g., Input `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045` and output `vitalik.eth` `Cost: 0.25 Credit` (<a href="#section/Pricing">See Pricing</a>)
import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';
let apiInstance = new theblockchainapi.NameServiceApi();
let blockchain = "blockchain_example"; // String | The blockchain you want to use
let network = ropsten; // String | The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`
let opts = {
'inputBlockchainIdentifier': new theblockchainapi.InputBlockchainIdentifier() // InputBlockchainIdentifier |
};
apiInstance.getNameForBlockchainIdentifier(blockchain, network, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
blockchain | String | The blockchain you want to use | |
network | String | The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten` | |
inputBlockchainIdentifier | InputBlockchainIdentifier | [optional] |
- Content-Type: application/json
- Accept: application/json