在php中以编程方式发送eth
我使用laravel将Eth从我的钱包发送到其他服务的钱包 我使用这个方法:在php中以编程方式发送eth,php,laravel,coinbase-api,coinbase-php,Php,Laravel,Coinbase Api,Coinbase Php,我使用laravel将Eth从我的钱包发送到其他服务的钱包 我使用这个方法:$client->createAccountTransaction($account,$transaction) 这样: $transaction = Transaction::send([ 'to' => new EthrereumAddress($destination_address), 'amount' => new Money($amount, $currency
$client->createAccountTransaction($account,$transaction)代码>
这样:
$transaction = Transaction::send([
'to' => new EthrereumAddress($destination_address),
'amount' => new Money($amount, $currency),
'description' => $description,
//'fee' => '0.0001' // only required for transactions under BTC0.0001
]);
$this->client->createAccountTransaction($account, $transaction);
但当我尝试这样做时,我得到了以下错误:
Coinbase API仅接受帐户、电子邮件或比特币地址的交易
有人能告诉我如何发送eth或有什么问题吗?这在最新的2.8.0版本中已修复
您应该为每种加密货币使用right$account
,而不仅仅是$client->getprimarycount()代码>
例如:
$account = Account::reference('YOUR_ETH_ACCOUNT_ID');
这一信息似乎源于。它检查至
的类型是否为电子邮件
、比特币地址
或账户
。您的EthrereumAddress
(这是一个打字错误吗?)可能不是从这些中派生出来的。