import { Base64String, HexString, Nillable, NonNil } from '../utils/types'; import { BytesEncodingStatus, PayloadBytesTypes, PayloadType } from './enums'; import { UnencodedActionPayload } from './payload'; import { AnySignatureType } from './signature'; /** * `MsgReceipt` is the interface for a payload structure for a response from the Kwil `call` GRPC endpoint {@link https://github.com/kwilteam/proto/blob/main/kwil/tx/v1/call.proto}. */ export interface MsgReceipt { get result(): Nillable; } /** * `MsgData` is the interface for a payload structure for a request to the Kwil `call` GRPC endpoint {@link https://github.com/kwilteam/proto/blob/main/kwil/tx/v1/call.proto}. */ export interface MsgData { body: MsgBody; auth_type: AnySignatureType; sender: Nillable; signature: Nillable; } interface MsgBody { payload: Nillable>; challenge?: Nillable; } /** * `Message` is the payload structure for a request to the Kwil `call` GRPC endpoint {@link https://github.com/kwilteam/proto/blob/main/kwil/tx/v1/call.proto}. * * All bytes in the payload are base64 encoded. */ export type Message = BaseMessage; export interface CallClientResponse { status: number; data?: T; authCode?: number; } /** * `BaseMessage` is the bass class for the payload structure for a request to the Kwil `call` GRPC endpoint {@link https://github.com/kwilteam/proto/blob/main/kwil/tx/v1/call.proto}. * * Bytes in the message can be typed to be either base64 encoded or Uint8Array. Uint8Array should be used when building the message within the SDK, and base64 should be used for the final message to be send over GRPC. * * @template {BytesEncodingStatus.BASE64_ENCODED | BytesEncodingStatus.UINT8_ENCODED} T - The type of bytes in the message. Can be either base64 encoded or Uint8Array. * @implements {MsgData} - The message data interface. */ export declare class BaseMessage implements MsgData { private data; constructor(data?: NonNil>); get body(): Readonly>; get auth_type(): AnySignatureType; get sender(): Nillable; get signature(): Nillable; } export declare namespace Msg { /** * Creates a new instance of the `BaseMessage` class. * * Bytes in the message can be typed to be either base64 encoded or Uint8Array. Uint8Array should be used when building the message within the SDK, and base64 should be used for the final message to be send over GRPC. * * @template {BytesEncodingStatus.BASE64_ENCODED | BytesEncodingStatus.UINT8_ENCODED} T - The type of bytes in the message. Can be either base64 encoded or Uint8Array. * @param {(msg: MsgData) => void} configure - A callback function that takes in a `MsgData` object and sets fields on it. * @returns {BaseMessage} - A new instance of the `BaseMessage` class. */ function create(configure: (msg: MsgData) => void): NonNil>; /** * Copies an existing instance of the `BaseMessage` class and modifies certain fields. * * Bytes in the message can be typed to be either base64 encoded or Uint8Array. Uint8Array should be used when building the message within the SDK, and base64 should be used for the final message to be send over GRPC. * * @template {BytesEncodingStatus.BASE64_ENCODED | BytesEncodingStatus.UINT8_ENCODED} T - The type of bytes in the message. Can be either base64 encoded or Uint8Array. * @param {BaseMessage} source - The source message to copy from. It can be using either base64 or Uint8Array bytes. * @param {(msg: MsgData) => void} configure - A callback function that takes in a `MsgData` object and sets fields on it. * @returns {BaseMessage} - A new instance of the `BaseMessage` class. */ function copy(source: NonNil>, configure: (msg: MsgData) => void): NonNil>; } export {};