@enclave-hq/wallet-sdk 1.1.4 → 1.1.5
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/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +5 -1
- package/dist/react/index.d.ts +5 -1
- package/dist/react/index.js +11 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +11 -0
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.d.mts
CHANGED
|
@@ -36,7 +36,11 @@ interface Account {
|
|
|
36
36
|
balance?: string;
|
|
37
37
|
name?: string;
|
|
38
38
|
}
|
|
39
|
-
interface
|
|
39
|
+
interface ISigner {
|
|
40
|
+
signMessage(message: string): Promise<string>;
|
|
41
|
+
getAddress(): Promise<string>;
|
|
42
|
+
}
|
|
43
|
+
interface IWalletAdapter extends ISigner {
|
|
40
44
|
readonly type: WalletType;
|
|
41
45
|
readonly chainType: ChainType;
|
|
42
46
|
readonly name: string;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -36,7 +36,11 @@ interface Account {
|
|
|
36
36
|
balance?: string;
|
|
37
37
|
name?: string;
|
|
38
38
|
}
|
|
39
|
-
interface
|
|
39
|
+
interface ISigner {
|
|
40
|
+
signMessage(message: string): Promise<string>;
|
|
41
|
+
getAddress(): Promise<string>;
|
|
42
|
+
}
|
|
43
|
+
interface IWalletAdapter extends ISigner {
|
|
40
44
|
readonly type: WalletType;
|
|
41
45
|
readonly chainType: ChainType;
|
|
42
46
|
readonly name: string;
|
package/dist/react/index.js
CHANGED
|
@@ -120,6 +120,17 @@ var WalletAdapter = class extends EventEmitter__default.default {
|
|
|
120
120
|
this.state = "disconnected" /* DISCONNECTED */;
|
|
121
121
|
this.currentAccount = null;
|
|
122
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Get the signer's address (implements ISigner interface)
|
|
125
|
+
* Returns the native address of the current account
|
|
126
|
+
*/
|
|
127
|
+
async getAddress() {
|
|
128
|
+
this.ensureConnected();
|
|
129
|
+
if (!this.currentAccount) {
|
|
130
|
+
throw new WalletNotConnectedError(this.type);
|
|
131
|
+
}
|
|
132
|
+
return this.currentAccount.nativeAddress;
|
|
133
|
+
}
|
|
123
134
|
signTransaction(_transaction) {
|
|
124
135
|
throw new MethodNotSupportedError("signTransaction", this.type);
|
|
125
136
|
}
|