@heyanon/sdk 2.3.10 → 2.4.0
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/types.d.ts +17 -11
- package/package.json +2 -2
package/dist/adapter/types.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface EvmFunctionOptions {
|
|
|
45
45
|
/** Send transactions */
|
|
46
46
|
readonly sendTransactions: (props: EVM.types.SendTransactionProps) => Promise<EVM.types.TransactionReturn>;
|
|
47
47
|
/** Deploy smart contracts */
|
|
48
|
-
readonly deployContracts
|
|
48
|
+
readonly deployContracts?: (props: DeployContractProps) => Promise<Address[]>;
|
|
49
49
|
/** Sign messages (optional) */
|
|
50
50
|
readonly signMessages?: (messages: Hex[]) => Promise<SignMessageReturnType[]>;
|
|
51
51
|
/** Sign typed data (optional) */
|
|
@@ -85,6 +85,14 @@ export interface TonFunctionOptions {
|
|
|
85
85
|
/** Send transactions */
|
|
86
86
|
readonly sendTransactions: (props: TON.types.SendTransactionProps) => Promise<TON.types.TransactionReturn>;
|
|
87
87
|
}
|
|
88
|
+
export interface UserFunctionOptions {
|
|
89
|
+
/** Get user's id */
|
|
90
|
+
readonly getUserId: () => Promise<string>;
|
|
91
|
+
/** Get user's token list */
|
|
92
|
+
readonly getUserTokens: () => Promise<UserToken[]>;
|
|
93
|
+
/** Add token to user's token list */
|
|
94
|
+
readonly addUserToken: (token: UserToken) => Promise<UserToken>;
|
|
95
|
+
}
|
|
88
96
|
/**
|
|
89
97
|
* User token information
|
|
90
98
|
* @interface UserToken
|
|
@@ -130,21 +138,19 @@ export interface UserToken {
|
|
|
130
138
|
*/
|
|
131
139
|
export interface FunctionOptions {
|
|
132
140
|
/** EVM blockchain options */
|
|
133
|
-
readonly evm
|
|
141
|
+
readonly evm?: EvmFunctionOptions;
|
|
134
142
|
/** Solana blockchain options */
|
|
135
|
-
readonly solana
|
|
143
|
+
readonly solana?: SolanaFunctionOptions;
|
|
136
144
|
/** TON blockchain options */
|
|
137
|
-
readonly ton
|
|
145
|
+
readonly ton?: TonFunctionOptions;
|
|
146
|
+
/** User options */
|
|
147
|
+
readonly user?: UserFunctionOptions;
|
|
138
148
|
/** Send notification to user */
|
|
139
|
-
readonly notify
|
|
149
|
+
readonly notify?: (message: string, type?: 'alert' | 'regular') => Promise<void>;
|
|
140
150
|
/** Get recipient address for specific wallet type */
|
|
141
|
-
readonly getRecipient
|
|
142
|
-
/** Get user's token list */
|
|
143
|
-
readonly getUserTokens: () => Promise<UserToken[]>;
|
|
151
|
+
readonly getRecipient?: (type: WalletType) => Promise<string>;
|
|
144
152
|
/** Get CCXT exchange instance */
|
|
145
|
-
readonly getCcxtExchange
|
|
146
|
-
/** Add token to user's token list */
|
|
147
|
-
readonly addUserToken: (token: UserToken) => Promise<UserToken>;
|
|
153
|
+
readonly getCcxtExchange?: (name: keyof typeof exchanges) => Promise<Exchange>;
|
|
148
154
|
}
|
|
149
155
|
/**
|
|
150
156
|
* Adapter export with configuration and functions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heyanon/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@ton/ton": "15.2.0",
|
|
51
51
|
"ccxt": "4.4.78",
|
|
52
52
|
"openai": "5.12.1",
|
|
53
|
-
"viem": "2.
|
|
53
|
+
"viem": "2.41.2",
|
|
54
54
|
"vitest": "^2.1.8"
|
|
55
55
|
}
|
|
56
56
|
}
|