weavedb-node-client 0.19.2 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -6
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -88,14 +88,13 @@ class SDK extends Base {
|
|
|
88
88
|
|
|
89
89
|
async write(func, query, nocache, bundle, relay = false) {
|
|
90
90
|
if (!includes(func)(this.reads)) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return query
|
|
94
|
-
}
|
|
91
|
+
if (relay) return query
|
|
92
|
+
nocache = !nocache
|
|
95
93
|
}
|
|
94
|
+
let params = query || []
|
|
96
95
|
const request = {
|
|
97
96
|
method: `${func}@${this.contractTxId}`,
|
|
98
|
-
query: JSON.stringify(
|
|
97
|
+
query: JSON.stringify(params),
|
|
99
98
|
nocache,
|
|
100
99
|
}
|
|
101
100
|
const _query = () =>
|
|
@@ -137,7 +136,12 @@ class SDK extends Base {
|
|
|
137
136
|
async getNonce(addr) {
|
|
138
137
|
return this.readQuery("getNonce", addr, true)
|
|
139
138
|
}
|
|
140
|
-
|
|
139
|
+
async getVersion(nocache) {
|
|
140
|
+
return this.readQuery("getVersion", null, nocache)
|
|
141
|
+
}
|
|
142
|
+
async getIds(tx, nocache) {
|
|
143
|
+
return this.readQuery("getIds", tx, nocache)
|
|
144
|
+
}
|
|
141
145
|
async getAddressLink(address, nocache) {
|
|
142
146
|
return this.readQuery("getAddressLink", address, nocache)
|
|
143
147
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weavedb-node-client",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"@grpc/proto-loader": "^0.5.0",
|
|
12
12
|
"arweave": "^1.12.2",
|
|
13
13
|
"ramda": "^0.28.0",
|
|
14
|
-
"weavedb-base": "^0.18.
|
|
14
|
+
"weavedb-base": "^0.18.6"
|
|
15
15
|
}
|
|
16
16
|
}
|