@heyanon/sdk 2.0.0 → 2.0.2

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
2
  import { EVM, Solana } 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 } from '@solana/web3.js';
5
5
  export interface FunctionReturn {
6
6
  readonly success: boolean;
@@ -9,14 +9,16 @@ export interface FunctionReturn {
9
9
  type SignTypedDataParameters = Omit<ViemSignTypedDataParameters, 'account'>;
10
10
  export interface EvmFunctionOptions {
11
11
  readonly getProvider: (chainId: number) => PublicClient;
12
+ readonly getRecipient: () => Promise<Address>;
12
13
  readonly sendTransactions: (props: EVM.types.SendTransactionProps) => Promise<EVM.types.TransactionReturn>;
13
14
  readonly signMessages?: (messages: Hex[]) => Promise<SignMessageReturnType[]>;
14
15
  readonly signTypedDatas?: (args: SignTypedDataParameters[]) => Promise<SignTypedDataReturnType[]>;
15
16
  }
16
17
  export interface SolanaFunctionOptions {
17
18
  readonly getConnection: () => Connection;
18
- readonly sendTransactions: (props: Solana.types.SendTransactionProps) => Promise<Solana.types.TransactionReturn>;
19
+ readonly getRecipient: () => Promise<PublicKey>;
19
20
  readonly getPublicKey: () => Promise<PublicKey>;
21
+ readonly sendTransactions: (props: Solana.types.SendTransactionProps) => Promise<Solana.types.TransactionReturn>;
20
22
  }
21
23
  export interface FunctionOptions {
22
24
  readonly evm: EvmFunctionOptions;
@@ -5,7 +5,6 @@ export declare enum Chain {
5
5
  GNOSIS = "gnosis",
6
6
  POLYGON = "polygon",
7
7
  SONIC = "sonic",
8
- FANTOM = "fantom",
9
8
  ZKSYNC = "zksync",
10
9
  METIS = "metis",
11
10
  KAVA_EVM = "kava_evm",
@@ -18,4 +17,4 @@ export declare enum Chain {
18
17
  }
19
18
  export type EvmChain = Exclude<Chain, Chain.SOLANA>;
20
19
  export declare const allChains: Chain[];
21
- export declare const allEvmChains: (Chain.ETHEREUM | Chain.OPTIMISM | Chain.BSC | Chain.GNOSIS | Chain.POLYGON | Chain.SONIC | Chain.FANTOM | Chain.ZKSYNC | Chain.METIS | Chain.KAVA_EVM | Chain.BASE | Chain.IOTA_EVM | Chain.AVALANCHE | Chain.ARBITRUM | Chain.SCROLL)[];
20
+ export declare const allEvmChains: (Chain.ETHEREUM | Chain.OPTIMISM | Chain.BSC | Chain.GNOSIS | Chain.POLYGON | Chain.SONIC | Chain.ZKSYNC | Chain.METIS | Chain.KAVA_EVM | Chain.BASE | Chain.IOTA_EVM | Chain.AVALANCHE | Chain.ARBITRUM | Chain.SCROLL)[];
@@ -5,7 +5,6 @@ export declare const ChainIds: {
5
5
  gnosis: number;
6
6
  polygon: number;
7
7
  sonic: number;
8
- fantom: number;
9
8
  zksync: number;
10
9
  metis: number;
11
10
  kava_evm: number;
@@ -7,7 +7,6 @@ export declare const WETH9: {
7
7
  optimism: Token;
8
8
  bsc: Token;
9
9
  polygon: Token;
10
- fantom: Token;
11
10
  zksync: Token;
12
11
  kava_evm: Token;
13
12
  avalanche: Token;
package/dist/index.js CHANGED
@@ -102,7 +102,6 @@ var Chain = /* @__PURE__ */ ((Chain2) => {
102
102
  Chain2["GNOSIS"] = "gnosis";
103
103
  Chain2["POLYGON"] = "polygon";
104
104
  Chain2["SONIC"] = "sonic";
105
- Chain2["FANTOM"] = "fantom";
106
105
  Chain2["ZKSYNC"] = "zksync";
107
106
  Chain2["METIS"] = "metis";
108
107
  Chain2["KAVA_EVM"] = "kava_evm";
@@ -121,7 +120,6 @@ var WETH9 = {
121
120
  ["optimism" /* OPTIMISM */]: sdk.optimismTokens.weth,
122
121
  ["bsc" /* BSC */]: sdk.bscTokens.wbnb,
123
122
  ["polygon" /* POLYGON */]: sdk.polygonTokens.wmatic,
124
- ["fantom" /* FANTOM */]: sdk.fantomTokens.wftm,
125
123
  ["zksync" /* ZKSYNC */]: sdk.zkSyncTokens.weth,
126
124
  ["kava_evm" /* KAVA_EVM */]: sdk.kavaTokens.wkava,
127
125
  ["avalanche" /* AVALANCHE */]: sdk.avalancheTokens.wavax,
@@ -142,7 +140,6 @@ var ChainIds = {
142
140
  ["gnosis" /* GNOSIS */]: 100,
143
141
  ["polygon" /* POLYGON */]: 137,
144
142
  ["sonic" /* SONIC */]: 146,
145
- ["fantom" /* FANTOM */]: 250,
146
143
  ["zksync" /* ZKSYNC */]: 324,
147
144
  ["metis" /* METIS */]: 1088,
148
145
  ["kava_evm" /* KAVA_EVM */]: 2222,
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { erc20Abi, getAddress, encodeFunctionData } from 'viem';
2
- import { ethereumTokens, optimismTokens, bscTokens, polygonTokens, fantomTokens, zkSyncTokens, kavaTokens, avalancheTokens, arbitrumTokens, metisTokens, baseTokens, iotaTokens, sonicTokens, Token } from '@real-wagmi/sdk';
2
+ import { ethereumTokens, optimismTokens, bscTokens, polygonTokens, zkSyncTokens, kavaTokens, avalancheTokens, arbitrumTokens, metisTokens, baseTokens, iotaTokens, sonicTokens, Token } from '@real-wagmi/sdk';
3
3
  import { TransactionMessage, VersionedTransaction, PublicKey } from '@solana/web3.js';
4
4
 
5
5
  var __defProp = Object.defineProperty;
@@ -100,7 +100,6 @@ var Chain = /* @__PURE__ */ ((Chain2) => {
100
100
  Chain2["GNOSIS"] = "gnosis";
101
101
  Chain2["POLYGON"] = "polygon";
102
102
  Chain2["SONIC"] = "sonic";
103
- Chain2["FANTOM"] = "fantom";
104
103
  Chain2["ZKSYNC"] = "zksync";
105
104
  Chain2["METIS"] = "metis";
106
105
  Chain2["KAVA_EVM"] = "kava_evm";
@@ -119,7 +118,6 @@ var WETH9 = {
119
118
  ["optimism" /* OPTIMISM */]: optimismTokens.weth,
120
119
  ["bsc" /* BSC */]: bscTokens.wbnb,
121
120
  ["polygon" /* POLYGON */]: polygonTokens.wmatic,
122
- ["fantom" /* FANTOM */]: fantomTokens.wftm,
123
121
  ["zksync" /* ZKSYNC */]: zkSyncTokens.weth,
124
122
  ["kava_evm" /* KAVA_EVM */]: kavaTokens.wkava,
125
123
  ["avalanche" /* AVALANCHE */]: avalancheTokens.wavax,
@@ -140,7 +138,6 @@ var ChainIds = {
140
138
  ["gnosis" /* GNOSIS */]: 100,
141
139
  ["polygon" /* POLYGON */]: 137,
142
140
  ["sonic" /* SONIC */]: 146,
143
- ["fantom" /* FANTOM */]: 250,
144
141
  ["zksync" /* ZKSYNC */]: 324,
145
142
  ["metis" /* METIS */]: 1088,
146
143
  ["kava_evm" /* KAVA_EVM */]: 2222,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyanon/sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",