@snowflake-so/safe-aptos-provider
v1.0.2
Published
A React library provides Provider, Context API and hooks to support Safe apps integration.
Downloads
4
Maintainers
Readme
Safe Aptos Provider
A React library provides Provider, Context API and hooks to support Safe apps integration.
Installation
npm install @snowflake-so/safe-aptos-provider
yarn add @snowflake-so/safe-aptos-provider
Quick start guide
Note: The implemented application only works inner Safe Aptos app.
Wrap your root component with SafeProvider
and use the React hook useSafeContext
to retrieve the data of the Snowflake Safe parent window.
import React from 'react';
import { useSafe, SafeProvider } from '@snowflake-so/safe-aptos-provider';
const AppContent = () => {
const { safe } = useSafe();
return <div>{safe.safeInfo.address}</div>;
};
const App = () => {
return (
<SafeProvider>
<AppContent />
</SafeProvider>
);
};
export default App;
Support
Struggle with the SDK integration?
If you have any problem with using the SDK in your system, drop a question our Snowflake Discord #sdk to receive a support from our engineers.
Find a bug or want to contribute to Snowflake?
If you find a bug or have any problem and idea while using the SDK, you can create an issue on SDK Github.
License MIT