@tetherto/wdk-wallet 1.0.0-beta.24 → 1.0.0-beta.26
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tetherto/wdk-wallet",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.26",
|
|
4
4
|
"description": "Base wallet and protocol classes for WDK (Wallet Development Kit) by Tether. For internal use only.",
|
|
5
5
|
"homepage": "https://docs.wdk.tether.io/",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test:coverage": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"bare-node-runtime": "^1.
|
|
28
|
+
"bare-node-runtime": "^1.5.2",
|
|
29
29
|
"bip39": "3.1.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -78,6 +78,15 @@ async function sleep (amount) {
|
|
|
78
78
|
|
|
79
79
|
/** @interface */
|
|
80
80
|
export class IWalletAccountReadOnly extends IWalletAccountReadOnlySimple {
|
|
81
|
+
/**
|
|
82
|
+
* The account's configuration.
|
|
83
|
+
*
|
|
84
|
+
* @type {Readonly<Record<string, unknown>>}
|
|
85
|
+
*/
|
|
86
|
+
get config () {
|
|
87
|
+
throw new NotImplementedError('config')
|
|
88
|
+
}
|
|
89
|
+
|
|
81
90
|
/**
|
|
82
91
|
* Quotes the costs of a send transaction operation.
|
|
83
92
|
*
|
|
@@ -139,10 +148,19 @@ export default class WalletAccountReadOnly {
|
|
|
139
148
|
* Creates a new read-only wallet account.
|
|
140
149
|
*
|
|
141
150
|
* @param {string} [address] - The account's address.
|
|
151
|
+
* @param {Record<string, unknown>} [config] - The account's configuration (default: an empty object).
|
|
142
152
|
*/
|
|
143
|
-
constructor (address) {
|
|
153
|
+
constructor (address, config = {}) {
|
|
144
154
|
/** @private */
|
|
145
155
|
this.__address = address
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The account's configuration.
|
|
159
|
+
*
|
|
160
|
+
* @protected
|
|
161
|
+
* @type {Record<string, unknown>}
|
|
162
|
+
*/
|
|
163
|
+
this._config = config
|
|
146
164
|
}
|
|
147
165
|
|
|
148
166
|
/**
|
|
@@ -155,6 +173,15 @@ export default class WalletAccountReadOnly {
|
|
|
155
173
|
return this.__address
|
|
156
174
|
}
|
|
157
175
|
|
|
176
|
+
/**
|
|
177
|
+
* The account's configuration.
|
|
178
|
+
*
|
|
179
|
+
* @type {Readonly<Record<string, unknown>>}
|
|
180
|
+
*/
|
|
181
|
+
get config () {
|
|
182
|
+
return this._config
|
|
183
|
+
}
|
|
184
|
+
|
|
158
185
|
/**
|
|
159
186
|
* Returns the account's address.
|
|
160
187
|
*
|
|
@@ -11,6 +11,12 @@ export namespace FINALITY {
|
|
|
11
11
|
}
|
|
12
12
|
/** @interface */
|
|
13
13
|
export interface IWalletAccountReadOnly extends IWalletAccountReadOnlySimple {
|
|
14
|
+
/**
|
|
15
|
+
* The account's configuration.
|
|
16
|
+
*
|
|
17
|
+
* @type {Readonly<Record<string, unknown>>}
|
|
18
|
+
*/
|
|
19
|
+
get config(): Readonly<Record<string, unknown>>;
|
|
14
20
|
/**
|
|
15
21
|
* Quotes the costs of a send transaction operation.
|
|
16
22
|
*
|
|
@@ -44,8 +50,9 @@ export default abstract class WalletAccountReadOnly implements IWalletAccountRea
|
|
|
44
50
|
* Creates a new read-only wallet account.
|
|
45
51
|
*
|
|
46
52
|
* @param {string} [address] - The account's address.
|
|
53
|
+
* @param {Record<string, unknown>} [config] - The account's configuration (default: an empty object).
|
|
47
54
|
*/
|
|
48
|
-
constructor(address?: string);
|
|
55
|
+
constructor(address?: string, config?: Record<string, unknown>);
|
|
49
56
|
/**
|
|
50
57
|
* The default poll cadence for {@link waitForTransaction}, in milliseconds,
|
|
51
58
|
* applied when the caller doesn't provide an `interval`. Subclasses override
|
|
@@ -71,6 +78,19 @@ export default abstract class WalletAccountReadOnly implements IWalletAccountRea
|
|
|
71
78
|
* @type {string | undefined}
|
|
72
79
|
*/
|
|
73
80
|
protected get _address(): string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* The account's configuration.
|
|
83
|
+
*
|
|
84
|
+
* @protected
|
|
85
|
+
* @type {Record<string, unknown>}
|
|
86
|
+
*/
|
|
87
|
+
protected _config: Record<string, unknown>;
|
|
88
|
+
/**
|
|
89
|
+
* The account's configuration.
|
|
90
|
+
*
|
|
91
|
+
* @type {Readonly<Record<string, unknown>>}
|
|
92
|
+
*/
|
|
93
|
+
get config(): Readonly<Record<string, unknown>>;
|
|
74
94
|
/**
|
|
75
95
|
* Returns the account's address.
|
|
76
96
|
*
|