emurgo / csl-mobile-bridge Goto Github PK
View Code? Open in Web Editor NEWReact-native bindings for Emurgo's cardano-serialization-lib (Cardano haskell Shelley)
License: MIT License
React-native bindings for Emurgo's cardano-serialization-lib (Cardano haskell Shelley)
License: MIT License
According to Emurgo/yoroi#2260 we need to update build.sh for ios
I got the issue when run on ios from xcode
My step when install the lib:
yarn add @emurgo/csl-mobile-bridge
cd ios && npx pod-install
I tried some solution from community but still not work:
source="$(readlink "${source}")"
-> source="$(readlink -f"${source}")"
Build Phrases
/[CP]Embed Pods Frameworks
/For install builds only
System:
"react-native": "0.71.3",
"@emurgo/csl-mobile-bridge": "^5.1.2",
Macos: Ventura - Version 13.3.1 (a) (22E772610a)
Xcode: Version 14.3 (14E222b)
Please give me some idea to resolve this problem. Thanks your work a lot!
iOS --------running $ npm install react-native-haskell-shelley --save
prompt error GET https://registry.npmjs.com/react-native-haskell-shelley - Not found
I am looking for the method TransactionBuilder.add_inputs_from
of @emurgo/cardano-serialization-lib-nodejs
but can not find it in @emurgo/react-native-haskell-shelley
(3.1.3)
The bindings for React Native seems do not provide any method for coin selection?
Many thanks! 🙏
Hi there,
So first things first, great works, so far we base our work on this repo to be able to use the cardano lib through a flutter app (so using the iOS/C wrapper).
But unfortunately even if we can generate signature it seems that the verify
function from the cardano-serialization-lib
is missing.
We saw some comment on the Android (nothing in the iOS one) version saying that it was a pending thing waiting for something, but it seems it may not be the case anymore? https://github.com/Emurgo/react-native-haskell-shelley/blob/master/rust/src/android/public_key.rs
// TODO: cannot implement yet since Ed25519Signature is missing.
// #[allow(non_snake_case)]
// #[no_mangle]
// pub unsafe extern "C" fn Java_io_emurgo_rnhaskellshelley_Native_publicKeyVerify(
Is there any reason to not have this function available, like a technical impossibility that we did not catch?
Thanks.
version 9.1.4
[submodule "binaryen"]
path = binaryen
url = [email protected]:WebAssembly/binaryen.git
New version
[submodule "binaryen"]
path = binaryen
url = https://github.com/WebAssembly/binaryen.git
The 9.1.4 version don't fetch the submodule binaryen
npm install @emurgo/react-native-haskell-shelley --save
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "@emurgo/react-native-haskell-shelley" under a package
npm ERR! also called "@emurgo/react-native-haskell-shelley". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm
Hi!
When I try to build my react-native app for android I get this error:
FAILURE: Build failed with an exception.
Where:
Build file '/home/piotr/Workspace/bonfire/node_modules/@emurgo/react-native-haskell-shelley/android/build.gradle' line: 89What went wrong:
A problem occurred evaluating project ':@emurgo_react-native-haskell-shelley'.Could not get unknown property 'DEFAULT_NDK_API_LEVEL' for object of type com.nishtahir.CargoExtension.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
I'm using version ^4.0.0-beta.3 of react-native-haskell-shelley.
Any ideas what could be the issue here? Thanks!
hi, I was trying to test the libraries by calling them from c ++ using the dynamic .so library that was compiled in the rust folder. but apparently it does not recognize the function when compiling.
I want to compile this test code:
#include "react_native_haskell_shelley.h"
...........
int main(){
std::string b32="addr1qxxxxxxxxxxxxxxxxxxxx";
bool estado;
const char **error=nullptr;
RPtr q;
estado=address_from_bech32(b32.c_str(), &q, error);
std::cout<<error<<std::endl;
std::cout<<estado<<std::endl;
return 0;
}
I compile with this command (the library is in the same folder)
g++ -Wall -o test main.cpp -L. -lreact_native_haskell_shelley
I get this error
/tmp/cceT6kUo.o: En la función `main':
main.cpp:(.text+0xa1): referencia a `address_from_bech32' sin definir
collect2: error: ld returned 1 exit status
What the title says: would it be possible to update the bindings so that they support latest versions of cardano-serialization-lib, and thus Babbage era new features (reference inputs, etc.)? This is a serious blocker in one of our projects. More generally, is react-native-haskell-shelley still being actively developed?
are leading underscores intended to imply a private method?
Can you please check if the issue from #81 has been addressed?
After npm installing the new package and building it for a Simulator on Mac OS I get the same error
The workaround for the error, is to comment out the line with "Mac.OSX.sdk" from the build.sh
file. After that, it compiles successfully for a simulator
Compiling for release doesn't require a workaround, and works as intended out of the box. Therefore the issue seems to be related to just the simulator target
All the best
Hello, I was trying to compile the library that is inside the rust folder with the following command:
cargo build
but it threw me this error:
error: failed to get cardano-serialization-lib as a dependency of package react-native-haskell-shelley v0.0.8
I am not familiar with rust, but I saw that its dynamic library could be used so that it can interact with c ++.
I have done some small tests with simple codes and the calls to the rust libraries work with c ++, and well, I would like to try this repositories because it contains the extern "c"
and # [no_mangle]
that I read that it is necessary for it to work.
only that I have not been able to compile to generate that .so library for me.
I noticed that this compilation also generates a .h library, which I found fantastic to be able to know the functions that the dynamic library has.
If you could help me compile this library, I would really appreciate it.
After build transaction, set witnesses. I added this code, but it always return same hex
const transaction = await Transaction.new(
txBody,
witnesses,
undefined // transaction metadata
);
console.log("-------transaction", transaction);
const transactionHash = Buffer.from(
await transaction.to_bytes(),
"utf8"
).toString("hex");
result key : 84a400800180021a0007a120030aa10081825820aac6f71be249b3aa2fb1f4a354d7a2673186422e0abf3924689d7f7dd97ddaf75840d248976b04d4a0cd836a16476e56677fa7549ff0bcb6300a0a05df690ede20076af7ffef433be35b3e09d6935bdfdec1c2c58b3d5bf00081501a3c8c30b9940ef5f6
Hi, can you upgrade the code to use the latest cardano-serialization-lib version 10.0.4 please
There are breaking changes between v9 and v10, so developing a Web DApp to use v10 and Mobile app to use v9 would lead to significant code duplication
Thanks
How can I create a shelley address from mnemonics using react-native-haskell-shelley npm? I can't see any test case related to mnemonics.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.