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

@realiotech/client-signer

v1.2.0

Published

Realio SDK for client side cross chain message signing

Readme

Client Signer SDK

A client side cross-chain message signing SDK for Realio, supporting multiple blockchain protocols.

Installation

npm install @realiotech/client-signer

Development

Branching Strategy

This project uses a simple branching strategy:

  • main is the only permanent branch
  • All development happens through pull requests to main
  • No staging branch is used
  • Feature branches should be created from main

Development Workflow

  1. Create a feature branch from main:

    git checkout main
    git pull origin main
    git checkout -b feature/your-feature-name
  2. Make your changes and commit them:

    git add .
    git commit -m "feat: your feature description"
  3. Push your branch and create a PR:

    git push origin feature/your-feature-name

    Then create a pull request to merge into main.

  4. After review and approval, your PR will be merged to main

Development Commands

# Install dependencies
npm install

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Build
npm run build

# Build for development (with sourcemaps)
npm run build:dev

# Lint code
npm run lint

# Fix linting issues
npm run lint:fix

# Format code
npm run format

Usage

import { createSigner, PROTOCOL_NAMES } from 'client-signer';

const signer = createSigner({
  protocol: PROTOCOL_NAMES.BITCOIN,
  mnemonic: 'your mnemonic here',
  options: { mainnet: true },
});

const result = await signer.signTransaction(unsignedTx);

Supported Protocols

  • Bitcoin
  • EVM
  • Tendermint
  • Stellar
  • Algorand
  • Solana

API Integration

This SDK is tightly coupled with Realio's core transaction API. Currently it supports signing transactions from the send-token/unsigned API. All other APIs or data formats are not tested and not guaranteed to work.

Supported APIs

Input Data Format

The SDK expects transaction data to be in the format provided by Realio's core transaction API. This means:

  1. The input transaction data must be obtained by calling the core API's transaction creation methods
  2. The signer will not validate or modify the transaction structure - it only handles the signing process

API Reference

createSigner

function createSigner<T extends ProtocolOptions>(options: CreateSignerOptions<T>): Signer;

Parameters

  • options: Configuration object containing:
    • protocol: The blockchain protocol to use (from PROTOCOL_NAMES)
    • mnemonic: BIP39 mnemonic phrase
    • options: Protocol-specific options (optional)

Returns

A Signer instance with a signTransaction method.

Signer Interface

interface Signer {
  signTransaction(tx: string): Promise<SignedTx>;
}

Protocol Options

BitcoinOptions

interface BitcoinOptions {
  mainnet: boolean; // true for mainnet, false for testnet
}

StellarOptions

interface StellarOptions {
  mainnet: boolean; // true for mainnet, false for testnet
}

TendermintOptions

interface TendermintOptions {
  chain: Chain;
  sender: Sender;
}

Examples

Bitcoin Transaction Signing

import { createSigner, PROTOCOL_NAMES } from 'client-signer';

const signer = createSigner({
  protocol: PROTOCOL_NAMES.BITCOIN,
  mnemonic: 'your mnemonic here',
  options: { mainnet: false }, // Required: true for mainnet, false for testnet
});

const result = await signer.signTransaction(unsignedPsbtHex);

EVM Transaction Signing

import { createSigner, PROTOCOL_NAMES } from 'client-signer';

const signer = createSigner({
  protocol: PROTOCOL_NAMES.EVM,
  mnemonic: 'your mnemonic here',
});

const result = await signer.signTransaction(unsignedTxHex);

Tendermint Transaction Signing

import { createSigner, PROTOCOL_NAMES } from 'client-signer';

const signer = createSigner({
  protocol: PROTOCOL_NAMES.TENDERMINT,
  mnemonic: 'your mnemonic here',
  options: {
    chain: {
      chainId: 3300,
      cosmosChainId: 'realionetwork_3300-4',
    },
    sender: {
      accountAddress: 'realio...',
      pubkey: 'AzUx...',
      accountNumber: 124,
      sequence: 1,
    },
  },
});

const result = await signer.signTransaction(unsignedTx);

Stellar Transaction Signing

import { createSigner, PROTOCOL_NAMES } from 'client-signer';

const signer = createSigner({
  protocol: PROTOCOL_NAMES.STELLAR,
  mnemonic: 'your mnemonic here',
  options: { mainnet: false }, // Required: true for mainnet, false for testnet
});

const result = await signer.signTransaction(unsignedXdr);

Algorand Transaction Signing

import { createSigner, PROTOCOL_NAMES } from 'client-signer';

const signer = createSigner({
  protocol: PROTOCOL_NAMES.ALGORAND,
  mnemonic: 'your mnemonic here',
});

const result = await signer.signTransaction(unsignedTxBase64);

Solana Transaction Signing

import { createSigner, PROTOCOL_NAMES } from 'client-signer';

const signer = createSigner({
  protocol: PROTOCOL_NAMES.SOLANA,
  mnemonic: 'your mnemonic here',
});

const result = await signer.signTransaction(unsignedTxBase64);

Deployment

Versioning

This package follows Semantic Versioning. The version in package.json should be a semantic version number without the 'v' prefix (e.g., "1.0.0").

Release Process

All changes, including releases, should be made through pull requests to the main branch. Never commit directly to main.

  1. Create a new branch for the release:

    git checkout -b release/1.0.0
  2. Update the version in package.json:

    {
      "version": "1.0.0" // Update this number
    }
  3. Commit the version change:

    git add package.json
    git commit -m "chore: bump version to 1.0.0"
  4. Push the branch and create a PR:

    git push origin release/1.0.0

    Then create a pull request to merge into main.

  5. After the PR is approved and merged to main, create and push a tag (with 'v' prefix):

    git checkout main
    git pull origin main
    git tag v1.0.0
    git push origin v1.0.0

The CI/CD pipeline will automatically:

  • Run tests on the PR
  • Run tests on merge to main
  • When a tag is pushed:
    • Verify the version matches package.json
    • Build the package
    • Publish to npm

Version Format

  • Package version (package.json): 1.0.0 (no 'v' prefix)
  • Git tag: v1.0.0 (with 'v' prefix)
  • CI will ensure they match (ignoring the 'v' prefix)

Tools

  • tsup: TypeScript bundler
  • Vitest: Testing framework
  • ESLint: Code linting
  • Prettier: Code formatting