Dapp Developers
Read on to learn how you can integrate the following ArchID features in your Dapps and web applications:
- Registering and minting domains
- Name resolution and resolving domain data
- Updating domain data
- Extending domain lifetimes
Smart Contract Addresses
See below for the smart contract addresses of the ArchID Registry and NFT contracts.
Chain ID: constantine-3
Registry: archway1lr8rstt40s697hqpedv2nvt27f4cuccqwvly9gnvuszxmcevrlns60xw4r
Cw721: archway146htsfvftmq8fl26977w9xgdwmsptr2quuf7yyra4j0gttx32z3secq008
Marketplace archway1mmm7d4w6dxpjcjp0y3lmvmjq0vtf9y0w7w8jnffgkvqge9v5vzvqe8me0n
JavaScript Client
The following docs reference a client
JavaScript object, and string addresses for REGISTRY_CONTRACT
and CW721_CONTRACT
. Assume you are working with an arch3.js client object.
Here's an example of getting an arch3.js client.
const Arch3 = require('@archwayhq/arch3.js');
const Stargate = require('@cosmjs/stargate')
const coin = Stargate.coin;
const REGISTRY_CONTRACT = "archway1275jwjpktae4y4y0cdq274a2m0jnpekhttnfuljm6n59wnpyd62qppqxq0";
const CW721_CONTRACT = "archway1cf5rq0amcl5m2flqrtl4gw2mdl3zdec9vlp5hfa9hgxlwnmrlazsdycu4l";
const Blockchain = {
chainId: "archway-1",
chainName: "Archway",
rpc: "https://rpc.mainnet.archway.io",
stakeCurrency: {coinDenom: "ARCH",coinMinimalDenom: "aarch",coinDecimals: 6,},
bech32Config: {bech32PrefixAccAddr: "archway",bech32PrefixAccPub: "archwaypub",bech32PrefixValAddr: "archwayvaloper",bech32PrefixValPub: "archwayvaloperpub",bech32PrefixConsAddr: "archwayvalcons",bech32PrefixConsPub: "archwayvalconspub"},
currencies: [{coinDenom: "ARCH",coinMinimalDenom: "aarch",coinDecimals: 18,}],
feeCurrencies: [{coinDenom: "ARCH",coinMinimalDenom: "aarch",coinDecimals: 18,gasPriceStep: {low: 0,average: 0.1,high: 0.2},}],
features: ['cosmwasm']
};
// Keplr example
async function getClient() {
await window.keplr.experimentalSuggestChain(Blockchain);
await window.keplr.enable(Blockchain.chainId);
window.keplr.defaultOptions = {sign:{preferNoSetFee: true}};
const signer = await window.getOfflineSignerAuto(Blockchain.chainId);
const client = await Arch3.SigningArchwayClient.connectWithSigner(Blockchain.rpc, signer);
return client;
}
async function getAccounts() {
const signer = await window.getOfflineSignerAuto(Blockchain.chainId);
const accounts = signer.getAccounts();
return accounts;
}
Compatibility
The following docs assume you are integrating ArchID into a web application using JavaScript.
If you're looking to integrate ArchID into a smart contract see the Contract docs.