weavedb-node-client 0.23.0 → 0.23.3

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.
Files changed (2) hide show
  1. package/index.js +10 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -114,6 +114,13 @@ class SDK extends Base {
114
114
  try {
115
115
  const result =
116
116
  response.result === "" ? null : JSON.parse(response.result)
117
+ if (!isNil(result?.result?.transaction?.id)) {
118
+ result.getResult = async () =>
119
+ await this.node({
120
+ op: "tx_result",
121
+ txid: result?.result?.transaction?.id,
122
+ })
123
+ }
117
124
  ret({ result, err: null })
118
125
  } catch (e) {
119
126
  ret({ result: null, err: e })
@@ -139,7 +146,9 @@ class SDK extends Base {
139
146
 
140
147
  return await this.write(params.function, query, nocache)
141
148
  }
142
-
149
+ async getHash(nocache) {
150
+ return this.readQuery("getHash", null, nocache)
151
+ }
143
152
  async getNonce(addr) {
144
153
  return this.readQuery("getNonce", addr, true)
145
154
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weavedb-node-client",
3
- "version": "0.23.0",
3
+ "version": "0.23.3",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "engines": {