Usage Example
Usage
SelectNetworks
import {setCurrentNetworkKey} from "@nulink_network/nulink-sdk";
//The currently available network: NETWORK_LIST.Horus
await setCurrentNetworkKey(NETWORK_LIST.Horus)
Set Data Storage
import {
StorageManager,
DataCallback,
setIPFSData,
getIPFSData,
} from '@nulink_network/nulink-sdk'With these preparations done, we can now proceed to the code for the pre process
Create Wallet for Alice
Alice upload data/files for encrypted
Bob requests to use the data/files uploaded by Alice
Alice approves Bob's request to use the file
Bob checks his list of requested files, and he can use the data now
Alice obtain the on-chain policy information published by herself
Alice upload file by select Published Policy
Bob get data no need approve by Alice's published policys
Restore wallet by mnemonic
API docs
More examples
Last updated