Catalog npm
PACKAGE EXPLORERView in registry

@0xcert/vue-plugin

npm

Implementation of VueJS plug-in.

0xcertassetblockchaincurrencyerc-20erc-721ethereumframeworkfungiblejavascriptlibrariesnodejsnon-fungiblenpmnuxtjsprotocol
All keywords (23)
smart-contracttokentypescriptvaluevaluesvuejszxc
Versions collected74
Direct dependencies13From release 2.1.1
Last observed20 Oct, 22:49 UTC

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.

Versions 74

Collected releases
VersionPublishedDirect dependenciesOpen version
1.5.16 May 20197
1.5.03 May 20197
1.4.13 May 20197
1.4.023 Apr 20197
1.3.023 Apr 20197
1.2.023 Apr 20197
1.1.023 Apr 20197
1.2.0-alpha111 Apr 20197
1.1.0-alpha027 Mar 20197
1.0.122 Mar 20197
1.0.021 Mar 20197
1.0.0-rc1315 Mar 20197
1.0.0-rc1228 Feb 20197
1.0.0-rc1127 Feb 20197
1.0.0-rc1027 Feb 20197
1.0.0-rc924 Feb 20197
1.0.0-rc819 Feb 20197
1.0.0-rc715 Feb 20197
1.0.0-rc615 Feb 20197
1.0.0-rc512 Feb 20197

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

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:b33148136081f09b0f8760405e95b64170814e05b7bd2193263386935f3fc88d