Skip to content

Commit df4d15c

Browse files
authored
Merge pull request #58 from bitxenia/get-node-multiaddrs-method
Get node multiaddrs method
2 parents 8442b32 + 36d22a5 commit df4d15c

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bitxenia/astrawiki",
3-
"version": "0.1.17",
3+
"version": "0.1.19",
44
"description": "Decentralized p2p wiki on IPFS",
55
"author": "Bitxenia",
66
"license": "MIT",
@@ -16,7 +16,7 @@
1616
"module": "./dist/index.mjs",
1717
"types": "./dist/index.d.ts",
1818
"dependencies": {
19-
"@bitxenia/astradb": "0.1.3",
19+
"@bitxenia/astradb": "0.1.4",
2020
"@bitxenia/wiki-version-manager": "0.1.2",
2121
"blockstore-core": "5.0.2",
2222
"datastore-core": "10.0.2"

src/astrawiki.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,8 @@ export class AstrawikiNode implements Astrawiki {
6363
public async getArticleList(): Promise<string[]> {
6464
return await this.articleRepository.getArticleList();
6565
}
66+
67+
public async getNodeMultiaddrs(): Promise<string[]> {
68+
return await this.astraDb.getNodeMultiaddrs();
69+
}
6670
}

src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ export interface Astrawiki {
174174
* Gets the list of articles in the wiki
175175
*/
176176
getArticleList(): Promise<string[]>;
177+
178+
/**
179+
* Retrieves the public multiaddresses of the astrawiki node.
180+
*
181+
* This multiaddresses can be used as bootstrapProviderPeers from other nodes.
182+
*/
183+
getNodeMultiaddrs: () => Promise<string[]>;
177184
}
178185

179186
export type ArticleInfo = {

0 commit comments

Comments
 (0)