react-native-zano 0.1.3 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.2.1 (2025-07-21)
6
+
7
+ - fixed: Support 16k pages for Android 15.
8
+
9
+ ## 0.2.0 (2025-05-26)
10
+
11
+ - changed: `transfer` now accepts an array of destinations.
12
+
5
13
  ## 0.1.3 (2025-05-05)
6
14
 
7
15
  - fixed: Shield symbols for iOS builds using partial linking and symbol encapsulation.
package/README.md CHANGED
@@ -59,4 +59,5 @@ For this to work, you need:
59
59
 
60
60
  - A recent Android SDK, installed at `$ANDROID_HOME`
61
61
  - Xcode command-line tools
62
+ - `cmake`, provided by `brew install cmake`
62
63
  - `llvm-objcopy`, provided by `brew install llvm`
@@ -174,7 +174,8 @@ async function buildAndroidZano(platform) {
174
174
  ...zanoLibs.map(name => (0, path_1.join)(zanoLibPath, `lib${name}.a`)),
175
175
  '-llog',
176
176
  `-Wl,--version-script=${(0, path_1.join)(exports.srcPath, 'jni/exports.map')}`,
177
- '-Wl,--no-undefined'
177
+ '-Wl,--no-undefined',
178
+ '-Wl,-z,max-page-size=16384'
178
179
  ]);
179
180
  }
180
181
  /**
@@ -56,12 +56,14 @@ export declare class CppBridge {
56
56
  getBalances(walletId: number): Promise<GetBalancesResponse>;
57
57
  getTransactions(walletId: number, offset?: number): Promise<GetRecentTransactionsResponse>;
58
58
  whitelistAssets(walletId: number, assetIds: string[]): Promise<void>;
59
- transfer(walletId: number, transferOpts: {
60
- assetId: string;
61
- fee: number;
62
- nativeAmount: number;
63
- recipient: string;
59
+ transfer(walletId: number, opts: {
60
+ transfers: Array<{
61
+ assetId: string;
62
+ nativeAmount: number;
63
+ recipient: string;
64
+ }>;
64
65
  comment?: string;
66
+ fee: number;
65
67
  paymentId?: string;
66
68
  }): Promise<string>;
67
69
  private handleRpcResponse;
@@ -262,22 +262,33 @@ class CppBridge {
262
262
  }
263
263
  }
264
264
  }
265
- async transfer(walletId, transferOpts) {
265
+ async transfer(walletId, opts) {
266
+ // Transaction can only have one payment ID
267
+ let paymentId = opts.paymentId;
268
+ for (const transfer of opts.transfers) {
269
+ const addressInfo = await this.getAddressInfo(transfer.recipient);
270
+ if (!addressInfo.is_integrated)
271
+ continue;
272
+ if (paymentId == null) {
273
+ paymentId = addressInfo.payment_id;
274
+ }
275
+ else if (paymentId !== addressInfo.payment_id) {
276
+ throw new Error('Transaction can only have one payment ID');
277
+ }
278
+ }
266
279
  const params = {
267
280
  method: 'transfer',
268
281
  params: {
269
- comment: transferOpts.comment,
270
- destinations: [
271
- {
272
- address: transferOpts.recipient,
273
- amount: transferOpts.nativeAmount,
274
- asset_id: transferOpts.assetId
275
- }
276
- ],
277
- fee: transferOpts.fee,
282
+ destinations: opts.transfers.map(t => ({
283
+ address: t.recipient,
284
+ amount: t.nativeAmount,
285
+ asset_id: t.assetId
286
+ })),
287
+ comment: opts.comment,
288
+ fee: opts.fee,
289
+ payment_id: opts.paymentId ?? '',
278
290
  hide_receiver: true,
279
291
  mixin: 15,
280
- payment_id: transferOpts.paymentId ?? '',
281
292
  push_payer: false,
282
293
  service_entries_permanent: true
283
294
  }
@@ -219,11 +219,13 @@ export interface WhitelistAssetsResponse {
219
219
  own_assets: AssetInfo[];
220
220
  }
221
221
  export interface TransferParams {
222
- assetId: string;
223
- fee: number;
224
- nativeAmount: number;
225
- recipient: string;
222
+ transfers: Array<{
223
+ assetId: string;
224
+ nativeAmount: number;
225
+ recipient: string;
226
+ }>;
226
227
  comment?: string;
228
+ fee: number;
227
229
  paymentId?: string;
228
230
  }
229
231
  export interface TransferResponse {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-zano",
3
- "version": "0.1.3",
3
+ "version": "0.2.1",
4
4
  "description": "React Native bindings for the Zano blockchain",
5
5
  "homepage": "https://github.com/EdgeApp/react-native-zano",
6
6
  "repository": {