Skip to content

Commit

Permalink
Export types
Browse files Browse the repository at this point in the history
  • Loading branch information
ash-vd committed Aug 16, 2023
1 parent 7aeda2a commit add6eb5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 7 deletions.
28 changes: 24 additions & 4 deletions packages/libs/client/etc/client.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ export { ChainId }
// @public
export const createClient: ICreateClient;

// Warning: (ae-forgotten-export) The symbol "IEckoSignFunction" needs to be exported by the entry point index.d.ts
//
// @public
export function createEckoWalletQuicksign(): IEckoSignFunction;

// Warning: (ae-forgotten-export) The symbol "IEckoSignSingleFunction" needs to be exported by the entry point index.d.ts
//
// @public
export function createEckoWalletSign(): IEckoSignSingleFunction;

Expand Down Expand Up @@ -96,6 +92,22 @@ export { ICommand }

export { ICommandResult }

// @public
export interface ICommonEckoFunctions {
// Warning: (ae-forgotten-export) The symbol "connect" needs to be exported by the entry point index.d.ts
//
// (undocumented)
connect: typeof connect;
// Warning: (ae-forgotten-export) The symbol "isConnected" needs to be exported by the entry point index.d.ts
//
// (undocumented)
isConnected: typeof isConnected;
// Warning: (ae-forgotten-export) The symbol "isInstalled" needs to be exported by the entry point index.d.ts
//
// (undocumented)
isInstalled: typeof isInstalled;
}

// @public
export interface IContinuationPayloadObject {
// (undocumented)
Expand All @@ -117,6 +129,14 @@ export interface ICreateClient {
}) => string): IClient;
}

// @public
export interface IEckoSignFunction extends ISignFunction, ICommonEckoFunctions {
}

// @public
export interface IEckoSignSingleFunction extends ISingleSignFunction, ICommonEckoFunctions {
}

// @public
export interface IExecutionPayloadObject {
// (undocumented)
Expand Down
4 changes: 2 additions & 2 deletions packages/libs/client/src/signing/ISignFunction.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { ICommand, IUnsignedCommand } from '@kadena/types';

/**
* Interface to use when writing a singing function that accepts multiple transactions
* Interface to use when writing a signing function that accepts a single transaction
* @public
*/
export interface ISingleSignFunction {
(transaction: IUnsignedCommand): Promise<ICommand | IUnsignedCommand>;
}

/**
* Interface to use when writing a singing function that accepts multiple transactions
* Interface to use when writing a signing function that accepts multiple transactions
* @public
*/
export interface ISignFunction extends ISingleSignFunction {
Expand Down
13 changes: 12 additions & 1 deletion packages/libs/client/src/signing/eckoWallet/eckoTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,27 @@ import { connect, isConnected, isInstalled } from './eckoCommon';

export type EckoStatus = 'success' | 'fail';

/**
* Interface that describes the common functions to be used with Ecko Wallet
* @public
*/
export interface ICommonEckoFunctions {
isInstalled: typeof isInstalled;
isConnected: typeof isConnected;
connect: typeof connect;
}

/**
* Interface to use when writing a signing function for Ecko Wallet that accepts a single transaction
* @public
*/
export interface IEckoSignSingleFunction
extends ISingleSignFunction,
ICommonEckoFunctions {}

/**
* Interface to use when writing a signing function for Ecko Wallet that accepts multiple transactions
* @public
*/
export interface IEckoSignFunction
extends ISignFunction,
ICommonEckoFunctions {}
Expand Down
5 changes: 5 additions & 0 deletions packages/libs/client/src/signing/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export {
ICommonEckoFunctions,
IEckoSignSingleFunction,
IEckoSignFunction,
} from './eckoWallet/eckoTypes';
export { TWalletConnectChainId } from './walletconnect/walletConnectTypes';
export { ISingleSignFunction, ISignFunction } from './ISignFunction';

Expand Down

0 comments on commit add6eb5

Please sign in to comment.