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

@synfin/wallet-partylayer

v0.1.7

Published

The reference Synfin WalletAdapter for PartyLayer-connected Canton wallets. Drop it into @synfin/client's executePlan so a swap executes in about five lines, non-custodially, from the user's own wallet.

Readme

@synfin/wallet-partylayer

The reference Synfin WalletAdapter for a PartyLayer-connected Canton wallet. Build it once and hand it to @synfin/client's executePlan, and a swap executes non-custodially from the user's own wallet in about five lines. Synfin holds no keys.

This wraps the same non-custodial adapter the Synfin Launch App runs and proved on mainnet, so there is no new execution logic here, only the PartyLayer wiring.

  • Docs: https://synfin.xyz/docs/support-matrix
  • Status: v0, pin an exact version.

Hosted wallets: no PartyLayer needed

If YOU are the wallet (the user is already inside; you hold the party and sign natively), skip the connector entirely: this package also exports the underlying CIP-0103 adapter, and @partylayer/sdk is an OPTIONAL peer you do not install on this path.

import {
  createCip0103WalletAdapter,
  MAINNET_REGISTRY_BASE_URL,
  type Cip0103Signer,
} from '@synfin/wallet-partylayer';

const signer: Cip0103Signer = {
  party: userParty, // yours already; nothing connects
  async signAndSubmit(tx) {
    // sign tx (exercise + disclosedContracts + actAs) with your own key
    // machinery and submit through your participant
    return { updateId: await myWallet.signAndExecute(tx) };
  },
};

const wallet = createCip0103WalletAdapter({
  ledger: { baseUrl: myParticipantJsonApi, token: myLedgerToken },
  registry: { baseUrl: MAINNET_REGISTRY_BASE_URL, token: '' },
  signer,
  instrumentAdmin,
});
// then executePlan({ plan, wallet }) from @synfin/client, unchanged

Guide: https://synfin.xyz/docs/hosted-wallets. Strict TypeScript setups (skipLibCheck off) can import from @synfin/wallet-partylayer/cip0103, a self-contained subpath whose types never reference the SDK.

Install

npm install @synfin/wallet-partylayer @synfin/client @partylayer/sdk

@synfin/client and @partylayer/sdk are peer dependencies (you already use both). This package bundles the rest and has no other runtime dependency.

Use

import { createClient, executePlan, track, isPartnerTerminal } from '@synfin/client';
import { createPartyLayerWalletAdapter } from '@synfin/wallet-partylayer';

// You already have a connected PartyLayer client (partyLayerClient) and a plan
// from synfin.createPlan(...). Wallet in, adapter out:
const wallet = createPartyLayerWalletAdapter(partyLayerClient, {
  party: 'yourparty::1220...', // the connected taker party
});

const handle = await executePlan(plan, { wallet });
let state = await track(handle, { wallet });
while (!isPartnerTerminal(state.status)) {
  await new Promise((r) => setTimeout(r, 3000));
  state = await track(handle, { wallet });
}
console.log('final:', state.status, state.payoutAmount);

That is the whole execute path: no CIP-56 transfer construction, no ledger reads, no Canton-specific code in your app, and no network identifiers to paste. The registry base defaults to Synfin's public mainnet proxy, and the deposit instrument's registrar admin is read from your wallet's own holdings (the same way the Launch App resolves it), so nothing that can change out from under you is hardcoded in your code.

Options

Only party is required. For devnet or a private registry, override the network:

createPartyLayerWalletAdapter(pl, {
  party: 'yourparty::1220...',
  network: 'devnet',                     // anything but mainnet needs a base
  registryBaseUrl: 'https://your-devnet-scan-proxy',
});

What it does

createPartyLayerWalletAdapter returns a @synfin/client WalletAdapter:

  • sendDeposit builds and submits the venue deposit as a CIP-56 token-standard transfer offer, signed by the user's wallet.
  • withdrawDeposit / depositActive manage the offer's lifecycle.
  • observePayout reads the taker's own holdings through the wallet's participant (never a third-party explorer).
  • lockFeeEscrow is a retired no-op (the escrow was retired for the CIP-0112 batch; see the docs).

Known limitation (stated, not hidden)

observePayout reports the taker's current balance of the instrument, not the amount received strictly since a timestamp. A holding that merges on payout re-creates the whole balance, so the reported figure can be the balance, not the delta. For terminal detection (did a nonzero payout arrive after the deposit) this is sufficient; for exact received-since accounting, track the delta yourself against a pre-swap snapshot. A precise received-since read is a planned hardening.

Non-custodial

Every write is signed by the user's wallet through the PartyLayer bridge; every read uses the wallet's own participant view. Synfin holds no keys and drives no ledger.

License

MIT. Copyright Cayvox Labs.