Catalog npm
Back to packageRELEASE DETAILS

2.0.3

npm

@0xcert/vue-plugin

Implementation of VueJS plug-in.

0xcertassetblockchaincurrencyerc-20erc-721ethereumframeworkfungiblejavascriptlibrariesnodejsnon-fungiblenpmnuxtjsprotocol
All keywords (23)
smart-contracttokentypescriptvaluevaluesvuejszxc
Published12 Aug 2020
Direct dependencies13
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 13

Native requirements
13 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0xcert/scaffold
Environment
{
  "local_name": "@0xcert/scaffold",
  "alias": false,
  "peer_metadata": null
}
2.0.3runtime
@hayspec/cli
Environment
{
  "local_name": "@hayspec/cli",
  "alias": false,
  "peer_metadata": null
}
0.10.0development
@hayspec/spec
Environment
{
  "local_name": "@hayspec/spec",
  "alias": false,
  "peer_metadata": null
}
0.10.0development
nyc
Environment
{
  "local_name": "nyc",
  "alias": false,
  "peer_metadata": null
}
15.1.0development
ts-node
Environment
{
  "local_name": "ts-node",
  "alias": false,
  "peer_metadata": null
}
8.10.2development
@typescript-eslint/eslint-plugin
Environment
{
  "local_name": "@typescript-eslint/eslint-plugin",
  "alias": false,
  "peer_metadata": null
}
3.9.0development
@typescript-eslint/parser
Environment
{
  "local_name": "@typescript-eslint/parser",
  "alias": false,
  "peer_metadata": null
}
3.9.0development
eslint-config-prettier
Environment
{
  "local_name": "eslint-config-prettier",
  "alias": false,
  "peer_metadata": null
}
6.11.0development
eslint-plugin-import
Environment
{
  "local_name": "eslint-plugin-import",
  "alias": false,
  "peer_metadata": null
}
2.22.0development
eslint-plugin-jsdoc
Environment
{
  "local_name": "eslint-plugin-jsdoc",
  "alias": false,
  "peer_metadata": null
}
30.2.1development
eslint-plugin-unicorn
Environment
{
  "local_name": "eslint-plugin-unicorn",
  "alias": false,
  "peer_metadata": null
}
21.0.0development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
7.6.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
3.9.7development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-DLDm3ncnjWzhVdFhP9xFoCB/bG8xXRPmHTJRmLA8L6s3z0cbWTbSi8CQ4O1XXLVRXKRZwAYyiDXGvGY6H7binQ==",
  "shasum": "254ca0155480b47fa0d6f92a816dec24adc2a8cc",
  "tarball": "https://registry.npmjs.org/@0xcert/vue-plugin/-/vue-plugin-2.0.3.tgz",
  "fileCount": 29,
  "unpackedSize": 51354,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM+b8CRA9TVsSAnZWagAAraoP/0SUJwY4yrrbJRYLGlep\n5LC4F0iMocHVDtJOY1ezsVMvfoyhyn8J0BsN5g/3YD4ZKvMQYYkYgWcDcQct\ni0VfdBZl8Itvl9NeMCfbmW7hLej1eOK3b8RfwdrygaXkbJXDu9Kf9acq+1sw\nSSwNDMc8Qsy2+bkppJrcMMXvRWjo2do4sZ4sKLDMNddf4a/RICf70zfJkIMO\n6Hh+DhxamHRbqRQ/0Si4YCrtM8aJV7dCi5OOdz2hn4821UuxH/RH186M0mS2\n3Jd++o2X0x0HusTyLT1shy3u31n2H4Rz+TZuV8QSp41L31Tx6onua5rM7QJx\nMGoNHkS2m1LcCU2EC/K3tF6l/rD9+chHZswrJ1WDjiV1wQGbOd55QJuj5NXb\nmL8lVBOHF6bqTXrp2MrASU7xgx6FcEvVRxF/68bx0za7eBb/LarlFNhWpVRS\n7UfD4Ht1E+BovJJfcj5kV9gMdqE4BJYgdTSyyoPchyIBZ0Xhyp0AMOU8tbnA\nItVMnWgS62PE3a7rYPG+Po5E32/xpuOeKIrve+HU9+g8Y+uTd/iFS0bvp1Cq\nj69djVBHo0drz4L6sg7pFP0DubZs+EDNSSX1hd8wJBYiKL+Sanqg8B31wtI/\nArZ1FyrguzocqNHJBMFN4NTGtJTtz4VIDrqzs7Nw7iVJDmAFWtRAPH7Q3pTA\nLPXK\r\n=sf8E\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIFXY/m7TmHrFqH0SRwjB3lrANjuQMPNjEPUBW3uKNvI2AiEAgOIPwR+YjwZtWenEYgOVeZwbHFIio9O+rWUKfQ1Ro/g="
    }
  ]
}

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

Other collected versions

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