@btc-vision/transaction 1.0.115 → 1.0.116

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.
@@ -4,6 +4,7 @@ export type MemorySlotPointer = bigint;
4
4
  export type BufferLike = Uint8Array | Buffer;
5
5
  export type MemorySlotData<T> = T;
6
6
  export type PointerStorage = DeterministicMap<MemorySlotPointer, MemorySlotData<bigint>>;
7
+ export type BlockchainStorage = DeterministicMap<string, PointerStorage>;
7
8
  export type i32 = number;
8
9
  export type u8 = number;
9
10
  export type u16 = number;
@@ -1 +1 @@
1
- export declare const version = "1.0.115";
1
+ export declare const version = "1.0.116";
package/build/_version.js CHANGED
@@ -1 +1 @@
1
- export const version = '1.0.115';
1
+ export const version = '1.0.116';
@@ -7,4 +7,5 @@ export declare class AddressMap<V> extends Map<Address, V> {
7
7
  has(key: Address): boolean;
8
8
  get(key: Address): V | undefined;
9
9
  delete(key: Address): boolean;
10
+ [Symbol.iterator](): IterableIterator<[Address, V]>;
10
11
  }
@@ -43,4 +43,9 @@ export class AddressMap extends Map {
43
43
  this._values.splice(index, 1);
44
44
  return true;
45
45
  }
46
+ *[Symbol.iterator]() {
47
+ for (const key of this._keys) {
48
+ yield [key, this.get(key)];
49
+ }
50
+ }
46
51
  }
@@ -1,13 +1,13 @@
1
- import { i32 } from '../utils/types.js';
2
1
  import { Address } from '../keypair/Address.js';
3
2
  export declare class AddressSet {
4
3
  private keys;
5
4
  constructor(keys?: Address[]);
5
+ get size(): number;
6
6
  add(address: Address): void;
7
7
  has(address: Address): boolean;
8
8
  remove(address: Address): void;
9
- size(): i32;
10
9
  clone(): AddressSet;
11
10
  clear(): void;
12
11
  combine(set: AddressSet): AddressSet;
12
+ [Symbol.iterator](): Generator<Address, void, unknown>;
13
13
  }
@@ -2,6 +2,9 @@ export class AddressSet {
2
2
  constructor(keys = []) {
3
3
  this.keys = keys;
4
4
  }
5
+ get size() {
6
+ return this.keys.length;
7
+ }
5
8
  add(address) {
6
9
  if (!this.has(address)) {
7
10
  this.keys.push(address);
@@ -21,9 +24,6 @@ export class AddressSet {
21
24
  this.keys.splice(index, 1);
22
25
  }
23
26
  }
24
- size() {
25
- return this.keys.length;
26
- }
27
27
  clone() {
28
28
  const clone = new AddressSet();
29
29
  for (let i = 0; i < this.keys.length; i++) {
@@ -41,4 +41,9 @@ export class AddressSet {
41
41
  }
42
42
  return clone;
43
43
  }
44
+ *[Symbol.iterator]() {
45
+ for (let i = 0; i < this.keys.length; i++) {
46
+ yield this.keys[i];
47
+ }
48
+ }
44
49
  }
@@ -100,6 +100,7 @@ export class AddressVerificator {
100
100
  }
101
101
  }
102
102
  catch (error) {
103
+ console.log(error);
103
104
  }
104
105
  return null;
105
106
  }
@@ -4,6 +4,7 @@ export type MemorySlotPointer = bigint;
4
4
  export type BufferLike = Uint8Array | Buffer;
5
5
  export type MemorySlotData<T> = T;
6
6
  export type PointerStorage = DeterministicMap<MemorySlotPointer, MemorySlotData<bigint>>;
7
+ export type BlockchainStorage = DeterministicMap<string, PointerStorage>;
7
8
  export type i32 = number;
8
9
  export type u8 = number;
9
10
  export type u16 = number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/transaction",
3
3
  "type": "module",
4
- "version": "1.0.115",
4
+ "version": "1.0.116",
5
5
  "author": "BlobMaster41",
6
6
  "description": "OPNet transaction library allows you to create and sign transactions for the OPNet network.",
7
7
  "engines": {
package/src/_version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.0.115';
1
+ export const version = '1.0.116';
@@ -54,4 +54,10 @@ export class AddressMap<V> extends Map<Address, V> {
54
54
 
55
55
  return true;
56
56
  }
57
+
58
+ *[Symbol.iterator](): IterableIterator<[Address, V]> {
59
+ for (const key of this._keys) {
60
+ yield [key, this.get(key) as V];
61
+ }
62
+ }
57
63
  }
@@ -1,4 +1,3 @@
1
- import { i32 } from '../utils/types.js';
2
1
  import { Address } from '../keypair/Address.js';
3
2
 
4
3
  export class AddressSet {
@@ -8,6 +7,10 @@ export class AddressSet {
8
7
  this.keys = keys;
9
8
  }
10
9
 
10
+ public get size(): number {
11
+ return this.keys.length;
12
+ }
13
+
11
14
  public add(address: Address): void {
12
15
  if (!this.has(address)) {
13
16
  this.keys.push(address);
@@ -32,10 +35,6 @@ export class AddressSet {
32
35
  }
33
36
  }
34
37
 
35
- public size(): i32 {
36
- return this.keys.length;
37
- }
38
-
39
38
  public clone(): AddressSet {
40
39
  const clone = new AddressSet();
41
40
 
@@ -59,4 +58,10 @@ export class AddressSet {
59
58
 
60
59
  return clone;
61
60
  }
61
+
62
+ *[Symbol.iterator]() {
63
+ for (let i = 0; i < this.keys.length; i++) {
64
+ yield this.keys[i];
65
+ }
66
+ }
62
67
  }
@@ -175,6 +175,7 @@ export class AddressVerificator {
175
175
  }
176
176
  }
177
177
  } catch (error) {
178
+ console.log(error);
178
179
  // Ignore errors from Bech32/Bech32m decoding
179
180
  }
180
181
 
@@ -8,6 +8,7 @@ export type BufferLike = Uint8Array | Buffer;
8
8
 
9
9
  export type MemorySlotData<T> = T;
10
10
  export type PointerStorage = DeterministicMap<MemorySlotPointer, MemorySlotData<bigint>>;
11
+ export type BlockchainStorage = DeterministicMap<string, PointerStorage>;
11
12
 
12
13
  export type i32 = number;
13
14
  export type u8 = number;