Skip to main content

Network

Mainnet With Custom RPC#

import { DAppClient, NetworkType } from "@airgap/beacon-sdk";
const dAppClient = new DAppClient({ name: "Beacon Docs" });
// Mainnet with different rpcUrl
const result = await dAppClient.requestPermissions({
network: {
type: NetworkType.MAINNET,
rpcUrl: "https://mainnet-tezos.giganode.io/",
},
});
https://example.com

Testnet#

import { DAppClient, NetworkType } from "@airgap/beacon-sdk";
const dAppClient = new DAppClient({
name: "Beacon Docs",
preferredNetwork: NetworkType.EDONET,
});
// Edonet with default rpcUrl
const result = await dAppClient.requestPermissions({
network: {
type: NetworkType.EDONET,
},
});
https://example.com

Testnet With Custom RPC#

import { DAppClient, NetworkType } from "@airgap/beacon-sdk";
const dAppClient = new DAppClient({
name: "Beacon Docs",
preferredNetwork: NetworkType.EDONET,
});
// Edonet with different rpcUrl
const result = await dAppClient.requestPermissions({
network: {
type: NetworkType.EDONET,
rpcUrl: "https://testnet-tezos.giganode.io/",
},
});
https://example.com

Custom Network#

import { DAppClient, NetworkType } from "@airgap/beacon-sdk";
const dAppClient = new DAppClient({
name: "Beacon Docs",
preferredNetwork: NetworkType.CUSTOM,
});
// Custom network (eg. local development or latest testnet)
const result = await dAppClient.requestPermissions({
network: {
type: NetworkType.CUSTOM,
name: "Local Node",
rpcUrl: "http://localhost:8732/",
},
});
https://example.com