react-native-rgb 0.2.2 → 0.2.3
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/ios/AppConstants.swift +36 -50
- package/ios/Rgb.mm +219 -220
- package/ios/Rgb.swift +3 -7
- package/lib/typescript/docs/docusaurus.config.d.ts +4 -0
- package/lib/typescript/docs/docusaurus.config.d.ts.map +1 -0
- package/lib/typescript/docs/sidebars.d.ts +14 -0
- package/lib/typescript/docs/sidebars.d.ts.map +1 -0
- package/lib/typescript/docs/src/components/HomepageFeatures/index.d.ts +3 -0
- package/lib/typescript/docs/src/components/HomepageFeatures/index.d.ts.map +1 -0
- package/lib/typescript/docs/src/pages/index.d.ts +2 -0
- package/lib/typescript/docs/src/pages/index.d.ts.map +1 -0
- package/package.json +3 -2
package/ios/Rgb.swift
CHANGED
|
@@ -157,7 +157,6 @@ public class RgbSwiftHelper: NSObject {
|
|
|
157
157
|
_ vanillaKeychain: NSNumber
|
|
158
158
|
) -> NSDictionary {
|
|
159
159
|
do {
|
|
160
|
-
// Validate inputs
|
|
161
160
|
guard !network.isEmpty, !accountXpubVanilla.isEmpty, !accountXpubColored.isEmpty,
|
|
162
161
|
!mnemonic.isEmpty, !masterFingerprint.isEmpty else {
|
|
163
162
|
return ["error": "All string parameters must be non-empty"] as NSDictionary
|
|
@@ -167,7 +166,6 @@ public class RgbSwiftHelper: NSObject {
|
|
|
167
166
|
return ["error": "supportedSchemas must not be empty"] as NSDictionary
|
|
168
167
|
}
|
|
169
168
|
|
|
170
|
-
// Ensure AppConstants is initialized - FileManager operations are thread-safe
|
|
171
169
|
let constants = AppConstants.shared
|
|
172
170
|
constants.ensureInitialized()
|
|
173
171
|
|
|
@@ -175,6 +173,8 @@ public class RgbSwiftHelper: NSObject {
|
|
|
175
173
|
return ["error": "RGB directory not initialized. Call AppConstants.initContext() first."] as NSDictionary
|
|
176
174
|
}
|
|
177
175
|
|
|
176
|
+
let dataDirPath = rgbDir.path
|
|
177
|
+
|
|
178
178
|
let bitcoinNetwork = getNetwork(network)
|
|
179
179
|
var schemaList: [AssetSchema] = []
|
|
180
180
|
for schemaStr in supportedSchemas {
|
|
@@ -184,7 +184,7 @@ public class RgbSwiftHelper: NSObject {
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
let walletData = WalletData(
|
|
187
|
-
dataDir:
|
|
187
|
+
dataDir: dataDirPath,
|
|
188
188
|
bitcoinNetwork: bitcoinNetwork,
|
|
189
189
|
databaseType: .sqlite,
|
|
190
190
|
maxAllocationsPerUtxo: UInt32(maxAllocationsPerUtxo.intValue),
|
|
@@ -197,7 +197,6 @@ public class RgbSwiftHelper: NSObject {
|
|
|
197
197
|
)
|
|
198
198
|
let wallet = try Wallet(walletData: walletData)
|
|
199
199
|
|
|
200
|
-
// Ensure WalletStore is accessible
|
|
201
200
|
let store = WalletStore.shared
|
|
202
201
|
let walletId = store.create(wallet: wallet)
|
|
203
202
|
return ["walletId": walletId] as NSDictionary
|
|
@@ -282,7 +281,6 @@ public class RgbSwiftHelper: NSObject {
|
|
|
282
281
|
return [:] as NSDictionary
|
|
283
282
|
}
|
|
284
283
|
|
|
285
|
-
// Helper functions for type conversions
|
|
286
284
|
private static func getAssignment(_ assignmentDict: NSDictionary) -> Assignment {
|
|
287
285
|
guard let type = assignmentDict["type"] as? String else {
|
|
288
286
|
fatalError("Assignment type is required")
|
|
@@ -352,7 +350,6 @@ public class RgbSwiftHelper: NSObject {
|
|
|
352
350
|
}
|
|
353
351
|
}
|
|
354
352
|
|
|
355
|
-
// WitnessData is optional
|
|
356
353
|
let witnessData: WitnessData?
|
|
357
354
|
if let witnessDataDict = recipientDict["witnessData"] as? NSDictionary {
|
|
358
355
|
guard let amountSatValue = witnessDataDict["amountSat"] as? NSNumber else {
|
|
@@ -547,7 +544,6 @@ public class RgbSwiftHelper: NSObject {
|
|
|
547
544
|
return dict as NSDictionary
|
|
548
545
|
}
|
|
549
546
|
|
|
550
|
-
// Wallet methods
|
|
551
547
|
@objc(_backup:backupPath:password:)
|
|
552
548
|
public static func _backup(_ walletId: NSNumber, _ backupPath: String, _ password: String) -> NSDictionary {
|
|
553
549
|
guard let session = WalletStore.shared.get(id: walletId.intValue) else {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docusaurus.config.d.ts","sourceRoot":"","sources":["../../../docs/docusaurus.config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhD,QAAA,MAAM,MAAM,EAAE,MA8Gb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
|
|
2
|
+
/**
|
|
3
|
+
* Creating a sidebar enables you to:
|
|
4
|
+
- create an ordered group of docs
|
|
5
|
+
- render a sidebar for each doc of that group
|
|
6
|
+
- provide next/previous navigation
|
|
7
|
+
|
|
8
|
+
The sidebars can be generated from the filesystem, or explicitly defined here.
|
|
9
|
+
|
|
10
|
+
Create as many sidebars as you want.
|
|
11
|
+
*/
|
|
12
|
+
declare const sidebars: SidebarsConfig;
|
|
13
|
+
export default sidebars;
|
|
14
|
+
//# sourceMappingURL=sidebars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebars.d.ts","sourceRoot":"","sources":["../../../docs/sidebars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAItE;;;;;;;;;GASG;AACH,QAAA,MAAM,QAAQ,EAAE,cAQf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../docs/src/components/HomepageFeatures/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA0DvC,MAAM,CAAC,OAAO,UAAU,gBAAgB,IAAI,SAAS,CAYpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../docs/src/pages/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,IAAI,4CAiC3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-rgb",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "React Native library for Bitcoin RGB Protocol",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
"react-native": "*"
|
|
95
95
|
},
|
|
96
96
|
"workspaces": [
|
|
97
|
-
"example"
|
|
97
|
+
"example",
|
|
98
|
+
"docs"
|
|
98
99
|
],
|
|
99
100
|
"packageManager": "yarn@4.11.0",
|
|
100
101
|
"react-native-builder-bob": {
|