-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(neon-domain): Add simple api page for neon-domain (#356)
- Add simple page for neon-domain - Add example for neon-domain readme - Update release notes for v3 and v4
- Loading branch information
1 parent
d98a842
commit a29cca5
Showing
10 changed files
with
80 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
id: domain | ||
title: neon-domain | ||
--- | ||
|
||
The `domain` module is available as the plugin `@cityofzion/neon-domain`. | ||
|
||
```js | ||
import _Neon from "@cityofzion/neon-js"; | ||
import domainPlugin from "@cityofzion/neon-domain"; | ||
|
||
const Neon = domainPlugin(_Neon); | ||
|
||
const provider = Neon.domain.nns.instance("NnsContractAddress"); | ||
const blockchainAddress = provider.resolveDomain( | ||
mainNetRpcUrl, | ||
"myaddress.neo" | ||
); | ||
``` | ||
|
||
The module's purpose is to integrate the common functionality of translating a human-readable address to a blockchain address. | ||
|
||
This package is not included in `neon-js` by default. Consumers are required to include this package in by themselves. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface DomainProvider { | ||
readonly name: string; | ||
resolveDomain(url: string, domain: string): Promise<string>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters