-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
38 lines (33 loc) · 824 Bytes
/
index.js
File metadata and controls
38 lines (33 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const Account = require('./lib/account');
const Mailbox = require('./lib/mailbox');
const IPFS = require('./lib/ipfs');
const Client = require('./lib/client');
const Domain = require('./lib/domain')
class ClientSDK {
constructor(opts = {}) {
this.client = new Client(opts)
this.Account = new Account(this.client)
this.Mailbox = new Mailbox(this.client)
this.Domain = new Domain(this.client)
this.IPFS = new IPFS(this.client)
}
setAuthPayload(auth) {
try{
this.client.auth = auth
return true
}catch(e){
console.log(e)
return false
}
}
setProvider(provider) {
try{
this.client.provider = provider
return true
}catch(e){
console.log(e)
return false
}
}
}
module.exports = ClientSDK