From 7715590b3efda1eb39a2600ffc858905265f5d12 Mon Sep 17 00:00:00 2001
From: Aaron DeRuvo <aaron.deruvo@clabs.co>
Date: Mon, 29 Jul 2024 14:35:20 +0200
Subject: [PATCH] Deprecation Notices (#313)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Adds changesets which contain deprecation notices to the wallet-rpc
package and the reserve command in the cli

<!-- start pr-codex -->

---

## PR-Codex overview
This PR deprecates the reserve commands and `@celo/wallet-rpc`.

### Detailed summary
- Deprecated reserve commands with forum links
- Deprecated `@celo/wallet-rpc` with forum links
- Updated deprecation warnings in code and documentation

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
---
 .changeset/nasty-clocks-hear.md               |  2 +-
 .changeset/tricky-months-rescue.md            |  5 ++++
 .changeset/twelve-cups-suffer.md              |  5 ++++
 .../classes/rpc_signer.RpcSigner.md           | 26 +++++++++++--------
 .../classes/rpc_wallet.RpcWallet.md           | 19 +++++++++-----
 packages/cli/src/commands/reserve/status.ts   |  3 +++
 .../cli/src/commands/reserve/transfergold.ts  |  3 +++
 .../sdk/wallets/wallet-rpc/src/rpc-signer.ts  |  1 +
 .../sdk/wallets/wallet-rpc/src/rpc-wallet.ts  |  4 ++-
 9 files changed, 49 insertions(+), 19 deletions(-)
 create mode 100644 .changeset/tricky-months-rescue.md
 create mode 100644 .changeset/twelve-cups-suffer.md

diff --git a/.changeset/nasty-clocks-hear.md b/.changeset/nasty-clocks-hear.md
index 60231bf9a..2be7b1d73 100644
--- a/.changeset/nasty-clocks-hear.md
+++ b/.changeset/nasty-clocks-hear.md
@@ -2,4 +2,4 @@
 '@celo/celocli': patch
 ---
 
-network:whitelist now oututs as a table, typical table formatting flags are now accepted such as --csv
+network:whitelist now outputs as a table accepting typical table formatting flags such as --csv
diff --git a/.changeset/tricky-months-rescue.md b/.changeset/tricky-months-rescue.md
new file mode 100644
index 000000000..62156cdc8
--- /dev/null
+++ b/.changeset/tricky-months-rescue.md
@@ -0,0 +1,5 @@
+---
+'@celo/celocli': patch
+---
+
+Deprecate reserve commands see https://forum.celo.org/t/sunset-of-reserve-commands/8454
diff --git a/.changeset/twelve-cups-suffer.md b/.changeset/twelve-cups-suffer.md
new file mode 100644
index 000000000..77a49eaeb
--- /dev/null
+++ b/.changeset/twelve-cups-suffer.md
@@ -0,0 +1,5 @@
+---
+'@celo/wallet-rpc': patch
+---
+
+Deprecate @celo/wallet-rpc see https://forum.celo.org/t/deprecation-of-celo-wallet-rpc/8452
diff --git a/docs/sdk/wallet-rpc/classes/rpc_signer.RpcSigner.md b/docs/sdk/wallet-rpc/classes/rpc_signer.RpcSigner.md
index ae498e070..8affc0b25 100644
--- a/docs/sdk/wallet-rpc/classes/rpc_signer.RpcSigner.md
+++ b/docs/sdk/wallet-rpc/classes/rpc_signer.RpcSigner.md
@@ -6,6 +6,10 @@
 
 Implements the signer interface on top of the JSON-RPC interface.
 
+**`Deprecated`**
+
+https://forum.celo.org/t/deprecation-of-celo-wallet-rpc/8452
+
 ## Implements
 
 - `Signer`
@@ -53,7 +57,7 @@ Construct a new instance of the RPC signer
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:64](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L64)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:65](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L65)
 
 ## Methods
 
@@ -77,7 +81,7 @@ Signer.computeSharedSecret
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:173](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L173)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:174](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L174)
 
 ___
 
@@ -101,7 +105,7 @@ Signer.decrypt
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:164](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L164)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:165](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L165)
 
 ___
 
@@ -119,7 +123,7 @@ Signer.getNativeKey
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:122](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L122)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:123](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L123)
 
 ___
 
@@ -140,7 +144,7 @@ ___
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:72](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L72)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:73](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L73)
 
 ___
 
@@ -154,7 +158,7 @@ ___
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:146](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L146)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:147](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L147)
 
 ___
 
@@ -178,7 +182,7 @@ Signer.signPersonalMessage
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:114](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L114)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:115](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L115)
 
 ___
 
@@ -198,7 +202,7 @@ ___
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:78](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L78)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:79](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L79)
 
 ___
 
@@ -216,7 +220,7 @@ Signer.signTransaction
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:101](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L101)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:102](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L102)
 
 ___
 
@@ -240,7 +244,7 @@ Signer.signTypedData
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:105](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L105)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:106](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L106)
 
 ___
 
@@ -261,4 +265,4 @@ ___
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-signer.ts:124](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L124)
+[sdk/wallets/wallet-rpc/src/rpc-signer.ts:125](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L125)
diff --git a/docs/sdk/wallet-rpc/classes/rpc_wallet.RpcWallet.md b/docs/sdk/wallet-rpc/classes/rpc_wallet.RpcWallet.md
index fe1de1467..887d9e14c 100644
--- a/docs/sdk/wallet-rpc/classes/rpc_wallet.RpcWallet.md
+++ b/docs/sdk/wallet-rpc/classes/rpc_wallet.RpcWallet.md
@@ -4,6 +4,13 @@
 
 [rpc-wallet](../modules/rpc_wallet.md).RpcWallet
 
+WARNING: This class should only be used with well-permissioned providers (ie IPC)
+  to avoid sensitive user 'privateKey' and 'passphrase' information being exposed
+
+**`Deprecated`**
+
+https://forum.celo.org/t/deprecation-of-celo-wallet-rpc/8452
+
 ## Hierarchy
 
 - `RemoteWallet`\<[`RpcSigner`](rpc_signer.RpcSigner.md)\>
@@ -62,7 +69,7 @@ RemoteWallet\&lt;RpcSigner\&gt;.constructor
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:20](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L20)
+[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:22](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L22)
 
 ## Properties
 
@@ -109,7 +116,7 @@ UnlockableWallet.addAccount
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L38)
+[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:40](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L40)
 
 ___
 
@@ -268,7 +275,7 @@ UnlockableWallet.isAccountUnlocked
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L54)
+[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L56)
 
 ___
 
@@ -286,7 +293,7 @@ RemoteWallet.loadAccountSigners
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:25](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L25)
+[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:27](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L27)
 
 ___
 
@@ -381,7 +388,7 @@ RemoteWallet.signTransaction
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:64](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L64)
+[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:66](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L66)
 
 ___
 
@@ -438,4 +445,4 @@ UnlockableWallet.unlockAccount
 
 #### Defined in
 
-[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:49](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L49)
+[sdk/wallets/wallet-rpc/src/rpc-wallet.ts:51](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L51)
diff --git a/packages/cli/src/commands/reserve/status.ts b/packages/cli/src/commands/reserve/status.ts
index c8f4809ca..d29d9ecda 100644
--- a/packages/cli/src/commands/reserve/status.ts
+++ b/packages/cli/src/commands/reserve/status.ts
@@ -1,6 +1,9 @@
 import { BaseCommand } from '../../base'
 import { printValueMapRecursive } from '../../utils/cli'
 
+/**
+ * @deprecated https://forum.celo.org/t/sunset-of-reserve-commands/8454
+ */
 export default class ReserveStatus extends BaseCommand {
   static description = 'Shows information about reserve'
 
diff --git a/packages/cli/src/commands/reserve/transfergold.ts b/packages/cli/src/commands/reserve/transfergold.ts
index c081a0e28..e5b0a8552 100644
--- a/packages/cli/src/commands/reserve/transfergold.ts
+++ b/packages/cli/src/commands/reserve/transfergold.ts
@@ -4,6 +4,9 @@ import { newCheckBuilder } from '../../utils/checks'
 import { displaySendTx } from '../../utils/cli'
 import { CustomFlags } from '../../utils/command'
 
+/**
+ @deprecated https://forum.celo.org/t/sunset-of-reserve-commands/8454
+*/
 export default class TransferGold extends BaseCommand {
   static description = 'Transfers reserve celo to other reserve address'
 
diff --git a/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts b/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts
index 3939283ad..10fe63ef6 100644
--- a/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts
+++ b/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts
@@ -48,6 +48,7 @@ type RpcSignerEndpointResult = {
 
 /**
  * Implements the signer interface on top of the JSON-RPC interface.
+ * @deprecated https://forum.celo.org/t/deprecation-of-celo-wallet-rpc/8452
  */
 export class RpcSigner implements Signer {
   /**
diff --git a/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts b/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts
index a12713c07..8a98b59aa 100644
--- a/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts
+++ b/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts
@@ -10,9 +10,11 @@ export enum RpcWalletErrors {
   AccountAlreadyExists = 'RpcWallet: account already exists',
 }
 
-/*
+/**
  *   WARNING: This class should only be used with well-permissioned providers (ie IPC)
  *   to avoid sensitive user 'privateKey' and 'passphrase' information being exposed
+ *
+ * @deprecated https://forum.celo.org/t/deprecation-of-celo-wallet-rpc/8452
  */
 export class RpcWallet extends RemoteWallet<RpcSigner> implements UnlockableWallet {
   protected readonly rpc: RpcCaller