status-lib/status/custom_tokens.nim
Sale Djenic 4eab2fa86b refactor: repo cleaning
- all unused/unnecessary files remove
- `statusgo_backend_new` content promoted to main content
- only necessary submodules for `status-lib` are kept
2022-02-01 11:16:20 +01:00

16 lines
611 B
Nim

import json
import ./core, ./response_type
export response_type
proc getCustomTokens*(): RpcResponse[JsonNode] {.raises: [Exception].} =
return callPrivateRPC("wallet_getCustomTokens", %* [])
proc addCustomToken*(address: string, name: string, symbol: string, decimals: int, color: string) {.raises: [Exception].} =
discard callPrivateRPC("wallet_addCustomToken", %* [
{"address": address, "name": name, "symbol": symbol, "decimals": decimals, "color": color}
])
proc removeCustomToken*(address: string) {.raises: [Exception].} =
discard callPrivateRPC("wallet_deleteCustomToken", %* [address])