All URIs are relative to https://rest-unstable.mainnet.cash
Method | HTTP request | Description |
---|---|---|
balance | POST /wallet/balance | Get total balance for wallet |
createWallet | POST /wallet/create | create a new wallet |
depositAddress | POST /wallet/deposit_address | Get a deposit address in cash address format |
depositQr | POST /wallet/deposit_qr | Get receiving cash address as a qrcode |
encodeTransaction | POST /wallet/encode_transaction | Encode and sign a transaction given a list of sendRequests, options and estimate fees |
getAllNftTokenBalances | POST /wallet/get_all_nft_token_balances | Get non-fungible token balance |
getAllTokenBalances | POST /wallet/get_all_token_balances | Get non-fungible token balance |
getHistory | POST /wallet/get_history | Get a simplified list of transactions related to a wallet |
getNftTokenBalance | POST /wallet/get_nft_token_balance | Get non-fungible token balance |
getTokenBalance | POST /wallet/get_token_balance | Get fungible token balance |
getTokenUtxos | POST /wallet/get_token_utxos | Get token utxos |
info | POST /wallet/info | Get information about a wallet |
maxAmountToSend | POST /wallet/max_amount_to_send | Get maximum spendable amount |
namedExists | POST /wallet/named_exists | Check if a named wallet already exists |
replaceNamed | POST /wallet/replace_named | Replace (recover) named wallet with a new walletId. If wallet with a provided name does not exist yet, it will be creted with a `walletId` supplied If wallet exists it will be overwritten without exception |
send | POST /wallet/send | Send some amount to a given address |
sendMax | POST /wallet/send_max | Send all available funds to a given address |
submitTransaction | POST /wallet/submit_transaction | submit an encoded and signed transaction to the network |
tokenBurn | POST /wallet/token_burn | Perform an explicit token burn |
tokenDepositAddress | POST /wallet/token_deposit_address | Get a token aware deposit address in cash address format |
tokenDepositQr | POST /wallet/token_deposit_qr | Get receiving token aware cash address as a qrcode |
tokenGenesis | POST /wallet/token_genesis | Create new token category |
tokenMint | POST /wallet/token_mint | Mint new non-fungible tokens |
utxos | POST /wallet/utxo | Get detailed information about unspent outputs (utxos) |
xpubkeys | POST /wallet/xpubkeys | A set of xpubkeys and paths for the wallet. |
\Mainnet\Model\BalanceResponse balance($balance_request)
Get total balance for wallet
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$balance_request = new \Mainnet\Model\BalanceRequest(); // \Mainnet\Model\BalanceRequest | Request for a wallet balance
try {
$result = $apiInstance->balance($balance_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->balance: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
balance_request | \Mainnet\Model\BalanceRequest | Request for a wallet balance |
\Mainnet\Model\BalanceResponse
- Content-Type: application/json
- Accept: application/json, text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\WalletResponse createWallet($wallet_request)
create a new wallet
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$wallet_request = new \Mainnet\Model\WalletRequest(); // \Mainnet\Model\WalletRequest | Request a new random wallet
try {
$result = $apiInstance->createWallet($wallet_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->createWallet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
wallet_request | \Mainnet\Model\WalletRequest | Request a new random wallet |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\DepositAddressResponse depositAddress($serialized_wallet)
Get a deposit address in cash address format
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$serialized_wallet = new \Mainnet\Model\SerializedWallet(); // \Mainnet\Model\SerializedWallet | Request for a deposit address given a wallet
try {
$result = $apiInstance->depositAddress($serialized_wallet);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->depositAddress: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
serialized_wallet | \Mainnet\Model\SerializedWallet | Request for a deposit address given a wallet |
\Mainnet\Model\DepositAddressResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\ScalableVectorGraphic depositQr($serialized_wallet)
Get receiving cash address as a qrcode
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$serialized_wallet = new \Mainnet\Model\SerializedWallet(); // \Mainnet\Model\SerializedWallet | Request for a deposit cash address as a Quick Response code (qrcode)
try {
$result = $apiInstance->depositQr($serialized_wallet);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->depositQr: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
serialized_wallet | \Mainnet\Model\SerializedWallet | Request for a deposit cash address as a Quick Response code (qrcode) |
\Mainnet\Model\ScalableVectorGraphic
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\EncodeTransactionResponse encodeTransaction($encode_transaction_request)
Encode and sign a transaction given a list of sendRequests, options and estimate fees
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$encode_transaction_request = new \Mainnet\Model\EncodeTransactionRequest(); // \Mainnet\Model\EncodeTransactionRequest | encode a transaction
try {
$result = $apiInstance->encodeTransaction($encode_transaction_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->encodeTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
encode_transaction_request | \Mainnet\Model\EncodeTransactionRequest | encode a transaction |
\Mainnet\Model\EncodeTransactionResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string,float] getAllNftTokenBalances($inline_object4)
Get non-fungible token balance
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$inline_object4 = new \Mainnet\Model\InlineObject4(); // \Mainnet\Model\InlineObject4 |
try {
$result = $apiInstance->getAllNftTokenBalances($inline_object4);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->getAllNftTokenBalances: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
inline_object4 | \Mainnet\Model\InlineObject4 |
map[string,float]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string,float] getAllTokenBalances($inline_object3)
Get non-fungible token balance
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$inline_object3 = new \Mainnet\Model\InlineObject3(); // \Mainnet\Model\InlineObject3 |
try {
$result = $apiInstance->getAllTokenBalances($inline_object3);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->getAllTokenBalances: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
inline_object3 | \Mainnet\Model\InlineObject3 |
map[string,float]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\HistoryResponse getHistory($history_request)
Get a simplified list of transactions related to a wallet
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$history_request = new \Mainnet\Model\HistoryRequest(); // \Mainnet\Model\HistoryRequest | Request for a wallet history
try {
$result = $apiInstance->getHistory($history_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->getHistory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
history_request | \Mainnet\Model\HistoryRequest | Request for a wallet history |
\Mainnet\Model\HistoryResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object getNftTokenBalance($inline_object2)
Get non-fungible token balance
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$inline_object2 = new \Mainnet\Model\InlineObject2(); // \Mainnet\Model\InlineObject2 |
try {
$result = $apiInstance->getNftTokenBalance($inline_object2);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->getNftTokenBalance: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
inline_object2 | \Mainnet\Model\InlineObject2 |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object getTokenBalance($inline_object1)
Get fungible token balance
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$inline_object1 = new \Mainnet\Model\InlineObject1(); // \Mainnet\Model\InlineObject1 |
try {
$result = $apiInstance->getTokenBalance($inline_object1);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->getTokenBalance: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
inline_object1 | \Mainnet\Model\InlineObject1 |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\Utxo[] getTokenUtxos($inline_object)
Get token utxos
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$inline_object = new \Mainnet\Model\InlineObject(); // \Mainnet\Model\InlineObject |
try {
$result = $apiInstance->getTokenUtxos($inline_object);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->getTokenUtxos: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
inline_object | \Mainnet\Model\InlineObject |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\WalletInfo info($serialized_wallet)
Get information about a wallet
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$serialized_wallet = new \Mainnet\Model\SerializedWallet(); // \Mainnet\Model\SerializedWallet | The wallet to request information about, in serialized form.
try {
$result = $apiInstance->info($serialized_wallet);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->info: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
serialized_wallet | \Mainnet\Model\SerializedWallet | The wallet to request information about, in serialized form. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\BalanceResponse maxAmountToSend($max_amount_to_send_request)
Get maximum spendable amount
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$max_amount_to_send_request = new \Mainnet\Model\MaxAmountToSendRequest(); // \Mainnet\Model\MaxAmountToSendRequest | get amount that will be spend with a spend max request. If a unit type is specified, a numeric value will be returned.
try {
$result = $apiInstance->maxAmountToSend($max_amount_to_send_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->maxAmountToSend: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
max_amount_to_send_request | \Mainnet\Model\MaxAmountToSendRequest | get amount that will be spend with a spend max request. If a unit type is specified, a numeric value will be returned. |
\Mainnet\Model\BalanceResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool namedExists($wallet_named_exists_request)
Check if a named wallet already exists
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$wallet_named_exists_request = new \Mainnet\Model\WalletNamedExistsRequest(); // \Mainnet\Model\WalletNamedExistsRequest | Request parameters
try {
$result = $apiInstance->namedExists($wallet_named_exists_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->namedExists: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
wallet_named_exists_request | \Mainnet\Model\WalletNamedExistsRequest | Request parameters |
bool
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool replaceNamed($wallet_replace_named_request)
Replace (recover) named wallet with a new walletId. If wallet with a provided name does not exist yet, it will be creted with a walletId
supplied If wallet exists it will be overwritten without exception
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$wallet_replace_named_request = new \Mainnet\Model\WalletReplaceNamedRequest(); // \Mainnet\Model\WalletReplaceNamedRequest | Request parameters
try {
$result = $apiInstance->replaceNamed($wallet_replace_named_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->replaceNamed: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
wallet_replace_named_request | \Mainnet\Model\WalletReplaceNamedRequest | Request parameters |
bool
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\SendResponse send($send_request)
Send some amount to a given address
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$send_request = new \Mainnet\Model\SendRequest(); // \Mainnet\Model\SendRequest | place a send request
try {
$result = $apiInstance->send($send_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->send: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
send_request | \Mainnet\Model\SendRequest | place a send request |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\SendMaxResponse sendMax($send_max_request)
Send all available funds to a given address
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$send_max_request = new \Mainnet\Model\SendMaxRequest(); // \Mainnet\Model\SendMaxRequest | Request to send all available funds to a given address
try {
$result = $apiInstance->sendMax($send_max_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->sendMax: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
send_max_request | \Mainnet\Model\SendMaxRequest | Request to send all available funds to a given address |
\Mainnet\Model\SendMaxResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\SubmitTransactionResponse submitTransaction($submit_transaction_request)
submit an encoded and signed transaction to the network
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$submit_transaction_request = new \Mainnet\Model\SubmitTransactionRequest(); // \Mainnet\Model\SubmitTransactionRequest | submit an encoded and signed transaction to the network
try {
$result = $apiInstance->submitTransaction($submit_transaction_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->submitTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
submit_transaction_request | \Mainnet\Model\SubmitTransactionRequest | submit an encoded and signed transaction to the network |
\Mainnet\Model\SubmitTransactionResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\SendResponse tokenBurn($token_burn_request)
Perform an explicit token burn
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$token_burn_request = new \Mainnet\Model\TokenBurnRequest(); // \Mainnet\Model\TokenBurnRequest | Perform an explicit token burning by spending a token utxo to an OP_RETURN Behaves differently for fungible and non-fungible tokens: * NFTs are always \"destroyed\" * FTs' amount is reduced by the amount specified, if 0 FT amount is left and no NFT present, the token is \"destroyed\" Refer to spec https://github.com/bitjson/cashtokens
try {
$result = $apiInstance->tokenBurn($token_burn_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->tokenBurn: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
token_burn_request | \Mainnet\Model\TokenBurnRequest | Perform an explicit token burning by spending a token utxo to an OP_RETURN Behaves differently for fungible and non-fungible tokens: * NFTs are always "destroyed" * FTs' amount is reduced by the amount specified, if 0 FT amount is left and no NFT present, the token is "destroyed" Refer to spec https://github.com/bitjson/cashtokens |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\DepositAddressResponse tokenDepositAddress($serialized_wallet)
Get a token aware deposit address in cash address format
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$serialized_wallet = new \Mainnet\Model\SerializedWallet(); // \Mainnet\Model\SerializedWallet | Request for a token aware deposit address given a wallet
try {
$result = $apiInstance->tokenDepositAddress($serialized_wallet);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->tokenDepositAddress: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
serialized_wallet | \Mainnet\Model\SerializedWallet | Request for a token aware deposit address given a wallet |
\Mainnet\Model\DepositAddressResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\ScalableVectorGraphic tokenDepositQr($serialized_wallet)
Get receiving token aware cash address as a qrcode
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$serialized_wallet = new \Mainnet\Model\SerializedWallet(); // \Mainnet\Model\SerializedWallet | Request for a token aware deposit cash address as a Quick Response code (qrcode)
try {
$result = $apiInstance->tokenDepositQr($serialized_wallet);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->tokenDepositQr: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
serialized_wallet | \Mainnet\Model\SerializedWallet | Request for a token aware deposit cash address as a Quick Response code (qrcode) |
\Mainnet\Model\ScalableVectorGraphic
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\SendResponse tokenGenesis($token_genesis_request)
Create new token category
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$token_genesis_request = new \Mainnet\Model\TokenGenesisRequest(); // \Mainnet\Model\TokenGenesisRequest | Create new cashtoken, both funglible and/or non-fungible (NFT) Refer to spec https://github.com/bitjson/cashtokens Newly created token identifier can be found in `tokenIds` field.
try {
$result = $apiInstance->tokenGenesis($token_genesis_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->tokenGenesis: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
token_genesis_request | \Mainnet\Model\TokenGenesisRequest | Create new cashtoken, both funglible and/or non-fungible (NFT) Refer to spec https://github.com/bitjson/cashtokens Newly created token identifier can be found in `tokenIds` field. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\SendResponse tokenMint($token_mint_request)
Mint new non-fungible tokens
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$token_mint_request = new \Mainnet\Model\TokenMintRequest(); // \Mainnet\Model\TokenMintRequest | Mint new NFT cashtokens using an existing minting token Refer to spec https://github.com/bitjson/cashtokens Newly minted tokens will retain the parent's `tokenId`.
try {
$result = $apiInstance->tokenMint($token_mint_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->tokenMint: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
token_mint_request | \Mainnet\Model\TokenMintRequest | Mint new NFT cashtokens using an existing minting token Refer to spec https://github.com/bitjson/cashtokens Newly minted tokens will retain the parent's `tokenId`. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\Utxo[] utxos($serialized_wallet)
Get detailed information about unspent outputs (utxos)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$serialized_wallet = new \Mainnet\Model\SerializedWallet(); // \Mainnet\Model\SerializedWallet | Request detailed list of unspent transaction outputs
try {
$result = $apiInstance->utxos($serialized_wallet);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->utxos: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
serialized_wallet | \Mainnet\Model\SerializedWallet | Request detailed list of unspent transaction outputs |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\XPubKeyResponse xpubkeys($x_pub_key_request)
A set of xpubkeys and paths for the wallet.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletApi(
// 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
);
$x_pub_key_request = new \Mainnet\Model\XPubKeyRequest(); // \Mainnet\Model\XPubKeyRequest | x
try {
$result = $apiInstance->xpubkeys($x_pub_key_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletApi->xpubkeys: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
x_pub_key_request | \Mainnet\Model\XPubKeyRequest | x |
\Mainnet\Model\XPubKeyResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]