UNPKG

@gear-js/api

Version:

A JavaScript library that provides functionality to connect GEAR Component APIs.

51 lines (50 loc) 1.58 kB
import type { Bool, Bytes, Option, Struct, Text, u32 } from '@polkadot/types'; import type { H256 } from '@polkadot/types/interfaces'; import type { HexString } from '../../common'; export declare class PayloadFilter { readonly offset: number; readonly pattern: Uint8Array; constructor(pattern: HexString | Uint8Array, offset?: number); toJSON(): { pattern: number[]; offset: number; }; } export interface UserMessageSentSubscriptionFilter { source?: HexString; destination?: HexString; payloadFilters?: PayloadFilter[]; fromBlock?: number | bigint; finalizedOnly?: boolean; } export interface UserMessageSentSubscriptionItem { readonly id: HexString; readonly block: HexString; readonly index: number; readonly source: HexString; readonly destination: HexString; readonly payload: HexString; readonly value: bigint; reply?: UserMessageSentSubscriptionReplyDetails; } export interface UserMessageSentSubscriptionReplyDetails { readonly to: HexString; readonly code: HexString; readonly codeDescription: string; } export interface UserMessageReplyJson extends Struct { readonly to: H256; readonly code: Bytes; readonly codeDescription: Text; } export interface UserMessageSentSubItem extends Struct { readonly block: H256; readonly index: u32; readonly id: H256; readonly source: H256; readonly destination: H256; readonly payload: Bytes; readonly value: Text; readonly reply?: Option<UserMessageReplyJson>; readonly ack: Option<Bool>; }