@heyanon/sdk 2.1.10 → 2.1.12

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,9 +1,10 @@
1
1
  import { AiTool } from '../ai';
2
2
  import { EVM, Solana, TON, WalletType, Chain } from '../blockchain';
3
- import { Hex, PublicClient, SignMessageReturnType, SignTypedDataParameters as ViemSignTypedDataParameters, SignTypedDataReturnType } from 'viem';
3
+ import { Hex, PublicClient, SignMessageReturnType, SignTypedDataParameters as ViemSignTypedDataParameters, SignTypedDataReturnType, Address } from 'viem';
4
4
  import { Connection, PublicKey, Transaction as SolanaTransaction, VersionedTransaction as SolanaVersionedTransaction } from '@solana/web3.js';
5
5
  import { AdapterTag } from './misc';
6
6
  import { Address as TonAddress } from '@ton/ton';
7
+ import { DeployContractProps } from '../blockchain/evm/types';
7
8
  export interface FunctionReturn {
8
9
  readonly success: boolean;
9
10
  readonly data: string;
@@ -12,6 +13,7 @@ type SignTypedDataParameters = Omit<ViemSignTypedDataParameters, 'account'>;
12
13
  export interface EvmFunctionOptions {
13
14
  readonly getProvider: (chainId: number) => PublicClient;
14
15
  readonly sendTransactions: (props: EVM.types.SendTransactionProps) => Promise<EVM.types.TransactionReturn>;
16
+ readonly deployContracts: (props: DeployContractProps) => Promise<Address[]>;
15
17
  readonly signMessages?: (messages: Hex[]) => Promise<SignMessageReturnType[]>;
16
18
  readonly signTypedDatas?: (args: SignTypedDataParameters[]) => Promise<SignTypedDataReturnType[]>;
17
19
  }
@@ -1,4 +1,4 @@
1
- import { Address, Hex } from 'viem';
1
+ import { Abi, Address, Hex } from 'viem';
2
2
  export interface TransactionParams {
3
3
  readonly target: Address;
4
4
  readonly data: Hex;
@@ -18,3 +18,13 @@ export interface SendTransactionProps {
18
18
  readonly account: Address;
19
19
  readonly transactions: TransactionParams[];
20
20
  }
21
+ export interface ContractProps {
22
+ readonly abi: Abi | unknown[];
23
+ readonly bytecode: Hex;
24
+ readonly args?: unknown[];
25
+ }
26
+ export interface DeployContractProps {
27
+ readonly chainId: number;
28
+ readonly account: Address;
29
+ readonly contracts: ContractProps[];
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyanon/sdk",
3
- "version": "2.1.10",
3
+ "version": "2.1.12",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",