Ethereum

Ethereum

Ethereum can be accessed with the following coin types:

EnvironmentCoin TypeFaucet Instructions
Ethereum Productioneth
Ethereum Testnetgtethhttps://goerlifaucet.com

Note: teth (aka Kovan testnet) has been deprecated. Please use gteth (aka Goerli testnet) instead.

Enterprise fee address

1 2 3 4 5 ENTERPRISEID=585c51a5df8380e0e3082e46 curl -X POST \ -H "Authorization: Bearer $ACCESS_TOKEN" \ https://app.bitgo-test.com/api/v2/gteth/enterprise/$ENTERPRISEID/feeAddressBalance

BitGo's Ethereum wallet contract requires separate accounts to send transactions and pay fees (unlike Bitcoin).

Each enterprise has one or more dedicated fee addresses (or "gas tanks") for paying Ethereum transaction fees. There is one fee address per network, for example, Ethereum mainnet, and each testnet.

On the dashboard of the BitGo UI, your "Network Gas Tanks," and their associated fee addresses, are displayed. In an Ethereum wallet response, there is a 'feeAddress' field under the 'CoinSpecific' key. Use this address to pay the fees for creating transactions and addresses.

Your enterprise must keep the relevant fee addresses funded in order to create wallets, create addresses, or send transaction. If you don't, you cannot do those operations, nor can you fund the tank.

Note: BitGo recommends that you create and fund a non-BitGo Ethereum account so you can use it to fund your BitGo enterprise fee addresses. Any open source Ethereum wallet or Ethereum exchange can be used to create an account.

A BitGo fee address is a single-signature account and the private key is created and owned by BitGo, so you cannot send funds from this address once you have sent them in.

Generating wallets

1 2 3 4 5 6 7 8 9 10 11 12 bitgo .coin('gteth') .wallets() .generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30', enterprise: '5612c2beeecf83610b621b90964448cd', }) .then(function (wallet) { // print the new wallet console.dir(wallet); });
1 2 3 4 5 6 7 8 LABEL="My Test Wallet" PASSPHRASE="secretpassphrase1a5df8380e0e30" curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d "{ \"label\": \"$LABEL\", \"passphrase\": \"$PASSPHRASE\" }" \ http://$BITGO_EXPRESS_HOST:3080/api/v2/gteth/wallet/generate

Before you can use an Ethereum wallet, it must be initialized on the Ethereum blockchain. When you create an Ethereum wallet, BitGo sends a transaction on the Ethereum network in order to deploy its multi-signature wallet contract.

Note: Ethereum wallets can only be created under an enterprise. When you create an Ethereum wallet, remember to pass the enterprise Id.

Until the initialization transaction is confirmed, the wallet is not ready for use, and the receive address is not exposed in the API. This is to protect users from losing funds by sending to a wallet that does not exist on the network.

Warning: Do not use an Ethereum wallet while it is being initialized or you may lose funds.

Creating addresses

1 2 3 4 5 6 7 8 9 10 11 bitgo .coin('gteth') .wallets() .getWallet({ id: '585c51a5df8380e0e3082e46' }) .then(function (wallet) { return wallet.createAddress(); }) .then(function (newAddress) { // print new address details console.dir(newAddress); });
1 2 3 4 5 WALLET=585c51a5df8380e0e3082e46 curl -X POST \ -H "Authorization: Bearer $ACCESS_TOKEN" \ https://app.bitgo-test.com/api/v2/gteth/wallet/$WALLET/address

Unlike Bitcoin, Ethereum address creation requires interactions with the Ethereum blockchain. In order to deploy a receive address contract, BitGo sends a transaction on the Ethereum network. Make sure to fund the fee address mentioned above. Like the wallet creation process, an Ethereum address will not be immediately usable upon creation and so the caller of this function will have to wait for the initialization transaction to be confirmed before attempting to fetch, or send to, the address

Balances

Ether (ETH) is the native asset of the Ethereum blockchain. The base unit is wei (and gas fees are denoted in gwei):

  • 1 wei is (10-18) or 0.000000000000000001 Ether.
  • 1 gwei is (10-9) or 0.000000001 Ether (or 1000000000 wei).
  • 1 Ether is (1018) or 1000000000000000000 wei (1 quintillion).

Balances are supported in string format: balanceString, confirmedBalanceString, and spendableBalanceString.

Transactions

BitGo's Ethereum multisig contract currently only supports one sender and one recipient. That means that the sendMany call only accepts one recipient.