import { PolkadotClient } from "polkadot-api"; import TransactionQueue from "./transactionQueue"; import { TransactionResult } from "./types"; export interface RemarkOptions { remark: string; } export default class System { private readonly clientFactory; private readonly transactionQueue?; constructor(clientFactory: () => Promise, transactionQueue?: TransactionQueue | undefined); private getClient; /** * Make a remark with event (WAITS FOR INCLUSION) * Returns when transaction is included in block * * @param sessionSigner - Optional session signer for faster transactions * @param options - Remark options including the remark string * @returns Promise with transaction result including hash * * @example * const result = await system.makeRemarkAsync(auth.sessionSigner, { * remark: "Hello, World!" * }); * console.log("Transaction included:", result.hash); */ makeRemarkAsync(sessionSigner: any | null, options: RemarkOptions): Promise; /** * Make a simple remark (WAITS FOR INCLUSION) * Returns when transaction is included in block * * @param sessionSigner - Optional session signer for faster transactions * @param options - Remark options including the remark string * @returns Promise with transaction result including hash * * @example * const result = await system.makeSimpleRemarkAsync(auth.sessionSigner, { * remark: "Hello, World!" * }); * console.log("Transaction included:", result.hash); */ makeSimpleRemarkAsync(sessionSigner: any | null, options: RemarkOptions): Promise; /** * Creates an unsigned remark extrinsic for batch operations * * @param options - Remark options including the remark string * @returns Promise with the unsigned extrinsic * * @example * const remarkExtrinsic = await system.createRemarkExtrinsic({ * remark: "Hello, World!" * }); */ createRemarkExtrinsic(options: RemarkOptions): Promise; /** * Creates an unsigned simple remark extrinsic for batch operations * * @param options - Remark options including the remark string * @returns Promise with the unsigned extrinsic * * @example * const remarkExtrinsic = await system.createSimpleRemarkExtrinsic({ * remark: "Hello, World!" * }); */ createSimpleRemarkExtrinsic(options: RemarkOptions): Promise; }