Skip to content

Latest commit

 

History

History
128 lines (82 loc) · 3.92 KB

WalletSignedApi.md

File metadata and controls

128 lines (82 loc) · 3.92 KB

Mainnet\WalletSignedApi

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

signedMessageSign

\Mainnet\Model\SignedMessageResponse signedMessageSign($create_signed_message_request)

Returns the message signature

Example

<?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;
}
?>

Parameters

Name Type Description Notes
create_signed_message_request \Mainnet\Model\CreateSignedMessageRequest Sign a message [optional]

Return type

\Mainnet\Model\SignedMessageResponse

Authorization

bearerAuth

HTTP request headers

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

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

signedMessageVerify

\Mainnet\Model\VerifySignedMessageResponse signedMessageVerify($verify_signed_message_request)

Returns a boolean indicating whether message was valid for a given address

Example

<?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;
}
?>

Parameters

Name Type Description Notes
verify_signed_message_request \Mainnet\Model\VerifySignedMessageRequest Sign a message [optional]

Return type

\Mainnet\Model\VerifySignedMessageResponse

Authorization

bearerAuth

HTTP request headers

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

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