mirror of
https://github.com/logos-storage/logos-storage-js.git
synced 2026-01-02 13:33:07 +00:00
Add documentation for spr
This commit is contained in:
parent
83c2e142e8
commit
3b3fc6794d
29
README.md
29
README.md
@ -55,7 +55,7 @@ const codex = new Codex("http://localhost:3000");
|
||||
To use a module, you need to use the await syntax. If the module is not loaded yet, it will be imported first and then cached in memory.
|
||||
|
||||
```js
|
||||
const marketplace = await codex.marketplace();
|
||||
const marketplace = await codex.marketplace;
|
||||
```
|
||||
|
||||
### Error handling
|
||||
@ -214,7 +214,7 @@ The following API assume that you have already a data module loaded, example:
|
||||
|
||||
```js
|
||||
const codex = new Codex("http://localhost:3000");
|
||||
const data = await codex.data();
|
||||
const data = await codex.data;
|
||||
```
|
||||
|
||||
#### cids
|
||||
@ -261,13 +261,13 @@ const upload = await data.upload(file, (loaded: number, total: number) => {
|
||||
await upload.result();
|
||||
```
|
||||
|
||||
### Node
|
||||
### Debug
|
||||
|
||||
The following API assume that you have already a node module loaded, example:
|
||||
|
||||
```js
|
||||
const codex = new Codex("http://localhost:3000");
|
||||
const data = await codex.node();
|
||||
const data = await codex.debug;
|
||||
```
|
||||
|
||||
#### setLogLevel
|
||||
@ -294,3 +294,24 @@ Example:
|
||||
```js
|
||||
const info = await debug.info();
|
||||
```
|
||||
|
||||
### Node
|
||||
|
||||
The following API assume that you have already a node module loaded, example:
|
||||
|
||||
```js
|
||||
const codex = new Codex("http://localhost:3000");
|
||||
const node = await codex.node;
|
||||
```
|
||||
|
||||
#### spr
|
||||
|
||||
Get Node's SPR
|
||||
|
||||
- returns Promise<string>
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
const spr = await node.spr();
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user