# metazen-frontend-sdk

> Metazen Frontend external SDK

Latest version **0.2.29** (published 2022-07-29) · commercial license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install metazen-frontend-sdk
pnpm add metazen-frontend-sdk
yarn add metazen-frontend-sdk
bun add metazen-frontend-sdk
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.29 |
| Published | 2022-07-29 |
| First published | 2022-06-15 |
| Weekly downloads | 0 |
| License | commercial |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 41 |
| Unpacked size | 2.1 MB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Author | Eugene Wong |
| Maintainers | ewht |

## Links

- npm: https://www.npmjs.com/package/metazen-frontend-sdk
- npm.io page: https://npm.io/package/metazen-frontend-sdk

## Dependencies (41)

- [uuid](https://npm.io/package/uuid.md) 8.3.2
- [axios](https://npm.io/package/axios.md) ~0.24.0
- [react](https://npm.io/package/react.md) ~17.0.2
- [redux](https://npm.io/package/redux.md) ~4.1.2
- [dotenv](https://npm.io/package/dotenv.md) ~10.0.0
- [ethers](https://npm.io/package/ethers.md) ~5.5.4
- [mkdirp](https://npm.io/package/mkdirp.md) ~1.0.4
- [history](https://npm.io/package/history.md) ~5.3.0
- [i18next](https://npm.io/package/i18next.md) ~21.6.16
- [@mui/lab](https://npm.io/package/@mui/lab.md) ~5.0.0-alpha.89
- [chokidar](https://npm.io/package/chokidar.md) ~3.5.3
- [date-fns](https://npm.io/package/date-fns.md) ~2.28.0
- [react-dom](https://npm.io/package/react-dom.md) ~17.0.2
- [typescript](https://npm.io/package/typescript.md) 4.5.4
- [web-vitals](https://npm.io/package/web-vitals.md) ~2.1.2
- [@mui/system](https://npm.io/package/@mui/system.md) ~5.9.2
- [date-fns-tz](https://npm.io/package/date-fns-tz.md) ~1.3.5
- [keycloak-js](https://npm.io/package/keycloak-js.md) ~16.1.0
- [react-redux](https://npm.io/package/react-redux.md) ~7.2.6
- [@craco/craco](https://npm.io/package/@craco/craco.md) ~7.0.0-alpha.5
- [bignumber.js](https://npm.io/package/bignumber.js.md) ~9.0.2
- [json-rpc-2.0](https://npm.io/package/json-rpc-2.0.md) ~1.1.0
- [qrcode.react](https://npm.io/package/qrcode.react.md) ~3.0.0
- [react-window](https://npm.io/package/react-window.md) ~1.8.7
- [@mui/material](https://npm.io/package/@mui/material.md) ~5.2.7
- [react-i18next](https://npm.io/package/react-i18next.md) ~11.16.7
- [react-refresh](https://npm.io/package/react-refresh.md) ~0.11.0
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.0
- [redux-persist](https://npm.io/package/redux-persist.md) 6.0.0
- [@emotion/react](https://npm.io/package/@emotion/react.md) ~11.8.1
- [oidc-client-ts](https://npm.io/package/oidc-client-ts.md) ~2.0.0-rc.3
- [@emotion/styled](https://npm.io/package/@emotion/styled.md) ~11.3.0
- [react-hook-form](https://npm.io/package/react-hook-form.md) ~7.31.1
- [@reduxjs/toolkit](https://npm.io/package/@reduxjs/toolkit.md) ~1.7.1
- [react-router-dom](https://npm.io/package/react-router-dom.md) ~6.3.0
- [react-oidc-context](https://npm.io/package/react-oidc-context.md) ~2.0.0-beta.2
- [@mui/icons-material](https://npm.io/package/@mui/icons-material.md) ~5.5.0
- [@mui/x-date-pickers](https://npm.io/package/@mui/x-date-pickers.md) ~5.0.0-alpha.2
- [@react-keycloak/web](https://npm.io/package/@react-keycloak/web.md) ~3.4.0
- [react-feature-flags](https://npm.io/package/react-feature-flags.md) 1.0.0
- [regenerator-runtime](https://npm.io/package/regenerator-runtime.md) 0.13.9

## Recent versions

- 0.2.29 (latest) — 2022-07-29
- 0.2.27 — 2022-07-27
- 0.2.26 — 2022-07-27
- 0.2.25 — 2022-07-27
- 0.2.24 — 2022-07-27
- 0.2.23 — 2022-07-26
- 0.2.22 — 2022-07-26
- 0.2.21 — 2022-07-26
- 0.2.20 — 2022-07-20
- 0.2.19 — 2022-07-19
- 0.2.18 — 2022-07-19
- 0.2.17 — 2022-07-19
- 0.2.9 — 2022-07-18
- 0.2.8 — 2022-07-13
- 0.2.7 — 2022-07-13
- … 5 more at https://npm.io/package/metazen-frontend-sdk/versions

## README

# Metazen Frontend SDK

This repo includes an example of the SDK's usages, which can be run with `npm run start`. It is designed to assist integration.

Authentication is done with standard OIDC flow, as implemented by Keycloak.

## Installation

Install the dependency:

```

npm i --save <TBD package name>

```

Import: 
```
import { <component> } from '<TBD final package name>'
```

The package may be the frontend-sdk or tentatively, just the frontend-components-sdk.

## KeyCloak

This needs to be run in conjunction with Keycloak server.

For information how to setup local Keycloak server refer to: https://gitlab.int.hextech.io/infrastructure/keycloak

Local Keycloak configuration is at `keycloak.json`.

## UI

Use Material UI V5.

## Prerequisites

You'll need to have Node 12.0.0 or up. We recommend upgrading to the LTS version of NodeJS available at [https://nodejs.org/](https://nodejs.org/). You can also use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.

## Available Scripts

Please only use `npm`.

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

```
# enable connects to fake api server in .env.local or any .env file you are using
REACT_APP_FAKE_API_SERVER=true

# modify requests that you are interested in local_mock_server/swagger.yaml
# install prism if you haven't, see local_mock_server/run.sh

# run local_mock_server
npm install @stoplight/prism-cli -g
npm run start:mock
```

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.


### `npm run storybook`

Launch Storybook in browser at [http://localhost:6006/](http://localhost:6006/) by default.


### `npm run integration-test`

Launch integration tests with Cypress (locally).


## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

## Directory Structure

As a library, anything that needs to be included in the library should be in `lib`.

## Zeplin Connect

Follow steps in
https://github.com/zeplin/connected-components-docs/blob/master/docs/gettingStarted/QUICK_START.md to setup Zeplin Connect.

## FE SDK API Reference

Use `camelCase` for all keys.

### How to display wallet?

- `isShown`

### What tokens, assets are available?

- tokenWhitelist. (Confirmed to be needed)

### Name of host

- hostName (Confirmed to be needed)

### logo of host

- logoUrl (Confirmed to be needed)

### Color of host

- palette (TBD - what are changeable?)

- Other aspects are TBD.

### (Upcoming)

- Customizations can be added. Feel free to discuss with dev and designer team.

---
_Source: https://npm.io/package/metazen-frontend-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
