datai-sdk 1.1.3 → 1.1.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.
@@ -46,11 +46,11 @@ export class TokenBalance extends TokenBalancePb {
46
46
  }
47
47
  return changetype<BigInt>(this.claimableAmountBytes)
48
48
  }
49
- set claimableAmount(value: BigInt | null) {
50
- if (value === null) {
51
- this.claimableAmountBytes = new Uint8Array(0)
52
- } else {
53
- this.claimableAmountBytes = value
54
- }
49
+ // AssemblyScript cannot narrow `BigInt | null` → `BigInt` inside an `if` branch,
50
+ // and cannot implicitly widen `BigInt` → `Uint8Array` even though graph-ts BigInt
51
+ // extends Uint8Array. Accept non-null BigInt and use changetype explicitly.
52
+ // To clear the field, assign `new Uint8Array(0)` to `claimableAmountBytes` directly.
53
+ set claimableAmount(value: BigInt) {
54
+ this.claimableAmountBytes = changetype<Uint8Array>(value)
55
55
  }
56
56
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "datai-sdk",
3
3
  "main": "index.ts",
4
- "version": "1.1.3",
4
+ "version": "1.1.4",
5
5
  "description": "Datai SDK which has useful libraries to help building projections",
6
6
  "scripts": {
7
7
  "postinstall": "node postinstall-script.js"