Guides
Zcash
Zcash
BitGo supports transparent transactions with the latest Zcash network upgrade, Sapling. This means BitGo only generates and reads Sapling compatible transactions. To sign Sapling transactions, BitGo SDK version 9.2.0 or greater is required.
Zcash can be accessed with the following coin types:
| Environment | Coin Type | Faucet |
|---|---|---|
| Zcash Production | zec | |
| Zcash Testnet | tzec | https://zecfaucet.com/ |
Notes on shielded transactions
BitGo wallets support only transparent addresses, which limits the type of transactions allowed. A Zcash BitGo wallet can receive assets from a transparent or a shielded address but can only send assets to a transparent address.
Explorer
https://blockexplorer.one/zcash/mainnet
Dust Threshold
A dust threshold is the minimum amount of Zcash that you can create in a single output. Zcash has a dust threshold of 2730 zatoshis.
Generating wallets
bitgo
.coin('tzec')
.wallets()
.generateWallet({
label: 'My Test Wallet',
passphrase: 'secretpassphrase1a5df8380e0e30',
})
.then(function (wallet) {
// print the new wallet
console.dir(wallet);
});
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/tzec/wallet/generate
Creating addresses
bitgo
.coin('tzec')
.wallets()
.getWallet({ id: '585c51a5df8380e0e3082e46' })
.then(function (wallet) {
return wallet.createAddress();
})
.then(function (newAddress) {
// print new address details
console.dir(newAddress);
});
WALLET=585c51a5df8380e0e3082e46
curl -X POST \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://app.bitgo-test.com/api/v2/tzec/wallet/$WALLET/address
Note: To view all supported address types and chain codes, see UTXO Address Types. Zcash defaults to chain 0 and doesn't support SegWit address types.
Balances
Zec (ZEC) is the native asset of the Zcash blockchain. The base unit of ZEC is zatoshi:
- 1 zatoshi is (
10-8) or 0.00000001 Zec. - 1 ZEC is (
108) or 100000000 zatoshis (100 million).
BitGo supports balances in string and number format but recommends string to ensure values do not exceed the
programmable number limit: balanceString, confirmedBalanceString, and spendableBalanceString.
Sending Transactions using BitGoJS or BitGo Express
Zcash blockchain parameters update with each hard fork, and this means you need an updated version of BitGoJS or BitGo Express to successfully sign and send transactions using the new blockchain parameters.
For the current Zcash blockchain parameters, the minimum supported versions for sending Zcash are BitGoJS 9.2.0 or greater, and BitGo Express 9.2.0 or greater.
If BitGo detects an SDK version that does not support the current blockchain parameters, it returns an UnsupportedSdkVersion error
when attempting to build or send transactions.