
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
@gnolang/gnonative
Advanced tools
@gnolang/gnonative
simplifies the process of access the Gno.land (d)apps to mobile by using gRPC to connect with core blockchain functions.
It helps bypass this complexity by using gRPC to make calls to the Gno core API and access the blockchain's realm functions on a remote Gno.land node.
The RPC API documentation is available in the Buf registry:
Please follow the general Build instructions
in the main
README and then:
make asdf.install_tools
npm config set @buf:registry https://buf.build/gen/npm/v1/
npx create-expo-app my-app --template expo-template-blank-typescript
cd my-app
npm install @gnolang/gnonative
We prepared for you an example Hello World code.
Open App.tsx and replace the content with this:
import { GnoNativeProvider, useGnoNativeContext } from '@gnolang/gnonative';
import React, { useEffect, useState } from 'react';
import { StyleSheet, Text, View } from 'react-native';
const config = {
remote: 'https://gno.berty.io',
chain_id: 'dev',
};
export default function App() {
return (
<GnoNativeProvider config={config}>
<InnerApp />
</GnoNativeProvider>
);
}
const InnerApp = () => {
const { gnonative } = useGnoNativeContext();
const [greeting, setGreeting] = useState('');
useEffect(() => {
(async () => {
try {
const accounts = await gnonative.listKeyInfo();
console.log(accounts);
const remote = await gnonative.getRemote();
const chainId = await gnonative.getChainID();
console.log('Remote %s ChainId %s', remote, chainId);
setGreeting(await gnonative.hello('Gno'));
for await (const res of await gnonative.helloStream('Gno')) {
console.log(res.greeting);
}
} catch (error) {
console.log(error);
}
})();
}, []);
return (
<View style={styles.container}>
<Text>Gnonative App</Text>
<Text>{greeting}</Text>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
# Re-generate the native project directories from scratch
npx expo prebuild --clean
# Run the example app on Android
npx expo run:android
# Run the example app on iOS
npx expo run:ios
For bare React Native projects, you must ensure that you have
installed and configured the expo
package
before continuing.
You can run one of the following command:
make npm.pack
or
make npm.publish
FAQs
Develop for Gno using your app's native language
The npm package @gnolang/gnonative receives a total of 206 weekly downloads. As such, @gnolang/gnonative popularity was classified as not popular.
We found that @gnolang/gnonative demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.