Skip to content

Latest commit

 

History

History
78 lines (55 loc) · 3.88 KB

GeneratingApi.md

File metadata and controls

78 lines (55 loc) · 3.88 KB

CryptoAPIs\GeneratingApi

All URIs are relative to https://rest.cryptoapis.io.

Method HTTP request Description
generateDepositAddress() POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses Generate Deposit Address

generateDepositAddress()

generateDepositAddress($blockchain, $network, $wallet_id, $context, $generate_deposit_address_rb): \CryptoAPIs\Model\GenerateDepositAddressR

Generate Deposit Address

Through this endpoint customers can generate a new Receiving/Deposit Addresses into their Wallet.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKey
$config = CryptoAPIs\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = CryptoAPIs\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new CryptoAPIs\Api\GeneratingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$blockchain = bitcoin; // string | Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
$network = testnet; // string | Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
$wallet_id = 60c9d9921c38030006675ff6; // string | Represents the unique ID of the specific Wallet.
$context = yourExampleString; // string | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
$generate_deposit_address_rb = new \CryptoAPIs\Model\GenerateDepositAddressRB(); // \CryptoAPIs\Model\GenerateDepositAddressRB

try {
    $result = $apiInstance->generateDepositAddress($blockchain, $network, $wallet_id, $context, $generate_deposit_address_rb);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GeneratingApi->generateDepositAddress: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
blockchain string Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network string Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.
wallet_id string Represents the unique ID of the specific Wallet.
context string In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. [optional]
generate_deposit_address_rb \CryptoAPIs\Model\GenerateDepositAddressRB [optional]

Return type

\CryptoAPIs\Model\GenerateDepositAddressR

Authorization

ApiKey

HTTP request headers

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

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