Near

Overview

NEAR Protocol is a decentralized blockchain platform designed to enable the creation and operation of scalable, high-performance decentralized applications (dApps). Utilizing a proof-of-stake (PoS) consensus mechanism, NEAR Protocol offers fast transaction finality and low transaction fees, making it suitable for a wide range of use cases.

NEAR is the native asset of the Near Protocol blockchain platform. It serves various purposes within the NEAR Protocol ecosystem, including transaction fees, staking, and governance. It utilizes the Account model.

Explorer

https://nearblocks.io/

Ticker Symbols

MainnetTestnet
NEARTNEAR

Wallets Types

BitGo enables holding Near in the following wallet types:

Multisig ColdMultisig HotMPC ColdMPC Hot
CustodyN//AN/A
Self-CustodyN/A

Faucet

Follow these steps to get NEAR testnet tokens:

  1. Create a <username>.testnet wallet address on https://testnet.mynearwallet.com/
  2. Get testnet tokens from https://near-faucet.io/ in the <username>.testnet wallet address created in step 1.
  3. Send the testnet tokens from <username>.testnet wallet to the BitGo Test wallet.

Units

The base unit of Near is yocto.

  • 1 near = 1024 yocto
  • 1 yocto = 10-24 near

To check the balance of a wallet:

  • JavaScript
1 2 3 4 5 6 7 const walletInstance = await bitgo.coin(coin).wallets().get({ id: walletId }); console.log('Wallet ID:', walletInstance.id()); console.log('Current Receive Address:', walletInstance.receiveAddress()); console.log('Balance:', walletInstance.balanceString()); console.log('Confirmed Balance:', walletInstance.confirmedBalanceString()); console.log('Spendable Balance:', walletInstance.spendableBalanceString());

Tokens

The Near Protocol blockchain natively support tokens. To view all BitGo supported tokens on the Near Protocol Blockchain, see the Coins and Tokens table.

Fees

On every transaction you send to the network NEAR charges a fee (aka gas fee). Fees are measured in gas units but paid in NEAR. Gas units are deterministic, the same transaction costs the same gas units. Gas units are transformed to NEAR by multiplying with a gas price.

  • Min. gas price = 10-16 NEAR per gas unit
  • 1 TGas (10¹² gas units) ≈ 1 ms of "compute" time. ≈ 0.0001 NEAR
  • The gas price is not fixed: it is recalculated each block depending on network demand. If the previous block is more than half full the price goes up, otherwise it goes down. The price cannot change by more than 1% each block.
  • A maximum of 300 TGas can be attached to a transaction.
  • Attaching extra gas does NOT make the transaction faster, unused gas is simply returned.

Learn more about fees at Near docs.

Create Wallet

  • cURL
  • JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>" export COIN="[testnet ID all lowercase]" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export LABEL="<DESIRED_WALLET_NAME>" export PASSPHRASE="<YOUR_BITGO_LOGIN_PASSPHRASE>" export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>" export MULTISIGTYPE="tss" curl -X POST \ http://$BITGO_EXPRESS_HOST:3080/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, "multisigType": "'"$MULTISIGTYPE"'" }'

Create Address

  • cURL
  • JavaScript
1 2 3 4 5 WALLET=585c51a5df8380e0e3082e46 curl -X POST \ -H "Authorization: Bearer $ACCESS_TOKEN" \ https://app.bitgo-test.com/api/v2/tnear/wallet/$WALLET/address

Consolidate Balance

Near is an account-based asset and therefore requires consolidating to the base address in order to use the maximum spendable amount.

Note: Near addresses require a minimum balance of ~0.052 NEAR. This amount remains in the address after consolidation.

Estimate Fee

  • cURL
  • JavaScript
1 2 3 4 5 6 7 export COIN="tnear" 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"

Transact

  • cURL
  • JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>" export COIN="tnear" 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:3080/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"'", "type": "transfer", "isTss": "true" }'

Stake

For details specific to staking NEAR tokens, see the tables below:

AmountsDetails
MinimumNone
Maximum coin supply1,000,000,000 NEAR
Are staked assets locked or liquid?Locked
FeesWithdraw from wallet balance

TimelineDetails
Activation period4 epochs (36 hours)
Unstaking period3 epochs (27 hours)

RewardsDetails
Rewards rateDecided by each validtor
On-chain transactions for reward distributions?No
Supports withdrawing rewards only?Yes
Requires transaction to claim rewards?Yes

ValidatorsDetails
Bring your own validator?Yes
Stake to multiple validators simultaneously?No
Stake multiple times to the same delegation?Yes
Figment support?No
Slashing?No

IntegrationDetails
Required transactionsDelegation and redelegation
Do staked assets leave wallet?No
Number of transactions to unstake1
Supports partial unstaking?Yes

See Also