Skip to main content
Last updated

API Report File for "@kadena/client"

Do not edit this file. It is a report generated by API Extractor.

ts
import { ChainId } from '@kadena/types';import type Client from '@walletconnect/sign-client';import { ICap } from '@kadena/types';import { ICommand } from '@kadena/types';import { ICommandResult } from '@kadena/chainweb-node-client';import type { IExecPayload } from '@kadena/types';import type { ILocalCommandResult } from '@kadena/chainweb-node-client';import type { ILocalOptions } from '@kadena/chainweb-node-client';import { IPollResponse } from '@kadena/chainweb-node-client';import { IPreflightResult } from '@kadena/chainweb-node-client';import { IUnsignedCommand } from '@kadena/types';import type { LocalRequestBody } from '@kadena/chainweb-node-client';import type { LocalResponse } from '@kadena/chainweb-node-client';import type { SessionTypes } from '@walletconnect/types'; // @publicexport const addSignatures: (transaction: IUnsignedCommand, ...signatures: {    sig: string;    pubKey?: string;}[]) => IUnsignedCommand | ICommand; export { ChainId } // @publicexport const createClient: ICreateClient; // @publicexport function createEckoWalletQuicksign(): IEckoSignFunction; // @publicexport function createEckoWalletSign(): IEckoSignSingleFunction; // @publicexport const createSignWithKeypair: ICreateSignWithKeypair; // @publicexport const createTransaction: (pactCommand: Partial<IPactCommand>) => IUnsignedCommand; // @publicexport const createTransactionBuilder: (initial?: Partial<IPactCommand>) => ITransactionBuilder; // @publicexport function createWalletConnectQuicksign(client: Client, session: SessionTypes.Struct, walletConnectChainId: TWalletConnectChainId): ISignFunction; // @publicexport function createWalletConnectSign(client: Client, session: SessionTypes.Struct, walletConnectChainId: TWalletConnectChainId): ISingleSignFunction; // @publicexport const getHostUrl: (hostBaseUrl: string) => ({ networkId, chainId }: INetworkOptions) => string; // @public (undocumented)export interface IBaseClient {    createSpv: (transactionDescriptor: ITransactionDescriptor, targetChainId: ChainId) => Promise<string>;    getStatus: (transactionDescriptors: ITransactionDescriptor[] | ITransactionDescriptor) => Promise<IPollResponse>;    listen: (transactionDescriptor: ITransactionDescriptor) => Promise<ICommandResult>;    local: <T extends ILocalOptions>(transaction: LocalRequestBody, options?: T) => Promise<LocalResponse<T>>;    pollCreateSpv: (transactionDescriptor: ITransactionDescriptor, targetChainId: ChainId, options?: IPollOptions) => Promise<string>;    pollStatus: (transactionDescriptors: ITransactionDescriptor[] | ITransactionDescriptor, options?: IPollOptions) => IPollRequestPromise<ICommandResult>;    submit: ISubmit;} // @publicexport interface IBuilder<TCommand> {    // Warning: (ae-forgotten-export) The symbol "ValidDataTypes" needs to be exported by the entry point index.d.ts    addData: (key: string, data: ValidDataTypes) => IBuilder<TCommand>;    // Warning: (ae-forgotten-export) The symbol "IAddKeyset" needs to be exported by the entry point index.d.ts    addKeyset: IAddKeyset<TCommand>;    // Warning: (ae-forgotten-export) The symbol "IAddSigner" needs to be exported by the entry point index.d.ts    addSigner: IAddSigner<TCommand>;    createTransaction: () => IUnsignedCommand;    getCommand: () => Partial<IPactCommand>;    setMeta: (meta: Partial<Omit<IPactCommand['meta'], 'sender'>> & {        senderAccount?: string;    }) => IBuilder<TCommand>;    setNetworkId: (id: string) => IBuilder<TCommand>;    // Warning: (ae-forgotten-export) The symbol "ISetNonce" needs to be exported by the entry point index.d.ts    setNonce: ISetNonce<TCommand>;} export { ICap } // @beta @deprecated (undocumented)export type ICapabilityItem = ICap; // @publicexport interface IClient extends IBaseClient {    dirtyRead: (transaction: IUnsignedCommand) => Promise<ICommandResult>;    // @deprecated    getPoll: (transactionDescriptors: ITransactionDescriptor[] | ITransactionDescriptor) => Promise<IPollResponse>;    preflight: (transaction: ICommand | IUnsignedCommand) => Promise<ILocalCommandResult>;    runPact: (code: string, data: Record<string, unknown>, option: INetworkOptions) => Promise<ICommandResult>;    // @deprecated    send: ISubmit;    signatureVerification: (transaction: ICommand) => Promise<ICommandResult>;    submitOne: (transaction: ICommand) => Promise<ITransactionDescriptor>;} export { ICommand } export { ICommandResult } // @publicexport interface ICommonEckoFunctions {    // (undocumented)    connect: (networkId: string) => Promise<boolean>;    // (undocumented)    isConnected: (networkId: string) => Promise<boolean>;    // (undocumented)    isInstalled: () => boolean;} // @publicexport interface IContinuationPayloadObject {    // (undocumented)    cont: {        pactId?: string;        step?: number;        rollback?: boolean;        data?: Record<string, unknown>;        proof?: string;    };} // @public (undocumented)export interface ICreateClient {    (hostUrl: string): IClient;    (hostAddressGenerator?: (options: {        chainId: ChainId;        networkId: string;    }) => string): IClient;} // @publicexport interface ICreateSignWithKeypair {    // (undocumented)    (key: IKeypair): ISignFunction;    // (undocumented)    (keys: IKeypair[]): ISignFunction;} // @publicexport interface IEckoSignFunction extends ISignFunction, ICommonEckoFunctions {} // @publicexport interface IEckoSignSingleFunction extends ISingleSignFunction, ICommonEckoFunctions {} // @publicexport interface IExecutionPayloadObject {    // (undocumented)    exec: {        code?: string;        data?: Record<string, unknown>;    };} // @publicexport interface IKeypair {    // (undocumented)    publicKey: string;    // (undocumented)    secretKey: string;} // @public (undocumented)export interface INetworkOptions {    // (undocumented)    chainId: ChainId;    // (undocumented)    networkId: string;} // @publicexport interface IPact {    // (undocumented)    builder: ITransactionBuilder;    // (undocumented)    modules: IPactModules;} // @publicexport interface IPactCommand {    // (undocumented)    meta: {        chainId: ChainId;        sender?: string;        gasLimit?: number;        gasPrice?: number;        ttl?: number;        creationTime?: number;    };    // (undocumented)    networkId: string;    // (undocumented)    nonce: string;    // (undocumented)    payload: IExecutionPayloadObject | IContinuationPayloadObject;    // (undocumented)    signers: Array<{        pubKey: string;        address?: string;        scheme?: 'ED25519' | 'ETH';        clist?: ICap[];    }>;} // @publicexport interface IPactModules {} // @publicexport interface IPollOptions {    // (undocumented)    interval?: number;    // (undocumented)    onPoll?: (id: string) => void;    // (undocumented)    timeout?: number;} // @public (undocumented)export type IPollRequestPromise<T> = Promise<Record<string, T>> & {    requests: Record<string, Promise<T>>;}; export { IPollResponse } export { IPreflightResult } // @publicexport interface IQuickSignRequestBody {    // (undocumented)    cmdSigDatas: IUnsignedQuicksignTransaction[];} // @publicexport type IQuicksignResponse = IQuicksignResponseError | IQuicksignResponseOutcomes; // @publicexport interface IQuicksignResponseCommand {    // (undocumented)    cmd: string;    // (undocumented)    sigs: IQuicksignSigner[];} // @publicexport interface IQuicksignResponseError {    // (undocumented)    error: {        type: 'reject';    } | {        type: 'emptyList';    } | {        type: 'other';        msg: string;    };} // @publicexport interface IQuicksignResponseOutcomes {    // (undocumented)    responses: {        commandSigData: IQuicksignResponseCommand;        outcome: {            hash: string;            result: 'success';        } | {            msg: string;            result: 'failure';        } | {            result: 'noSig';        };    }[];} // @publicexport type IQuicksignSig = string | null; // @publicexport interface IQuicksignSigner {    // (undocumented)    pubKey: string;    // (undocumented)    sig: IQuicksignSig;} // @publicexport interface ISignBody {    // (undocumented)    caps: {        role: string;        description: string;        cap: ICap;    }[];    // (undocumented)    chainId: string;    // (undocumented)    code: string;    // (undocumented)    data: Record<string, unknown>;    // (undocumented)    gasLimit: number;    // (undocumented)    gasPrice: number;    // (undocumented)    networkId: string;    // (undocumented)    sender: string;    // (undocumented)    signingPubKey: string;    // (undocumented)    ttl: number;} // @publicexport interface ISignFunction extends ISingleSignFunction {    // (undocumented)    (transactionList: IUnsignedCommand[]): Promise<(ICommand | IUnsignedCommand)[]>;} // @publicexport interface ISingleSignFunction {    // (undocumented)    (transaction: IUnsignedCommand): Promise<ICommand | IUnsignedCommand>;} // @publicexport function isSignedTransaction(command: IUnsignedCommand | ICommand): command is ICommand; // @public (undocumented)export interface ISubmit {    (transaction: ICommand): Promise<ITransactionDescriptor>;    (transactionList: ICommand[]): Promise<ITransactionDescriptor[]>;} // @public (undocumented)export interface ITransactionBuilder {    // Warning: (ae-forgotten-export) The symbol "IContinuation" needs to be exported by the entry point index.d.ts    continuation: IContinuation;    // Warning: (ae-forgotten-export) The symbol "IExecution" needs to be exported by the entry point index.d.ts    execution: IExecution;} // @publicexport interface ITransactionDescriptor {    // (undocumented)    chainId: ChainId;    // (undocumented)    networkId: string;    // (undocumented)    requestKey: string;} export { IUnsignedCommand } // @publicexport interface IUnsignedQuicksignTransaction {    // (undocumented)    cmd: string;    // (undocumented)    sigs: IQuicksignSigner[];} // @publicexport class Literal {    constructor(value: string);    // (undocumented)    getValue(): string;    // (undocumented)    toJSON(): string;    // (undocumented)    toString(): string;} // @publicexport const literal: (value: string) => Literal; // @publicexport const Pact: IPact; // @publicexport type PactReference = Literal | (() => string); // @publicexport const readKeyset: (key: string) => () => string; // @publicexport const signWithChainweaver: ISignFunction; // @publicexport type TWalletConnectChainId = `kadena:${IPactCommand['networkId']}`; // Warning: (ae-internal-missing-underscore) The name "unpackLiterals" should be prefixed with an underscore because the declaration is marked as @internal//// @internalexport function unpackLiterals(value: string): string; // Warning: (ae-forgotten-export) The symbol "ExtractCapabilityType" needs to be exported by the entry point index.d.ts//// @publicexport type WithCapability<TCode extends string & {    capability: unknown;}> = ExtractCapabilityType<{    payload: {        funs: [TCode];    };}>; // (No @packageDocumentation comment for this package) 
ts
import { ChainId } from '@kadena/types';import type Client from '@walletconnect/sign-client';import { ICap } from '@kadena/types';import { ICommand } from '@kadena/types';import { ICommandResult } from '@kadena/chainweb-node-client';import type { IExecPayload } from '@kadena/types';import type { ILocalCommandResult } from '@kadena/chainweb-node-client';import type { ILocalOptions } from '@kadena/chainweb-node-client';import { IPollResponse } from '@kadena/chainweb-node-client';import { IPreflightResult } from '@kadena/chainweb-node-client';import { IUnsignedCommand } from '@kadena/types';import type { LocalRequestBody } from '@kadena/chainweb-node-client';import type { LocalResponse } from '@kadena/chainweb-node-client';import type { SessionTypes } from '@walletconnect/types'; // @publicexport const addSignatures: (transaction: IUnsignedCommand, ...signatures: {    sig: string;    pubKey?: string;}[]) => IUnsignedCommand | ICommand; export { ChainId } // @publicexport const createClient: ICreateClient; // @publicexport function createEckoWalletQuicksign(): IEckoSignFunction; // @publicexport function createEckoWalletSign(): IEckoSignSingleFunction; // @publicexport const createSignWithKeypair: ICreateSignWithKeypair; // @publicexport const createTransaction: (pactCommand: Partial<IPactCommand>) => IUnsignedCommand; // @publicexport const createTransactionBuilder: (initial?: Partial<IPactCommand>) => ITransactionBuilder; // @publicexport function createWalletConnectQuicksign(client: Client, session: SessionTypes.Struct, walletConnectChainId: TWalletConnectChainId): ISignFunction; // @publicexport function createWalletConnectSign(client: Client, session: SessionTypes.Struct, walletConnectChainId: TWalletConnectChainId): ISingleSignFunction; // @publicexport const getHostUrl: (hostBaseUrl: string) => ({ networkId, chainId }: INetworkOptions) => string; // @public (undocumented)export interface IBaseClient {    createSpv: (transactionDescriptor: ITransactionDescriptor, targetChainId: ChainId) => Promise<string>;    getStatus: (transactionDescriptors: ITransactionDescriptor[] | ITransactionDescriptor) => Promise<IPollResponse>;    listen: (transactionDescriptor: ITransactionDescriptor) => Promise<ICommandResult>;    local: <T extends ILocalOptions>(transaction: LocalRequestBody, options?: T) => Promise<LocalResponse<T>>;    pollCreateSpv: (transactionDescriptor: ITransactionDescriptor, targetChainId: ChainId, options?: IPollOptions) => Promise<string>;    pollStatus: (transactionDescriptors: ITransactionDescriptor[] | ITransactionDescriptor, options?: IPollOptions) => IPollRequestPromise<ICommandResult>;    submit: ISubmit;} // @publicexport interface IBuilder<TCommand> {    // Warning: (ae-forgotten-export) The symbol "ValidDataTypes" needs to be exported by the entry point index.d.ts    addData: (key: string, data: ValidDataTypes) => IBuilder<TCommand>;    // Warning: (ae-forgotten-export) The symbol "IAddKeyset" needs to be exported by the entry point index.d.ts    addKeyset: IAddKeyset<TCommand>;    // Warning: (ae-forgotten-export) The symbol "IAddSigner" needs to be exported by the entry point index.d.ts    addSigner: IAddSigner<TCommand>;    createTransaction: () => IUnsignedCommand;    getCommand: () => Partial<IPactCommand>;    setMeta: (meta: Partial<Omit<IPactCommand['meta'], 'sender'>> & {        senderAccount?: string;    }) => IBuilder<TCommand>;    setNetworkId: (id: string) => IBuilder<TCommand>;    // Warning: (ae-forgotten-export) The symbol "ISetNonce" needs to be exported by the entry point index.d.ts    setNonce: ISetNonce<TCommand>;} export { ICap } // @beta @deprecated (undocumented)export type ICapabilityItem = ICap; // @publicexport interface IClient extends IBaseClient {    dirtyRead: (transaction: IUnsignedCommand) => Promise<ICommandResult>;    // @deprecated    getPoll: (transactionDescriptors: ITransactionDescriptor[] | ITransactionDescriptor) => Promise<IPollResponse>;    preflight: (transaction: ICommand | IUnsignedCommand) => Promise<ILocalCommandResult>;    runPact: (code: string, data: Record<string, unknown>, option: INetworkOptions) => Promise<ICommandResult>;    // @deprecated    send: ISubmit;    signatureVerification: (transaction: ICommand) => Promise<ICommandResult>;    submitOne: (transaction: ICommand) => Promise<ITransactionDescriptor>;} export { ICommand } export { ICommandResult } // @publicexport interface ICommonEckoFunctions {    // (undocumented)    connect: (networkId: string) => Promise<boolean>;    // (undocumented)    isConnected: (networkId: string) => Promise<boolean>;    // (undocumented)    isInstalled: () => boolean;} // @publicexport interface IContinuationPayloadObject {    // (undocumented)    cont: {        pactId?: string;        step?: number;        rollback?: boolean;        data?: Record<string, unknown>;        proof?: string;    };} // @public (undocumented)export interface ICreateClient {    (hostUrl: string): IClient;    (hostAddressGenerator?: (options: {        chainId: ChainId;        networkId: string;    }) => string): IClient;} // @publicexport interface ICreateSignWithKeypair {    // (undocumented)    (key: IKeypair): ISignFunction;    // (undocumented)    (keys: IKeypair[]): ISignFunction;} // @publicexport interface IEckoSignFunction extends ISignFunction, ICommonEckoFunctions {} // @publicexport interface IEckoSignSingleFunction extends ISingleSignFunction, ICommonEckoFunctions {} // @publicexport interface IExecutionPayloadObject {    // (undocumented)    exec: {        code?: string;        data?: Record<string, unknown>;    };} // @publicexport interface IKeypair {    // (undocumented)    publicKey: string;    // (undocumented)    secretKey: string;} // @public (undocumented)export interface INetworkOptions {    // (undocumented)    chainId: ChainId;    // (undocumented)    networkId: string;} // @publicexport interface IPact {    // (undocumented)    builder: ITransactionBuilder;    // (undocumented)    modules: IPactModules;} // @publicexport interface IPactCommand {    // (undocumented)    meta: {        chainId: ChainId;        sender?: string;        gasLimit?: number;        gasPrice?: number;        ttl?: number;        creationTime?: number;    };    // (undocumented)    networkId: string;    // (undocumented)    nonce: string;    // (undocumented)    payload: IExecutionPayloadObject | IContinuationPayloadObject;    // (undocumented)    signers: Array<{        pubKey: string;        address?: string;        scheme?: 'ED25519' | 'ETH';        clist?: ICap[];    }>;} // @publicexport interface IPactModules {} // @publicexport interface IPollOptions {    // (undocumented)    interval?: number;    // (undocumented)    onPoll?: (id: string) => void;    // (undocumented)    timeout?: number;} // @public (undocumented)export type IPollRequestPromise<T> = Promise<Record<string, T>> & {    requests: Record<string, Promise<T>>;}; export { IPollResponse } export { IPreflightResult } // @publicexport interface IQuickSignRequestBody {    // (undocumented)    cmdSigDatas: IUnsignedQuicksignTransaction[];} // @publicexport type IQuicksignResponse = IQuicksignResponseError | IQuicksignResponseOutcomes; // @publicexport interface IQuicksignResponseCommand {    // (undocumented)    cmd: string;    // (undocumented)    sigs: IQuicksignSigner[];} // @publicexport interface IQuicksignResponseError {    // (undocumented)    error: {        type: 'reject';    } | {        type: 'emptyList';    } | {        type: 'other';        msg: string;    };} // @publicexport interface IQuicksignResponseOutcomes {    // (undocumented)    responses: {        commandSigData: IQuicksignResponseCommand;        outcome: {            hash: string;            result: 'success';        } | {            msg: string;            result: 'failure';        } | {            result: 'noSig';        };    }[];} // @publicexport type IQuicksignSig = string | null; // @publicexport interface IQuicksignSigner {    // (undocumented)    pubKey: string;    // (undocumented)    sig: IQuicksignSig;} // @publicexport interface ISignBody {    // (undocumented)    caps: {        role: string;        description: string;        cap: ICap;    }[];    // (undocumented)    chainId: string;    // (undocumented)    code: string;    // (undocumented)    data: Record<string, unknown>;    // (undocumented)    gasLimit: number;    // (undocumented)    gasPrice: number;    // (undocumented)    networkId: string;    // (undocumented)    sender: string;    // (undocumented)    signingPubKey: string;    // (undocumented)    ttl: number;} // @publicexport interface ISignFunction extends ISingleSignFunction {    // (undocumented)    (transactionList: IUnsignedCommand[]): Promise<(ICommand | IUnsignedCommand)[]>;} // @publicexport interface ISingleSignFunction {    // (undocumented)    (transaction: IUnsignedCommand): Promise<ICommand | IUnsignedCommand>;} // @publicexport function isSignedTransaction(command: IUnsignedCommand | ICommand): command is ICommand; // @public (undocumented)export interface ISubmit {    (transaction: ICommand): Promise<ITransactionDescriptor>;    (transactionList: ICommand[]): Promise<ITransactionDescriptor[]>;} // @public (undocumented)export interface ITransactionBuilder {    // Warning: (ae-forgotten-export) The symbol "IContinuation" needs to be exported by the entry point index.d.ts    continuation: IContinuation;    // Warning: (ae-forgotten-export) The symbol "IExecution" needs to be exported by the entry point index.d.ts    execution: IExecution;} // @publicexport interface ITransactionDescriptor {    // (undocumented)    chainId: ChainId;    // (undocumented)    networkId: string;    // (undocumented)    requestKey: string;} export { IUnsignedCommand } // @publicexport interface IUnsignedQuicksignTransaction {    // (undocumented)    cmd: string;    // (undocumented)    sigs: IQuicksignSigner[];} // @publicexport class Literal {    constructor(value: string);    // (undocumented)    getValue(): string;    // (undocumented)    toJSON(): string;    // (undocumented)    toString(): string;} // @publicexport const literal: (value: string) => Literal; // @publicexport const Pact: IPact; // @publicexport type PactReference = Literal | (() => string); // @publicexport const readKeyset: (key: string) => () => string; // @publicexport const signWithChainweaver: ISignFunction; // @publicexport type TWalletConnectChainId = `kadena:${IPactCommand['networkId']}`; // Warning: (ae-internal-missing-underscore) The name "unpackLiterals" should be prefixed with an underscore because the declaration is marked as @internal//// @internalexport function unpackLiterals(value: string): string; // Warning: (ae-forgotten-export) The symbol "ExtractCapabilityType" needs to be exported by the entry point index.d.ts//// @publicexport type WithCapability<TCode extends string & {    capability: unknown;}> = ExtractCapabilityType<{    payload: {        funs: [TCode];    };}>; // (No @packageDocumentation comment for this package)