# EOS

Source: https://developers.bitgo.com/docs/eos

## EOS

EOS can be accessed with the following coin types:

| Environment          | Coin Type | Faucet                                                                                                                           |
| :------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------------- |
| EOS Production.      | eos       |                                                                                                                                  |
| EOS Testnet (Jungle) | teos      | <a href="https://monitor4.jungletestnet.io/#faucet" target="_blank" rel="noreferrer">https://monitor4.jungletestnet.io/#faucet</a> |

### Explorer
<a href="https://eosauthority.com/" target="_blank" rel="noreferrer">https://eosauthority.com/</a>


### Generating wallets

```javascript
bitgo
  .coin('teos')
  .wallets()
  .generateWallet({
    label: 'My Test Wallet',
    passphrase: 'secretpassphrase1a5df8380e0e30',
  })
  .then(function (wallet) {
    // print the new wallet
    console.dir(wallet);
  });
```
```shell
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/api/v2/teos/wallet/generate
```

Before you can use an EOS wallet, it must be initialized on the EOS blockchain. A funding transaction must first be sent
to the wallet address. When BitGo detects this funding transaction, it automatically sends another initialization
transaction to set up the signers and the home domain of the account.

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

> 🚧 **Warning:** Do not use an EOS wallet during initialization or you may lose assets.

### Creating addresses

```javascript
bitgo
  .coin('teos')
  .wallets()
  .getWallet({ id: '585c51a5df8380e0e3082e46' })
  .then(function (wallet) {
    return wallet.createAddress();
  })
  .then(function (newAddress) {
    // print new address details
    console.dir(newAddress);
  });
```
```shell
WALLET=585c51a5df8380e0e3082e46

curl -X POST \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://app.bitgo-test.com/api/v2/teos/wallet/$WALLET/address
```

EOS transactions only support one input and one output. That means that the `sendMany` call is not supported.

Like XLM, EOS addresses differ only by sequential and incrementing memo components (and do not use the BIP-32 standard). EOS supports alphanumeric `memoId`.

### Balances

EOS (EOS) is the native asset of the EOS blockchain. The base unit does not have a name; the documentation calls it the
base unit of EOS.

- 1 base unit of EOS is (<code>10<sup>-4</sup></code>) or 0.0001 EOS.
- 1 EOS is (<code>10<sup>4</sup></code>) or 10000 base units of EOS (10 thousand).

BitGo supports balances in string format: `balanceString`, `confirmedBalanceString`, and `spendableBalanceString`.

### Transactions

The BitGo EOS multisig contract currently only supports one sender and one recipient so the `sendMany` is not supported.

### Fees

EOS doesn't have transaction fees. Instead, it requires accounts to stake CPU and RAM. BitGo handles this though, so you don't have to provide any hardware or bandwidth.
