react-native-neural-wallet-lib 0.1.0

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.
Files changed (43) hide show
  1. package/LICENSE +20 -0
  2. package/NeuralWalletLib.podspec +44 -0
  3. package/README.md +27 -0
  4. package/android/CMakeLists.txt +76 -0
  5. package/android/build.gradle +143 -0
  6. package/android/cpp-adapter.cpp +63 -0
  7. package/android/gradle.properties +5 -0
  8. package/android/src/main/AndroidManifest.xml +5 -0
  9. package/android/src/main/java/com/neuralwalletlib/NeuralWalletLibModule.kt +43 -0
  10. package/android/src/main/java/com/neuralwalletlib/NeuralWalletLibPackage.kt +34 -0
  11. package/android/src/main/jniLibs/arm64-v8a/libwallet.a +0 -0
  12. package/android/src/main/jniLibs/armeabi-v7a/libwallet.a +0 -0
  13. package/android/src/main/jniLibs/x86/libwallet.a +0 -0
  14. package/android/src/main/jniLibs/x86_64/libwallet.a +0 -0
  15. package/cpp/generated/wallet.cpp +1814 -0
  16. package/cpp/generated/wallet.hpp +77 -0
  17. package/cpp/react-native-neural-wallet-lib.cpp +16 -0
  18. package/cpp/react-native-neural-wallet-lib.h +15 -0
  19. package/ios/NeuralWalletLib.h +16 -0
  20. package/ios/NeuralWalletLib.mm +66 -0
  21. package/lib/module/NativeNeuralWalletLib.js +7 -0
  22. package/lib/module/NativeNeuralWalletLib.js.map +1 -0
  23. package/lib/module/generated/wallet-ffi.js +43 -0
  24. package/lib/module/generated/wallet-ffi.js.map +1 -0
  25. package/lib/module/generated/wallet.js +219 -0
  26. package/lib/module/generated/wallet.js.map +1 -0
  27. package/lib/module/index.js +43 -0
  28. package/lib/module/index.js.map +1 -0
  29. package/lib/module/package.json +1 -0
  30. package/lib/typescript/package.json +1 -0
  31. package/lib/typescript/src/NativeNeuralWalletLib.d.ts +8 -0
  32. package/lib/typescript/src/NativeNeuralWalletLib.d.ts.map +1 -0
  33. package/lib/typescript/src/generated/wallet-ffi.d.ts +84 -0
  34. package/lib/typescript/src/generated/wallet-ffi.d.ts.map +1 -0
  35. package/lib/typescript/src/generated/wallet.d.ts +166 -0
  36. package/lib/typescript/src/generated/wallet.d.ts.map +1 -0
  37. package/lib/typescript/src/index.d.ts +8 -0
  38. package/lib/typescript/src/index.d.ts.map +1 -0
  39. package/package.json +169 -0
  40. package/src/NativeNeuralWalletLib.ts +10 -0
  41. package/src/generated/wallet-ffi.ts +197 -0
  42. package/src/generated/wallet.ts +360 -0
  43. package/src/index.tsx +41 -0
@@ -0,0 +1,77 @@
1
+ // This file was autogenerated by some hot garbage in the
2
+ // `uniffi-bindgen-react-native` crate. Trust me, you don't want to mess with
3
+ // it!
4
+ #pragma once
5
+ #include "UniffiCallInvoker.h"
6
+ #include <ReactCommon/CallInvoker.h>
7
+ #include <iostream>
8
+ #include <jsi/jsi.h>
9
+ #include <map>
10
+ #include <memory>
11
+
12
+ namespace react = facebook::react;
13
+ namespace jsi = facebook::jsi;
14
+
15
+ class NativeWallet : public jsi::HostObject {
16
+ private:
17
+ // For calling back into JS from Rust.
18
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker;
19
+
20
+ protected:
21
+ std::map<std::string, jsi::Value> props;
22
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(
23
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24
+ size_t count);
25
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(
26
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27
+ size_t count);
28
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
29
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
30
+ size_t count);
31
+ jsi::Value cpp_uniffi_wallet_fn_func_generate_eth_keypair(
32
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
33
+ size_t count);
34
+ jsi::Value cpp_uniffi_wallet_fn_func_generate_solana_keypair(
35
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
36
+ size_t count);
37
+ jsi::Value cpp_uniffi_wallet_checksum_func_generate_eth_keypair(
38
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
39
+ size_t count);
40
+ jsi::Value cpp_uniffi_wallet_checksum_func_generate_solana_keypair(
41
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
42
+ size_t count);
43
+ jsi::Value cpp_ffi_wallet_uniffi_contract_version(jsi::Runtime &rt,
44
+ const jsi::Value &thisVal,
45
+ const jsi::Value *args,
46
+ size_t count);
47
+
48
+ public:
49
+ NativeWallet(jsi::Runtime &rt,
50
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker);
51
+ virtual ~NativeWallet();
52
+
53
+ /**
54
+ * The entry point into the crate.
55
+ *
56
+ * React Native must call `NativeWallet.registerModule(rt, callInvoker)`
57
+ * before using the Javascript interface.
58
+ */
59
+ static void registerModule(jsi::Runtime &rt,
60
+ std::shared_ptr<react::CallInvoker> callInvoker);
61
+
62
+ /**
63
+ * Some cleanup into the crate goes here.
64
+ *
65
+ * Current implementation is empty, however, this is not guaranteed to always
66
+ * be the case.
67
+ *
68
+ * Clients should call `NativeWallet.unregisterModule(rt)` after final use
69
+ * where possible.
70
+ */
71
+ static void unregisterModule(jsi::Runtime &rt);
72
+
73
+ virtual jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
74
+ virtual void set(jsi::Runtime &rt, const jsi::PropNameID &name,
75
+ const jsi::Value &value);
76
+ virtual std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt);
77
+ };
@@ -0,0 +1,16 @@
1
+ // Generated by uniffi-bindgen-react-native
2
+ #include "react-native-neural-wallet-lib.h"
3
+ #include "generated/wallet.hpp"
4
+
5
+ namespace neuralwalletlib {
6
+ using namespace facebook;
7
+
8
+ uint8_t installRustCrate(jsi::Runtime &runtime, std::shared_ptr<react::CallInvoker> callInvoker) {
9
+ NativeWallet::registerModule(runtime, callInvoker);
10
+ return true;
11
+ }
12
+
13
+ uint8_t cleanupRustCrate(jsi::Runtime &runtime) {
14
+ return false;
15
+ }
16
+ }
@@ -0,0 +1,15 @@
1
+ #ifndef NEURALWALLETLIB_H
2
+ #define NEURALWALLETLIB_H
3
+ // Generated by uniffi-bindgen-react-native
4
+ #include <cstdint>
5
+ #include <jsi/jsi.h>
6
+ #include <ReactCommon/CallInvoker.h>
7
+
8
+ namespace neuralwalletlib {
9
+ using namespace facebook;
10
+
11
+ uint8_t installRustCrate(jsi::Runtime &runtime, std::shared_ptr<react::CallInvoker> callInvoker);
12
+ uint8_t cleanupRustCrate(jsi::Runtime &runtime);
13
+ }
14
+
15
+ #endif /* NEURALWALLETLIB_H */
@@ -0,0 +1,16 @@
1
+ // Generated by uniffi-bindgen-react-native
2
+ #ifdef __cplusplus
3
+ #import "react-native-neural-wallet-lib.h"
4
+ #endif
5
+
6
+ #ifdef RCT_NEW_ARCH_ENABLED
7
+ #import "NeuralWalletLibSpec.h"
8
+
9
+ @interface NeuralWalletLib : NSObject <NativeNeuralWalletLibSpec>
10
+ #else
11
+ #import <React/RCTBridgeModule.h>
12
+
13
+ @interface NeuralWalletLib : NSObject <RCTBridgeModule>
14
+ #endif
15
+
16
+ @end
@@ -0,0 +1,66 @@
1
+ // Generated by uniffi-bindgen-react-native
2
+ #import "NeuralWalletLib.h"
3
+
4
+ namespace uniffi_generated {
5
+ using namespace facebook::react;
6
+ /**
7
+ * ObjC++ class for module 'NativeNeuralWalletLib'
8
+ */
9
+ class JSI_EXPORT NativeNeuralWalletLibSpecJSI : public ObjCTurboModule {
10
+ public:
11
+ NativeNeuralWalletLibSpecJSI(const ObjCTurboModule::InitParams &params);
12
+ std::shared_ptr<CallInvoker> callInvoker;
13
+ };
14
+
15
+ static facebook::jsi::Value __hostFunction_NeuralWalletLib_installRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
+ auto& tm = static_cast<NativeNeuralWalletLibSpecJSI&>(turboModule);
17
+ auto jsInvoker = tm.callInvoker;
18
+ uint8_t result = neuralwalletlib::installRustCrate(rt, jsInvoker);
19
+ return facebook::jsi::Value(rt, result);
20
+ }
21
+ static facebook::jsi::Value __hostFunction_NeuralWalletLib_cleanupRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
22
+ uint8_t result = neuralwalletlib::cleanupRustCrate(rt);
23
+ return facebook::jsi::Value(rt, result);
24
+ }
25
+
26
+ NativeNeuralWalletLibSpecJSI::NativeNeuralWalletLibSpecJSI(const ObjCTurboModule::InitParams &params)
27
+ : ObjCTurboModule(params), callInvoker(params.jsInvoker) {
28
+ this->methodMap_["installRustCrate"] = MethodMetadata {1, __hostFunction_NeuralWalletLib_installRustCrate};
29
+ this->methodMap_["cleanupRustCrate"] = MethodMetadata {1, __hostFunction_NeuralWalletLib_cleanupRustCrate};
30
+ }
31
+ } // namespace uniffi_generated
32
+
33
+ @implementation NeuralWalletLib
34
+ RCT_EXPORT_MODULE()
35
+
36
+ // Don't compile this code when we build for the old architecture.
37
+ #ifdef RCT_NEW_ARCH_ENABLED
38
+
39
+ // Automated testing checks neuralwalletlib
40
+ // by comparing the whole line here.
41
+ /*
42
+ - (NSNumber *)multiply:(double)a b:(double)b {
43
+ NSNumber *result = @(neuralwalletlib::multiply(a, b));
44
+ }
45
+ */
46
+
47
+ - (NSNumber *)installRustCrate {
48
+ @throw [NSException exceptionWithName:@"UnreachableException"
49
+ reason:@"This method should never be called."
50
+ userInfo:nil];
51
+ }
52
+
53
+ - (NSNumber *)cleanupRustCrate {
54
+ @throw [NSException exceptionWithName:@"UnreachableException"
55
+ reason:@"This method should never be called."
56
+ userInfo:nil];
57
+ }
58
+
59
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
60
+ (const facebook::react::ObjCTurboModule::InitParams &)params
61
+ {
62
+ return std::make_shared<uniffi_generated::NativeNeuralWalletLibSpecJSI>(params);
63
+ }
64
+ #endif
65
+
66
+ @end
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ // Generated by uniffi-bindgen-react-native
4
+
5
+ import { TurboModuleRegistry } from 'react-native';
6
+ export default TurboModuleRegistry.getEnforcing('NeuralWalletLib');
7
+ //# sourceMappingURL=NativeNeuralWalletLib.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeNeuralWalletLib.ts"],"mappings":";;AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAOlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,iBAAiB,CAAC","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
4
+ // Trust me, you don't want to mess with it!
5
+
6
+ // Casting globalThis to any allows us to look for `NativeWallet`
7
+ // if it was added via JSI.
8
+ //
9
+ // We use a getter here rather than simply `globalThis.NativeWallet` so that
10
+ // if/when the startup sequence isn't just so, an empty value isn't inadvertantly cached.
11
+ const getter = () => globalThis.NativeWallet;
12
+ export default getter;
13
+
14
+ // Structs and function types for calling back into Typescript from Rust.
15
+
16
+ // UniffiRustFutureContinuationCallback is generated as part of the component interface's
17
+ // ffi_definitions. However, we need it in the runtime.
18
+ // We could:
19
+ // (a) do some complicated template logic to ensure the declaration is not generated here (possible)
20
+ // (b) import the generated declaration into the runtime (m a y b e) or…
21
+ // (c) generate the declaration anyway, and use a different declaration in the runtime.
22
+ //
23
+ // We chose (c) here as the simplest. In addition, we perform a compile time check that
24
+ // the two versions of `UniffiRustFutureContinuationCallback` are structurally equivalent.
25
+ //
26
+ // If you see the error:
27
+ // ```
28
+ // Type 'true' is not assignable to type 'false'.(2322)
29
+ // ```
30
+ // Then a new version of uniffi has changed the signature of the callback. Most likely, code in
31
+ // `typescript/src/async-rust-call.ts` will need to be changed.
32
+ //
33
+ // If you see the error:
34
+ // ```
35
+ // Cannot find name 'UniffiRustFutureContinuationCallback'. Did you mean 'RuntimeUniffiRustFutureContinuationCallback'?(2552)
36
+ // ```
37
+ // then you may not be using callbacks or promises, and uniffi is now not generating Futures and callbacks.
38
+ // You should not generate this if that is the case.
39
+ //
40
+ // ('You' being the bindings generator maintainer).
41
+ const isRustFutureContinuationCallbackTypeCompatible = true;
42
+ const isUniffiForeignFutureTypeCompatible = true;
43
+ //# sourceMappingURL=wallet-ffi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getter","globalThis","NativeWallet","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/wallet-ffi.ts"],"mappings":";;AAAA;AACA;;AAuCA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,YAAY;AAClC,eAAeF,MAAM;;AAErB;;AAmHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+
3
+ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
4
+ // Trust me, you don't want to mess with it!
5
+ import nativeModule from "./wallet-ffi.js";
6
+ import { AbstractFfiConverterByteArray, FfiConverterInt32, UniffiError, UniffiInternalError, UniffiRustCaller, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiTypeNameSymbol } from 'uniffi-bindgen-react-native';
7
+
8
+ // Get converters from the other files, if any.
9
+ const uniffiCaller = new UniffiRustCaller(() => ({
10
+ code: 0
11
+ }));
12
+ const uniffiIsDebug =
13
+ // @ts-ignore -- The process global might not be defined
14
+ typeof process !== 'object' ||
15
+ // @ts-ignore -- The process global might not be defined
16
+ process?.env?.NODE_ENV !== 'production' || false;
17
+ // Public interface members begin here.
18
+
19
+ export function generateEthKeypair(mnemonicStr, pathStr) /*throws*/{
20
+ return FfiConverterTypeKeyPair.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeWalletError.lift.bind(FfiConverterTypeWalletError), /*caller:*/callStatus => {
21
+ return nativeModule().ubrn_uniffi_wallet_fn_func_generate_eth_keypair(FfiConverterString.lower(mnemonicStr), FfiConverterString.lower(pathStr), callStatus);
22
+ }, /*liftString:*/FfiConverterString.lift));
23
+ }
24
+ export function generateSolanaKeypair(mnemonicStr, pathStr) /*throws*/{
25
+ return FfiConverterTypeKeyPair.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeWalletError.lift.bind(FfiConverterTypeWalletError), /*caller:*/callStatus => {
26
+ return nativeModule().ubrn_uniffi_wallet_fn_func_generate_solana_keypair(FfiConverterString.lower(mnemonicStr), FfiConverterString.lower(pathStr), callStatus);
27
+ }, /*liftString:*/FfiConverterString.lift));
28
+ }
29
+ /**
30
+ * Generated factory for {@link KeyPair} record objects.
31
+ */
32
+ export const KeyPair = (() => {
33
+ const defaults = () => ({});
34
+ const create = (() => {
35
+ return uniffiCreateRecord(defaults);
36
+ })();
37
+ return Object.freeze({
38
+ /**
39
+ * Create a frozen instance of {@link KeyPair}, with defaults specified
40
+ * in Rust, in the {@link wallet} crate.
41
+ */
42
+ create,
43
+ /**
44
+ * Create a frozen instance of {@link KeyPair}, with defaults specified
45
+ * in Rust, in the {@link wallet} crate.
46
+ */
47
+ new: create,
48
+ /**
49
+ * Defaults specified in the {@link wallet} crate.
50
+ */
51
+ defaults: () => Object.freeze(defaults())
52
+ });
53
+ })();
54
+ const FfiConverterTypeKeyPair = (() => {
55
+ class FFIConverter extends AbstractFfiConverterByteArray {
56
+ read(from) {
57
+ return {
58
+ privateKey: FfiConverterString.read(from),
59
+ publicKey: FfiConverterString.read(from),
60
+ address: FfiConverterString.read(from)
61
+ };
62
+ }
63
+ write(value, into) {
64
+ FfiConverterString.write(value.privateKey, into);
65
+ FfiConverterString.write(value.publicKey, into);
66
+ FfiConverterString.write(value.address, into);
67
+ }
68
+ allocationSize(value) {
69
+ return FfiConverterString.allocationSize(value.privateKey) + FfiConverterString.allocationSize(value.publicKey) + FfiConverterString.allocationSize(value.address);
70
+ }
71
+ }
72
+ return new FFIConverter();
73
+ })();
74
+ const stringConverter = {
75
+ stringToBytes: s => uniffiCaller.rustCall(status => nativeModule().ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(s, status)),
76
+ bytesToString: ab => uniffiCaller.rustCall(status => nativeModule().ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(ab, status)),
77
+ stringByteLength: s => uniffiCaller.rustCall(status => nativeModule().ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(s, status))
78
+ };
79
+ const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
80
+
81
+ // Error type: WalletError
82
+
83
+ // Enum: WalletError
84
+ export let WalletError_Tags = /*#__PURE__*/function (WalletError_Tags) {
85
+ WalletError_Tags["InvalidMnemonic"] = "InvalidMnemonic";
86
+ WalletError_Tags["DerivationError"] = "DerivationError";
87
+ return WalletError_Tags;
88
+ }({});
89
+ export const WalletError = (() => {
90
+ class InvalidMnemonic_ extends UniffiError {
91
+ /**
92
+ * @private
93
+ * This field is private and should not be used, use `tag` instead.
94
+ */
95
+ [uniffiTypeNameSymbol] = 'WalletError';
96
+ tag = WalletError_Tags.InvalidMnemonic;
97
+ constructor() {
98
+ super('WalletError', 'InvalidMnemonic');
99
+ }
100
+ static new() {
101
+ return new InvalidMnemonic_();
102
+ }
103
+ static instanceOf(obj) {
104
+ return obj.tag === WalletError_Tags.InvalidMnemonic;
105
+ }
106
+ static hasInner(obj) {
107
+ return false;
108
+ }
109
+ }
110
+ class DerivationError_ extends UniffiError {
111
+ /**
112
+ * @private
113
+ * This field is private and should not be used, use `tag` instead.
114
+ */
115
+ [uniffiTypeNameSymbol] = 'WalletError';
116
+ tag = WalletError_Tags.DerivationError;
117
+ constructor() {
118
+ super('WalletError', 'DerivationError');
119
+ }
120
+ static new() {
121
+ return new DerivationError_();
122
+ }
123
+ static instanceOf(obj) {
124
+ return obj.tag === WalletError_Tags.DerivationError;
125
+ }
126
+ static hasInner(obj) {
127
+ return false;
128
+ }
129
+ }
130
+ function instanceOf(obj) {
131
+ return obj[uniffiTypeNameSymbol] === 'WalletError';
132
+ }
133
+ return Object.freeze({
134
+ instanceOf,
135
+ InvalidMnemonic: InvalidMnemonic_,
136
+ DerivationError: DerivationError_
137
+ });
138
+ })();
139
+ // FfiConverter for enum WalletError
140
+ const FfiConverterTypeWalletError = (() => {
141
+ const ordinalConverter = FfiConverterInt32;
142
+ class FFIConverter extends AbstractFfiConverterByteArray {
143
+ read(from) {
144
+ switch (ordinalConverter.read(from)) {
145
+ case 1:
146
+ return new WalletError.InvalidMnemonic();
147
+ case 2:
148
+ return new WalletError.DerivationError();
149
+ default:
150
+ throw new UniffiInternalError.UnexpectedEnumCase();
151
+ }
152
+ }
153
+ write(value, into) {
154
+ switch (value.tag) {
155
+ case WalletError_Tags.InvalidMnemonic:
156
+ {
157
+ ordinalConverter.write(1, into);
158
+ return;
159
+ }
160
+ case WalletError_Tags.DerivationError:
161
+ {
162
+ ordinalConverter.write(2, into);
163
+ return;
164
+ }
165
+ default:
166
+ // Throwing from here means that WalletError_Tags hasn't matched an ordinal.
167
+ throw new UniffiInternalError.UnexpectedEnumCase();
168
+ }
169
+ }
170
+ allocationSize(value) {
171
+ switch (value.tag) {
172
+ case WalletError_Tags.InvalidMnemonic:
173
+ {
174
+ return ordinalConverter.allocationSize(1);
175
+ }
176
+ case WalletError_Tags.DerivationError:
177
+ {
178
+ return ordinalConverter.allocationSize(2);
179
+ }
180
+ default:
181
+ throw new UniffiInternalError.UnexpectedEnumCase();
182
+ }
183
+ }
184
+ }
185
+ return new FFIConverter();
186
+ })();
187
+
188
+ /**
189
+ * This should be called before anything else.
190
+ *
191
+ * It is likely that this is being done for you by the library's `index.ts`.
192
+ *
193
+ * It checks versions of uniffi between when the Rust scaffolding was generated
194
+ * and when the bindings were generated.
195
+ *
196
+ * It also initializes the machinery to enable Rust to talk back to Javascript.
197
+ */
198
+ function uniffiEnsureInitialized() {
199
+ // Get the bindings contract version from our ComponentInterface
200
+ const bindingsContractVersion = 29;
201
+ // Get the scaffolding contract version by calling the into the dylib
202
+ const scaffoldingContractVersion = nativeModule().ubrn_ffi_wallet_uniffi_contract_version();
203
+ if (bindingsContractVersion !== scaffoldingContractVersion) {
204
+ throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
205
+ }
206
+ if (nativeModule().ubrn_uniffi_wallet_checksum_func_generate_eth_keypair() !== 15022) {
207
+ throw new UniffiInternalError.ApiChecksumMismatch('uniffi_wallet_checksum_func_generate_eth_keypair');
208
+ }
209
+ if (nativeModule().ubrn_uniffi_wallet_checksum_func_generate_solana_keypair() !== 38886) {
210
+ throw new UniffiInternalError.ApiChecksumMismatch('uniffi_wallet_checksum_func_generate_solana_keypair');
211
+ }
212
+ }
213
+ export default Object.freeze({
214
+ initialize: uniffiEnsureInitialized,
215
+ converters: {
216
+ FfiConverterTypeKeyPair
217
+ }
218
+ });
219
+ //# sourceMappingURL=wallet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["nativeModule","AbstractFfiConverterByteArray","FfiConverterInt32","UniffiError","UniffiInternalError","UniffiRustCaller","uniffiCreateFfiConverterString","uniffiCreateRecord","uniffiTypeNameSymbol","uniffiCaller","code","uniffiIsDebug","process","env","NODE_ENV","generateEthKeypair","mnemonicStr","pathStr","FfiConverterTypeKeyPair","lift","rustCallWithError","FfiConverterTypeWalletError","bind","callStatus","ubrn_uniffi_wallet_fn_func_generate_eth_keypair","FfiConverterString","lower","generateSolanaKeypair","ubrn_uniffi_wallet_fn_func_generate_solana_keypair","KeyPair","defaults","create","Object","freeze","new","FFIConverter","read","from","privateKey","publicKey","address","write","value","into","allocationSize","stringConverter","stringToBytes","s","rustCall","status","ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer","bytesToString","ab","ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string","stringByteLength","ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length","WalletError_Tags","WalletError","InvalidMnemonic_","tag","InvalidMnemonic","constructor","instanceOf","obj","hasInner","DerivationError_","DerivationError","ordinalConverter","UnexpectedEnumCase","uniffiEnsureInitialized","bindingsContractVersion","scaffoldingContractVersion","ubrn_ffi_wallet_uniffi_contract_version","ContractVersionMismatch","ubrn_uniffi_wallet_checksum_func_generate_eth_keypair","ApiChecksumMismatch","ubrn_uniffi_wallet_checksum_func_generate_solana_keypair","initialize","converters"],"sourceRoot":"../../../src","sources":["generated/wallet.ts"],"mappings":";;AAAA;AACA;AACA,OAAOA,YAAY,MA6BZ,iBAAc;AACrB,SAEEC,6BAA6B,EAC7BC,iBAAiB,EAEjBC,WAAW,EACXC,mBAAmB,EACnBC,gBAAgB,EAChBC,8BAA8B,EAC9BC,kBAAkB,EAClBC,oBAAoB,QAEf,6BAA6B;;AAEpC;AACA,MAAMC,YAAY,GAAG,IAAIJ,gBAAgB,CAAC,OAAO;EAAEK,IAAI,EAAE;AAAE,CAAC,CAAC,CAAC;AAE9D,MAAMC,aAAa;AACjB;AACA,OAAOC,OAAO,KAAK,QAAQ;AAC3B;AACAA,OAAO,EAAEC,GAAG,EAAEC,QAAQ,KAAK,YAAY,IACvC,KAAK;AACP;;AAEA,OAAO,SAASC,kBAAkBA,CAChCC,WAAmB,EACnBC,OAAe,EACN,UAAW;EACpB,OAAOC,uBAAuB,CAACC,IAAI,CACjCV,YAAY,CAACW,iBAAiB,CAC5B,cAAeC,2BAA2B,CAACF,IAAI,CAACG,IAAI,CAClDD,2BACF,CAAC,EACD,WAAaE,UAAU,IAAK;IAC1B,OAAOvB,YAAY,CAAC,CAAC,CAACwB,+CAA+C,CACnEC,kBAAkB,CAACC,KAAK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,mBAAmB,CAACgE,kBAAkB,CAAC,CAAC;MACtD;IACF;EACF;EACA,OAAO,IAAIjC,YAAY,CAAC,CAAC;AAC3B,CAAC,EAAE,CAAC;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASkC,uBAAuBA,CAAA,EAAG;EACjC;EACA,MAAMC,uBAAuB,GAAG,EAAE;EAClC;EACA,MAAMC,0BAA0B,GAC9BvE,YAAY,CAAC,CAAC,CAACwE,uCAAuC,CAAC,CAAC;EAC1D,IAAIF,uBAAuB,KAAKC,0BAA0B,EAAE;IAC1D,MAAM,IAAInE,mBAAmB,CAACqE,uBAAuB,CACnDF,0BAA0B,EAC1BD,uBACF,CAAC;EACH;EACA,IACEtE,YAAY,CAAC,CAAC,CAAC0E,qDAAqD,CAAC,CAAC,KACtE,KAAK,EACL;IACA,MAAM,IAAItE,mBAAmB,CAACuE,mBAAmB,CAC/C,kDACF,CAAC;EACH;EACA,IACE3E,YAAY,CAAC,CAAC,CAAC4E,wDAAwD,CAAC,CAAC,KACzE,KAAK,EACL;IACA,MAAM,IAAIxE,mBAAmB,CAACuE,mBAAmB,CAC/C,qDACF,CAAC;EACH;AACF;AAEA,eAAe3C,MAAM,CAACC,MAAM,CAAC;EAC3B4C,UAAU,EAAER,uBAAuB;EACnCS,UAAU,EAAE;IACV5D;EACF;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ // Generated by uniffi-bindgen-react-native
4
+ import installer from "./NativeNeuralWalletLib.js";
5
+
6
+ // Register the rust crate with Hermes
7
+ // - the boolean flag ensures this loads exactly once, even if the JS
8
+ // code is reloaded (e.g. during development with metro).
9
+ let rustInstalled = false;
10
+ if (!rustInstalled) {
11
+ installer.installRustCrate();
12
+ rustInstalled = true;
13
+ }
14
+
15
+ // Export the generated bindings to the app.
16
+ export * from "./generated/wallet.js";
17
+
18
+ // Now import the bindings so we can:
19
+ // - intialize them
20
+ // - export them as namespaced objects as the default export.
21
+ import * as wallet from "./generated/wallet.js";
22
+
23
+ // Initialize the generated bindings: mostly checksums, but also callbacks.
24
+ // - the boolean flag ensures this loads exactly once, even if the JS code
25
+ // is reloaded (e.g. during development with metro).
26
+ let initialized = false;
27
+ if (!initialized) {
28
+ wallet.default.initialize();
29
+ initialized = true;
30
+ }
31
+
32
+ // This provides parity with the index.web.ts version of this file.
33
+ // The web version relies on an asynchronous fetch, which this doesn't
34
+ // need, so we just no-op.
35
+ export async function uniffiInitAsync() {
36
+ // NOOP.
37
+ }
38
+
39
+ // Export the crates as individually namespaced objects.
40
+ export default {
41
+ wallet
42
+ };
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["installer","rustInstalled","installRustCrate","wallet","initialized","default","initialize","uniffiInitAsync"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,OAAOA,SAAS,MAAM,4BAAyB;;AAE/C;AACA;AACA;AACA,IAAIC,aAAa,GAAG,KAAK;AACzB,IAAI,CAACA,aAAa,EAAE;EAClBD,SAAS,CAACE,gBAAgB,CAAC,CAAC;EAC5BD,aAAa,GAAG,IAAI;AACtB;;AAEA;AACA,cAAc,uBAAoB;;AAElC;AACA;AACA;AACA,OAAO,KAAKE,MAAM,MAAM,uBAAoB;;AAE5C;AACA;AACA;AACA,IAAIC,WAAW,GAAG,KAAK;AACvB,IAAI,CAACA,WAAW,EAAE;EAChBD,MAAM,CAACE,OAAO,CAACC,UAAU,CAAC,CAAC;EAC3BF,WAAW,GAAG,IAAI;AACpB;;AAEA;AACA;AACA;AACA,OAAO,eAAeG,eAAeA,CAAA,EAAG;EACtC;AAAA;;AAGF;AACA,eAAe;EACbJ;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,8 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ installRustCrate(): boolean;
4
+ cleanupRustCrate(): boolean;
5
+ }
6
+ declare const _default: Spec;
7
+ export default _default;
8
+ //# sourceMappingURL=NativeNeuralWalletLib.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeNeuralWalletLib.d.ts","sourceRoot":"","sources":["../../../src/NativeNeuralWalletLib.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,gBAAgB,IAAI,OAAO,CAAC;IAC5B,gBAAgB,IAAI,OAAO,CAAC;CAC7B;;AAED,wBAAyE"}
@@ -0,0 +1,84 @@
1
+ import { type UniffiRustCallStatus } from 'uniffi-bindgen-react-native';
2
+ interface NativeModuleInterface {
3
+ ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(string: string, uniffi_out_err: UniffiRustCallStatus): number;
4
+ ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(string: string, uniffi_out_err: UniffiRustCallStatus): Uint8Array;
5
+ ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(buffer: Uint8Array, uniffi_out_err: UniffiRustCallStatus): string;
6
+ ubrn_uniffi_wallet_fn_func_generate_eth_keypair(mnemonicStr: Uint8Array, pathStr: Uint8Array, uniffi_out_err: UniffiRustCallStatus): Uint8Array;
7
+ ubrn_uniffi_wallet_fn_func_generate_solana_keypair(mnemonicStr: Uint8Array, pathStr: Uint8Array, uniffi_out_err: UniffiRustCallStatus): Uint8Array;
8
+ ubrn_uniffi_wallet_checksum_func_generate_eth_keypair(): number;
9
+ ubrn_uniffi_wallet_checksum_func_generate_solana_keypair(): number;
10
+ ubrn_ffi_wallet_uniffi_contract_version(): number;
11
+ }
12
+ declare const getter: () => NativeModuleInterface;
13
+ export default getter;
14
+ export type UniffiRustFutureContinuationCallback = (data: bigint, pollResult: number) => void;
15
+ type UniffiForeignFutureFree = (handle: bigint) => void;
16
+ export type UniffiForeignFuture = {
17
+ handle: bigint;
18
+ free: UniffiForeignFutureFree;
19
+ };
20
+ export type UniffiForeignFutureStructU8 = {
21
+ returnValue: number;
22
+ callStatus: UniffiRustCallStatus;
23
+ };
24
+ export type UniffiForeignFutureCompleteU8 = (callbackData: bigint, result: UniffiForeignFutureStructU8) => void;
25
+ export type UniffiForeignFutureStructI8 = {
26
+ returnValue: number;
27
+ callStatus: UniffiRustCallStatus;
28
+ };
29
+ export type UniffiForeignFutureCompleteI8 = (callbackData: bigint, result: UniffiForeignFutureStructI8) => void;
30
+ export type UniffiForeignFutureStructU16 = {
31
+ returnValue: number;
32
+ callStatus: UniffiRustCallStatus;
33
+ };
34
+ export type UniffiForeignFutureCompleteU16 = (callbackData: bigint, result: UniffiForeignFutureStructU16) => void;
35
+ export type UniffiForeignFutureStructI16 = {
36
+ returnValue: number;
37
+ callStatus: UniffiRustCallStatus;
38
+ };
39
+ export type UniffiForeignFutureCompleteI16 = (callbackData: bigint, result: UniffiForeignFutureStructI16) => void;
40
+ export type UniffiForeignFutureStructU32 = {
41
+ returnValue: number;
42
+ callStatus: UniffiRustCallStatus;
43
+ };
44
+ export type UniffiForeignFutureCompleteU32 = (callbackData: bigint, result: UniffiForeignFutureStructU32) => void;
45
+ export type UniffiForeignFutureStructI32 = {
46
+ returnValue: number;
47
+ callStatus: UniffiRustCallStatus;
48
+ };
49
+ export type UniffiForeignFutureCompleteI32 = (callbackData: bigint, result: UniffiForeignFutureStructI32) => void;
50
+ export type UniffiForeignFutureStructU64 = {
51
+ returnValue: bigint;
52
+ callStatus: UniffiRustCallStatus;
53
+ };
54
+ export type UniffiForeignFutureCompleteU64 = (callbackData: bigint, result: UniffiForeignFutureStructU64) => void;
55
+ export type UniffiForeignFutureStructI64 = {
56
+ returnValue: bigint;
57
+ callStatus: UniffiRustCallStatus;
58
+ };
59
+ export type UniffiForeignFutureCompleteI64 = (callbackData: bigint, result: UniffiForeignFutureStructI64) => void;
60
+ export type UniffiForeignFutureStructF32 = {
61
+ returnValue: number;
62
+ callStatus: UniffiRustCallStatus;
63
+ };
64
+ export type UniffiForeignFutureCompleteF32 = (callbackData: bigint, result: UniffiForeignFutureStructF32) => void;
65
+ export type UniffiForeignFutureStructF64 = {
66
+ returnValue: number;
67
+ callStatus: UniffiRustCallStatus;
68
+ };
69
+ export type UniffiForeignFutureCompleteF64 = (callbackData: bigint, result: UniffiForeignFutureStructF64) => void;
70
+ export type UniffiForeignFutureStructPointer = {
71
+ returnValue: bigint;
72
+ callStatus: UniffiRustCallStatus;
73
+ };
74
+ export type UniffiForeignFutureCompletePointer = (callbackData: bigint, result: UniffiForeignFutureStructPointer) => void;
75
+ export type UniffiForeignFutureStructRustBuffer = {
76
+ returnValue: Uint8Array;
77
+ callStatus: UniffiRustCallStatus;
78
+ };
79
+ export type UniffiForeignFutureCompleteRustBuffer = (callbackData: bigint, result: UniffiForeignFutureStructRustBuffer) => void;
80
+ export type UniffiForeignFutureStructVoid = {
81
+ callStatus: UniffiRustCallStatus;
82
+ };
83
+ export type UniffiForeignFutureCompleteVoid = (callbackData: bigint, result: UniffiForeignFutureStructVoid) => void;
84
+ //# sourceMappingURL=wallet-ffi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-ffi.d.ts","sourceRoot":"","sources":["../../../../src/generated/wallet-ffi.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,oBAAoB,EAI1B,MAAM,6BAA6B,CAAC;AAErC,UAAU,qBAAqB;IAC7B,uDAAuD,CACrD,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,oBAAoB,GACnC,MAAM,CAAC;IACV,uDAAuD,CACrD,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,oBAAoB,GACnC,UAAU,CAAC;IACd,uDAAuD,CACrD,MAAM,EAAE,UAAU,EAClB,cAAc,EAAE,oBAAoB,GACnC,MAAM,CAAC;IACV,+CAA+C,CAC7C,WAAW,EAAE,UAAU,EACvB,OAAO,EAAE,UAAU,EACnB,cAAc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