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

@canton-network/core-provider-dapp

v1.12.2

Published

CIP-0103 provider for web dApps, covering both Sync and Async APIs.

Downloads

297,115

Readme

@canton-network/core-provider-dapp

CIP-103 Provider implementations for Canton dApps. Extends @canton-network/core-splice-provider with wallet-mediated access to the dApp API (and proxied ledger calls).

Most applications should use @canton-network/dapp-sdk, which picks and wraps these providers. Use this package directly when building lower-level integrations or custom discovery / transport wiring.

Published on npm under Apache-2.0.

Install

npm install @canton-network/core-provider-dapp

Providers

| Class | API | Typical wallet | Transport | | ------------------- | ------------- | --------------------------- | --------------------------------- | | DappSyncProvider | CIP-103 Sync | Browser extension / desktop | postMessage (WindowTransport) | | DappAsyncProvider | CIP-103 Async | Remote / custody gateway | HTTPS RPC + SSE |

flowchart LR
    dApp["dApp / dApp SDK"] --> Sync["DappSyncProvider"]
    dApp --> Async["DappAsyncProvider"]
    Sync -->|"postMessage"| Ext["Extension / desktop wallet"]
    Async -->|"HTTPS + SSE"| Gw["Remote wallet gateway"]
    Ext --> LAPI["JSON Ledger API"]
    Gw --> LAPI

Both implement the same Provider surface (request, on, emit, removeListener). Method and event types come from the generated OpenRPC clients (@canton-network/core-wallet-dapp-rpc-client and @canton-network/core-wallet-dapp-remote-rpc-client).

Sync vs Async

Sync — user interaction is in-process (popup / extension). Methods return results directly.

Async — user interaction cannot block. Methods that need approval return a userUrl (or similar) for the user to complete the action; the outcome arrives later as an event (for example connected, txChanged, messageSignature).

| | Sync | Async | | ---------------- | -------------------------------------------- | ------------------------------------------------ | | Connect | Returns session when ready | May return userUrl; connected after login | | prepareExecute | Completes in the request | Returns userUrl; progress via txChanged | | signMessage | Returns signature | Pending / signed / failed via messageSignature | | Events | Wallet notifications on the window transport | Shared SSE stream from the gateway |

Usage

DappSyncProvider

Defaults to a WindowTransport bound to window. Pass a custom RpcTransport when testing or bridging a non-browser host.

import { DappSyncProvider } from '@canton-network/core-provider-dapp'

const provider = new DappSyncProvider()

provider.on('statusChanged', (status) => {
    console.log('connected:', status.connection.isConnected)
})

const { isConnected } = await provider.request({ method: 'isConnected' })
if (!isConnected) {
    await provider.request({ method: 'connect' })
}

const accounts = await provider.request({ method: 'listAccounts' })

DappAsyncProvider

Point at the remote gateway base URL. An optional session token opens the SSE event stream immediately; after IDP auth in a popup, the provider updates the token and reconnects SSE.

import { DappAsyncProvider } from '@canton-network/core-provider-dapp'

const provider = new DappAsyncProvider('https://wallet-gateway.example.com')

provider.on('connected', (status) => {
    console.log('session ready', status)
})

provider.on('txChanged', (tx) => {
    if (tx.status === 'executed') console.log(tx.payload.updateId)
})

const connect = await provider.request({ method: 'connect' })
// If not already authenticated, open connect.userUrl for the user to log in.

Events

Subscribe with provider.on / provider.removeListener. Payloads follow CIP-103 / the OpenRPC event schemas.

| Event | Sync | Async | When | | ------------------ | ---- | ----- | ---------------------------------------- | | statusChanged | yes | yes | Connection / session changes | | accountsChanged | yes | yes | Parties added/removed or primary changes | | txChanged | yes | yes | prepareExecute lifecycle | | connected | — | yes | Login completed after async connect | | messageSignature | — | yes | Async signMessage lifecycle |

DappSyncProvider bridges wallet-pushed notifications from WindowTransport into the provider listener map. DappAsyncProvider multiplexes a shared EventSource across instances for the same gateway URL + token.

window.canton

This package augments Window with an optional injected provider:

window.canton?: Provider<DappLedgerRpc>

DappLedgerRpc is the Sync dApp RPC map combined with Ledger ledgerApi operation types, matching a full browser wallet injection that can both speak CIP-103 and proxy ledger calls.

Related

| Package | Role | | ------------------------------------------------------------ | ----------------------------------------- | | @canton-network/core-splice-provider | Provider interface and AbstractProvider | | @canton-network/core-provider-ledger | Direct JSON LAPI provider (no wallet) | | @canton-network/core-rpc-transport | WindowTransport, HttpTransport, … | | @canton-network/dapp-sdk | High-level SDK on top of these providers |

Specs