Skip to content

Latest commit

 

History

History
118 lines (82 loc) · 5.72 KB

NameServiceAPI.md

File metadata and controls

118 lines (82 loc) · 5.72 KB

NameServiceAPI

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

getBlockchainIdentifierFromName

    open class func getBlockchainIdentifierFromName(blockchain: Blockchain_getBlockchainIdentifierFromName, network: String, inputName: InputName? = nil, completion: @escaping (_ data: InputBlockchainIdentifier?, _ error: Error?) -> Void)

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]. 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)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import theblockchainapi

let blockchain = "blockchain_example" // String | The blockchain you want to use 
let network = "network_example" // 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 inputName = InputName(name: "name_example") // InputName |  (optional)

// Get the identifier
NameServiceAPI.getBlockchainIdentifierFromName(blockchain: blockchain, network: network, inputName: inputName) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

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]

Return type

InputBlockchainIdentifier

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

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

getNameForBlockchainIdentifier

    open class func getNameForBlockchainIdentifier(blockchain: Blockchain_getNameForBlockchainIdentifier, network: String, inputBlockchainIdentifier: InputBlockchainIdentifier? = nil, completion: @escaping (_ data: InputName?, _ error: Error?) -> Void)

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]. 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)

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import theblockchainapi

let blockchain = "blockchain_example" // String | The blockchain you want to use 
let network = "network_example" // 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 inputBlockchainIdentifier = InputBlockchainIdentifier(blockchainIdentifier: "blockchainIdentifier_example") // InputBlockchainIdentifier |  (optional)

// Get the name
NameServiceAPI.getNameForBlockchainIdentifier(blockchain: blockchain, network: network, inputBlockchainIdentifier: inputBlockchainIdentifier) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

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]

Return type

InputName

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

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