Wallets
Embed Branta in your wallet so users see who they are paying before they hit send.
Why integrate Branta
How Branta works for wallets
Integrate
import { BrantaServerBaseUrl } from "@branta-ops/branta";
import { BrantaService } from "@branta-ops/branta/v2";
const service = new BrantaService({
baseUrl: BrantaServerBaseUrl.Production,
privacy: 'strict',
});
async function lookup(input: string, isQrCode: boolean) {
try {
const result = isQrCode
? await service.getPaymentsByQrCode(input)
: await service.getPayments(input);
if (result.payments.length === 0) {
// Not found — show nothing. The address may simply not exist in Branta.
return;
}
// Render result.payments and result.verifyUrl
} catch {
// Swallow errors — never surface a "not found" or lookup failure to the user.
}
}Test your integration
Wallets using Branta
Last updated