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

@talonfi/wallet-okx

v0.8.0

Published

Official OKX Agentic Wallet plugin for Talon

Readme

@talonfi/wallet-okx

Talon 官方 OKX Agentic Wallet 插件,当前支持 Solana 主网。插件直接实现 OKX 官方 OnchainOS CLI 使用的浏览器登录、会话刷新、TEE 授权和广播协议,不启动或依赖 onchainos 进程,也不读取本地 Solana 私钥。

插件拥有 OKX DEX 路由、Agentic Wallet 授权与广播、Solana 确认和钱包快照。 workspace 必须明确配置完整 Solana 地址;启动时插件会在登录账户中查找唯一匹配项, 不会使用“当前钱包”或账户列表中的第一个钱包。

登录

插件直接复用 OnchainOS 官方工具的登录状态:~/.onchainos/session.json、 ~/.onchainos/wallets.json,以及系统凭据库中 service 为 onchainos、account 为 agentic-wallet 的条目。Linux 下同时兼容官方的 ~/.onchainos/keyring.enc 回退文件。 已登录 OnchainOS 的用户不需要再次授权。

未登录时,可以先用官方工具登录,也可以用插件导出的 beginAgenticWalletLogin(); 后者生成浏览器登录地址并按相同格式写入官方存储位置。

import { beginAgenticWalletLogin } from "@talonfi/wallet-okx";

const login = beginAgenticWalletLogin({});
console.log(login.loginUrl);
await login.complete();

用户需要在 loginUrl 中完成 OKX 登录。访问令牌和会话授权密钥进入官方凭据库, 会话证书和公开账户元数据进入官方 OnchainOS 目录。交易钱包私钥仍由 OKX TEE 管理。

Workspace 配置

{
  "package": "@talonfi/wallet-okx",
  "version": "0.7.0",
  "export": "walletPlugin",
  "config": {
    "id": "primary",
    "address": "完整的 Solana 钱包地址",
    "rpcUrlEnv": "SOLANA_RPC_URL",
    "confirmation": "finalized",
    "slippageBps": 50
  }
}

workspace 不配置凭据路径或账户 ID;address 是唯一的钱包选择依据。Solana RPC URL 从 rpcUrlEnv 指定的环境变量读取。插件状态会持久化操作请求、阶段、报价身份和链上引用, 不会保存访问令牌、会话证书或会话签名。

对于买入,amountIn 是包含网络费用的 SOL 最大总支出。插件在授权前计算交易费并按需 缩小实际换币金额;提供 principalBaseUnits 时则固定该换币本金,只验证本金与费用合计不超过 amountIn,不会花掉剩余费用预算。相同 operationId 只会广播一次;广播响应无法确认时操作进入 manual,重启后也不会自动重播。

插件声明 wallet.execution-constraints。deadlineAtMs 和 maxPriceImpactBps 随 operation 持久化,并在 TEE 授权前后及广播前再次校验;价格影响直接使用 OKX 路由返回的 priceImpactPercent,不由策略临时回调批准。

插件同时声明 wallet.abort。策略可按 operationId 尝试撤销报价或授权中的 operation; 撤销结果会持久化,且只有 aborted 表示交易未广播。operation 进入 dispatch 栅栏后返回 too-late,不会把可能已经广播的交易误报为已撤销。返回 aborted 时,同一 operation 的 trade() 会立即以 aborted 终态结算;插件同时向进行中的报价或 TEE 授权传递取消信号, 不等待失去作用的供应商请求结束。