Skip to main content
Once you’ve tested on signet, testing on mainnet is the same flow with real bitcoin. In this guide you’ll use bark to create a mainnet wallet, fund it over Lightning, and make your first payments on Second’s mainnet Ark server. Bytes adventure
Mainnet uses real bitcoin. Start with small amounts while you get familiar with the tooling. Bark is beta software, so back up your mnemonic and don’t store more than you’re willing to lose.
Building on mainnet? Head to chat.second.tech and ping Neil (982572) to get a dedicated support channel set up for your team. Slack and Signal are also available on request.

Create your wallet

1

Verify Bark is installed

To ensure that bark is installed, run bark --version. Follow the installation instructions if you need to.
2

Create a new mainnet wallet

Create a wallet pointed at Second’s mainnet Ark server.
bark create --mainnet --ark ark.second.tech
3

Check your balance

bark balance
You should see all balances at zero:
{
  "spendable_sat": 0,
  "pending_lightning_send_sat": 0,
  "claimable_lightning_receive_sat": 0,
  "pending_in_round_sat": 0,
  "pending_board_sat": 0,
  "pending_exit_sat": null
}

Add funds to your wallet

The quickest way to fund your wallet is to send bitcoin from any Lightning wallet.
1

Generate a BOLT11 invoice

bark ln invoice "10000 sats"
2

Pay the invoice

Pay the invoice from your preferred Lightning wallet, and the sats will arrive in your Ark wallet instantly.
3

Confirm your VTXOs

bark vtxos
The output will look something like:
[
  {
    "id": "7d53e2c1e57c4c40dbe942c9a040c95e92db7c4486b2faf9163804097fa165bc:0",
    "amount_sat": 10000,
    "policy_type": "pubkey",
    "user_pubkey": "025577f6f44237f4c334b50c257c8feab6ff89d5591db2aff0ffee5c7bef7c03db",
    "server_pubkey": "02f0f358c1b6173ddecec1ad06b42d3762f193e6ff98a3e112292aec21129f9f6b",
    "expiry_height": 271138,
    "exit_delta": 12,
    "state": {
      "type": "spendable"
    }
  }
]
You can also receive via an Ark payment or by boarding instead. Learn more about Ark payments.

Make a Lightning payment

1

Get a BOLT11 invoice

Using a separate Lightning wallet, generate a BOLT11 invoice, or ask a friend or colleague to generate one.
2

Pay the invoice

bark send <bolt11-invoice>
Replace <bolt11-invoice> with the full invoice string. The payment is routed over Lightning, so anyone with a Lightning wallet can receive it.

Make an Ark payment

If you have a friend or colleague on the same Ark server, you can also make an Ark payment.
1

Get an Ark address

Ask them for their Ark address.
2

Send some sats

bark send <ark-address> "<amount> sats"
Replace <ark-address> with their Ark address and <amount> with the number of sats to send.
3

Verify the payment

Run bark vtxos again to see your new VTXO (change from the payment).

Refresh your VTXOs

Your VTXOs have a limited lifetime and must be periodically refreshed in a round. Unlike our signet server, which runs a round every 30 seconds for testing, the mainnet server runs rounds much less frequently, so a refresh may take longer to confirm.
bark refresh --all
In the current implementation users must refresh coins manually, but any production-quality wallet will handle this automatically.

Getting your money out, aka off-boarding

You can offboard your funds back to a regular on-chain UTXO. This is the cheapest and fastest way to leave Ark.
bark offboard --all
If the Ark server is uncooperative, you can always perform an emergency exit instead. For more on how offboarding works, see Offboarding in the Learn section.

Start building

Now that you have a feel for how fast payments are across both Lightning and Ark, you’re ready to start building. There are two integration paths depending on your use case:

Bark SDK

For mobile and desktop apps where users hold their own keys.

Barkd

For exchanges, e-commerce, and services where you manage bitcoin.

Connection details

Either path connects to Second’s mainnet infrastructure using these endpoints:
SettingValue
Ark serverark.second.tech
Esplorahttps://mempool.second.tech/api
The bark CLI uses the Ark server’s default chain source, so you only need to pass --ark. Point the SDK, barkd, or your own node at the Esplora endpoint when you configure a chain source explicitly.

Share your feedback

You’ve now made some of the first ever Bark transactions on mainnet across both Lightning and Ark. We’re excited to see what you build! Let us know if there are any more guides you’d like to see, and please share any feedback on the developer experience.