Library for NBdomain
- setOpay(opay)
-
Set opay object to be used in webpage.
-
sha256(string) ⇒
string
-
getDomain(root) ⇒
object
- setPrivateKey(privateKey)
-
makePublic(domain) ⇒
json
-
Make a domain as public, so everyone can write to it. inreversible.
-
writePublicDomain(option) ⇒
json
-
Write contents to a public domain
-
updateKey2(option) ⇒
json
-
verifySig(data_hash, strSig) ⇒
bool
-
buy(option) ⇒
json
-
getNodeInfo() ⇒
json
-
queryDomain(domain, full) ⇒
json
-
domainFromAddress(address) ⇒
json
Set opay object to be used in webpage.
Kind: global function
Param | Type | Description |
---|---|---|
opay | object |
opay or opay2 object |
Kind: global function
Returns: string
- hashed string
Param | Type | Description |
---|---|---|
string | string |
to hash |
Kind: global function
Returns: object
- domain object
Param | Type | Description |
---|---|---|
root | string |
domain name |
Kind: global function
Param | Type | Description |
---|---|---|
privateKey | string |
to be used with nodeJS app |
Make a domain as public, so everyone can write to it. inreversible.
Kind: global function
Returns: json
- result
Param | Type | Description |
---|---|---|
domain | string |
to set as public |
Write contents to a public domain
Kind: global function
Returns: json
- result of the update
Param | Type | Description |
---|---|---|
option | object |
option of the update |
option.kv | object |
key/value pairs. eg: for key {abc:{abc:"234"}} or {abc:{def:100}} or for keys ab and cd {ab:100,cd:200} |
option.isUser | Boolean |
indicate it's for key.domain.tld or key@domain.tld |
option.pay | Array.<object> |
object array. eg: [{address:"dfdaf"},value:1000}]. some blockchain, like ar, only supports one receiver per tx |
Kind: global function
Returns: json
- result of the update
Param | Type | Description |
---|---|---|
option | object |
option of the update |
option.kv | object |
key/value pairs. eg: for key {abc:{abc:"234"}} or {abc:{def:100}} or for keys ab and cd {ab:100,cd:200} |
option.tags | string |
string. eg: for key {abc:{abc:"234"}} or {abc:{def:100}} or for keys ab and cd {ab:100,cd:200} |
option.isUser | Boolean |
indicate it's for key.domain.tld or key@domain.tld |
option.pay | Array.<object> |
object array. eg: [{address:"dfdaf"},value:1000}]. some blockchain, like ar, only supports one receiver per tx |
Kind: global function
Returns: bool
- result of verify
Param | Type | Description |
---|---|---|
data_hash | string |
hasded string of data |
strSig | string |
signature |
Kind: global function
Returns: json
- result
Param | Type | Description |
---|---|---|
option | object |
- |
option.domain | domain |
domain to buy |
Kind: global function
Returns: json
- nodeInfo from node
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
domain | string |
one or more domains, separated by ',' .eg "test.b" "test.b,www.abc.b" "aaa.test886.test/all,aaa.test886.test/1" | |
full | Boolean |
false |
Kind: global function
Returns: json
- result
Param | Type | Description |
---|---|---|
address | string |
address of the domains |