SDK

TypeScript SDK

The SDK currently focuses on Session Pay typed data, hashing, and session signatures.

3 sectionssdk
01

Install

npm install @1doapp/sdk
02

Current exports

  • sessionPayDomain
  • structHashSessionGrant / structHashSettlementAuthorization
  • hashSessionGrant / hashSettlementAuthorization
  • signSettlementAuthorization
  • SESSIONPAY_TYPES and related TypeScript types
import { OneDoSessionPay } from "@1doapp/sdk";

const sessionId = OneDoSessionPay.structHashSessionGrant(grant);
const digest = OneDoSessionPay.hashSessionGrant(grant, chainId, wallet);
const signature = await OneDoSessionPay.signSettlementAuthorization(
  authorization, sessionKeyPrivateKey, chainId, wallet
);
03

Scope

Do not assume legacy SDK APIs still exist

The current public entry only exports the SDK namespace OneDoSessionPay for Session Pay. Predicted wallet addresses, AccountFactory, and Paymaster APIs are not part of the current SDK.