Skip to content

Commit 794ed73

Browse files
authored
Update README.md
1 parent e273791 commit 794ed73

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,30 @@ Add new entry
7171

7272
Remove an entry.
7373

74+
#### `stream = pass.listWriters(query)`
75+
76+
List all writers, optionally takes a hyperdb query
77+
78+
#### `writer = await pass.getWriter(key)
79+
80+
Get a writer, object similar to the addWriter input.
81+
7482
#### `await pass.removeWriter(writerKey)`
7583

7684
Remove a writer explictly.
7785

78-
#### `await pass.addWriter(writerKey)`
86+
#### `await pass.addWriter(writer)`
7987

8088
Add a writer explictly.
89+
Writer should look like this
90+
91+
```
92+
{
93+
key: otherSidesLocalWriterKey,
94+
name: 'optional name for the writer',
95+
readOnly: false // weather the person can write or only read
96+
}
97+
```
8198

8299
#### `pass.writerKey`
83100

@@ -127,7 +144,7 @@ Fully close the pass instance.
127144

128145
Suspend the swarm and discovery
129146

130-
#### `await pass.resume`
147+
#### `await pass.resume()`
131148

132149
Resume the swarm is suspended
133150

0 commit comments

Comments
 (0)