@heyanon/sdk 2.0.2 → 2.0.4
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.
- package/dist/adapter/index.d.ts +1 -0
- package/dist/adapter/misc.d.ts +8 -0
- package/dist/adapter/types.d.ts +2 -0
- package/dist/index.js +12 -0
- package/dist/index.mjs +12 -1
- package/package.json +1 -1
package/dist/adapter/index.d.ts
CHANGED
package/dist/adapter/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AiTool } from '../ai';
|
|
|
2
2
|
import { EVM, Solana } from '../blockchain';
|
|
3
3
|
import { Hex, PublicClient, SignMessageReturnType, SignTypedDataParameters as ViemSignTypedDataParameters, SignTypedDataReturnType, Address } from 'viem';
|
|
4
4
|
import { Connection, PublicKey } from '@solana/web3.js';
|
|
5
|
+
import { AdapterTag } from './misc';
|
|
5
6
|
export interface FunctionReturn {
|
|
6
7
|
readonly success: boolean;
|
|
7
8
|
readonly data: string;
|
|
@@ -29,5 +30,6 @@ export interface AdapterExport {
|
|
|
29
30
|
readonly tools: AiTool[];
|
|
30
31
|
readonly functions: Record<string, (args: any, options: FunctionOptions) => Promise<FunctionReturn>>;
|
|
31
32
|
readonly description: string;
|
|
33
|
+
readonly tags?: AdapterTag[];
|
|
32
34
|
}
|
|
33
35
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,17 @@ function toResult(data = "", error = false) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
// src/adapter/misc.ts
|
|
22
|
+
var AdapterTag = /* @__PURE__ */ ((AdapterTag2) => {
|
|
23
|
+
AdapterTag2["ALM"] = "ALM";
|
|
24
|
+
AdapterTag2["STAKE"] = "Stake";
|
|
25
|
+
AdapterTag2["LENDING"] = "Lending";
|
|
26
|
+
AdapterTag2["FARM"] = "Farm";
|
|
27
|
+
AdapterTag2["PERPETUALS"] = "Perpetuals";
|
|
28
|
+
AdapterTag2["BRIDGE"] = "Bridge";
|
|
29
|
+
return AdapterTag2;
|
|
30
|
+
})(AdapterTag || {});
|
|
31
|
+
|
|
21
32
|
// src/blockchain/evm/index.ts
|
|
22
33
|
var evm_exports = {};
|
|
23
34
|
__export(evm_exports, {
|
|
@@ -523,6 +534,7 @@ async function retry(fn, options) {
|
|
|
523
534
|
// src/utils/sleep.ts
|
|
524
535
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
525
536
|
|
|
537
|
+
exports.AdapterTag = AdapterTag;
|
|
526
538
|
exports.Chain = Chain;
|
|
527
539
|
exports.EVM = evm_exports;
|
|
528
540
|
exports.Solana = solana_exports;
|
package/dist/index.mjs
CHANGED
|
@@ -16,6 +16,17 @@ function toResult(data = "", error = false) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
// src/adapter/misc.ts
|
|
20
|
+
var AdapterTag = /* @__PURE__ */ ((AdapterTag2) => {
|
|
21
|
+
AdapterTag2["ALM"] = "ALM";
|
|
22
|
+
AdapterTag2["STAKE"] = "Stake";
|
|
23
|
+
AdapterTag2["LENDING"] = "Lending";
|
|
24
|
+
AdapterTag2["FARM"] = "Farm";
|
|
25
|
+
AdapterTag2["PERPETUALS"] = "Perpetuals";
|
|
26
|
+
AdapterTag2["BRIDGE"] = "Bridge";
|
|
27
|
+
return AdapterTag2;
|
|
28
|
+
})(AdapterTag || {});
|
|
29
|
+
|
|
19
30
|
// src/blockchain/evm/index.ts
|
|
20
31
|
var evm_exports = {};
|
|
21
32
|
__export(evm_exports, {
|
|
@@ -521,4 +532,4 @@ async function retry(fn, options) {
|
|
|
521
532
|
// src/utils/sleep.ts
|
|
522
533
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
523
534
|
|
|
524
|
-
export { Chain, evm_exports as EVM, solana_exports as Solana, allChains, allEvmChains, retry, sleep, toResult };
|
|
535
|
+
export { AdapterTag, Chain, evm_exports as EVM, solana_exports as Solana, allChains, allEvmChains, retry, sleep, toResult };
|