I am using blockcypher Library and creating Api for Ethereum wallet and address but when i am passing ETH.main in
$addressClient = new \BlockCypher\Client\AddressClient($apiContexts['ETH.main']);
than it's giving undefined index error.
Unable to identify what is the issue and how can i create address and wallet through blockcypher Api.
好像您没有加载整个BlockCypher库,您需要加载bootstrap.php或查看https://github.com/blockcypher/php-client/wiki/Making-First-Call中的一些入门说明。
I had the same issue. I think the current library version for the toolkit needs to be adjusted to include ETH.
Open the file BlockCypherCoinSymbolConstants.php in the directory:
php-client/blockcypher/php-client/lib/BlockCypher/Core/BlockCypherCoinSymbolConstants.php
You can add ETH in the array that starts on Line 19, $COIN_SYMBOL_ODICT_LIST. The code I used is below. It works, but I'm not 100% sure of the correct values for 'pow', and 'address_first_char_list'
array(
'coin_symbol' => 'eth',
'display_name' => 'Ethereum',
'display_shortname' => 'ETH',
'blockcypher_code' => 'eth',
'blockcypher_network' => 'main',
'currency_abbrev' => 'eth',
'pow' => 'sha',
'example_address' => 'CFr99841LyMkyX5ZTGepY58rjXJhyNGXHf',
"address_first_char_list" => array('B', 'C', 'D')
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.