Skip to content

Commit 4e76a73

Browse files
fix: add deprecated message (#488)
1 parent d1da20f commit 4e76a73

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

packages/get-starknet/src/wallet.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export class MetaMaskSnapWallet implements StarknetWindowObject {
4343

4444
icon: string;
4545

46+
/**
47+
* Determines whether the wallet is connected.
48+
* @deprecated This property is deprecated and will be removed in a future release.
49+
*/
4650
isConnected: boolean;
4751

4852
snap: MetaMaskSnap;
@@ -146,6 +150,10 @@ export class MetaMaskSnapWallet implements StarknetWindowObject {
146150
return accountResponse.address;
147151
}
148152

153+
/**
154+
* Starknet.js Account interface.
155+
* @deprecated This property is deprecated and will be removed in a future release.
156+
*/
149157
get account() {
150158
if (!this.#account) {
151159
if (!this.selectedAddress) {
@@ -159,6 +167,10 @@ export class MetaMaskSnapWallet implements StarknetWindowObject {
159167
return this.#account;
160168
}
161169

170+
/**
171+
* Starknet.js Provider interface.
172+
* @deprecated This property is deprecated and will be removed in a future release.
173+
*/
162174
get provider(): ProviderInterface {
163175
if (!this.#provider) {
164176
if (!this.#network) {
@@ -172,10 +184,18 @@ export class MetaMaskSnapWallet implements StarknetWindowObject {
172184
return this.#provider;
173185
}
174186

187+
/**
188+
* The selected account's address of the wallet.
189+
* @deprecated This property is deprecated and will be removed in a future release. Use RPC `wallet_requestAccounts` instead.
190+
*/
175191
get selectedAddress(): string {
176192
return this.#selectedAddress;
177193
}
178194

195+
/**
196+
* The selected chain id of the wallet.
197+
* @deprecated This property is deprecated and will be removed in a future release. Use RPC `wallet_requestChainId` instead.
198+
*/
179199
get chainId(): string {
180200
return this.#chainId;
181201
}
@@ -231,12 +251,17 @@ export class MetaMaskSnapWallet implements StarknetWindowObject {
231251
* accommodate potential support for multiple addresses in the future.
232252
*
233253
* @returns An array of address.
254+
* @deprecated This property is deprecated and will be removed in a future release.
234255
*/
235256
async enable() {
236257
await this.init();
237258
return [this.selectedAddress];
238259
}
239260

261+
/**
262+
* Checks if the wallet is preauthorized.
263+
* @deprecated This property is deprecated and will be removed in a future release.
264+
*/
240265
async isPreauthorized() {
241266
return true;
242267
}

0 commit comments

Comments
 (0)