mirror of
https://github.com/status-im/status-lib.git
synced 2025-01-17 16:01:21 +00:00
23 lines
680 B
Nim
23 lines
680 B
Nim
import json
|
|
import ./core, ./response_type
|
|
|
|
export response_type
|
|
|
|
proc resolver*(username: string): RpcResponse[JsonNode] {.raises: [Exception].} =
|
|
# TODO: Use a real chain id
|
|
let payload = %* [1, username]
|
|
|
|
return core.callPrivateRPC("ens_resolver", payload)
|
|
|
|
proc contentHash*(username: string): RpcResponse[JsonNode] {.raises: [Exception].} =
|
|
# TODO: Use a real chain id
|
|
let payload = %* [1, username]
|
|
|
|
return core.callPrivateRPC("ens_contentHash", payload)
|
|
|
|
proc resourceURL*(username: string): RpcResponse[JsonNode] {.raises: [Exception].} =
|
|
# TODO: Use a real chain id
|
|
let payload = %* [1, username]
|
|
return core.callPrivateRPC("ens_resourceURL", payload)
|
|
|