mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-03 01:13:55 +00:00
d5c984c592
If a package uses only `.js` then supply `--extensions ".js"`. If a package uses only `.ts` then supply `--extensions ".ts"`. If a package uses both, then supply `--extensions ".js,.ts"`. The reason for this is that adding/removing TS/JS support ought to occasion revising a package's `package.json` file and adjusting other scripts as well, e.g. for linting. With these changes, it won't work to simply start adding `.ts` files in a package's `src/` directory, which should prompt the developer to review `package.json` and make the appropriate changes, and/or other developers may realize changes need to be made during code review.
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 otherwiseaddress
- address associated to the ensname
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 otherwiseresult
- true/false depending ifname
given is a valid ens name
command: storage:ens:associate
- associates an hash to an ENS domain
arguments:
options
name
- ens namestorageHash
- 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: <address of ens name>
}
endpoint: GET /embark-api/ens/lookup
- returns the ens name of an address
arguments:
address
- address to query
response:
{
name: <ens name of address>
}
endpoint: POST /embark-api/ens/register
registers a domain or subdomain
arguments:
subdomain
- ens domainaddress
- address to associate
response:
{
name: <ens name>
address: <address>
}
Dependencies
- async
- eth-ens-namehash
- embarkjs.utils
- secureSend
- embark utils
- soliditySha3
- ZERO_ADDRESS
- hashTo32ByteHexString
- joinPath
- recursiveMerge