@bubolabs/wallet-rn-sdk 0.1.4 → 0.1.5

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/README.md CHANGED
@@ -78,7 +78,7 @@ import {
78
78
  await init();
79
79
  const chains = await listSupportedChains();
80
80
  const address = await deriveAddress({
81
- chainId: "bitcoin",
81
+ chainId: "btc",
82
82
  mnemonic: "<mnemonic>",
83
83
  account: 0,
84
84
  index: 0,
@@ -86,13 +86,74 @@ const address = await deriveAddress({
86
86
  });
87
87
 
88
88
  const signed = await buildAndSign({
89
- chainId: "bitcoin",
89
+ chainId: "btc",
90
90
  mnemonic: "<mnemonic>",
91
91
  txPayload: "<tx payload>",
92
92
  txEncoding: "utf8",
93
93
  });
94
94
  ```
95
95
 
96
+ ### `txPayload` JSON Examples
97
+
98
+ `txEncoding` uses `"utf8"` by default, so pass JSON text directly.
99
+
100
+ BTC:
101
+
102
+ ```json
103
+ {
104
+ "account": 0,
105
+ "address_index": 0,
106
+ "change_index": 0,
107
+ "network": "mainnet",
108
+ "prev_txid": "0000000000000000000000000000000000000000000000000000000000000001",
109
+ "prev_vout": 0,
110
+ "prev_script_pubkey_hex": "76a914d986ed01b7a22225a70edbf2ba7cfb63a15cb3aa88ac",
111
+ "prev_value_sat": 100000,
112
+ "to_address": "1BoatSLRHtKNngkdXEeobR76b53LETtpyT",
113
+ "amount_sat": 10000,
114
+ "fee_sat": 1000,
115
+ "lock_time": 0,
116
+ "sequence": 4294967295
117
+ }
118
+ ```
119
+
120
+ ETH (legacy transfer):
121
+
122
+ ```json
123
+ {
124
+ "account": 0,
125
+ "index": 0,
126
+ "chain_id": 1,
127
+ "nonce": 0,
128
+ "gas_price_wei": "1000000000",
129
+ "gas_limit": 21000,
130
+ "to_address": "0x1111111111111111111111111111111111111111",
131
+ "value_wei": "1000000000000000"
132
+ }
133
+ ```
134
+
135
+ Solana (system transfer):
136
+
137
+ ```json
138
+ {
139
+ "account": 0,
140
+ "index": 0,
141
+ "to_address": "11111111111111111111111111111111",
142
+ "lamports": 1000,
143
+ "recent_blockhash": "11111111111111111111111111111111"
144
+ }
145
+ ```
146
+
147
+ ### Chain Feature Notes
148
+
149
+ - Published package content depends on Rust feature set at build time.
150
+ - When `BUBO_RUST_FEATURES` is not set, packaging auto-enables all `chain-*` features from `crates/ffi/Cargo.toml`.
151
+ - You can still override for focused builds, for example:
152
+
153
+ ```bash
154
+ BUBO_RUST_FEATURES=chain-eth,chain-btc ./scripts/build-rn-sdk-native-artifacts.sh
155
+ ```
156
+
96
157
  ## Compatibility Smoke API
97
158
 
98
159
  Legacy smoke APIs remain available for regression checks:
@@ -10,18 +10,15 @@
10
10
  <key>HeadersPath</key>
11
11
  <string>Headers</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64_x86_64-simulator</string>
13
+ <string>ios-arm64</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>libbubo_wallet_ffi.a</string>
16
16
  <key>SupportedArchitectures</key>
17
17
  <array>
18
18
  <string>arm64</string>
19
- <string>x86_64</string>
20
19
  </array>
21
20
  <key>SupportedPlatform</key>
22
21
  <string>ios</string>
23
- <key>SupportedPlatformVariant</key>
24
- <string>simulator</string>
25
22
  </dict>
26
23
  <dict>
27
24
  <key>BinaryPath</key>
@@ -29,15 +26,18 @@
29
26
  <key>HeadersPath</key>
30
27
  <string>Headers</string>
31
28
  <key>LibraryIdentifier</key>
32
- <string>ios-arm64</string>
29
+ <string>ios-arm64_x86_64-simulator</string>
33
30
  <key>LibraryPath</key>
34
31
  <string>libbubo_wallet_ffi.a</string>
35
32
  <key>SupportedArchitectures</key>
36
33
  <array>
37
34
  <string>arm64</string>
35
+ <string>x86_64</string>
38
36
  </array>
39
37
  <key>SupportedPlatform</key>
40
38
  <string>ios</string>
39
+ <key>SupportedPlatformVariant</key>
40
+ <string>simulator</string>
41
41
  </dict>
42
42
  </array>
43
43
  <key>CFBundlePackageType</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubolabs/wallet-rn-sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "React Native smoke SDK for bubo wallet UniFFI bridge",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",