Second | Scalable Bitcoin Payments With Ark & Lightning
SubscribeSubscribe for updates
SubscribeSubscribe for updates
NewWe’re now live on mainnetThe simple way to add bitcoin payments to your app<br>Support fast, low-cost payments across Ark, Lightning, and on-chain through a single integration. No channel management and fully self-custodial.
Subscribe for updatesRead the docs<br>React NativeWebSwiftKotlinFlutterGoRust
Copy code<br>import { Wallet, generateMnemonic } from "@secondts/bark-react-native"
const wallet = await Wallet.create(generateMnemonic(), config, dataDir, false)
// ⚡ Pay a Lightning invoice. No channels, no liquidity to manage.<br>await wallet.payLightningInvoice("lnbc1pvjluez...", undefined, true)
// Pay an Ark address. Instant and off-chain.<br>await wallet.sendArkoorPayment("ark1qqn8zq...", 25_000n)
const { spendableSats } = await wallet.balance()<br>import init, { Wallet, generateMnemonic } from "@secondts/bark/web"<br>await init()
const wallet = await Wallet.create({ mnemonic, config, dbName: "bark", forceRescan: false })
// ⚡ Pay a Lightning invoice. No channels, no liquidity to manage.<br>await wallet.payLightningInvoice({ invoice: "lnbc1pvjluez...", wait: true })
// Pay an Ark address. Instant and off-chain.<br>await wallet.sendArkoorPayment("ark1qqn8zq...", 25_000)
const { spendableSats } = await wallet.balance()<br>import Bark
let wallet = try await Wallet.create(mnemonic: mnemonic, config: config, datadir: dataDir, forceRescan: false)
// ⚡ Pay a Lightning invoice. No channels, no liquidity to manage.<br>try await wallet.payLightningInvoice(invoice: "lnbc1pvjluez...", amountSats: nil, wait: true)
// Pay an Ark address. Instant and off-chain.<br>try await wallet.sendArkoorPayment(arkAddress: "ark1qqn8zq...", amountSats: 25_000)
let balance = try await wallet.balance()<br>import uniffi.bark.*
val wallet = Wallet.create(mnemonic, config, dataDir, false)
// ⚡ Pay a Lightning invoice. No channels, no liquidity to manage.<br>wallet.payLightningInvoice("lnbc1pvjluez...", null, true)
// Pay an Ark address. Instant and off-chain.<br>wallet.sendArkoorPayment("ark1qqn8zq...", 25_000uL)
val balance = wallet.balance()<br>import 'package:bark_bitcoin/bark_bitcoin.dart';
final wallet = await Wallet.create(mnemonic: mnemonic, config: config, datadir: dataDir, forceRescan: false);
// ⚡ Pay a Lightning invoice. No channels, no liquidity to manage.<br>await wallet.payLightningInvoice(invoice: "lnbc1pvjluez...", amountSats: null, wait: true);
// Pay an Ark address. Instant and off-chain.<br>await wallet.sendArkoorPayment(arkAddress: "ark1qqn8zq...", amountSats: 25000);
final balance = await wallet.balance();<br>import "gitlab.com/ark-bitcoin/bark-ffi-bindings/golang/bark"
wallet, _ := bark.WalletCreate(mnemonic, config, dataDir, false)<br>defer wallet.Destroy()
// ⚡ Pay a Lightning invoice. No channels, no liquidity to manage.<br>wallet.PayLightningInvoice("lnbc1pvjluez...", nil, true)
// Pay an Ark address. Instant and off-chain.<br>wallet.SendArkoorPayment("ark1qqn8zq...", 25_000)
balance, _ := wallet.Balance()<br>use bark::Wallet;
let wallet = Wallet::create(/* mnemonic, config, db, ... */).await?;
// ⚡ Pay a Lightning invoice. No channels, no liquidity to manage.<br>wallet.pay_lightning_invoice(invoice, None, true).await?;
// Pay an Ark address. Instant and off-chain.<br>wallet.send_arkoor_payment(&address, Amount::from_sat(25_000)).await?;
let balance = wallet.balance().await?;
$ npx expo install @secondts/bark-react-nativeCopied!<br>$ npm i @secondts/barkCopied!<br>.package(url: "https://gitlab.com/ark-bitcoin/bark-ffi-bindings.git", exact: "0.11.3+bark-0.3.0")Copied!<br>implementation("tech.second.bark:bark-android:0.11.3+bark-0.3.0")Copied!<br>$ flutter pub add bark_bitcoinCopied!<br>$ go get gitlab.com/ark-bitcoin/bark-ffi-bindings/golang/barkCopied!<br>$ cargo add barkCopied!<br>One Rust core. Native bindings for every platform.
Available in
Ark + Lightning<br>Enable Ark and Lightning with one integration<br>Ark<br>A new approach to bitcoin scaling<br>Ark lets users share UTXOs and transact them off-chain, so payments are instant and cheap. Plus, it even simplifies sending payments over Lightning!
Subscribe for updates
Easy onboarding<br>No fees or channel opening. Ark users can start receiving self-custodial bitcoin payments immediately after setting up their wallet.<br>More about onboarding<br>Fast, low-cost transactions<br>Settle payments almost instantly with minimal fees, giving users a seamless experience without the delays and costs of on-chain transactions.<br>More about transactions<br>Familiar bitcoin-like model<br>Bitcoin-like addresses and a familiar interface that make for an effortless transition to layer two for developers and users alike.<br>More about Ark UX
Lightning<br>Enable Lightning payments, painlessly<br>Lightning is awesome. But if you’ve ever built a Lightning integration, you’ll know how brutal it can be. With Second, you can do Lightning without “doing Lightning”.<br>Start testing nowDeveloper docs<br>The fastest way to get started...