Skip to main content

Hashinal Wallet Connect SDK

IntroductionDirect link to Introduction

Hashinal Wallet Connect SDK is a powerful abstraction layer for Hedera Wallet Connect that simplifies wallet integration for Hedera applications. Whether you're building inscribed HTML Hashinals using HCS-3 or modern JavaScript applications, this SDK provides a unified interface for all Hedera operations.

Key BenefitsDirect link to Key Benefits

  • 🚀 Simple Integration: One SDK for both inscribed HTML files (UMD) and modern frameworks (ESM)
  • 🔐 Secure Wallet Connection: Built on WalletConnect v2 protocol for secure communication
  • 📦 Comprehensive Features: Full suite of Hedera operations from transfers to smart contracts
  • 🎯 Developer Friendly: Consistent API with clear examples for every method
  • 🔄 Auto-versioning: Inscribed versions automatically updated via HCS topics

ArchitectureDirect link to Architecture

The SDK architecture provides two deployment models to suit different application needs:

Quick StartDirect link to Quick Start

The SDK provides two integration paths depending on your application type. Both use the same underlying functionality with consistent APIs.

For Inscribed HTML (Hashinals)Direct link to For Inscribed HTML (Hashinals)

Use the UMD build for inscribed HTML applications on Hedera:

<!-- Include the SDK via HCS -->
<script data-src="hcs://1/0.0.8084872" data-script-id="wallet-connect"></script>

<script>
// Initialize and connect
async function connectWallet() {
const projectId = 'YOUR_PROJECT_ID';
const metadata = {
name: 'My Hashinal',
description: 'Inscribed application on Hedera',
url: window.location.href,
icons: ['https://example.com/icon.png']
};

await window.HashinalsWalletConnectSDK.init(projectId, metadata);
const session = await window.HashinalsWalletConnectSDK.connect();
console.log('Connected:', session);
}
</script>

For Modern JavaScript ApplicationsDirect link to For Modern JavaScript Applications

Use the ESM package for React, Next.js, Vue, or any modern framework:

import { HashinalsWalletConnectSDK } from '@hashgraphonline/hashinal-wc';
import { LedgerId } from '@hashgraph/sdk';

const sdk = HashinalsWalletConnectSDK.getInstance();

// Initialize with network selection
await sdk.init(
'YOUR_PROJECT_ID',
{
name: 'My dApp',
description: 'Modern Hedera application',
url: 'https://myapp.com',
icons: ['https://myapp.com/icon.png']
},
LedgerId.MAINNET
);

// Connect wallet
const session = await sdk.connect();

Core FeaturesDirect link to Core Features

Wallet OperationsDirect link to Wallet Operations

FeatureDescriptionUse Case
Connect/DisconnectEstablish and manage wallet connectionsUser authentication
Account InfoRetrieve account details and balancesDisplay user data
HBAR TransfersSend HBAR between accountsPayments, tips
Token OperationsTransfer, associate, dissociate tokensDeFi, gaming

Topic & MessagingDirect link to Topic & Messaging

FeatureDescriptionUse Case
Create TopicsCreate new HCS topics with optional keysDecentralized messaging
Submit MessagesWrite messages to HCS topicsData storage, communication
Retrieve MessagesRead messages from topicsData retrieval, verification

NFT & Token ManagementDirect link to NFT & Token Management

FeatureDescriptionUse Case
Create TokensDeploy new fungible or non-fungible tokensToken launches
Mint NFTsMint NFTs with metadataDigital collectibles
NFT ValidationVerify NFT ownershipAccess control, gating
Token QueriesGet account tokens and NFTsPortfolio display

Smart Contract IntegrationDirect link to Smart Contract Integration

FeatureDescriptionUse Case
Execute ContractsCall smart contract functionsDeFi protocols
Read ContractsQuery contract state without gasData fetching
Contract ParametersBuild complex function parametersAdvanced interactions

Supported WalletsDirect link to Supported Wallets

The SDK supports all WalletConnect-compatible Hedera wallets:

  • HashPack - Most popular Hedera wallet
  • Blade Wallet - Gaming-focused wallet
  • Kabila - Mobile-first wallet
  • Other WalletConnect v2 compatible wallets

Network SupportDirect link to Network Support

The SDK supports all Hedera networks:

NetworkLedgerIdUse Case
MainnetLedgerId.MAINNETProduction applications
TestnetLedgerId.TESTNETDevelopment and testing
PreviewnetLedgerId.PREVIEWNETPreview features

Next StepsDirect link to Next Steps