npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@topo/wallet-adapter-core

v8.4.0

Published

Aptos Wallet Adapter Core

Downloads

379

Readme

@topo/wallet-adapter-core

Core functionality for the Aptos Wallet Adapter. This package provides the foundation for wallet management, state handling, and interaction with AIP-62 compatible wallets on the Aptos blockchain.

Overview

The wallet-adapter-core package handles:

  • Wallet Detection: Automatically detects AIP-62 standard compatible wallets installed in the browser
  • Connection Management: Connect, disconnect, and manage wallet sessions
  • Transaction Signing: Sign messages, transactions, and submit transactions to the network
  • Network Management: Handle network changes and multi-network support
  • Event System: Subscribe to wallet, account, and network change events
  • State Management: Centralized state for connected wallet, account, and network information

Installation

npm install @topo/wallet-adapter-core
# or
pnpm add @topo/wallet-adapter-core
# or
yarn add @topo/wallet-adapter-core

Peer Dependencies:

npm install @topo/ts-sdk

Usage

Basic Setup

import { WalletCore } from "@topo/wallet-adapter-core";
import { Network } from "@topo/ts-sdk";

// Create wallet core instance
const walletCore = new WalletCore(
  [], // Optional: array of wallet names to opt-in (empty = all wallets)
  { network: Network.MAINNET }, // Optional: dapp configuration
  false, // Optional: disable telemetry (default: false)
  ["Petra Web"] // Optional: wallets to hide from display
);

// Get available wallets
const wallets = walletCore.wallets;
const notDetectedWallets = walletCore.notDetectedWallets;

Connecting to a Wallet

// Connect to a wallet by name
await walletCore.connect("Petra");

// Check connection status
if (walletCore.isConnected()) {
  console.log("Connected account:", walletCore.account);
  console.log("Connected network:", walletCore.network);
}

Signing Messages

const signedMessage = await walletCore.signMessage({
  message: "Hello, Aptos!",
  nonce: "random-nonce-123",
});

console.log("Signature:", signedMessage.signature);
console.log("Full message:", signedMessage.fullMessage);

Signing and Submitting Transactions

const result = await walletCore.signAndSubmitTransaction({
  data: {
    function: "0x1::aptos_account::transfer",
    typeArguments: [],
    functionArguments: [recipientAddress, amount],
  },
});

console.log("Transaction hash:", result.hash);

Listening to Events

// Account change event
walletCore.on("accountChange", (account) => {
  console.log("Account changed:", account);
});

// Network change event
walletCore.on("networkChange", (network) => {
  console.log("Network changed:", network);
});

// Disconnect event
walletCore.on("disconnect", () => {
  console.log("Wallet disconnected");
});

Disconnecting

await walletCore.disconnect();

API Reference

WalletCore

The main class that manages wallet state and interactions.

Constructor

new WalletCore(
  optInWallets?: ReadonlyArray<AvailableWallets>,
  dappConfig?: DappConfig,
  disableTelemetry?: boolean,
  hideWallets?: ReadonlyArray<AvailableWallets>
)

Properties

| Property | Type | Description | |----------|------|-------------| | wallet | AptosWallet \| null | Currently connected wallet | | account | AccountInfo \| null | Currently connected account | | network | NetworkInfo \| null | Currently connected network | | wallets | ReadonlyArray<AptosWallet> | List of detected wallets | | hiddenWallets | ReadonlyArray<AdapterWallet> | List of hidden wallets | | notDetectedWallets | ReadonlyArray<AdapterNotDetectedWallet> | List of not-detected wallets |

Methods

| Method | Description | |--------|-------------| | connect(walletName) | Connect to a wallet | | disconnect() | Disconnect from current wallet | | signMessage(input) | Sign a message | | signTransaction(args) | Sign a transaction | | signAndSubmitTransaction(input) | Sign and submit a transaction | | changeNetwork(network) | Request network change | | signIn(args) | Sign in with SIWA (Sign In With Aptos) | | isConnected() | Check if wallet is connected |

Events

| Event | Payload | Description | |-------|---------|-------------| | connect | AccountInfo | Emitted when wallet connects | | disconnect | - | Emitted when wallet disconnects | | accountChange | AccountInfo | Emitted when account changes | | networkChange | NetworkInfo | Emitted when network changes |

DappConfig

Configuration options for the wallet adapter:

interface DappConfig {
  network: Network;
  transactionSubmitter?: TransactionSubmitter;
  aptosApiKeys?: Partial<Record<Network, string>>;
  aptosConnectDappId?: string;
  aptosConnect?: AptosConnectWalletConfig;
  crossChainWallets?: boolean;
}

Related Packages

License

Apache-2.0