@heyanon/sdk 2.1.3 → 2.1.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,6 +1,6 @@
1
1
  import { AiTool } from '../ai';
2
- import { EVM, Solana, TON } from '../blockchain';
3
- import { Hex, PublicClient, SignMessageReturnType, SignTypedDataParameters as ViemSignTypedDataParameters, SignTypedDataReturnType, Address as EvmAddress } from 'viem';
2
+ import { EVM, Solana, TON, WalletType } from '../blockchain';
3
+ import { Hex, PublicClient, SignMessageReturnType, SignTypedDataParameters as ViemSignTypedDataParameters, SignTypedDataReturnType } from 'viem';
4
4
  import { Connection, PublicKey } from '@solana/web3.js';
5
5
  import { AdapterTag } from './misc';
6
6
  import { Address as TonAddress } from '@ton/ton';
@@ -11,14 +11,12 @@ export interface FunctionReturn {
11
11
  type SignTypedDataParameters = Omit<ViemSignTypedDataParameters, 'account'>;
12
12
  export interface EvmFunctionOptions {
13
13
  readonly getProvider: (chainId: number) => PublicClient;
14
- readonly getRecipient: () => Promise<EvmAddress>;
15
14
  readonly sendTransactions: (props: EVM.types.SendTransactionProps) => Promise<EVM.types.TransactionReturn>;
16
15
  readonly signMessages?: (messages: Hex[]) => Promise<SignMessageReturnType[]>;
17
16
  readonly signTypedDatas?: (args: SignTypedDataParameters[]) => Promise<SignTypedDataReturnType[]>;
18
17
  }
19
18
  export interface SolanaFunctionOptions {
20
19
  readonly getConnection: () => Connection;
21
- readonly getRecipient: () => Promise<PublicKey>;
22
20
  readonly getPublicKey: () => Promise<PublicKey>;
23
21
  readonly sendTransactions: (props: Solana.types.SendTransactionProps) => Promise<Solana.types.TransactionReturn>;
24
22
  }
@@ -32,6 +30,7 @@ export interface FunctionOptions {
32
30
  readonly solana: SolanaFunctionOptions;
33
31
  readonly ton: TonFunctionOptions;
34
32
  readonly notify: (message: string) => Promise<void>;
33
+ readonly getRecipient: (type: WalletType) => Promise<string>;
35
34
  }
36
35
  export interface AdapterExport {
37
36
  readonly tools: AiTool[];
@@ -1 +1,2 @@
1
1
  export * from './chains';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ export declare enum WalletType {
2
+ EVM = "evm",
3
+ SOLANA = "solana",
4
+ TON = "ton"
5
+ }
package/dist/index.js CHANGED
@@ -127,6 +127,14 @@ var Chain = /* @__PURE__ */ ((Chain2) => {
127
127
  })(Chain || {});
128
128
  var allChains = Object.values(Chain);
129
129
  var allEvmChains = Object.values(Chain).filter((chain) => chain !== "solana" /* SOLANA */ && chain !== "ton" /* TON */);
130
+
131
+ // src/blockchain/constants/types.ts
132
+ var WalletType = /* @__PURE__ */ ((WalletType2) => {
133
+ WalletType2["EVM"] = "evm";
134
+ WalletType2["SOLANA"] = "solana";
135
+ WalletType2["TON"] = "ton";
136
+ return WalletType2;
137
+ })(WalletType || {});
130
138
  var WETH9 = {
131
139
  ["ethereum" /* ETHEREUM */]: sdk.ethereumTokens.weth,
132
140
  ["optimism" /* OPTIMISM */]: sdk.optimismTokens.weth,
@@ -549,6 +557,7 @@ exports.Chain = Chain;
549
557
  exports.EVM = evm_exports;
550
558
  exports.Solana = solana_exports;
551
559
  exports.TON = ton_exports;
560
+ exports.WalletType = WalletType;
552
561
  exports.allChains = allChains;
553
562
  exports.allEvmChains = allEvmChains;
554
563
  exports.retry = retry;
package/dist/index.mjs CHANGED
@@ -125,6 +125,14 @@ var Chain = /* @__PURE__ */ ((Chain2) => {
125
125
  })(Chain || {});
126
126
  var allChains = Object.values(Chain);
127
127
  var allEvmChains = Object.values(Chain).filter((chain) => chain !== "solana" /* SOLANA */ && chain !== "ton" /* TON */);
128
+
129
+ // src/blockchain/constants/types.ts
130
+ var WalletType = /* @__PURE__ */ ((WalletType2) => {
131
+ WalletType2["EVM"] = "evm";
132
+ WalletType2["SOLANA"] = "solana";
133
+ WalletType2["TON"] = "ton";
134
+ return WalletType2;
135
+ })(WalletType || {});
128
136
  var WETH9 = {
129
137
  ["ethereum" /* ETHEREUM */]: ethereumTokens.weth,
130
138
  ["optimism" /* OPTIMISM */]: optimismTokens.weth,
@@ -542,4 +550,4 @@ async function retry(fn, options) {
542
550
  // src/utils/sleep.ts
543
551
  var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
544
552
 
545
- export { AdapterTag, Chain, evm_exports as EVM, solana_exports as Solana, ton_exports as TON, allChains, allEvmChains, retry, sleep, toResult };
553
+ export { AdapterTag, Chain, evm_exports as EVM, solana_exports as Solana, ton_exports as TON, WalletType, allChains, allEvmChains, retry, sleep, toResult };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyanon/sdk",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -42,12 +42,12 @@
42
42
  ],
43
43
  "dependencies": {
44
44
  "@real-wagmi/sdk": "^1.4.5",
45
- "@solana/web3.js": "^1.98.0",
46
- "@ton-api/client": "^0.3.1",
45
+ "@solana/web3.js": "1.98.0",
46
+ "@ton-api/client": "0.3.1",
47
47
  "@ton-api/ton-adapter": "0.3.0",
48
- "@ton/core": "^0.60.0",
49
- "@ton/ton": "^15.2.0",
50
- "viem": "^2.22.7",
48
+ "@ton/core": "0.60.0",
49
+ "@ton/ton": "15.2.0",
50
+ "viem": "2.22.9",
51
51
  "vitest": "^2.1.8"
52
52
  }
53
53
  }