@edgematrixjs/client
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@edgematrixjs/browser

This project webpack to browser.

For usage, please refer to the "@edgematrixjs/rtc" module.

Exports

export { Http } from '@edgematrixjs/http';
export { EmSocket } from '@edgematrixjs/socket';
export { RTC } from '@edgematrixjs/rtc';
export { Transaction, LegacyTransaction } from '@edgematrixjs/tx';
export * from '@edgematrixjs/util';

INSTALL

Download dist/bundle.js in your project and add <script> in .html

<script src="dist/bundle.js"></script>

or

In your project dir, npm install @edgematrixjs/client and add <script> in .html

<script src="node_modules/@edgematrixjs/client/dist/bundle.js"></script>

Example

import { Http } from '@edgematrixjs/http';
import { RTC } from '@edgematrixjs/rtc';
const rtc = new RTC({ debug: false });
const chainId = 2;
const privateKey = '{privatekey}';
const network = 'https://oregon.edgematrix.xyz';
const http = new Http({ baseURL: network });
rtc.createSubject(chainId, privateKey, http);

API

postJSON(options: AxiosRequestConfig) - Similar to Axios

post(options: AxiosRequestConfig) - Similar to Axios

get(options: AxiosRequestConfig) - Similar to Axios

Readme

Keywords

Package Sidebar

Install

npm i @edgematrixjs/client

Weekly Downloads

0

Version

0.0.3

License

MPL-2.0

Unpacked Size

905 kB

Total Files

5

Last publish

Collaborators

  • jiwu_ma