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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@paraport/sdk

v0.1.14

Published

ParaPort Embedded UI

Downloads

205

Readme

@paraport/sdk

UI layer for seamless integration of ParaPort cross-chain teleportation functionality.

Installation

pnpm add @paraport/sdk polkadot-api

Install Peer Dependencies

ParaPort SDK requires polkadot-api in your application. Install it as a peer dependency:

# Required peer dependency
pnpm add polkadot-api

Build

  • Prerequisites: build @paraport/static, @paraport/core, and @paraport/vue first
  • From repo root:
    • pnpm --filter @paraport/static build
    • pnpm --filter @paraport/core build
    • pnpm --filter @paraport/vue build
    • pnpm --filter @paraport/sdk build

Topological order across packages:

  • @paraport/static@paraport/core@paraport/vue@paraport/sdk@paraport/react

See TESTING.md for end-to-end build and test flow.

Component Usage

Basic Integration

import '@paraport/sdk/style'
import * as paraport from '@paraport/sdk'
import { connectInjectedExtension } from 'polkadot-api/pjs-signer'

const main = async () => {
  // Required signer (polkadot-api compatible)
  const getSigner = async () => {
    const ext = await connectInjectedExtension('talisman', 'Your App')
    const account = ext.getAccounts()[0]
    return account.polkadotSigner
  }

  paraport.init({
    integratedTargetId: 'root',
    address: USER_ADDRESS,
    amount: '10000000000', // 1 DOT
    chain: 'AssetHubPolkadot',
    asset: 'DOT',
    getSigner,
    label: 'Mint',
    logLevel: 'DEBUG',
    onReady: (session) => {
      console.log('🚀 ParaPort ready!', session)
    },
    onSubmit: ({ autoteleport, completed }) => {
      console.log('📦 Submit button pressed')
      console.log('💥 Autoteleport: ', autoteleport)
      console.log('✅ Completed: ', completed)
    },
    onCompleted: () => {
      console.log('✅ Auto-teleport successfully completed!')
    },
    onAddFunds: () => {
      console.log('💰 Add funds button pressed')
    },
  })
}

main()

With custom endpoints (optional)

import '@paraport/sdk/style'
import * as paraport from '@paraport/sdk'
paraport.init({
  integratedTargetId: 'root',
  address: USER_ADDRESS,
  amount: '10000000000',
  chain: 'AssetHubPolkadot',
  asset: 'DOT',
  endpoints: {
    AssetHubPolkadot: ['wss://statemint.api.onfinality.io/public-ws'],
    Polkadot: ['wss://polkadot-rpc.publicnode.com']
  },
})

Theming

You can customize the UI via CSS variables or per instance:

  • Global: override tokens under .paraport in your app stylesheet using cascade layers.
  • Per instance: pass appearance (map of CSS variables) and themeMode to init.
paraport.init({
  integratedTargetId: 'root',
  // ...required params
  appearance: { '--radius': '12px', '--accent-blue': '#4f46e5' },
  themeMode: 'auto', // 'light' | 'dark' | 'auto'
})

Props Documentation

MountOptions

| Property | Type | Description | |----------|------|-------------| | integratedTargetId | string | DOM element ID for component mounting | | address | string | User's address | | amount | string | Amount to be teleported | | chain | string | Chain to be teleported to | | chains | string[] | Optional list of allowed chains to scope routing/UX | | asset | string | Asset to be teleported | | endpoints | Record<string, string[]> | Optional RPC endpoints per chain to override defaults | | getSigner | () => Promise | Required function returning a polkadot-api signer | | label | string | Button display text | | logLevel | string | Log level for debugging (e.g., 'DEBUG') | | onSubmit | Function | Callback on form submission with { autoteleport, completed } parameters | | onCompleted | Function | Callback on successful teleport | | onReady | Function | Callback when UI is ready for interaction | | onAddFunds | Function | Callback when user clicks to add funds |

License

MIT