1.0.16 • Published 2 years ago

@snowflake-so/safe-apps-provider v1.0.16

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Safe Apps Provider

A React library provides Provider, Context API and hooks to support Snowflake Safe Apps integration.

Installation

npm

npm install @snowflake-so/safe-apps-provider

yarn add @snowflake-so/safe-apps-provider

Quick start guide

Note: The implemented application only works inner Snowflake Safe 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-apps-provider";

const AppContent = () => {
  const { safe } = useSafe();
  return <div>{safe.safeInfo.vaultAddress}</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

1.0.16

2 years ago

1.0.14-beta

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago