@dfns/lib-xrpl 0.2.3 → 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.
Files changed (2) hide show
  1. package/index.js +6 -4
  2. package/package.json +2 -2
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
- // ripple adds the prefix "ed" to eddsa pubKey/private key to have
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 !== 'Ripple' && res.network !== 'RippleTestnet') {
30
- throw new sdk_1.DfnsError(-1, 'wallet is not bound to Ripple or RippleTestnet', { walletId, network: res.network });
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfns/lib-xrpl",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "dependencies": {
5
5
  "buffer": "6.0.3",
6
6
  "cross-fetch": "3.1.6",
@@ -8,7 +8,7 @@
8
8
  "xrpl": "2.14.0"
9
9
  },
10
10
  "peerDependencies": {
11
- "@dfns/sdk": "0.2.3"
11
+ "@dfns/sdk": "0.2.4"
12
12
  },
13
13
  "main": "./index.js",
14
14
  "type": "commonjs"