wative 1.2.6 → 1.2.8
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/lib/account.d.ts +13 -13
- package/lib/account.d.ts.map +1 -1
- package/lib/assets.d.ts +10 -10
- package/lib/assets.d.ts.map +1 -1
- package/lib/chain.d.ts +5 -5
- package/lib/chain.d.ts.map +1 -1
- package/lib/config.d.ts +22 -22
- package/lib/home_page.d.ts +3 -3
- package/lib/home_page.d.ts.map +1 -1
- package/lib/index.d.ts +11 -11
- package/lib/network.d.ts +27 -27
- package/lib/network.d.ts.map +1 -1
- package/lib/ssh/client.d.ts +119 -119
- package/lib/ssh/config_manager.d.ts +54 -54
- package/lib/ssh/index.d.ts +7 -7
- package/lib/ssh/index.d.ts.map +1 -1
- package/lib/ssh/service_manager.d.ts +118 -118
- package/lib/ssh/types.d.ts +43 -44
- package/lib/ssh/types.d.ts.map +1 -1
- package/lib/ssh/utils.d.ts +10 -10
- package/lib/ssh/utils.d.ts.map +1 -1
- package/lib/ssh/wative_server.d.ts +25 -25
- package/lib/ssh/wative_server.d.ts.map +1 -1
- package/lib/tools.d.ts +5 -5
- package/lib/tools.d.ts.map +1 -1
- package/lib/tx_gas_utils.d.ts +17 -17
- package/lib/utils.d.ts +48 -48
- package/lib/utils.d.ts.map +1 -1
- package/lib/wallet-cli.d.ts +1 -1
- package/lib/wative.d.ts +3 -3
- package/lib/web3.d.ts +58 -58
- package/lib/web3.d.ts.map +1 -1
- package/package.json +15 -14
- package/src/ssh/types.ts +1 -3
package/lib/account.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
declare const WativeCore: any;
|
|
2
|
-
export declare const getNetworkInfo: (keystore_path: string) => any;
|
|
3
|
-
export declare const getAccountInfo: (keystore_path: string, keystore_slug: string) => any;
|
|
4
|
-
export declare const saveAccountInfo: (keystore_path: string, keystore_slug: string, account_info: any) => void;
|
|
5
|
-
export declare const loginIn: (keystore_path: string, keystore_slug: string, wative_core: typeof WativeCore) => Promise<{
|
|
6
|
-
isLoginIn: boolean;
|
|
7
|
-
password?: undefined;
|
|
8
|
-
} | {
|
|
9
|
-
isLoginIn: boolean;
|
|
10
|
-
password: any;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const accountSetting: (keystore_path: string, wative_core: typeof WativeCore) => Promise<void>;
|
|
13
|
-
export {};
|
|
1
|
+
declare const WativeCore: any;
|
|
2
|
+
export declare const getNetworkInfo: (keystore_path: string) => any;
|
|
3
|
+
export declare const getAccountInfo: (keystore_path: string, keystore_slug: string) => any;
|
|
4
|
+
export declare const saveAccountInfo: (keystore_path: string, keystore_slug: string, account_info: any) => void;
|
|
5
|
+
export declare const loginIn: (keystore_path: string, keystore_slug: string, wative_core: typeof WativeCore) => Promise<{
|
|
6
|
+
isLoginIn: boolean;
|
|
7
|
+
password?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
isLoginIn: boolean;
|
|
10
|
+
password: any;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const accountSetting: (keystore_path: string, wative_core: typeof WativeCore) => Promise<void>;
|
|
13
|
+
export {};
|
|
14
14
|
//# sourceMappingURL=account.d.ts.map
|
package/lib/account.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAgCA,QAAA,MAAQ,UAAU,KAA2B,CAAC;AA8M9C,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAgCA,QAAA,MAAQ,UAAU,KAA2B,CAAC;AA8M9C,eAAO,MAAM,cAAc,kBAAmB,MAAM,QAInD,CAAA;AAED,eAAO,MAAM,cAAc,kBAAmB,MAAM,iBAAiB,MAAM,QAI1E,CAAA;AAED,eAAO,MAAM,eAAe,kBAAmB,MAAM,iBAAiB,MAAM,gBAAgB,GAAG,SAG9F,CAAA;AAED,eAAO,MAAM,OAAO,kBAAyB,MAAM,iBAAiB,MAAM,eAAe,iBAAiB;;;;;;EAyCzG,CAAA;AA6gBD,eAAO,MAAM,cAAc,kBAAyB,MAAM,eAAe,iBAAiB,kBA0CzF,CAAA"}
|
package/lib/assets.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const getAssetList: (keystore_path: string, chain_id: string) => Promise<any>;
|
|
2
|
-
export declare const getAssetListByTokenName: (keystore_path: string, chain_id: string, token_name: string) => Promise<any>;
|
|
3
|
-
export declare const showAssetsDetail: (keystore_path: string, default_network: string, account_address: string) => Promise<void>;
|
|
4
|
-
export declare const updateTokenBalanceOption: (keystore_path: string, default_network: string, account_address: string) => Promise<void>;
|
|
5
|
-
export declare const saveAsset: (keystore_path: string, chain_id: string, asset_address: string, symbol: string, name: string, decimals: number, display_decimals: number) => Promise<void>;
|
|
6
|
-
export declare const addToken: (keystore_path: string) => Promise<void>;
|
|
7
|
-
export declare const addAsset: (keystore_path: string, default_network: string) => Promise<void>;
|
|
8
|
-
export declare const showAssets: (keystore_path: string, account_address: string, default_network: string) => Promise<void>;
|
|
9
|
-
export declare const batchGetTokenBalance: (account_address: string, asset_info_list: any, rpc_url: string, chain_type: string, chain_id: string) => Promise<any>;
|
|
10
|
-
export declare const getBatchAccountBalance: (keystore_path: string, account_address_list: string[], asset_info_list: any, rpc_url: string, network_name: string, show_gas_token: boolean, show_extended_token: boolean) => Promise<any>;
|
|
1
|
+
export declare const getAssetList: (keystore_path: string, chain_id: string) => Promise<any>;
|
|
2
|
+
export declare const getAssetListByTokenName: (keystore_path: string, chain_id: string, token_name: string) => Promise<any>;
|
|
3
|
+
export declare const showAssetsDetail: (keystore_path: string, default_network: string, account_address: string) => Promise<void>;
|
|
4
|
+
export declare const updateTokenBalanceOption: (keystore_path: string, default_network: string, account_address: string) => Promise<void>;
|
|
5
|
+
export declare const saveAsset: (keystore_path: string, chain_id: string, asset_address: string, symbol: string, name: string, decimals: number, display_decimals: number) => Promise<void>;
|
|
6
|
+
export declare const addToken: (keystore_path: string) => Promise<void>;
|
|
7
|
+
export declare const addAsset: (keystore_path: string, default_network: string) => Promise<void>;
|
|
8
|
+
export declare const showAssets: (keystore_path: string, account_address: string, default_network: string) => Promise<void>;
|
|
9
|
+
export declare const batchGetTokenBalance: (account_address: string, asset_info_list: any, rpc_url: string, chain_type: string, chain_id: string) => Promise<any>;
|
|
10
|
+
export declare const getBatchAccountBalance: (keystore_path: string, account_address_list: string[], asset_info_list: any, rpc_url: string, network_name: string, show_gas_token: boolean, show_extended_token: boolean) => Promise<any>;
|
|
11
11
|
//# sourceMappingURL=assets.d.ts.map
|
package/lib/assets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,YAAY,kBACN,MAAM,YACX,MAAM,iBAcnB,CAAA;AAED,eAAO,MAAM,uBAAuB,kBACjB,MAAM,YACX,MAAM,cACJ,MAAM,iBAUrB,CAAA;AAED,eAAO,MAAM,gBAAgB,kBACV,MAAM,mBACJ,MAAM,mBACN,MAAM,kBAkC1B,CAAA;AAED,eAAO,MAAM,wBAAwB,kBAClB,MAAM,mBACJ,MAAM,mBACN,MAAM,kBAO1B,CAAA;AAED,eAAO,MAAM,SAAS,kBACH,MAAM,YACX,MAAM,iBACD,MAAM,UACb,MAAM,QACR,MAAM,YACF,MAAM,oBACE,MAAM,kBAsC3B,CAAA;AAED,eAAO,MAAM,QAAQ,kBACF,MAAM,kBA2DxB,CAAA;AAED,eAAO,MAAM,QAAQ,kBACF,MAAM,mBACJ,MAAM,kBAgD1B,CAAA;AAED,eAAO,MAAM,UAAU,kBACJ,MAAM,mBACJ,MAAM,mBACN,MAAM,kBAyB1B,CAAA;AAED,eAAO,MAAM,oBAAoB,oBACZ,MAAM,mBACN,GAAG,WACX,MAAM,cACH,MAAM,YACR,MAAM,iBAqDnB,CAAA;AAED,eAAO,MAAM,sBAAsB,kBAChB,MAAM,wBACC,MAAM,EAAE,mBACb,GAAG,WACX,MAAM,gBACD,MAAM,kBACJ,OAAO,uBACF,OAAO,iBA4C/B,CAAA"}
|
package/lib/chain.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const SOLANA_CHAIN_IDS: string[];
|
|
2
|
-
export declare const getNativeTokenDecimals: (chain_id: string) => 9 | 18;
|
|
3
|
-
export declare const getChainType: (chain_id: string) => "solana" | "evm";
|
|
4
|
-
export declare const isSolanaAddress: (account_address: string) => boolean;
|
|
5
|
-
export declare const isEvmAddress: (account_address: string) => boolean;
|
|
1
|
+
export declare const SOLANA_CHAIN_IDS: string[];
|
|
2
|
+
export declare const getNativeTokenDecimals: (chain_id: string) => 9 | 18;
|
|
3
|
+
export declare const getChainType: (chain_id: string) => "solana" | "evm";
|
|
4
|
+
export declare const isSolanaAddress: (account_address: string) => boolean;
|
|
5
|
+
export declare const isEvmAddress: (account_address: string) => boolean;
|
|
6
6
|
//# sourceMappingURL=chain.d.ts.map
|
package/lib/chain.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../src/chain.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,UAAwB,CAAC;AAEtD,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../src/chain.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,UAAwB,CAAC;AAEtD,eAAO,MAAM,sBAAsB,aAAc,MAAM,WAMtD,CAAA;AAED,eAAO,MAAM,YAAY,aAAc,MAAM,qBAM5C,CAAA;AAED,eAAO,MAAM,eAAe,oBAAqB,MAAM,YAGtD,CAAA;AAED,eAAO,MAAM,YAAY,oBAAqB,MAAM,YAGnD,CAAA"}
|
package/lib/config.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export declare const MNEMONIC_WORDS: string[];
|
|
2
|
-
export declare const DEFAULT_NETWORK: ({
|
|
3
|
-
name: string;
|
|
4
|
-
chainId: number;
|
|
5
|
-
rpcUrl: string;
|
|
6
|
-
nativeCurrency: {
|
|
7
|
-
name: string;
|
|
8
|
-
symbol: string;
|
|
9
|
-
decimals: number;
|
|
10
|
-
};
|
|
11
|
-
multicallAddress: string;
|
|
12
|
-
} | {
|
|
13
|
-
name: string;
|
|
14
|
-
chainId: number;
|
|
15
|
-
rpcUrl: string;
|
|
16
|
-
nativeCurrency: {
|
|
17
|
-
name: string;
|
|
18
|
-
symbol: string;
|
|
19
|
-
decimals: number;
|
|
20
|
-
};
|
|
21
|
-
multicallAddress?: undefined;
|
|
22
|
-
})[];
|
|
1
|
+
export declare const MNEMONIC_WORDS: string[];
|
|
2
|
+
export declare const DEFAULT_NETWORK: ({
|
|
3
|
+
name: string;
|
|
4
|
+
chainId: number;
|
|
5
|
+
rpcUrl: string;
|
|
6
|
+
nativeCurrency: {
|
|
7
|
+
name: string;
|
|
8
|
+
symbol: string;
|
|
9
|
+
decimals: number;
|
|
10
|
+
};
|
|
11
|
+
multicallAddress: string;
|
|
12
|
+
} | {
|
|
13
|
+
name: string;
|
|
14
|
+
chainId: number;
|
|
15
|
+
rpcUrl: string;
|
|
16
|
+
nativeCurrency: {
|
|
17
|
+
name: string;
|
|
18
|
+
symbol: string;
|
|
19
|
+
decimals: number;
|
|
20
|
+
};
|
|
21
|
+
multicallAddress?: undefined;
|
|
22
|
+
})[];
|
|
23
23
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/home_page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const WativeCore: any;
|
|
2
|
-
export declare const showHomePage: (keystore_path: string, wative_core: typeof WativeCore) => Promise<void>;
|
|
3
|
-
export {};
|
|
1
|
+
declare const WativeCore: any;
|
|
2
|
+
export declare const showHomePage: (keystore_path: string, wative_core: typeof WativeCore) => Promise<void>;
|
|
3
|
+
export {};
|
|
4
4
|
//# sourceMappingURL=home_page.d.ts.map
|
package/lib/home_page.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home_page.d.ts","sourceRoot":"","sources":["../src/home_page.ts"],"names":[],"mappings":"AAIA,QAAA,MAAQ,UAAU,KAA2B,CAAC;AAE9C,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"home_page.d.ts","sourceRoot":"","sources":["../src/home_page.ts"],"names":[],"mappings":"AAIA,QAAA,MAAQ,UAAU,KAA2B,CAAC;AAE9C,eAAO,MAAM,YAAY,kBAAyB,MAAM,eAAe,iBAAiB,kBA6BvF,CAAA"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * as SSH from './ssh';
|
|
2
|
-
export * from './utils';
|
|
3
|
-
export * from './network';
|
|
4
|
-
export * from './account';
|
|
5
|
-
export * from './assets';
|
|
6
|
-
export * from './tools';
|
|
7
|
-
export * from './web3';
|
|
8
|
-
export * from './wative';
|
|
9
|
-
export * from './chain';
|
|
10
|
-
export * from './config';
|
|
11
|
-
export * from './tx_gas_utils';
|
|
1
|
+
export * as SSH from './ssh';
|
|
2
|
+
export * from './utils';
|
|
3
|
+
export * from './network';
|
|
4
|
+
export * from './account';
|
|
5
|
+
export * from './assets';
|
|
6
|
+
export * from './tools';
|
|
7
|
+
export * from './web3';
|
|
8
|
+
export * from './wative';
|
|
9
|
+
export * from './chain';
|
|
10
|
+
export * from './config';
|
|
11
|
+
export * from './tx_gas_utils';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/network.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Result } from "./utils";
|
|
2
|
-
export declare const createNetwork: (keystore_path: string) => Promise<void>;
|
|
3
|
-
export declare const selectOrEditNetwork: (keystore_path: string, selected_network: any) => Promise<void>;
|
|
4
|
-
export declare const updateNetwork: (keystore_path: string, default_network: any) => Promise<void>;
|
|
5
|
-
export declare const removeNetwork: (keystore_path: string, default_network: any) => Promise<void>;
|
|
6
|
-
export declare const addNetwork: (keystore_path: string) => Promise<void>;
|
|
7
|
-
export declare const showAvailableNetworks: (keystore_path: string) => Promise<void>;
|
|
8
|
-
export declare const showDataview: (keystore_path: string) => Promise<void>;
|
|
9
|
-
export declare const updateStatus: (keystore_path: string) => Promise<void>;
|
|
10
|
-
export declare const selectFlag: () => Promise<boolean | undefined>;
|
|
11
|
-
export declare const getShowTokenList: (keystore_path: string, chain_name: string) => any;
|
|
12
|
-
export declare const showTokenList: (keystore_path: string) => Promise<void>;
|
|
13
|
-
export declare const enhancedBalanceDisplay: (keystore_path: string) => Promise<void>;
|
|
14
|
-
export declare const showNetwork: (keystore_path: string) => Promise<void>;
|
|
15
|
-
export declare const selectDefaultNetwork: (keystore_path: string) => Promise<any>;
|
|
16
|
-
export declare const getNetworkTypeByName: (keystore_path: string, network_name: string) => "solana" | "evm" | "unknown";
|
|
17
|
-
export declare const getNetworkInfoByName: (keystore_path: string, network_name: string) => any;
|
|
18
|
-
export declare const getAccountAddress: (keystore_path: string, keystore_slug: string, account_id: number) => any;
|
|
19
|
-
export declare const getPKAccountAddress: (keystore_path: string, keystore_slug: string) => any;
|
|
20
|
-
export declare const switchPPNetwork: (keystore_path: string, keystore_slug: string, account_id: number) => Promise<void>;
|
|
21
|
-
export declare const showAllAccounts: (keystore_path: string, keystore_slug: string, account_index: number) => Promise<void>;
|
|
22
|
-
export declare const switchNetworkByAccountName: (keystore_path: string, keystore_slug: string, is_keystore_slug: boolean) => Promise<void>;
|
|
23
|
-
export declare const accountBalanceLog: (keystore_slug: string, account_id: number, keystore_path: string, default_network: string) => Promise<void>;
|
|
24
|
-
export declare const getAccountBalance: (account: string, keystore_path: string, default_network: string) => Promise<Result>;
|
|
25
|
-
export declare const getDefaultNetworkByAddress: (keystore_path: string, keystore_slug: string, account_address: string) => any;
|
|
26
|
-
export declare const getEvmNetworks: (keystore_path: string) => any;
|
|
27
|
-
export declare const getStatus: (keystore_path: string) => any;
|
|
1
|
+
import { Result } from "./utils";
|
|
2
|
+
export declare const createNetwork: (keystore_path: string) => Promise<void>;
|
|
3
|
+
export declare const selectOrEditNetwork: (keystore_path: string, selected_network: any) => Promise<void>;
|
|
4
|
+
export declare const updateNetwork: (keystore_path: string, default_network: any) => Promise<void>;
|
|
5
|
+
export declare const removeNetwork: (keystore_path: string, default_network: any) => Promise<void>;
|
|
6
|
+
export declare const addNetwork: (keystore_path: string) => Promise<void>;
|
|
7
|
+
export declare const showAvailableNetworks: (keystore_path: string) => Promise<void>;
|
|
8
|
+
export declare const showDataview: (keystore_path: string) => Promise<void>;
|
|
9
|
+
export declare const updateStatus: (keystore_path: string) => Promise<void>;
|
|
10
|
+
export declare const selectFlag: () => Promise<boolean | undefined>;
|
|
11
|
+
export declare const getShowTokenList: (keystore_path: string, chain_name: string) => any;
|
|
12
|
+
export declare const showTokenList: (keystore_path: string) => Promise<void>;
|
|
13
|
+
export declare const enhancedBalanceDisplay: (keystore_path: string) => Promise<void>;
|
|
14
|
+
export declare const showNetwork: (keystore_path: string) => Promise<void>;
|
|
15
|
+
export declare const selectDefaultNetwork: (keystore_path: string) => Promise<any>;
|
|
16
|
+
export declare const getNetworkTypeByName: (keystore_path: string, network_name: string) => "solana" | "evm" | "unknown";
|
|
17
|
+
export declare const getNetworkInfoByName: (keystore_path: string, network_name: string) => any;
|
|
18
|
+
export declare const getAccountAddress: (keystore_path: string, keystore_slug: string, account_id: number) => any;
|
|
19
|
+
export declare const getPKAccountAddress: (keystore_path: string, keystore_slug: string) => any;
|
|
20
|
+
export declare const switchPPNetwork: (keystore_path: string, keystore_slug: string, account_id: number) => Promise<void>;
|
|
21
|
+
export declare const showAllAccounts: (keystore_path: string, keystore_slug: string, account_index: number) => Promise<void>;
|
|
22
|
+
export declare const switchNetworkByAccountName: (keystore_path: string, keystore_slug: string, is_keystore_slug: boolean) => Promise<void>;
|
|
23
|
+
export declare const accountBalanceLog: (keystore_slug: string, account_id: number, keystore_path: string, default_network: string) => Promise<void>;
|
|
24
|
+
export declare const getAccountBalance: (account: string, keystore_path: string, default_network: string) => Promise<Result>;
|
|
25
|
+
export declare const getDefaultNetworkByAddress: (keystore_path: string, keystore_slug: string, account_address: string) => any;
|
|
26
|
+
export declare const getEvmNetworks: (keystore_path: string) => any;
|
|
27
|
+
export declare const getStatus: (keystore_path: string) => any;
|
|
28
28
|
//# sourceMappingURL=network.d.ts.map
|
package/lib/network.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAMA,OAAO,EAQH,MAAM,EAIT,MAAM,SAAS,CAAC;AASjB,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAMA,OAAO,EAQH,MAAM,EAIT,MAAM,SAAS,CAAC;AASjB,eAAO,MAAM,aAAa,kBAAyB,MAAM,kBAcxD,CAAA;AAED,eAAO,MAAM,mBAAmB,kBAAyB,MAAM,oBAAoB,GAAG,kBA2BrF,CAAA;AAED,eAAO,MAAM,aAAa,kBAAyB,MAAM,mBAAmB,GAAG,kBA2E9E,CAAA;AAED,eAAO,MAAM,aAAa,kBAAyB,MAAM,mBAAmB,GAAG,kBAgB9E,CAAA;AAED,eAAO,MAAM,UAAU,kBAAyB,MAAM,kBAyDrD,CAAA;AAED,eAAO,MAAM,qBAAqB,kBAAyB,MAAM,kBAoEhE,CAAA;AAED,eAAO,MAAM,YAAY,kBAAyB,MAAM,kBAmBvD,CAAA;AAED,eAAO,MAAM,YAAY,kBAAyB,MAAM,kBAmCvD,CAAA;AAED,eAAO,MAAM,UAAU,oCAetB,CAAA;AAED,eAAO,MAAM,gBAAgB,kBAAmB,MAAM,cAAc,MAAM,QAUzE,CAAA;AAED,eAAO,MAAM,aAAa,kBAAyB,MAAM,kBA6DxD,CAAA;AAED,eAAO,MAAM,sBAAsB,kBAAyB,MAAM,kBA8BjE,CAAA;AAED,eAAO,MAAM,WAAW,kBAAyB,MAAM,kBAyBtD,CAAA;AAED,eAAO,MAAM,oBAAoB,kBAAyB,MAAM,iBAQ/D,CAAA;AAED,eAAO,MAAM,oBAAoB,kBAAmB,MAAM,gBAAgB,MAAM,iCAY/E,CAAA;AAED,eAAO,MAAM,oBAAoB,kBAAmB,MAAM,gBAAgB,MAAM,QAY/E,CAAA;AAED,eAAO,MAAM,iBAAiB,kBAAmB,MAAM,iBAAiB,MAAM,cAAc,MAAM,QAiBjG,CAAA;AAED,eAAO,MAAM,mBAAmB,kBAAmB,MAAM,iBAAiB,MAAM,QAG/E,CAAA;AAED,eAAO,MAAM,eAAe,kBAAyB,MAAM,iBAAiB,MAAM,cAAc,MAAM,kBA2DrG,CAAA;AAED,eAAO,MAAM,eAAe,kBAAyB,MAAM,iBAAiB,MAAM,iBAAiB,MAAM,kBAoCxG,CAAA;AAED,eAAO,MAAM,0BAA0B,kBAAyB,MAAM,iBAAiB,MAAM,oBAAoB,OAAO,kBA4DvH,CAAA;AAED,eAAO,MAAM,iBAAiB,kBAAyB,MAAM,cAAc,MAAM,iBAAiB,MAAM,mBAAmB,MAAM,kBAoBhI,CAAA;AAED,eAAO,MAAM,iBAAiB,YAAmB,MAAM,iBAAiB,MAAM,mBAAmB,MAAM,oBA4BtG,CAAA;AAED,eAAO,MAAM,0BAA0B,kBAAmB,MAAM,iBAAiB,MAAM,mBAAmB,MAAM,QAkB/G,CAAA;AAED,eAAO,MAAM,cAAc,kBAAmB,MAAM,QAYnD,CAAA;AAED,eAAO,MAAM,SAAS,kBAAmB,MAAM,QAI9C,CAAA"}
|
package/lib/ssh/client.d.ts
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
export interface SSHAuthConfig {
|
|
2
|
-
username: string;
|
|
3
|
-
privateKeyPath: string;
|
|
4
|
-
publicKeyPath: string;
|
|
5
|
-
passphrase?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface SSHConfig {
|
|
8
|
-
host: string;
|
|
9
|
-
port: number;
|
|
10
|
-
clientAuth: SSHAuthConfig;
|
|
11
|
-
useRemoteServer?: boolean;
|
|
12
|
-
remoteServer?: {
|
|
13
|
-
host: string;
|
|
14
|
-
port?: number;
|
|
15
|
-
auth: SSHAuthConfig;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export interface WativeRequest {
|
|
19
|
-
method: string;
|
|
20
|
-
keystoreId?: string;
|
|
21
|
-
chainId?: string;
|
|
22
|
-
params?: any;
|
|
23
|
-
}
|
|
24
|
-
export interface WativeResponse {
|
|
25
|
-
status: boolean;
|
|
26
|
-
data?: any;
|
|
27
|
-
msg?: string;
|
|
28
|
-
}
|
|
29
|
-
export declare class WativeSSHClient {
|
|
30
|
-
private config;
|
|
31
|
-
constructor(config: SSHConfig);
|
|
32
|
-
/**
|
|
33
|
-
* Execute a command on the SSH server
|
|
34
|
-
* @param command The command to execute
|
|
35
|
-
* @returns Promise<string> The command output
|
|
36
|
-
*/
|
|
37
|
-
private executeCommand;
|
|
38
|
-
/**
|
|
39
|
-
* Execute a command through remote server
|
|
40
|
-
* @param command The command to execute
|
|
41
|
-
* @returns Promise<string> The command output
|
|
42
|
-
*/
|
|
43
|
-
private executeCommandThroughRemoteServer;
|
|
44
|
-
/**
|
|
45
|
-
* Send a request to the Wative server
|
|
46
|
-
* @param request The request object
|
|
47
|
-
* @returns Promise<WativeResponse> The server response
|
|
48
|
-
*/
|
|
49
|
-
sendRequest(request: WativeRequest): Promise<WativeResponse>;
|
|
50
|
-
/**
|
|
51
|
-
* Get root account for a keystore and chain
|
|
52
|
-
* @param keystoreId The keystore ID
|
|
53
|
-
* @param chainId The chain ID
|
|
54
|
-
* @returns Promise<any> The root account data
|
|
55
|
-
*/
|
|
56
|
-
getRootAccount(keystoreId: string, chainId: string): Promise<any>;
|
|
57
|
-
/**
|
|
58
|
-
* Get sub accounts for a keystore and chain
|
|
59
|
-
* @param keystoreId The keystore ID
|
|
60
|
-
* @param chainId The chain ID
|
|
61
|
-
* @param startIndex Optional start index
|
|
62
|
-
* @param endIndex Optional end index
|
|
63
|
-
* @returns Promise<any> The sub account data
|
|
64
|
-
*/
|
|
65
|
-
getSubAccount(keystoreId: string, chainId: string, startIndex?: number, endIndex?: number): Promise<any>;
|
|
66
|
-
/**
|
|
67
|
-
* Sign a transaction
|
|
68
|
-
* @param txParams Transaction parameters
|
|
69
|
-
* @param rpcUrl RPC URL
|
|
70
|
-
* @returns Promise<any> The signed transaction
|
|
71
|
-
*/
|
|
72
|
-
signTransaction(txParams: any, rpcUrl: string): Promise<any>;
|
|
73
|
-
/**
|
|
74
|
-
* Sign and send a transaction
|
|
75
|
-
* @param txParams Transaction parameters
|
|
76
|
-
* @param rpcUrl RPC URL
|
|
77
|
-
* @returns Promise<any> The transaction hash
|
|
78
|
-
*/
|
|
79
|
-
signAndSendTransaction(txParams: any, rpcUrl: string): Promise<any>;
|
|
80
|
-
/**
|
|
81
|
-
* Sign a Solana transaction
|
|
82
|
-
* @param txParams Transaction parameters
|
|
83
|
-
* @param rpcUrl RPC URL
|
|
84
|
-
* @param priorityFee Priority fee
|
|
85
|
-
* @returns Promise<any> The signed transaction
|
|
86
|
-
*/
|
|
87
|
-
signSolanaTransaction(txParams: any, rpcUrl: string, priorityFee?: any): Promise<any>;
|
|
88
|
-
/**
|
|
89
|
-
* Send a signed Solana transaction
|
|
90
|
-
* @param txParams Transaction parameters with signature
|
|
91
|
-
* @param rpcUrl RPC URL
|
|
92
|
-
* @returns Promise<any> The transaction result
|
|
93
|
-
*/
|
|
94
|
-
sendSignedSolanaTransaction(txParams: any, rpcUrl: string): Promise<any>;
|
|
95
|
-
/**
|
|
96
|
-
* Sign a message
|
|
97
|
-
* @param account The account to sign with
|
|
98
|
-
* @param message The message to sign
|
|
99
|
-
* @returns Promise<any> The signature
|
|
100
|
-
*/
|
|
101
|
-
signMessage(account: string, message: string): Promise<any>;
|
|
102
|
-
/**
|
|
103
|
-
* Sign typed data (EIP-712)
|
|
104
|
-
* @param account The account to sign with
|
|
105
|
-
* @param domain The domain
|
|
106
|
-
* @param typesName The types name
|
|
107
|
-
* @param types The types
|
|
108
|
-
* @param message The message
|
|
109
|
-
* @returns Promise<any> The signature
|
|
110
|
-
*/
|
|
111
|
-
signTypedData(account: string, domain: string, typesName: string, types: string, message: string): Promise<any>;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Create a new Wative SSH client instance
|
|
115
|
-
* @param config SSH configuration
|
|
116
|
-
* @returns WativeSSHClient instance
|
|
117
|
-
*/
|
|
118
|
-
export declare function createWativeSSHClient(config: SSHConfig): WativeSSHClient;
|
|
119
|
-
export default WativeSSHClient;
|
|
1
|
+
export interface SSHAuthConfig {
|
|
2
|
+
username: string;
|
|
3
|
+
privateKeyPath: string;
|
|
4
|
+
publicKeyPath: string;
|
|
5
|
+
passphrase?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SSHConfig {
|
|
8
|
+
host: string;
|
|
9
|
+
port: number;
|
|
10
|
+
clientAuth: SSHAuthConfig;
|
|
11
|
+
useRemoteServer?: boolean;
|
|
12
|
+
remoteServer?: {
|
|
13
|
+
host: string;
|
|
14
|
+
port?: number;
|
|
15
|
+
auth: SSHAuthConfig;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface WativeRequest {
|
|
19
|
+
method: string;
|
|
20
|
+
keystoreId?: string;
|
|
21
|
+
chainId?: string;
|
|
22
|
+
params?: any;
|
|
23
|
+
}
|
|
24
|
+
export interface WativeResponse {
|
|
25
|
+
status: boolean;
|
|
26
|
+
data?: any;
|
|
27
|
+
msg?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class WativeSSHClient {
|
|
30
|
+
private config;
|
|
31
|
+
constructor(config: SSHConfig);
|
|
32
|
+
/**
|
|
33
|
+
* Execute a command on the SSH server
|
|
34
|
+
* @param command The command to execute
|
|
35
|
+
* @returns Promise<string> The command output
|
|
36
|
+
*/
|
|
37
|
+
private executeCommand;
|
|
38
|
+
/**
|
|
39
|
+
* Execute a command through remote server
|
|
40
|
+
* @param command The command to execute
|
|
41
|
+
* @returns Promise<string> The command output
|
|
42
|
+
*/
|
|
43
|
+
private executeCommandThroughRemoteServer;
|
|
44
|
+
/**
|
|
45
|
+
* Send a request to the Wative server
|
|
46
|
+
* @param request The request object
|
|
47
|
+
* @returns Promise<WativeResponse> The server response
|
|
48
|
+
*/
|
|
49
|
+
sendRequest(request: WativeRequest): Promise<WativeResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Get root account for a keystore and chain
|
|
52
|
+
* @param keystoreId The keystore ID
|
|
53
|
+
* @param chainId The chain ID
|
|
54
|
+
* @returns Promise<any> The root account data
|
|
55
|
+
*/
|
|
56
|
+
getRootAccount(keystoreId: string, chainId: string): Promise<any>;
|
|
57
|
+
/**
|
|
58
|
+
* Get sub accounts for a keystore and chain
|
|
59
|
+
* @param keystoreId The keystore ID
|
|
60
|
+
* @param chainId The chain ID
|
|
61
|
+
* @param startIndex Optional start index
|
|
62
|
+
* @param endIndex Optional end index
|
|
63
|
+
* @returns Promise<any> The sub account data
|
|
64
|
+
*/
|
|
65
|
+
getSubAccount(keystoreId: string, chainId: string, startIndex?: number, endIndex?: number): Promise<any>;
|
|
66
|
+
/**
|
|
67
|
+
* Sign a transaction
|
|
68
|
+
* @param txParams Transaction parameters
|
|
69
|
+
* @param rpcUrl RPC URL
|
|
70
|
+
* @returns Promise<any> The signed transaction
|
|
71
|
+
*/
|
|
72
|
+
signTransaction(txParams: any, rpcUrl: string): Promise<any>;
|
|
73
|
+
/**
|
|
74
|
+
* Sign and send a transaction
|
|
75
|
+
* @param txParams Transaction parameters
|
|
76
|
+
* @param rpcUrl RPC URL
|
|
77
|
+
* @returns Promise<any> The transaction hash
|
|
78
|
+
*/
|
|
79
|
+
signAndSendTransaction(txParams: any, rpcUrl: string): Promise<any>;
|
|
80
|
+
/**
|
|
81
|
+
* Sign a Solana transaction
|
|
82
|
+
* @param txParams Transaction parameters
|
|
83
|
+
* @param rpcUrl RPC URL
|
|
84
|
+
* @param priorityFee Priority fee
|
|
85
|
+
* @returns Promise<any> The signed transaction
|
|
86
|
+
*/
|
|
87
|
+
signSolanaTransaction(txParams: any, rpcUrl: string, priorityFee?: any): Promise<any>;
|
|
88
|
+
/**
|
|
89
|
+
* Send a signed Solana transaction
|
|
90
|
+
* @param txParams Transaction parameters with signature
|
|
91
|
+
* @param rpcUrl RPC URL
|
|
92
|
+
* @returns Promise<any> The transaction result
|
|
93
|
+
*/
|
|
94
|
+
sendSignedSolanaTransaction(txParams: any, rpcUrl: string): Promise<any>;
|
|
95
|
+
/**
|
|
96
|
+
* Sign a message
|
|
97
|
+
* @param account The account to sign with
|
|
98
|
+
* @param message The message to sign
|
|
99
|
+
* @returns Promise<any> The signature
|
|
100
|
+
*/
|
|
101
|
+
signMessage(account: string, message: string): Promise<any>;
|
|
102
|
+
/**
|
|
103
|
+
* Sign typed data (EIP-712)
|
|
104
|
+
* @param account The account to sign with
|
|
105
|
+
* @param domain The domain
|
|
106
|
+
* @param typesName The types name
|
|
107
|
+
* @param types The types
|
|
108
|
+
* @param message The message
|
|
109
|
+
* @returns Promise<any> The signature
|
|
110
|
+
*/
|
|
111
|
+
signTypedData(account: string, domain: string, typesName: string, types: string, message: string): Promise<any>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Create a new Wative SSH client instance
|
|
115
|
+
* @param config SSH configuration
|
|
116
|
+
* @returns WativeSSHClient instance
|
|
117
|
+
*/
|
|
118
|
+
export declare function createWativeSSHClient(config: SSHConfig): WativeSSHClient;
|
|
119
|
+
export default WativeSSHClient;
|
|
120
120
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { SSHServiceConfig } from './types';
|
|
2
|
-
export declare class SSHConfigManager {
|
|
3
|
-
private configDir;
|
|
4
|
-
private keystorePath;
|
|
5
|
-
constructor(configDir?: string, keystorePath?: string);
|
|
6
|
-
/**
|
|
7
|
-
* 获取 keystore 路径
|
|
8
|
-
*/
|
|
9
|
-
getKeystorePath(): string;
|
|
10
|
-
/**
|
|
11
|
-
* 获取配置目录路径
|
|
12
|
-
*/
|
|
13
|
-
getConfigDir(): string;
|
|
14
|
-
/**
|
|
15
|
-
* 创建新的 SSH 服务配置
|
|
16
|
-
*/
|
|
17
|
-
createServiceConfig(serviceName: string, port: number, allowedKeystores: string[], clientName?: string, description?: string): Promise<SSHServiceConfig>;
|
|
18
|
-
/**
|
|
19
|
-
* 加载服务配置
|
|
20
|
-
*/
|
|
21
|
-
loadServiceConfig(serviceName: string): SSHServiceConfig;
|
|
22
|
-
serviceIsExist(serviceName: string): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* 获取所有服务配置列表
|
|
25
|
-
*/
|
|
26
|
-
listServiceConfigs(): string[];
|
|
27
|
-
/**
|
|
28
|
-
* 删除服务配置
|
|
29
|
-
*/
|
|
30
|
-
removeServiceConfig(serviceName: string): void;
|
|
31
|
-
/**
|
|
32
|
-
* 更新服务配置
|
|
33
|
-
*/
|
|
34
|
-
updateServiceConfig(serviceName: string, updates: Partial<SSHServiceConfig>): void;
|
|
35
|
-
/**
|
|
36
|
-
* 验证 keystore 密码
|
|
37
|
-
*/
|
|
38
|
-
validateKeystorePasswords(keystoreIds: string[], passwords: {
|
|
39
|
-
[keystoreId: string]: string;
|
|
40
|
-
}): Promise<{
|
|
41
|
-
[keystoreId: string]: boolean;
|
|
42
|
-
}>;
|
|
43
|
-
/**
|
|
44
|
-
* 生成默认配置(向后兼容)
|
|
45
|
-
*/
|
|
46
|
-
private isValidServiceName;
|
|
47
|
-
private isPortInUse;
|
|
48
|
-
private generateServiceKeyPair;
|
|
49
|
-
private generateClientKeyPair;
|
|
50
|
-
private generateSecurePassphrase;
|
|
51
|
-
private getServiceConfigPath;
|
|
52
|
-
private saveServiceConfig;
|
|
53
|
-
private parseConfigData;
|
|
54
|
-
}
|
|
1
|
+
import { SSHServiceConfig } from './types';
|
|
2
|
+
export declare class SSHConfigManager {
|
|
3
|
+
private configDir;
|
|
4
|
+
private keystorePath;
|
|
5
|
+
constructor(configDir?: string, keystorePath?: string);
|
|
6
|
+
/**
|
|
7
|
+
* 获取 keystore 路径
|
|
8
|
+
*/
|
|
9
|
+
getKeystorePath(): string;
|
|
10
|
+
/**
|
|
11
|
+
* 获取配置目录路径
|
|
12
|
+
*/
|
|
13
|
+
getConfigDir(): string;
|
|
14
|
+
/**
|
|
15
|
+
* 创建新的 SSH 服务配置
|
|
16
|
+
*/
|
|
17
|
+
createServiceConfig(serviceName: string, port: number, allowedKeystores: string[], clientName?: string, description?: string): Promise<SSHServiceConfig>;
|
|
18
|
+
/**
|
|
19
|
+
* 加载服务配置
|
|
20
|
+
*/
|
|
21
|
+
loadServiceConfig(serviceName: string): SSHServiceConfig;
|
|
22
|
+
serviceIsExist(serviceName: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 获取所有服务配置列表
|
|
25
|
+
*/
|
|
26
|
+
listServiceConfigs(): string[];
|
|
27
|
+
/**
|
|
28
|
+
* 删除服务配置
|
|
29
|
+
*/
|
|
30
|
+
removeServiceConfig(serviceName: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* 更新服务配置
|
|
33
|
+
*/
|
|
34
|
+
updateServiceConfig(serviceName: string, updates: Partial<SSHServiceConfig>): void;
|
|
35
|
+
/**
|
|
36
|
+
* 验证 keystore 密码
|
|
37
|
+
*/
|
|
38
|
+
validateKeystorePasswords(keystoreIds: string[], passwords: {
|
|
39
|
+
[keystoreId: string]: string;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
[keystoreId: string]: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* 生成默认配置(向后兼容)
|
|
45
|
+
*/
|
|
46
|
+
private isValidServiceName;
|
|
47
|
+
private isPortInUse;
|
|
48
|
+
private generateServiceKeyPair;
|
|
49
|
+
private generateClientKeyPair;
|
|
50
|
+
private generateSecurePassphrase;
|
|
51
|
+
private getServiceConfigPath;
|
|
52
|
+
private saveServiceConfig;
|
|
53
|
+
private parseConfigData;
|
|
54
|
+
}
|
|
55
55
|
//# sourceMappingURL=config_manager.d.ts.map
|
package/lib/ssh/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { WativeSSHClient, SSHConfig, createWativeSSHClient } from './client';
|
|
2
|
-
export { WativeWielderServer } from './wative_server';
|
|
3
|
-
export { SSHConfigManager } from './config_manager';
|
|
4
|
-
export * from './types';
|
|
5
|
-
export * from './utils';
|
|
6
|
-
declare const mainWithConfig: (configName?: string) => Promise<void>;
|
|
7
|
-
export { mainWithConfig };
|
|
1
|
+
export { WativeSSHClient, SSHConfig, createWativeSSHClient } from './client';
|
|
2
|
+
export { WativeWielderServer } from './wative_server';
|
|
3
|
+
export { SSHConfigManager } from './config_manager';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
declare const mainWithConfig: (configName?: string) => Promise<void>;
|
|
7
|
+
export { mainWithConfig };
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/ssh/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssh/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAKxB,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssh/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAKxB,QAAA,MAAM,cAAc,gBAAuB,MAAM,kBA+BhD,CAAC;AAsBF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|