Catalog npm
Back to packageRELEASE DETAILS

1.2.0

npm

@0xcert/vue-plugin

Implementation of VueJS plug-in.

0xcertassetblockchaincurrencyerc-20erc-721ethereumframeworkfungiblejavascriptlibrariesnodejsnon-fungiblenpmnuxtjsprotocol
All keywords (23)
smart-contracttokentypescriptvaluevaluesvuejszxc
Published23 Apr 2019
Direct dependencies7
Transitive dependenciesNot calculated

README

Current package documentation

Implementation of Vue.js plug-in.

The 0xcert Framework is a free and open-source JavaScript library that provides tools for building powerful decentralized applications. Please refer to the official documentation for more details.

This module is one of the bricks of the 0xcert Framework. It's written with TypeScript and it's actively maintained. The source code is available on GitHub where you can also find our issue tracker.

Installation

Create a new file ./plugins/0xcert.js with the code below.

import Vue from 'vue'
import { Vue0xcert } from '@0xcert/vue-plugin'
import { MetamaskProvider } from '@0xcert/ethereum-metamask-provider'
import { Cert } from '@0xcert/cert'
import { AssetLedger } from '@0xcert/ethereum-asset-ledger'
import { ValueLedger } from '@0xcert/ethereum-value-ledger'
import { Gateway } from '@0xcert/ethereum-gateway'

Vue.use(Vue0xcert, {
  provider: new MetamaskProvider({
    actionsGatewayId: '0xf382cfa46f01d9b401d62432ad3797ee190cc97f',
  }),
  modules: [
    { name: 'Cert', object: Cert },
    { name: 'AssetLedger', object: AssetLedger },
    { name: 'ValueLedger', object: ValueLedger },
    { name: 'Gateway', object: Gateway },
  ],
})

Register the plugin inside the nuxt.config.js file.

export default {
  plugins: [
    { src: '~/plugins/0xcert', ssr: false },
  ],
}

The plugin gives you access to the 0xcert Vue.js client.

const client = this.$0xcert; // 0xcert client
const provider = this.$0xcert.provider; // current provider

Vue.js and Nuxt.js use Webpack for compiling modules. Webpack can sometimes render the source code in a strange way, ignoring code conditions, thus you may encounter the "missing module" error. The fix for this is to set node.{module-name} = 'empty' property in the webpack configuration. The example below shows how you should do this in Nuxt.js:

export default {
  build: {
    ...
    extend (config, ctx) {
      ...
      if (ctx.isClient) { config.node = { fs: 'empty' } }
    }
  }
}

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 7

Native requirements
7 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0xcert/scaffold
Environment
{
  "local_name": "@0xcert/scaffold",
  "alias": false,
  "peer_metadata": null
}
1.2.0runtime
@hayspec/cli
Environment
{
  "local_name": "@hayspec/cli",
  "alias": false,
  "peer_metadata": null
}
^0.8.3development
@hayspec/spec
Environment
{
  "local_name": "@hayspec/spec",
  "alias": false,
  "peer_metadata": null
}
^0.8.3development
nyc
Environment
{
  "local_name": "nyc",
  "alias": false,
  "peer_metadata": null
}
^13.1.0development
ts-node
Environment
{
  "local_name": "ts-node",
  "alias": false,
  "peer_metadata": null
}
^7.0.1development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
^5.12.1development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^3.1.1development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-K/rJwfzThRK4+zACvzgJh2drvuNTGg7ZK8PKc3keXjMMC9pTcTZCczwMVMmerYgQw6mIouJ2valmD5CG7GMt6A==",
  "shasum": "d3d4cb13e357a2c176d0c3d42b0fe97ffa017658",
  "tarball": "https://registry.npmjs.org/@0xcert/vue-plugin/-/vue-plugin-1.2.0.tgz",
  "fileCount": 26,
  "unpackedSize": 30639,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvxzdCRA9TVsSAnZWagAAtTAP/0FTbX+69pNAOg7gKq++\nUhbFHdffj4Ca+qt/mCzvrMW6BlnHHCGuq7PBI11BOqekqz46x+/01KNxNuHh\nu8VvcoveMTulYpg3mtUP1D1Q4zMdO/6yQkZkd4TWB++K0XAWr6Z+bQ3BE0eY\nmWmA0fdLntl9gDq1z1aF2j1fNUKpfe58mNjE0wgi7+S8vAxMwLiJuu+yCEPM\nOXWBx17qJv+chPYAzuwnptFz5tq4qG0bjRZAQG062An3V4xukh9grhUemT6v\nL9XCup9zAPljfVVrxO6lRZdEz2i5P3OwolNCyH8R/K61Z+b7qi55O5CFXFLp\nHwINXQBkUEttQasc7sr1WpLfSsegU4xY7L7ZTzCelyi07Pzl2hzfC9KcLTVW\ngxZqGyX1JuPRxUWx8FaKIdyfGce0sH21+RDxEncBMTvB68wQqUF70pgaiZqx\nmnVTy57hwg1vfw8tUBugWFnHGT0y8UDlGyBX7jG2RD88sNTmbDpaFlaeNLWk\nKEfpx7R4V25zUrZyFTbalaxsMunVUr/tG8rL0DUilzKqCpPOcqoX5hYtPKgG\nxUPNY9K0lPVLpzs+S/XLxFwFCQOinvWJWdakhS/bplwc2h8iG1PseoLefsAz\n8tBU81o8WUh8HHHimHl9DCg8grXF6FbpZ7T6hOEeb4arC5dBINljCF4g4yEp\neYrd\r\n=82of\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQDxXNBrpR8fIVvEsuy5DpKDfUmwx4hxTbOV1JFC/1Hj5wIhAPkdcZG1Hf9lT4ice1oqpLV29KZa74mkmzSzo+wMDK13"
    }
  ]
}

Repository

PENDING
0xcert/framework

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:49 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:b6e295d89da0be7825c968668ca8a31c2faaa3d2cd39a14dbff79b6f9d770bb3

Other collected versions

2.1.115 Mar2.1.014 Jan2.0.312 Aug2.0.24 May2.0.16 Mar2.0.1-beta05 MarView all collected versions →