@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.
8 lines (7 loc) • 623 B
TypeScript
import { Address, Hex } from 'viem';
import { UnsignedState, State, StateHash, Signature, ChannelId } from '../client/types';
export declare function getPackedState(channelId: ChannelId, state: UnsignedState): Hex;
export declare function getStateHash(channelId: ChannelId, state: UnsignedState): StateHash;
export declare function getPackedChallengeState(channelId: ChannelId, state: State): Hex;
export declare function getChallengeHash(channelId: ChannelId, state: State): Hex;
export declare function verifySignature(channelId: ChannelId, state: State, signature: Signature, expectedSigner: Address): Promise<boolean>;