All URIs are relative to https://rest-unstable.mainnet.cash
Method | HTTP request | Description |
---|---|---|
signedMessageSign | POST /wallet/signed/sign | Returns the message signature |
signedMessageVerify | POST /wallet/signed/verify | Returns a boolean indicating whether message was valid for a given address |
\Mainnet\Model\SignedMessageResponse signedMessageSign($create_signed_message_request)
Returns the message signature
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Mainnet\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Mainnet\Api\WalletSignedApi(
// 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
);
$create_signed_message_request = new \Mainnet\Model\CreateSignedMessageRequest(); // \Mainnet\Model\CreateSignedMessageRequest | Sign a message
try {
$result = $apiInstance->signedMessageSign($create_signed_message_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletSignedApi->signedMessageSign: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
create_signed_message_request | \Mainnet\Model\CreateSignedMessageRequest | Sign a message | [optional] |
\Mainnet\Model\SignedMessageResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Mainnet\Model\VerifySignedMessageResponse signedMessageVerify($verify_signed_message_request)
Returns a boolean indicating whether message was valid for 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\WalletSignedApi(
// 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
);
$verify_signed_message_request = new \Mainnet\Model\VerifySignedMessageRequest(); // \Mainnet\Model\VerifySignedMessageRequest | Sign a message
try {
$result = $apiInstance->signedMessageVerify($verify_signed_message_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WalletSignedApi->signedMessageVerify: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
verify_signed_message_request | \Mainnet\Model\VerifySignedMessageRequest | Sign a message | [optional] |
\Mainnet\Model\VerifySignedMessageResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]