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

@openfort/openfort-node

v0.10.1

Published

Openfort Node SDK

Readme

Openfort

npm version npm downloads Follow @openfort_hq MIT License

Table of Contents

Overview

The Openfort Node.js SDK provides convenient access to the Openfort API for server-side applications. It enables developers to:

  • Create and manage EVM and Solana backend wallets
  • Sign messages, typed data, and transactions
  • Execute gasless transactions with gas sponsorship policies
  • Manage users, accounts, and transaction intents
  • Integrate with smart contracts and token swaps

Installation

Requires Node.js 18 or higher.

npm install @openfort/openfort-node
yarn add @openfort/openfort-node
pnpm add @openfort/openfort-node

Quickstart

Get your API key from the Openfort Dashboard.

import Openfort from "@openfort/openfort-node";

const openfort = new Openfort("sk_test_...", {
  walletSecret: "your-wallet-secret", // Required for signing operations
});

// Create an EVM backend account
const account = await openfort.accounts.evm.backend.create();
console.log("Account address:", account.address);

// Sign a message (methods are on the account object)
const signature = await account.signMessage({
  message: "Hello, Openfort!",
});
console.log("Signature:", signature);

Features

Wallet Management

Create and manage wallets across EVM chains and Solana:

// EVM backend accounts
const evmAccount = await openfort.accounts.evm.backend.create();

// Solana backend accounts
const solanaAccount = await openfort.accounts.solana.backend.create();

// Import existing wallet
const imported = await openfort.accounts.evm.backend.import({
  privateKey: "0x...",
});

Signing

Sign messages, typed data, and transactions. Methods are called directly on the account object:

// Sign message
const signature = await account.signMessage({
  message: "Hello, Openfort!",
});

// Sign EIP-712 typed data
const typedSig = await account.signTypedData({
  domain: { name: "MyApp", version: "1", chainId: 1 },
  types: {
    Person: [
      { name: "name", type: "string" },
      { name: "wallet", type: "address" },
    ],
  },
  primaryType: "Person",
  message: { name: "Alice", wallet: "0x..." },
});

Gas Sponsorship

Sponsor gas fees for your users. Create a policy with criteria-based rules, then link it to a fee sponsorship:

// 1. Create a policy that accepts transactions on Polygon
const policy = await openfort.policies.create({
  scope: "project",
  rules: [
    {
      action: "accept",
      operation: "sponsorEvmTransaction",
      criteria: [
        { type: "evmNetwork", operator: "in", chainIds: [137] },
      ],
    },
  ],
});

// 2. Create a fee sponsorship linked to that policy
const sponsorship = await openfort.feeSponsorship.create({
  name: "Free gas for users",
  strategy: { sponsorSchema: "pay_for_user" },
  policyId: policy.id,
});

IAM & Authentication

Manage users and verify sessions:

// List authenticated users
const users = await openfort.iam.users.list({ limit: 10 });

// Verify session from access token
const session = await openfort.iam.getSession({ accessToken });
console.log("User ID:", session.user.id);
console.log("Session expires:", session.session.expiresAt);

Examples

The SDK includes comprehensive examples for all features. See the examples directory for runnable code.

| Category | Examples | | ---------------- | -------------------------------------------------- | | EVM Wallets | Create, import, export, sign messages/transactions | | Solana Wallets | Create, import, export, sign messages/transactions | | Policies | Criteria-based rules for EVM and Solana operations | | Fee Sponsorship | Create, update, enable/disable gas sponsorship | | Transactions | Create intents, estimate gas | | IAM | User management, session verification |

Run examples:

cd examples
cp .env.example .env
# Edit .env with your API key
pnpm example evm/accounts/createAccount.ts

Documentation

Support

New features and bug fixes are released on the latest major version. We recommend upgrading to the latest version for security updates and new functionality.

License

This project is licensed under the MIT License.