@dfns/lib-xrpl 0.2.2 → 0.2.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 +6 -4
- package/package.json +7 -1
package/index.js
CHANGED
|
@@ -14,8 +14,7 @@ const assertSigned = (res) => {
|
|
|
14
14
|
class DfnsWallet {
|
|
15
15
|
constructor(metadata, options) {
|
|
16
16
|
this.metadata = metadata;
|
|
17
|
-
//
|
|
18
|
-
// the same bytes number as ecdsa pubKey.
|
|
17
|
+
// xrpl adds the prefix "ed" to EdDSA public key to have the same size as ECDSA key
|
|
19
18
|
const prefix = metadata.signingKey.scheme === 'EdDSA' ? 'ed' : '';
|
|
20
19
|
this.signingPubKey = prefix + metadata.signingKey.publicKey;
|
|
21
20
|
this.dfnsClient = options.dfnsClient;
|
|
@@ -26,8 +25,11 @@ class DfnsWallet {
|
|
|
26
25
|
if (res.status !== 'Active') {
|
|
27
26
|
throw new sdk_1.DfnsError(-1, 'wallet not active', { walletId, status: res.status });
|
|
28
27
|
}
|
|
29
|
-
if (res.network !== '
|
|
30
|
-
throw new sdk_1.DfnsError(-1, 'wallet is not bound to
|
|
28
|
+
if (res.network !== 'XrpLedger' && res.network !== 'XrpLedgerTestnet') {
|
|
29
|
+
throw new sdk_1.DfnsError(-1, 'wallet is not bound to XrpLedger or XrpLedgerTestnet', {
|
|
30
|
+
walletId,
|
|
31
|
+
network: res.network,
|
|
32
|
+
});
|
|
31
33
|
}
|
|
32
34
|
return new DfnsWallet(res, options);
|
|
33
35
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfns/lib-xrpl",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"dependencies": {
|
|
5
|
+
"buffer": "6.0.3",
|
|
6
|
+
"cross-fetch": "3.1.6",
|
|
7
|
+
"uuid": "9.0.0",
|
|
5
8
|
"xrpl": "2.14.0"
|
|
6
9
|
},
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"@dfns/sdk": "0.2.4"
|
|
12
|
+
},
|
|
7
13
|
"main": "./index.js",
|
|
8
14
|
"type": "commonjs"
|
|
9
15
|
}
|