UNPKG

@erc7824/nitrolite

Version:

The Nitrolite SDK empowers developers to build high-performance, scalable web3 applications using state channels. It's designed to provide near-instant transactions and significantly improved user experiences by minimizing direct blockchain interactions.

17 lines (16 loc) 636 B
import { Address, Hex } from 'viem'; import { State, StateHash, Signature, ChannelId } from '../client/types'; export declare function getStateHash(channelId: ChannelId, state: State): StateHash; type SignMessageFn = (args: { message: { raw: Hex; }; }) => Promise<Hex>; export declare function signState(stateHash: StateHash, signMessage: SignMessageFn): Promise<{ r: Hex; s: Hex; v: number; }>; export declare function removeQuotesFromRS(input: Signature): Signature; export declare function verifySignature(stateHash: StateHash, signature: Signature, expectedSigner: Address): Promise<boolean>; export {};