@opensolutions/vue-waves-signer
Version:
Waves Signer implementation for Vue.js
62 lines (43 loc) • 1.06 kB
Markdown
# Waves Signer implementation for Vue.js
## Helpfull links
* [Waves Signer methods](https://docs.wavesplatform.com/en/building-apps/waves-api-and-sdk/client-libraries/signer#methods)
* [Vue.js Waves Signer example](https://github.com/tltary/waves-signer-vue-example)
* [Vue.js Waves Signer demo](https://github.com/tltary/waves-signer-vue-example-demo)
## How to install
```
$ npm i @opensolutions/vue-waves-signer --save
```
## How to setup
```js
// add to main.js
import VueSigner from '@opensolutions/vue-waves-signer'
// production version
Vue.use(VueSigner)
// debug version
Vue.use(VueSigner, {
debug: true
})
```
## If you need custom node url or provider
```js
Vue.use(VueSigner, {
node: '<custom node>',
provider: '<custom provider>'
})
```
## How to use
```js
// simple login function
methods: {
async login() {
await this.signer
.login()
.then((response) => {
console.log(response)
},
(error) => {
console.log(error)
})
}
}
```