react-native-zano 0.2.0 → 0.2.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/CHANGELOG.md +8 -0
- package/README.md +1 -0
- package/android/src/main/jniLibs/arm64-v8a/librnzano.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/librnzano.so +0 -0
- package/android/src/main/jniLibs/x86/librnzano.so +0 -0
- package/android/src/main/jniLibs/x86_64/librnzano.so +0 -0
- package/ios/ZanoModule.xcframework/ios-arm64/libzano-module.a +0 -0
- package/ios/ZanoModule.xcframework/ios-arm64_x86_64-simulator/libzano-module.a +0 -0
- package/lib/scripts/update-sources.js +2 -1
- package/lib/src/CppBridge.d.ts +13 -0
- package/lib/src/CppBridge.js +15 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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
|
/**
|
package/lib/src/CppBridge.d.ts
CHANGED
|
@@ -66,6 +66,19 @@ export declare class CppBridge {
|
|
|
66
66
|
fee: number;
|
|
67
67
|
paymentId?: string;
|
|
68
68
|
}): Promise<string>;
|
|
69
|
+
burnAsset(walletId: number, opts: {
|
|
70
|
+
assetId: string;
|
|
71
|
+
burnAmount: number;
|
|
72
|
+
nativeAmount?: number;
|
|
73
|
+
pointTxToAddress?: string;
|
|
74
|
+
serviceEntries?: Array<{
|
|
75
|
+
body: string;
|
|
76
|
+
flags: number;
|
|
77
|
+
instruction: string;
|
|
78
|
+
security: string;
|
|
79
|
+
service_id: string;
|
|
80
|
+
}>;
|
|
81
|
+
}): Promise<string>;
|
|
69
82
|
private handleRpcResponse;
|
|
70
83
|
private _asyncCallWithRetry;
|
|
71
84
|
}
|
package/lib/src/CppBridge.js
CHANGED
|
@@ -297,6 +297,21 @@ class CppBridge {
|
|
|
297
297
|
const result = this.handleRpcResponse(response);
|
|
298
298
|
return result.tx_hash;
|
|
299
299
|
}
|
|
300
|
+
async burnAsset(walletId, opts) {
|
|
301
|
+
const params = {
|
|
302
|
+
method: 'burn_asset',
|
|
303
|
+
params: {
|
|
304
|
+
asset_id: opts.assetId,
|
|
305
|
+
burn_amount: opts.burnAmount,
|
|
306
|
+
native_amount: opts.nativeAmount ?? 0,
|
|
307
|
+
point_tx_to_address: opts.pointTxToAddress ?? '',
|
|
308
|
+
service_entries: opts.serviceEntries ?? []
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
const response = await this._asyncCallWithRetry('invoke', walletId, JSON.stringify(params));
|
|
312
|
+
const result = this.handleRpcResponse(response);
|
|
313
|
+
return JSON.stringify(result);
|
|
314
|
+
}
|
|
300
315
|
// -----------------------------------------------------------------------------
|
|
301
316
|
// Utils
|
|
302
317
|
// -----------------------------------------------------------------------------
|