@bestinslot/wallet-kit 0.7.0 → 0.7.1
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/node.js +427 -423
- package/dist/types/api/wallet.node.d.ts +1 -1
- package/dist/types/provider/local.d.ts +14 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { LocalWalletSource, LocalWalletType } from '../provider/local';
|
|
2
|
-
export { createWallet, saveWallet as connectLocalWallet } from '../provider/local';
|
|
2
|
+
export { createWallet, lockLocalWallet, saveWallet as connectLocalWallet } from '../provider/local';
|
|
3
3
|
export * from './wallet';
|
|
4
4
|
export type { LocalWalletSource, LocalWalletType };
|
|
@@ -36,4 +36,18 @@ export declare function saveWallet(privKeyWIF: string, network: BISNetwork, wall
|
|
|
36
36
|
export declare function createWallet(network: BISNetwork, walletType?: LocalWalletType, sourceWallet?: LocalWalletSource): Promise<BISWallet & {
|
|
37
37
|
wif: string;
|
|
38
38
|
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Locks the local (WIF) wallet by evicting all in-memory key material and
|
|
41
|
+
* clearing the connected session. After calling this, no private key remains
|
|
42
|
+
* resident in the process: `getSession()` returns `null`, and any subsequent
|
|
43
|
+
* sign/send call will fail until a wallet is reconnected via {@link saveWallet}
|
|
44
|
+
* (`connectLocalWallet`) or {@link createWallet}. (The exact error depends on the
|
|
45
|
+
* call path — e.g. a missing key or, if the network was also cleared, a network
|
|
46
|
+
* check — so callers should not rely on a specific error message.)
|
|
47
|
+
*
|
|
48
|
+
* This is intended for callers (e.g. an MCP server) that want to hold a key
|
|
49
|
+
* only for the duration of a single approved operation rather than keep it
|
|
50
|
+
* resident for the life of the process.
|
|
51
|
+
*/
|
|
52
|
+
export declare function lockLocalWallet(): void;
|
|
39
53
|
export declare const LOCAL: BISProvider;
|
package/package.json
CHANGED