# Provenance

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

## Provenance

Provenance can be accessed with the following coin types:

| Environment           | Coin Type | Faucet                                                                                                                           |
| :-------------------- | :-------- | :--------------------------------------------------------------------------------------------------------------------------------|
| Provenance Production | hash      |                                                                                                                                  |
| Provenance Testnet    | thash     | <a href="https://explorer.test.provenance.io/faucet" target="_blank" rel="noreferrer">https://explorer.test.provenance.io/faucet</a>|

### Explorer
<a href="https://www.mintscan.io/provenance/" target="_blank" rel="noreferrer">https://www.mintscan.io/provenance/</a>


### Generating wallets

To create a Provenance wallet using BitGoJS:

```javascript
bitgo
  .coin('thash')
  .wallets()
  .generateWallet({
    label: 'My Test Wallet',
    passphrase: 'secretpassphrase1a5df8380e0e30',
  })
  .then(function (wallet) {
    // print the new wallet
    console.dir(wallet);
  });
```

To create a Provenance wallet using the platform API:

```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/thash/wallet/generate
```

### Creating addresses

```javascript
bitgo
  .coin('thash')
  .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/thash/wallet/$WALLET/address
```

### Staking
- Provenance supports staking. Provenance uses a delegated proof-of-stake (DPoS) consensus mechanism. Provenance holders can stake their tokens to validators.
- Validators participate in consensus to produce new blocks and validate transactions.
- By staking Provenance, holders can earn rewards.

### Balances
The base unit of Provenance is `nhash` (nanohash).
- 1 hash = 1,000,000,000 nhash
- 1 nhash = 0.000000001 hash

To check the balance of a wallet:

```javascript
const address = yield walletInstance.getAddress({ address: 'tp1ytxha7lg002rzd4jxmahrdjzkd62mx99klgjcc' });
const bal = address.balance;
return bal;
```

### Tokens

The Provenance blockchain natively support tokens. To view all BitGo supported tokens on the Provenance blockchain, see [Cosmos Tokens](/docs/cosmos-tokens)

### Consolidation
BitGo supports memo based addresses. Therefore, consolidation is not required.

### Fee rate
The default gas fee is 1.75 hash
