Tezos

Tezos

Tezos (xtz) can be accessed with the following coin types:

EnvironmentCoin TypeFaucet
Tezos Productionxtzhttps://faucet.tezos.com/
Tezos Testnettxtzhttps://teztnets.com/

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/txtz/enterprise/$ENTERPRISEID/feeAddressBalance

Each enterprise has a fee address which will be used to pay for transaction fees on every Tezos wallet in such enterprise. The fee address is displayed in the dashboard of the BitGo website, and you must fund it before creating a wallet, address, or sending funds. Unlike in Bitcoin (where the sending wallet also pays the transaction fees) BitGo's Tezos wallet contract requires a separate account to initiate the transaction and pay the fees. If the enterprise's fee address runs out of funds, you will not be able to create new wallets, addresses, or send transactions until you fund the fee address. You will not be able to use one of your own Tezos wallets to fund the fee address if the fee address is too low (because you will not be able to send transactions from your wallet) so it is best to create and fund a non-BitGo Tezos account so you can use it to fund your BitGo enterprise fee address. Any open source Tezos wallet or exchange can be used to create an account.

Note that the fee address is a single-signature account and the private key is created and owned by BitGo, so you will not be able to send funds out of the fee address once you have sent them in.

There will be a 'feeAddress' field under the 'CoinSpecific' key for Tezos wallets. You will use this address to pay the fees for creating transactions and addresses.

Generating wallets

To create a Tezos wallet using BitGoJS:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 bitgo .coin('txtz') .wallets() .generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30', }) .then(function (wallet) { // print the new wallet console.dir(wallet); // print the new wallets address to send to console.dir(wallet.coinSpecific.rootAddress); });

It currently costs 1.33964 ꜩ to create a new Tezos wallet. This amount is payed by the fee account and consists of 0.04764 ꜩ in baker fees, 1.035 ꜩ storage fees, and 0.257 ꜩ for allocation fees.

To create a Tezos wallet using the platform API:

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/txtz/wallet/generate

A similar operation will need to be provided above to the resultant rootAddress.

Creating addresses

1 2 3 4 5 6 7 8 9 10 11 bitgo .coin('txtz') .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/txtz/wallet/$WALLET/address

The creation of receive addresses for Tezos wallets results in additional accounts associated with the main wallet. When a user receives funds on a receive address, those funds need to be consolidated in the base address of the wallet first in order to be spent. See Consolidate account.

Sending

Funds can only be sent out from the wallet's base address. If your wallet has sufficient funds but you are unable to send, you may need to consolidate the funds from the receive addresses into the base address by calling Consolidate account first. Fees of transactions sent from the base wallet address are paid for by the fee address, while fees of consolidation transactions taken from the receive address itself. The public key of every Tezos receive address must be revealed to the network before it can send transactions. The reveal operation will be added to the address' first consolidation transaction. The baker fee for a reveal operation is 0.00142 ꜩ and for a consolidation transaction is 0.04764 ꜩ.

Balances

tez (ꜩ) (XTZ) is the native asset of the Tezos blockchain. The base unit of tez is micro tez (or "mutez"):

  • 1 micro tez is (10-6) or 0.000001 tez.
  • 1 tez is (106) or 1000000 micro tez (1 million).

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

Funds stored in the base address of a Tezos wallet are considered "spendable balance". The sum of the balances of the base address and the receive addresses is the wallet's "confirmed balance".