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

@k2flabs/walley-dapp-sdk

v1.0.2

Published

Walley provider adapter for @canton-network/dapp-sdk. Lets dapps connect to the Walley self-custodial wallet on Canton Network.

Readme

@k2flabs/walley-dapp-sdk

A provider adapter that lets dapps connect to Walley, a self-custodial wallet for Canton Network.

This package plugs into @canton-network/dapp-sdk as a provider. It opens a popup to walley.cc to handle connect, sign, and prepare/execute flows.

Install

npm install @k2flabs/walley-dapp-sdk @canton-network/dapp-sdk

Usage

Register the adapter with the dapp-sdk discovery registry:

import { WalleyAdapter } from "@k2flabs/walley-dapp-sdk";
import { DiscoveryRegistry } from "@canton-network/dapp-sdk";

const registry = new DiscoveryRegistry();
registry.register(new WalleyAdapter());

To point at a non-default Walley host (for example a local instance):

new WalleyAdapter({ host: "http://localhost:5173" });

API Reference

All methods are called via provider.request({ method, params? }) using the standard Canton Provider interface.

connect

Opens a popup to Walley where the user approves the connection. Returns connection status and persists the session to localStorage.

const result = await provider.request({ method: "connect" });
// { isConnected: true, isNetworkConnected: true }

disconnect

Clears the active session and removes it from localStorage. Returns null.

await provider.request({ method: "disconnect" });

status

Returns the current provider, connection, network, and session state without opening a popup.

const status = await provider.request({ method: "status" });
// {
//   provider:   { id: "walley", providerType: "browser", userUrl: string },
//   connection: { isConnected: boolean, isNetworkConnected: boolean },
//   network?:   { networkId: string },
//   session?:   { accessToken: string, userId: string }
// }

listAccounts

Returns an array of wallets. When connected, contains a single wallet entry; empty when disconnected.

const accounts = await provider.request({ method: "listAccounts" });
// Wallet[]

getPrimaryAccount

Returns the connected wallet. Throws rpcErrors.internal if not connected.

const wallet = await provider.request({ method: "getPrimaryAccount" });
// {
//   primary: true,
//   partyId: string,
//   status: "allocated",
//   hint: string,
//   publicKey: string,
//   namespace: string,
//   networkId: string,
//   signingProviderId: "walley"
// }

getActiveNetwork

Returns the network the wallet is connected to. Throws rpcErrors.internal if not connected.

const network = await provider.request({ method: "getActiveNetwork" });
// { networkId: string }

signMessage

Opens a popup for the user to sign an arbitrary message.

const result = await provider.request({
  method: "signMessage",
  params: { message: "Hello from my dApp!" },
});
// SignMessageResult

prepareExecute

Opens a popup for the user to review, sign, and submit Daml commands. Returns null on success (fire-and-forget).

await provider.request({
  method: "prepareExecute",
  params: { commands: [{ type: "create", templateId: "...", argument: { ... } }] },
});

prepareExecuteAndWait

Same as prepareExecute but waits for the transaction to be committed and returns the result.

const result = await provider.request({
  method: "prepareExecuteAndWait",
  params: { commands: [{ type: "create", templateId: "...", argument: { ... } }] },
});
// PrepareExecuteAndWaitResult

Types

The SDK exports the following:

| Export | Kind | Description | |---|---|---| | WalleyAdapter | class | ProviderAdapter implementation — register with DiscoveryRegistry | | WalleyAdapterConfig | type | { host?: string } — defaults to https://walley.cc | | WalleyProvider | class | The underlying Provider<DappRpcTypes> — rarely used directly | | ConnectResult | type | Session data: partyId, partyHint, publicKeyFingerprint, publicKeyBase64, networkId |

Notes

  • All interactions go through a popup window. Dapps should call adapter methods in response to a user gesture so the popup is not blocked by the browser.
  • Sessions are persisted to localStorage and restored automatically on the next page load, until the dapp calls disconnect().

License

Apache 2.0