@heyanon/sdk 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,21 @@
1
1
  import { AiTool } from '../ai';
2
2
  import { ChainId, SendTransactionProps, TransactionReturn } from '../blockchain';
3
- import { PublicClient } from 'viem';
3
+ import { Hex, PublicClient, SignMessageReturnType, SignTypedDataParameters as ViemSignTypedDataParameters, SignTypedDataReturnType } from 'viem';
4
4
  export interface FunctionReturn {
5
5
  readonly success: boolean;
6
6
  readonly data: string;
7
7
  }
8
+ type SignTypedDataParameters = Omit<ViemSignTypedDataParameters, 'account'>;
8
9
  export interface FunctionOptions {
9
10
  readonly getProvider: (chainId: ChainId) => PublicClient;
10
11
  readonly sendTransactions: (props: SendTransactionProps) => Promise<TransactionReturn>;
11
12
  readonly notify: (message: string) => Promise<any>;
13
+ readonly signMessages?: (messages: Hex[]) => Promise<SignMessageReturnType[]>;
14
+ readonly signTypedDatas?: (args: SignTypedDataParameters[]) => Promise<SignTypedDataReturnType[]>;
12
15
  }
13
16
  export interface AdapterExport {
14
17
  readonly tools: AiTool[];
15
18
  readonly functions: Record<string, (args: any, options: FunctionOptions) => PromiseLike<FunctionReturn>>;
16
19
  readonly description: string;
17
20
  }
21
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyanon/sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",