23 lines
680 B
Nim
Raw Normal View History

2021-10-27 16:09:36 -04:00
import json
2021-12-20 11:51:41 +01:00
import ./core, ./response_type
2021-10-27 16:09:36 -04:00
2021-12-20 11:51:41 +01:00
export response_type
2021-10-27 16:09:36 -04:00
2021-12-20 11:51:41 +01:00
proc resolver*(username: string): RpcResponse[JsonNode] {.raises: [Exception].} =
# TODO: Use a real chain id
let payload = %* [1, username]
2021-10-27 16:09:36 -04:00
2021-12-20 11:51:41 +01:00
return core.callPrivateRPC("ens_resolver", payload)
2021-10-27 16:09:36 -04:00
2021-12-20 11:51:41 +01:00
proc contentHash*(username: string): RpcResponse[JsonNode] {.raises: [Exception].} =
# TODO: Use a real chain id
let payload = %* [1, username]
2021-10-27 16:09:36 -04:00
2021-12-20 11:51:41 +01:00
return core.callPrivateRPC("ens_contentHash", payload)
2021-10-27 16:09:36 -04:00
2021-12-20 11:51:41 +01:00
proc resourceURL*(username: string): RpcResponse[JsonNode] {.raises: [Exception].} =
# TODO: Use a real chain id
let payload = %* [1, username]
return core.callPrivateRPC("ens_resourceURL", payload)
2021-10-27 16:09:36 -04:00