@1sat/connect SDK Development

Guide the design and implementation of the @1sat/connect popup-based wallet SDK.

5|1|Updated Dec 15, 2025
One-click install
npx skills add https://github.com/b-open-io/1sat-sdk --skill 1sat-connect-sdk-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: @1sat/connect SDK Development
Source: https://github.com/b-open-io/1sat-sdk/tree/main/.claude/skills/1sat-connect-sdk
Command: npx skills add https://github.com/b-open-io/1sat-sdk --skill 1sat-connect-sdk-development

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides a comprehensive guide for developing the @1sat/connect popup-based wallet SDK, enabling dApps to communicate with the 1Sat Wallet.

Core Features & Use Cases

  • Architectural guidance for the @1sat/connect package, including core modules, messaging, and transport layers.
  • Best-practice patterns for building, testing, and publishing the wallet SDK, with examples for API surface, error handling, and security considerations.
  • Use Case: When building a new feature or updating the SDK, follow this guide to ensure consistent design and robust integration with wallet popups.

Quick Start

Clone the repository and run the local development workflow to start building the @1sat/connect SDK.

Frequently Asked Questions about @1sat/connect SDK Development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a popup-based wallet SDK for dApp integration?

To build a popup-based wallet SDK, establish a messaging protocol and transport layer enabling dApps to communicate securely with wallet popups. This involves defining the API surface, handling errors, and structuring core modules like provider.ts for consistent message passing.

How does the wallet SDK popup protocol work for dApp communication?

The popup protocol works by establishing a secure transport layer between the dApp and the wallet, exchanging structured messages to request and approve transactions. It relies on a defined API surface and standardized error handling managed by modules like messages.ts.

What is the best way to structure a TypeScript wallet SDK project?

The best way to structure a TypeScript wallet SDK is to separate concerns into key modules like provider.ts for the API surface, messages.ts for protocol definitions, and errors.ts for error handling. Following strict coding conventions ensures maintainability when extending with new methods.

Can I use TypeScript to extend the wallet SDK with new methods and features?

Yes, you can extend the TypeScript wallet SDK with new methods by updating the core modules and following established architectural patterns. The guide provides conventions for adding features, updating the API surface, and maintaining robust integration with wallet popups.

How do I handle errors in a popup-based wallet SDK?

Handle errors in a popup-based wallet SDK by centralizing error definitions in dedicated modules like errors.ts and standardizing error messaging across the transport layer. This ensures the dApp receives clear, actionable feedback when popup communication or transaction approvals fail.

Why does my dApp wallet popup transport layer lose messages during dApp integration?

Messages are lost in the wallet popup transport layer when the messaging protocol lacks proper handshake or event handling logic. Debugging requires verifying structured messages in modules like provider.ts and ensuring the popup window lifecycle is correctly managed by the SDK.