@column-org/wallet-sdk
v1.3.2
Published
Column Wallet Mobile Deep-Link SDK for Movement/Aptos ecosystem
Maintainers
Readme
@column-org/wallet-sdk
The official SDK for integrating Column Wallet's deep-linking protocol into your Web3 applications on the Movement/Aptos ecosystem.
Features
- Direct Deep-Linking: Low-latency communication between dApps and Column Wallet.
- End-to-End Encryption: Secure handshakes using X25519 and TweetNaCl.
- Environment Agnostic: Works seamlessly for both mobile websites and native applications.
- Aptos Compatible: Built-in support for BCS transaction payloads and message signing.
Installation
npm install @column-org/wallet-sdk
# or
yarn add @column-org/wallet-sdkQuick Start
1. Initialize the SDK
import { ColumnWalletSDK } from '@column-org/wallet-sdk';
const sdk = new ColumnWalletSDK({
appName: 'My Awesome DApp',
appUrl: 'https://mydapp.io',
redirectLink: 'https://mydapp.io/callback', // Use custom scheme for native apps
appIcon: 'https://mydapp.io/logo.png'
});2. Connect Wallet
You can either generate a link manually or use the built-in premium modal:
Method A: Using the built-in Modal (Recommended)
// This will open a glassmorphic selection modal
sdk.openConnectModal();Method B: Manual Redirect
// Generate the connection URL
const connectUrl = sdk.connect();
// Redirect the user to Column Wallet
window.location.href = connectUrl;3. Handle the Response
After approval, Column redirects back to your redirectLink.
// On your callback page
const response = sdk.handleResponse(window.location.href);
if (response.address) {
console.log('Connected to:', response.address);
// Store the wallet's encryption public key for future signing requests
localStorage.setItem('wallet_pk', response.column_encryption_public_key);
}4. Sign and Submit Transaction
sdk.setWalletPublicKey(localStorage.getItem('wallet_pk'));
const txUrl = sdk.signAndSubmitTransaction(base58TransactionPayload);
window.location.href = txUrl;Security
Column SDK uses the Nacl protocol for authenticated encryption. Every request generates an ephemeral session key pair, ensuring that your user's transactions are private and secure from transit-level interceptions.
License
MIT
