diff --git a/status/statusgo_backend_new/saved_addresses.nim b/status/statusgo_backend_new/saved_addresses.nim new file mode 100644 index 0000000..e130331 --- /dev/null +++ b/status/statusgo_backend_new/saved_addresses.nim @@ -0,0 +1,16 @@ +import json +import ./core, ./response_type + +export response_type + +proc addSavedAddress*(name, address: string): RpcResponse[JsonNode] {.raises: [Exception].} = + let payload = %* [{"name": name, "address": address}] + return callPrivateRPC("wallet_addSavedAddress", payload) + +proc deleteSavedAddress*(address: string): RpcResponse[JsonNode] {.raises: [Exception].} = + let payload = %* [address] + return callPrivateRPC("wallet_deleteSavedAddress", payload) + +proc getSavedAddresses*(): RpcResponse[JsonNode] {.raises: [Exception].} = + let payload = %* [] + return callPrivateRPC("wallet_getSavedAddresses", payload)