Browser — Wallet Integrations
The browser client mirrors the Node API but delegates all signing to WalletConnect, making it safe for user-facing portals.
1. Install DependenciesDirect link to 1. Install Dependencies
npm install @hashgraphonline/standards-sdk @hashgraphonline/hashinal-wc
2. Connect the WalletDirect link to 2. Connect the Wallet
- TypeScript
- Go
import { HashinalsWalletConnectSDK } from '@hashgraphonline/hashinal-wc';
const hwc = new HashinalsWalletConnectSDK({ projectId: '<walletconnect>' });
await hwc.connect(); // prompts the user to pick an account
// Browser/wallet operations are TypeScript-only.
// In Go, use the server-side client directly — see the [Server](./server) page.
3. Instantiate HCS7BrowserClientDirect link to 3-instantiate-hcs7browserclient
- TypeScript
- Go
import { HCS7BrowserClient, HCS7ConfigType } from '@hashgraphonline/standards-sdk';
const hcs7 = new HCS7BrowserClient({
network: 'testnet',
hwc,
});
// Browser/wallet operations are TypeScript-only.
// In Go, use the server-side client directly — see the [Server](./server) page.
If no wallet session exists, ensureConnected() throws with "No active wallet connection" so you can show a reconnect button.
4. Create a Registry from the Browser (Optional)Direct link to 4. Create a Registry from the Browser (Optional)
- TypeScript
- Go
const registry = await hcs7.createRegistry({ ttl: 86_400 });
if (!registry.success) {
toast.error(registry.error);
}
// Browser/wallet operations are TypeScript-only.
// In Go, use the server-side client directly — see the [Server](./server) page.
Topic creation uses the connected account’s signing key, so the wallet will prompt for approval.
5. Register Configurations and MetadataDirect link to 5. Register Configurations and Metadata
- TypeScript
- Go
await hcs7.registerConfig({
registryTopicId: registry.topicId!,
memo: 'minted counter',
config: {
type: HCS7ConfigType.EVM,
contractAddress: '0x1d67aaf7f7e8d806bbeba24c4dea24808e1158b8',
abi: {
name: 'minted',
inputs: [],
outputs: [{ name: '', type: 'uint64' }],
stateMutability: 'view',
type: 'function',
},
},
});
await hcs7.registerMetadata({
registryTopicId: registry.topicId!,
metadataTopicId: '0.0.3717746',
memo: 'purple-phase-art',
weight: 1,
tags: ['even'],
});
// Browser/wallet operations are TypeScript-only.
// In Go, use the server-side client directly — see the [Server](./server) page.
Each call automatically validates the payload and sends submitMessageToTopic through WalletConnect. The wallet UI displays the topic memo + tx memo so users can verify what they are signing.
6. Reading Registries in the BrowserDirect link to 6. Reading Registries in the Browser
HCS7BrowserClient inherits getRegistry() from the base client, so you can render dashboards without server hops:
- TypeScript
- Go
const registryView = await hcs7.getRegistry('0.0.10058300', { limit: 100 });
setState(registryView.entries);
// Browser/wallet operations are TypeScript-only.
// In Go, use the server-side client directly — see the [Server](./server) page.
7. Pair With Bridges When NeededDirect link to 7. Pair With Bridges When Needed
When you need live previews (e.g., show the WASM router’s current selection), you can still run the bridges client-side:
- TypeScript
- Go
import { EVMBridge, WasmBridge } from '@hashgraphonline/standards-sdk';
const evm = new EVMBridge('testnet');
const wasm = new WasmBridge();
// Browser/wallet operations are TypeScript-only.
// In Go, use the server-side client directly — see the [Server](./server) page.
For security, only expose read-only operations in the browser; keep privileged writes and caching on the server side.