-
-
Save rohasnagpal/c791fd4573e84088437688a4859ae673 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Requires libcurl | |
$curl = curl_init(); | |
$payload = array( | |
"index" => 0, | |
"mnemonic" => "urge pulp usage sister evidence arrest palm math please chief egg abuse" | |
); | |
curl_setopt_array($curl, [ | |
CURLOPT_HTTPHEADER => [ | |
"Content-Type: application/json", | |
"x-api-key: YOUR_API_KEY" | |
], | |
CURLOPT_POSTFIELDS => json_encode($payload), | |
CURLOPT_URL => "https://api-eu1.tatum.io/v3/bitcoin/wallet/priv", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_CUSTOMREQUEST => "POST", | |
]); | |
$response = curl_exec($curl); | |
$error = curl_error($curl); | |
curl_close($curl); | |
if ($error) { | |
echo "cURL Error #:" . $error; | |
} else { | |
echo $response; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment