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.

29 lines (28 loc) 4.5 kB
import { Address, Hex, WalletClient } from 'viem'; import { MessageSigner, AccountID, RequestID, Timestamp, AuthRequestParams, PartialEIP712AuthMessage, EIP712AuthDomain, AuthChallengeResponse, GetLedgerTransactionsFilters, RPCChannelStatus } from './types'; import { CloseAppSessionRequestParams, CreateAppSessionRequestParams, SubmitAppStateRequestParams, ResizeChannelRequestParams, TransferRequestParams, CreateChannelRequestParams } from './types/request'; export declare function createAuthRequestMessage(params: AuthRequestParams, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createAuthVerifyMessageFromChallenge(signer: MessageSigner, challenge: string, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createAuthVerifyMessage(signer: MessageSigner, challenge: AuthChallengeResponse, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createAuthVerifyMessageWithJWT(jwtToken: string, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createPingMessage(signer: MessageSigner, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetConfigMessage(signer: MessageSigner, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetUserTagMessage(signer: MessageSigner, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetLedgerBalancesMessage(signer: MessageSigner, participant: Address, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetLedgerEntriesMessage(signer: MessageSigner, accountId: string, asset?: string, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetLedgerTransactionsMessage(signer: MessageSigner, accountId: string, filters?: GetLedgerTransactionsFilters, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetAppDefinitionMessage(signer: MessageSigner, appSessionId: AccountID, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetAppSessionsMessage(signer: MessageSigner, participant: Address, status?: RPCChannelStatus, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createAppSessionMessage(signer: MessageSigner, params: CreateAppSessionRequestParams, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createSubmitAppStateMessage(signer: MessageSigner, params: SubmitAppStateRequestParams, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createCloseAppSessionMessage(signer: MessageSigner, params: CloseAppSessionRequestParams, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createApplicationMessage(signer: MessageSigner, appSessionId: Hex, messageParams: any, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createCreateChannelMessage(signer: MessageSigner, params: CreateChannelRequestParams, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createCloseChannelMessage(signer: MessageSigner, channelId: AccountID, fundDestination: Address, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createResizeChannelMessage(signer: MessageSigner, params: ResizeChannelRequestParams, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetChannelsMessage(signer: MessageSigner, participant?: Address, status?: RPCChannelStatus, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetRPCHistoryMessage(signer: MessageSigner, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createGetAssetsMessage(signer: MessageSigner, chainId?: number, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createTransferMessage(signer: MessageSigner, params: TransferRequestParams, requestId?: RequestID, timestamp?: Timestamp): Promise<string>; export declare function createEIP712AuthMessageSigner(walletClient: WalletClient, partialMessage: PartialEIP712AuthMessage, domain: EIP712AuthDomain): MessageSigner; export declare function createECDSAMessageSigner(privateKey: Hex): MessageSigner;