@mintgate/mintgate-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

mintgate-js

Token protect any content on any blockchain with the MintGate-JS developer library.

Getting Started

yarn install @mintgate/mintgate-js

API:

mintgate.embedVideo(linkID, domReference, provider);

Options:

  • linkID: the ID of the link (exmaple: LkI0yVFuIW5n in https://mgate.io/go/LkI0yVFuIW5n)
  • domReference: container to display the video
  • provider (options): Wallet provider to use

React example:

import {useRef, useEffect} from 'react';
import * as mintgate from '@mintgate/mintgate-js';

const linkID = 'LkI0yVFuIW5n'; // postfix of the link https://mgate.io/go/LkI0yVFuIW5n

function App() {
  const ref = useRef();
  useEffect(()=> {
    if(!ref) return;

    mintgate.embedVideo(linkID, ref.current)
      .then(x=>console.log('done'));
  }, [ref]);

  return (
    <div ref={ref}></div>
  );
}

export default App;

Readme

Keywords

none

Package Sidebar

Install

npm i @mintgate/mintgate-js

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

1.95 MB

Total Files

86

Last publish

Collaborators

  • simonweniger
  • jennifer_mintgate
  • jshanks21
  • jadbox