Customisation
Customisation can be done using the setup module. Run these before anything else you do with the SDK.
1
// custom api, lobby, and/or user domain
2
// (no need to specify each one)
3
wn.setup.endpoints({
4
api: "https://my.fission.api",
5
lobby: "https://my.fission.lobby",
6
user: "my.domain"
7
})
8
​
9
// js-ipfs options
10
// (see docs in src for more info)
11
wn.setup.ipfs({ init: { repo: "my-ipfs-repo" } })
Copied!

Building Blocks

Warning: Here be πŸ‰! Only use lower level utilities if you know what you're doing.
This library is built on top of js-ipfs and keystore-idb. If you have already integrated an ipfs daemon or keystore-idb into your web application, you probably don't want to have two instances floating around.
You can use one instance for your whole application by doing the following:
1
import * as ipfs from 'webnative/ipfs'
2
​
3
// get the ipfs instance that the Fission SDK is using
4
const ipfsInstance = await ipfs.get()
5
​
6
// OR set the ipfs to an instance that you already have
7
await ipfs.set(ipfsInstance)
Copied!
1
import * as keystore from 'webnative/keystore'
2
​
3
// get the keystore instance that the Fission SDK is using
4
const keystoreInstance = await keystore.get()
5
​
6
// OR set the keystore to an instance that you already have
7
await keystore.set(keystoreInstance)
Copied!
Last modified 1yr ago
Export as PDF
Copy link