This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('\n'); | |
let bitcore = require('bitcore-lib'); | |
let privateKeyWIF = 'cVumzeajS3k7QeUb8dcUiF5JH43uTLZUmZSYM87rRLbJvv4zJnX8'; | |
let privateKey = bitcore.PrivateKey.fromWIF(privateKeyWIF); | |
let address = privateKey.toAddress(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import Home from '../views/Home.vue' | |
import SignIn from '../views/SignIn.vue' | |
import Dashboard from '../views/Dashboard.vue' | |
import store from '@/store' | |
Vue.use(VueRouter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import Home from '../views/Home.vue' | |
import SignIn from '../views/SignIn.vue' | |
import Dashboard from '../views/Dashboard.vue' | |
import store from '@/store' | |
Vue.use(VueRouter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import store from '@/store' | |
import axios from 'axios' | |
store.subscribe((mutation) => { | |
switch(mutation.type){ | |
case 'auth/SET_TOKEN': | |
if(mutation.payload){ | |
axios.defaults.headers.common['Authorization'] = `Bearer ${mutation.payload}` | |
localStorage.setItem('token', mutation.payload) | |
}else{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
export default{ | |
namespaced: true, | |
state: { | |
token: null, | |
user : null | |
}, | |
getters:{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Vuex from 'vuex' | |
import auth from './auth' | |
Vue.use(Vuex) | |
export default new Vuex.Store({ | |
state: { | |
}, | |
mutations: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<form @submit.prevent="submit"> | |
<div class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4 flex flex-col"> | |
<div class="mb-4"> | |
<label class="block text-grey-darker text-sm font-bold mb-2" for="username"> | |
Email Address | |
</label> | |
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-grey-darker" id="email" type="text" placeholder="Username" v-model="form.email"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<TheNavigation/> | |
<router-view/> | |
</div> | |
</template> | |
<script> | |
import TheNavigation from '@/components/TheNavigation' | |
export default{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Auth; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
use Auth; | |
class SignOutController extends Controller | |
{ |