diff --git a/src/lib/modules/ens/README.md b/src/lib/modules/ens/README.md new file mode 100644 index 000000000..16ff08b1c --- /dev/null +++ b/src/lib/modules/ens/README.md @@ -0,0 +1,103 @@ +## Embark ENS module + +This module implements ENS support in embark. It: +* registers console commands to interact with ENS +* deploys & setups ENS contracts depending on the network +* implements ENS support in EmbarkJS +* setups generated code acording to the config + +### API + +**command: `ens:resolve`** - _returns the address of an ens name_ + +arguments: + +* `name` - ens name to resolve + +response: + +* `error` - if an error occurs, null otherwise +* `address` - address associated to the ens `name` given + +**command: `ens:isENSName`** - _checks is it's a (valid) ENS name_ + +arguments: + +* `name` - ens name to validate + +response: + +* `error` - if an error occurs, null otherwise +* `result` - true/false depending if `name` given is a valid ens name + +**command: `storage:ens:associate`** - _associates an hash to an ENS domain_ + +arguments: + +* `options` + * `name` - ens name + * `storageHash` - hash to associate + +response: + +* `error` - if an error occurs, null otherwise + +### Web API + +**endpoint: GET `/embark-api/ens/resolve`** - _returns the address of an ens name_ + +arguments: + +* `name` - ens name to resolve + +response: + +``` +{ + address:
+} +``` + +**endpoint: GET `/embark-api/ens/lookup`** - _returns the ens name of an address_ + +arguments: + +* `address` - address to query + +response: + +``` +{ + name: