UNPKG

@opendatalabs/vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts.

31 lines (30 loc) 1.35 kB
/** * Optional first-party Account integration for PS Lite owner binding. * * The protocol helper lives in `protocol/personal-server-lite-owner-binding`. * This module adapts any Account-style client exposing `getAddress` and * `signMessage` to the SDK owner-binding signature shape. * * @category Account */ import type { Address, Hex } from "viem"; import { buildPersonalServerLiteOwnerBindingMessage, type PersonalServerLiteOwnerBindingSignature } from "../protocol/personal-server-lite-owner-binding"; export interface AccountPersonalServerLiteOwnerBindingClient { getAddress(): Promise<Address | null> | Address | null; signMessage(input: { message: ReturnType<typeof buildPersonalServerLiteOwnerBindingMessage>; }): Promise<Hex> | Hex; } export interface SignPersonalServerLiteOwnerBindingWithAccountClientConfig { client: AccountPersonalServerLiteOwnerBindingClient; } export declare class AccountPersonalServerLiteOwnerBindingError extends Error { code?: number | string; details?: unknown; constructor(input: { message: string; code?: number | string; details?: unknown; }); } export declare function signPersonalServerLiteOwnerBindingWithAccountClient(config: SignPersonalServerLiteOwnerBindingWithAccountClientConfig): Promise<PersonalServerLiteOwnerBindingSignature>;