New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

o3-dapi-core

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

o3-dapi-core

O3 dapi core messaging protocol

  • 0.3.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

o3-dapi-core

Core messaging protocol.

Accepts plugins for different blockchains.

A plugin is required for use.

Usage

In a browser - cdn

<script src="https://cdn.jsdelivr.net/npm/o3-dapi-core/lib/o3-dapi-core.min.js"></script>
window.o3dapi

Install via npm npm version

npm i --save o3-dapi-core

or

yarn add o3-dapi-core
var o3dapi = require('o3-dapi-core');

import o3dapi from 'o3-dapi-core';

Example

o3dapi.initPlugins([<neo_plugin>, <ont_plugin>]);

React Native

For use with React Native, please pass in the ReactNative module into the setReactNativeOverrides method.

This will broadcast any dapi messages from the client to the DapiBridge.handleMessage method in your native mobile app.

The client app will also listen to the o3dapiEvent event from the DeviceEventEmitter. Events should be passed with the format:

interface Event {
  eventName: string;
  data: any;
}

Initialization on from the react native app should look like this:

import o3dapi from 'o3-dapi-core';
import ReactNative from 'react-native';

o3dapi.setReactNativeOverrides(ReactNative);

Keywords

FAQs

Package last updated on 01 Aug 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc