@bsv/sdk 1.5.1 → 1.5.2

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": "@bsv/sdk",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "type": "module",
5
5
  "description": "BSV Blockchain Software Development Kit",
6
6
  "main": "dist/cjs/mod.js",
@@ -57,6 +57,7 @@ export default class WalletClient implements WalletInterface {
57
57
  | 'XDM'
58
58
  | 'window.CWI'
59
59
  | 'json-api'
60
+ | 'react-native'
60
61
  | WalletInterface = 'auto',
61
62
  originator?: OriginatorDomainNameStringUnder250Bytes
62
63
  ) {
@@ -66,6 +67,7 @@ export default class WalletClient implements WalletInterface {
66
67
  if (substrate === 'window.CWI') substrate = new WindowCWISubstrate()
67
68
  if (substrate === 'XDM') substrate = new XDMSubstrate()
68
69
  if (substrate === 'json-api') substrate = new HTTPWalletJSON(originator)
70
+ if (substrate === 'react-native') substrate = new ReactNativeWebView(originator)
69
71
  this.substrate = substrate
70
72
  this.originator = originator
71
73
  }
@@ -92,7 +94,6 @@ export default class WalletClient implements WalletInterface {
92
94
  }
93
95
  }
94
96
  try {
95
- console.log('Connecting to substrate...')
96
97
  sub = new WindowCWISubstrate()
97
98
  await checkSub()
98
99
  this.substrate = sub
@@ -109,7 +110,7 @@ export default class WalletClient implements WalletInterface {
109
110
  await checkSub()
110
111
  this.substrate = sub
111
112
  } catch (e) {
112
- // HTTP JSON failed, attempt the next...
113
+ // HTTP Wire failed, attempt the next...
113
114
  try {
114
115
  sub = new HTTPWalletJSON(this.originator)
115
116
  await checkSub()