Rune

Overview

Rune (thorchain:rune) is the native asset of the THORChain blockchain. It utilizes:

  • Account model
  • EcDSA signature algorithm

THORChain is a decentralized cross-chain liquidity protocol that utilizes the Tendermint consensus engine, Cosmos-SDK state machine, and GG20 Threshold Signature Scheme (TSS). It operates as an independent Layer 1 cross-chain decentralized exchange (DEX) built on the Cosmos SDK. It could be described as a "cross-chain automated market maker (AMM), like Uniswap" or a "decentralized Binance".

Explorer

https://runescan.io/

Wallets Types

BitGo enables holding Rune in the following wallet types:

Multisig ColdMultisig HotMPC ColdMPC Hot
Custodial
Self Managed

Ticker Symbols

MainnetTestnet
thorchain:runetthorchain:rune

Faucet

THORChain does not have a faucet to obtain testnet Rune for development and testing purposes.

Units

Rune is divisible by 10-8 and the base unit is a tor:

  • 1 Rune = 100,000,000 tor
  • 1 tor = 0.00000001 Rune

Rune balances can be in either integer or string format. However, BitGo recommends using string format to ensure values don't exceed the programmable number limit.

Tokens

The THORChain blockchain doesn't natively support tokens.

Fees

Rune has the following fees:

  • Minimum fee = 0.02 Rune
  • Default fee rate = 0.02 Rune

Learn more about fees at Fees | THORChain Docs

Create Wallet

export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>"
export COIN="tthorchain:rune"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export LABEL="<DESIRED_WALLET_NAME>"
export PASSPHRASE="<YOUR_BITGO_LOGIN_PASSPHRASE>"
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"

curl -X POST \
  http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/generate \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "label": "'"$LABEL"'",
    "passphrase": "'"$PASSPHRASE"'",
    "enterprise": "'"$ENTERPRISE_ID"'",
    "disableTransactionNotifications": true,
    "disableKRSEmail": true
}'
const { BitGo } = require('bitgo');

const accessToken = '<YOUR_ACCESS_TOKEN>';

// Initialize the SDK
const bitgo = new BitGo({
accessToken: accessToken,
env: 'test',
});

// Generate hot wallet
async function createHotWalletSimple() {
const newWallet = await bitgo.coin('tthorchain:rune').wallets().generateWallet({
    label: '<DESIRED_WALLET_NAME>',
    passphrase: '<YOUR_BITGO_LOGIN_PASSWORD>',
});

console.log(JSON.stringify(newWallet, undefined, 2));
}

Create Address

export COIN="tthorchain:rune"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"

curl -X POST \
  https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID/address \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
const { BitGo } = require('bitgo');
const accessToken = '<YOUR_ACCESS_TOKEN>';

// Initialize the SDK
const bitgo = new BitGo({
  accessToken: accessToken,
  env: 'custom',
  customRootURI: 'https://app.bitgo.com',
});

// Create address
const wallet = await bitgo.coin('tthorchain:rune').wallets().generateWallet({
  label: '<DESIRED_WALLET_NAME>',
  passphrase: '<YOUR_BITGO_LOGIN_PASSPHRASE>',
});

const address = await wallet.createAddress(
);

// Print address details
console.log(JSON.stringify(address, undefined, 2));

Estimate Fee

export COIN="tthorchain:rune"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"

curl -X GET \
  https://app.bitgo-test.com/api/v2/$COIN/tx/fee \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
const BitGoJS = require('../../../src/index.js');
const bitgo = new BitGoJS.BitGo({ env: 'test' });
const Promise = require('bluebird');
const accessToken = '<YOUR_ACCESS_TOKEN>';
const coin = 'tthorchain:rune';

Promise.coroutine(function *() {
  bitgo.authenticateWithAccessToken({ accessToken });
  bitgo.coin(coin).feeEstimate({ numBlocks: 2 }, function callback(err, res) {
     console.dir(res);
  });
})();

Transact

export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>"
export COIN="tthorchain:rune"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export ADDRESS="<DESTINATION_ADDRESS>"
export AMOUNT="<AMOUNT_IN_BASE_UNITS>"
export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>"

curl -X POST \
  http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/$WALLET_ID/sendcoins \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "address": "'"$ADDRESS"'",
    "amount": "'"$AMOUNT"'",
    "walletPassphrase": "'"$WALLET_PASSPHRASE"'"
}'
export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>"
export COIN="tthorchain:rune"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export ADDRESS_1="<DESTINATION_ADDRESS_1>"
export ADDRESS_2="<DESTINATION_ADDRESS_2>"
export AMOUNT_1="<AMOUNT_1_IN_BASE_UNITS>"
export AMOUNT_2="<AMOUNT_2_IN_BASE_UNITS>"
export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>"

curl -X POST \
  http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/$WALLET_ID/sendmany \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "recipients": [
    {
      "address": "'"$ADDRESS_1"'",
      "amount": "'"$AMOUNT_1"'"
    },
    {
      "address": "'"$ADDRESS_2"'",
      "amount": "'"$AMOUNT_2"'"
    }
  ],
    "walletPassphrase": "'"$WALLET_PASSPHRASE"'"
}'
const tx = await fundedWallet.send({
    address: `<DESTINATION_ADDRESS>`,
    amount: `<AMOUNT>`,
    walletPassphrase: process.env.PASSWORD as string,
  });
let params = {
  recipients: [
    {
      amount: "<AMOUNT_1>",
      address: "<DESTINATION_ADDRESS_1>",
    },
    {
      amount: "<AMOUNT_2>",
      address: "<DESTINATION_ADDRESS_2>",
    },
  ],
  walletPassphrase: "<YOUR_WALLET_PASSPHRASE>",
};
wallet.sendMany(params).then(function (transaction) {
  // Print transaction details
  console.dir(transaction);
});

See Also