Catalog npm
Back to packageRELEASE DETAILS

0.0.0-alpha3

npm

@0xcert/vue-plugin

Ethereum certification for 0xcert protocol.

0xcertassetblockchaincurrencyerc-20erc-721ethereumframeworkfungiblejavascriptlibrariesnodejsnon-fungiblenpmnuxtjsprotocol
All keywords (23)
smart-contracttokentypescriptvaluevaluesvuejszxc
Published28 Nov 2018
Direct dependencies5
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 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0xcert/scaffold
Environment
{
  "local_name": "@0xcert/scaffold",
  "alias": false,
  "peer_metadata": null
}
0.0.0-alpha3runtime
@hayspec/cli
Environment
{
  "local_name": "@hayspec/cli",
  "alias": false,
  "peer_metadata": null
}
^0.7.6development
@hayspec/spec
Environment
{
  "local_name": "@hayspec/spec",
  "alias": false,
  "peer_metadata": null
}
^0.7.6development
ts-node
Environment
{
  "local_name": "ts-node",
  "alias": false,
  "peer_metadata": null
}
^7.0.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-b066ImnUOPbZ7egMf+DwnO3CFyBV5J9n50sAfZWPIjbAyGLuFuauJCReZV2tI2gYHGD9W/fECmkpd43l5rpzhQ==",
  "shasum": "5a32a567ba6009dbad4b0544d1e98a41e9d10765",
  "tarball": "https://registry.npmjs.org/@0xcert/vue-plugin/-/vue-plugin-0.0.0-alpha3.tgz",
  "fileCount": 22,
  "unpackedSize": 10645,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/sZbCRA9TVsSAnZWagAAEDoQAJqTT3y5W9B73siwEz+1\n9DNH5tCvjp19Jf4wLUWw5ZNBKJCI4dBkwdx04pX5iUL8djbWJKbqwGyIN77I\ng4zmHWZBK3KmN9hhZRGUm5zklHQN6DTpBcWFJvcEHUb48YRWlJbglHuoBR+w\nc+YTdfz6ymA2R7yHFeQeOMVjqWRyxD5LcAUVqPyT4bCFn4tnWgocPInS2PUo\nfSJVgzpa3eqQigWnPzJcHDrg0hy3WSZWmyzOIx3AGRpRH43Am3sE8fNzgj6D\n9K8RN4BFlv/lzbcnmdAdwYUABtt2zFzYKdQMFgt5PvPgkv1pW6EF9Byz5hk9\nrffbwnl5WInfEpURvHxSA7ypURFw5f0u0cMhLudc7N0FCq0CXKyvRYTrc7wR\nLwR3QRVvHS810dp6L8dtxqHP1D1Q0bCL1RO4RWJgZEWKfcFfZg3cPkfAb3E7\nCNJnVeRS2l7bJ+mC/rsC1TBGntLy1p37GhA8p5rJrS/Jfz1KI/E0Lt/HULwF\nvlffKJ+77El6VgqFaD+6Dju31h0vA0wOfVTHPvVPi0CmhY92Lk4oXbBkapur\nkAvf5EbZ+jsJG21LpWaomcnmDioCcqY0BHtA3TBotb2fnknR3Vi/5Lrn14zn\nW8/6wOwcZ2QOaqV9ccpQgD5Xw1wJpbk6XFNB4euBX29+VQSZppb7bE9tbNWJ\nnUaD\r\n=Ae3W\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDDg4S1p/K//XrZcFjoNVn33ocpc+zSXp1UEIFH3/8OtgIgeRw/AKs6E30AbA0/6ULjwQaxsa8Dxakb3vF6ih2sVF4="
    }
  ]
}

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:898b7f84b4da92ddd1ca3a51e20a1e07d07e0bf2c1c3f4c302aa69c76cce80ea

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 →