From 380354539fee3a28ccb67e73b1dae2032bf60d18 Mon Sep 17 00:00:00 2001 From: Ashwin van Dijk Date: Wed, 16 Aug 2023 17:27:21 +0200 Subject: [PATCH] Export types --- packages/libs/client/etc/client.api.md | 22 +++++++++++++++---- .../libs/client/src/signing/ISignFunction.ts | 4 ++-- .../src/signing/eckoWallet/eckoTypes.ts | 13 ++++++++++- packages/libs/client/src/signing/index.ts | 5 +++++ 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/packages/libs/client/etc/client.api.md b/packages/libs/client/etc/client.api.md index a38df96b4e..9bc6ec53bd 100644 --- a/packages/libs/client/etc/client.api.md +++ b/packages/libs/client/etc/client.api.md @@ -30,13 +30,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; @@ -102,6 +98,16 @@ export { ICommand } export { ICommandResult } +// @public +export interface ICommonEckoFunctions { + // (undocumented) + connect: (networkId: string) => Promise; + // (undocumented) + isConnected: (networkId: string) => Promise; + // (undocumented) + isInstalled: () => boolean; +} + // @public export interface IContinuationPayloadObject { // (undocumented) @@ -123,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) diff --git a/packages/libs/client/src/signing/ISignFunction.ts b/packages/libs/client/src/signing/ISignFunction.ts index 6d9af11843..de0daf549b 100644 --- a/packages/libs/client/src/signing/ISignFunction.ts +++ b/packages/libs/client/src/signing/ISignFunction.ts @@ -1,7 +1,7 @@ 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 { @@ -9,7 +9,7 @@ export interface ISingleSignFunction { } /** - * 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 { diff --git a/packages/libs/client/src/signing/eckoWallet/eckoTypes.ts b/packages/libs/client/src/signing/eckoWallet/eckoTypes.ts index 651fc4b9b8..b4e56a3e70 100644 --- a/packages/libs/client/src/signing/eckoWallet/eckoTypes.ts +++ b/packages/libs/client/src/signing/eckoWallet/eckoTypes.ts @@ -5,16 +5,27 @@ import { ISignFunction, ISingleSignFunction } from '../ISignFunction'; export type EckoStatus = 'success' | 'fail'; +/** + * Interface that describes the common functions to be used with Ecko Wallet + * @public + */ export interface ICommonEckoFunctions { isInstalled: () => boolean; isConnected: (networkId: string) => Promise; connect: (networkId: string) => Promise; } - +/** + * 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 {} diff --git a/packages/libs/client/src/signing/index.ts b/packages/libs/client/src/signing/index.ts index 84c2fde79c..a1c4b9cadd 100644 --- a/packages/libs/client/src/signing/index.ts +++ b/packages/libs/client/src/signing/index.ts @@ -1,3 +1,8 @@ +export { + ICommonEckoFunctions, + IEckoSignSingleFunction, + IEckoSignFunction, +} from './eckoWallet/eckoTypes'; export { TWalletConnectChainId } from './walletconnect/walletConnectTypes'; export { ISingleSignFunction, ISignFunction } from './ISignFunction';