This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
/
transferDogeMnemonic.php
82 lines (63 loc) · 2.81 KB
/
transferDogeMnemonic.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
* Copyright (c) 2022-2023 tatum.io
*
* @link https://tatumio.github.io/tatum-php/Api/BlockchainOperationsApi/#transferdogemnemonic
* @license MIT
* @author Mark Jivko
*
* SECURITY WARNING
* Execute this file in CLI mode only!
*/
"cli" !== php_sapi_name() && exit();
// Use any PSR-4 autoloader
require_once dirname(__DIR__, 3) . "/autoload.php";
// Set your API Keys 👇 here
$sdk = new \Tatum\Sdk();
// 🐛 Enable debugging on the MainNet
$sdk->mainnet()->config()->setDebug(true);
$arg_transfer_doge_mnemonic = (new \Tatum\Model\TransferDogeMnemonic())
// Sender account ID
->setSenderAccountId('5e68c66581f2ee32bc354087')
// Blockchain address to send assets to. For BTC, LTC, DOGE and BCH, it is possible to enter list of...
->setAddress('mpTwPdF8up9kidgcAStriUPwRdnE9MRAg7')
// Amount to be withdrawn to blockchain.
->setAmount('0.001')
// (optional) Compliance check, if withdrawal is not compliant, it will not be processed.
->setCompliant(false)
// (optional) Fee to be submitted as a transaction fee to blockchain. If none is set, default value of 1 DOGE i...
->setFee('1')
// (optional) For BTC, LTC, DOGE and BCH, it is possible to enter list of multiple recipient blockchain amounts...
->setMultipleAmounts(null)
// (optional) Used to parametrize withdrawal as a change address for left coins from transaction. XPub or attr ...
->setAttr('null')
// Mnemonic seed - usually 12-24 words with access to whole wallet. Either mnemonic, keyPair or sign...
->setMnemonic('urge pulp usage sister evidence arrest palm math please chief egg abuse')
// Extended public key (xpub) of the wallet associated with the accounts. Should be present, when mn...
->setXpub('xpub6EsCk1uU6cJzqvP9CdsTiJwT2rF748YkPnhv5Qo8q44DG7nn2vbyt48YRsNSUYS44jFCW9gwvD9kLQu9AuqXpTpM1c5hgg9PsuBLdeNncid')
// (optional) Identifier of the payment, shown for created Transaction within Tatum sender account.
->setPaymentId('1234')
// (optional) Note visible to owner of withdrawing account
->setSenderNote('Sender note');
try {
/**
* POST /v3/offchain/dogecoin/transfer
*
* @var \Tatum\Model\TransferBtcMnemonic200Response $response
*/
$response = $sdk->mainnet()
->api()
->blockchainOperations()
->transferDogeMnemonic($arg_transfer_doge_mnemonic);
var_dump($response);
} catch (\Tatum\Sdk\ApiException $apiExc) {
echo sprintf(
"API Exception when calling api()->blockchainOperations()->transferDogeMnemonic(): %s\n",
var_export($apiExc->getResponseObject(), true)
);
} catch (\Exception $exc) {
echo sprintf(
"Exception when calling api()->blockchainOperations()->transferDogeMnemonic(): %s\n",
$exc->getMessage()
);
}