API Report File for "@kadena/client"
Do not edit this file. It is a report generated by API Extractor.
import { ChainId } from '@kadena/types';
import Client from '@walletconnect/sign-client';
import { ICap } from '@kadena/types';
import { ICommand } from '@kadena/types';
import { ICommandResult } from '@kadena/chainweb-node-client';
import { IExecPayload } from '@kadena/types';
import { ILocalCommandResult } from '@kadena/chainweb-node-client';
import { 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 { LocalRequestBody } from '@kadena/chainweb-node-client';
import { LocalResponse } from '@kadena/chainweb-node-client';
import { SessionTypes } from '@walletconnect/types';
export { ChainId };
// @alpha (undocumented)
export const createTransaction: (
pactCommand: Partial<IPactCommand>,
) => IUnsignedCommand;
// Warning: (ae-forgotten-export) The symbol "TWalletConnectChainId" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ISignFunction" needs to be exported by the entry point index.d.ts
//
// @alpha (undocumented)
export function createWalletConnectQuicksign(
client: Client,
session: SessionTypes.Struct,
walletConnectChainId: TWalletConnectChainId,
): ISignFunction;
// Warning: (ae-forgotten-export) The symbol "ISignSingleFunction" needs to be exported by the entry point index.d.ts
//
// @alpha (undocumented)
export function createWalletConnectSign(
client: Client,
session: SessionTypes.Struct,
walletConnectChainId: TWalletConnectChainId,
): ISignSingleFunction;
// Warning: (ae-forgotten-export) The symbol "IGetClient" needs to be exported by the entry point index.d.ts
//
// @alpha (undocumented)
export const getClient: IGetClient;
export { ICap };
// @alpha (undocumented)
export type ICapabilityItem = ICap;
// @alpha (undocumented)
export interface IChainweaverCap {
// (undocumented)
args: Array<number | string | Record<string, unknown>>;
// (undocumented)
name: string;
}
// @alpha (undocumented)
export interface IChainweaverCapElement {
// (undocumented)
cap: IChainweaverCap;
// (undocumented)
description: string;
// (undocumented)
role: string;
}
// @alpha (undocumented)
export interface IChainweaverSignBody {
// (undocumented)
caps: IChainweaverCapElement[];
// (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;
}
export { ICommand };
export { ICommandResult };
// @alpha (undocumented)
export interface IContinuationPayloadObject {
// (undocumented)
cont: {
pactId?: string;
step?: number;
rollback?: boolean;
data?: Record<string, unknown>;
proof?: string;
};
}
// @alpha (undocumented)
export interface IExecPayloadObject {
// (undocumented)
exec: {
code?: string;
data?: Record<string, unknown>;
};
}
// @alpha (undocumented)
export interface INetworkOptions {
// (undocumented)
chainId: ChainId;
// (undocumented)
networkId: string;
}
// @alpha (undocumented)
export interface IPact {
// Warning: (ae-forgotten-export) The symbol "ICommandBuilder" needs to be exported by the entry point index.d.ts
//
// (undocumented)
builder: ICommandBuilder;
// (undocumented)
modules: IPactModules;
}
// @alpha (undocumented)
export interface IPactCommand {
// (undocumented)
meta: {
chainId: ChainId;
sender: string;
gasLimit: number;
gasPrice: number;
ttl: number;
creationTime: number;
};
// (undocumented)
networkId: string;
// (undocumented)
nonce: string;
// (undocumented)
payload: IExecPayloadObject | IContinuationPayloadObject;
// (undocumented)
signers: Array<{
pubKey: string;
address?: string;
scheme?: 'ED25519' | 'ETH';
clist?: ICapabilityItem[];
}>;
}
// @alpha (undocumented)
export interface IPactModules {}
// @alpha (undocumented)
export interface IPollOptions {
// (undocumented)
interval?: number;
// (undocumented)
onPoll?: (id: string) => void;
// (undocumented)
timeout?: number;
}
// @alpha (undocumented)
export type IPollRequestPromise<T> = Promise<Record<string, T>> & {
requests: Record<string, Promise<T>>;
};
export { IPollResponse };
export { IPreflightResult };
// @alpha (undocumented)
export interface IQuickSignRequestBody {
// (undocumented)
cmdSigDatas: IUnsignedQuicksignTransaction[];
}
// @alpha (undocumented)
export type IQuicksignResponse =
| IQuicksignResponseError
| IQuicksignResponseOutcomes;
// @alpha (undocumented)
export interface IQuicksignResponseCommand {
// (undocumented)
cmd: string;
// (undocumented)
sigs: IQuicksignSigner[];
}
// @alpha (undocumented)
export interface IQuicksignResponseError {
// (undocumented)
error:
| {
type: 'reject';
}
| {
type: 'emptyList';
}
| {
type: 'other';
msg: string;
};
}
// @alpha (undocumented)
export interface IQuicksignResponseOutcomes {
// (undocumented)
responses: {
commandSigData: IQuicksignResponseCommand;
outcome:
| {
hash: string;
result: 'success';
}
| {
msg: string;
result: 'failure';
}
| {
result: 'noSig';
};
}[];
}
// @alpha (undocumented)
export type IQuicksignSig = string | null;
// @alpha (undocumented)
export interface IQuicksignSigner {
// (undocumented)
pubKey: string;
// (undocumented)
sig: IQuicksignSig;
}
// @alpha
export function isSignedCommand(
command: IUnsignedCommand | ICommand,
): command is ICommand;
// @alpha (undocumented)
export interface ISubmit {
(transaction: ICommand): Promise<string>;
(transactionList: ICommand[]): Promise<string[]>;
}
export { IUnsignedCommand };
// @alpha (undocumented)
export interface IUnsignedQuicksignTransaction {
// (undocumented)
cmd: string;
// (undocumented)
sigs: IQuicksignSigner[];
}
// @alpha (undocumented)
export const literal: <T extends string | Record<string, unknown>>(
value: T,
) => () => T;
// @alpha (undocumented)
export const Pact: IPact;
// @alpha (undocumented)
export type ReadKeyset = <TKey extends string>(
key: TKey,
) => () => `(read-keyset "${TKey}")`;
// @alpha (undocumented)
export const readKeyset: ReadKeyset;
// @alpha (undocumented)
export const signWithChainweaver: ISignFunction;
// (No @packageDocumentation comment for this package)
import { ChainId } from '@kadena/types';
import Client from '@walletconnect/sign-client';
import { ICap } from '@kadena/types';
import { ICommand } from '@kadena/types';
import { ICommandResult } from '@kadena/chainweb-node-client';
import { IExecPayload } from '@kadena/types';
import { ILocalCommandResult } from '@kadena/chainweb-node-client';
import { 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 { LocalRequestBody } from '@kadena/chainweb-node-client';
import { LocalResponse } from '@kadena/chainweb-node-client';
import { SessionTypes } from '@walletconnect/types';
export { ChainId };
// @alpha (undocumented)
export const createTransaction: (
pactCommand: Partial<IPactCommand>,
) => IUnsignedCommand;
// Warning: (ae-forgotten-export) The symbol "TWalletConnectChainId" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ISignFunction" needs to be exported by the entry point index.d.ts
//
// @alpha (undocumented)
export function createWalletConnectQuicksign(
client: Client,
session: SessionTypes.Struct,
walletConnectChainId: TWalletConnectChainId,
): ISignFunction;
// Warning: (ae-forgotten-export) The symbol "ISignSingleFunction" needs to be exported by the entry point index.d.ts
//
// @alpha (undocumented)
export function createWalletConnectSign(
client: Client,
session: SessionTypes.Struct,
walletConnectChainId: TWalletConnectChainId,
): ISignSingleFunction;
// Warning: (ae-forgotten-export) The symbol "IGetClient" needs to be exported by the entry point index.d.ts
//
// @alpha (undocumented)
export const getClient: IGetClient;
export { ICap };
// @alpha (undocumented)
export type ICapabilityItem = ICap;
// @alpha (undocumented)
export interface IChainweaverCap {
// (undocumented)
args: Array<number | string | Record<string, unknown>>;
// (undocumented)
name: string;
}
// @alpha (undocumented)
export interface IChainweaverCapElement {
// (undocumented)
cap: IChainweaverCap;
// (undocumented)
description: string;
// (undocumented)
role: string;
}
// @alpha (undocumented)
export interface IChainweaverSignBody {
// (undocumented)
caps: IChainweaverCapElement[];
// (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;
}
export { ICommand };
export { ICommandResult };
// @alpha (undocumented)
export interface IContinuationPayloadObject {
// (undocumented)
cont: {
pactId?: string;
step?: number;
rollback?: boolean;
data?: Record<string, unknown>;
proof?: string;
};
}
// @alpha (undocumented)
export interface IExecPayloadObject {
// (undocumented)
exec: {
code?: string;
data?: Record<string, unknown>;
};
}
// @alpha (undocumented)
export interface INetworkOptions {
// (undocumented)
chainId: ChainId;
// (undocumented)
networkId: string;
}
// @alpha (undocumented)
export interface IPact {
// Warning: (ae-forgotten-export) The symbol "ICommandBuilder" needs to be exported by the entry point index.d.ts
//
// (undocumented)
builder: ICommandBuilder;
// (undocumented)
modules: IPactModules;
}
// @alpha (undocumented)
export interface IPactCommand {
// (undocumented)
meta: {
chainId: ChainId;
sender: string;
gasLimit: number;
gasPrice: number;
ttl: number;
creationTime: number;
};
// (undocumented)
networkId: string;
// (undocumented)
nonce: string;
// (undocumented)
payload: IExecPayloadObject | IContinuationPayloadObject;
// (undocumented)
signers: Array<{
pubKey: string;
address?: string;
scheme?: 'ED25519' | 'ETH';
clist?: ICapabilityItem[];
}>;
}
// @alpha (undocumented)
export interface IPactModules {}
// @alpha (undocumented)
export interface IPollOptions {
// (undocumented)
interval?: number;
// (undocumented)
onPoll?: (id: string) => void;
// (undocumented)
timeout?: number;
}
// @alpha (undocumented)
export type IPollRequestPromise<T> = Promise<Record<string, T>> & {
requests: Record<string, Promise<T>>;
};
export { IPollResponse };
export { IPreflightResult };
// @alpha (undocumented)
export interface IQuickSignRequestBody {
// (undocumented)
cmdSigDatas: IUnsignedQuicksignTransaction[];
}
// @alpha (undocumented)
export type IQuicksignResponse =
| IQuicksignResponseError
| IQuicksignResponseOutcomes;
// @alpha (undocumented)
export interface IQuicksignResponseCommand {
// (undocumented)
cmd: string;
// (undocumented)
sigs: IQuicksignSigner[];
}
// @alpha (undocumented)
export interface IQuicksignResponseError {
// (undocumented)
error:
| {
type: 'reject';
}
| {
type: 'emptyList';
}
| {
type: 'other';
msg: string;
};
}
// @alpha (undocumented)
export interface IQuicksignResponseOutcomes {
// (undocumented)
responses: {
commandSigData: IQuicksignResponseCommand;
outcome:
| {
hash: string;
result: 'success';
}
| {
msg: string;
result: 'failure';
}
| {
result: 'noSig';
};
}[];
}
// @alpha (undocumented)
export type IQuicksignSig = string | null;
// @alpha (undocumented)
export interface IQuicksignSigner {
// (undocumented)
pubKey: string;
// (undocumented)
sig: IQuicksignSig;
}
// @alpha
export function isSignedCommand(
command: IUnsignedCommand | ICommand,
): command is ICommand;
// @alpha (undocumented)
export interface ISubmit {
(transaction: ICommand): Promise<string>;
(transactionList: ICommand[]): Promise<string[]>;
}
export { IUnsignedCommand };
// @alpha (undocumented)
export interface IUnsignedQuicksignTransaction {
// (undocumented)
cmd: string;
// (undocumented)
sigs: IQuicksignSigner[];
}
// @alpha (undocumented)
export const literal: <T extends string | Record<string, unknown>>(
value: T,
) => () => T;
// @alpha (undocumented)
export const Pact: IPact;
// @alpha (undocumented)
export type ReadKeyset = <TKey extends string>(
key: TKey,
) => () => `(read-keyset "${TKey}")`;
// @alpha (undocumented)
export const readKeyset: ReadKeyset;
// @alpha (undocumented)
export const signWithChainweaver: ISignFunction;
// (No @packageDocumentation comment for this package)