This file contains hidden or 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
export interface NewKycPerson { | |
type: KycType.PERSON | |
fullName: string | |
document: string | |
address: Address | |
birthDay: string | |
phone?: Phone | |
email?: string | |
} |
This file contains hidden or 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
// ES2015 / TypeScript | |
import * as Swipe from '@swp/swipe-sdk' | |
// or via CommonJS | |
// const Swipe = require('@swp/swipe-sdk') | |
// initializes on production environment | |
const swp = Swipe.init({ | |
apiKey: "your api key", | |
secret: "your secret key", |
This file contains hidden or 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
const Crypto = require("crypto-js") | |
const Base64 = require("crypto-js/enc-base64") | |
const requestPath = "/accounts" | |
const bodyString = "" | |
const secret = "71ad81f98fbbab22c9d74948d2899a65027208197291d11e2065c3a9c62fe1f0" | |
const timestamp = Math.floor(Date.now() / 1000) // "1540920260" | |
const method = "GET" | |
const stringToSign = method + timestamp + requestPath + bodyString | |
const hmac = Crypto.HmacSHA256(stringToSign, secret) |
This file contains hidden or 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
// ES2015 / TypeScript | |
import * as Swipe from '@swp/swipe-sdk' | |
// or via CommonJS | |
// const Swipe = require('@swp/swipe-sdk') | |
// initializes on production environment | |
const swp = Swipe.init({ | |
apiKey: "your api key", | |
secret: "your secret key", |
This file contains hidden or 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
var nome = "Thiago"; //global | |
let nomeLet = "Thiago"; //escopo/block | |
const nomeConst = "Thiago";//nao pode ser alterado | |
console.log(typeof ``); | |
var endereco = ""; | |
var endereco = "Thiago de Souza"; | |
var endereco = 'Thiago disse:"Eu sou eu!"'; | |
var endereco = "Thiago disse:\"Eu sou eu!\""; | |
var jardineiro = "Jesus" |
This file contains hidden or 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
'use strict'; | |
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
const cors = require('cors') | |
console.log(process.env.NODE_ENV); | |
if (process.env.NODE_ENV === "production") { |
This file contains hidden or 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
## List Docker CLI commands | |
docker | |
docker container --help | |
## Display Docker version and info | |
docker --version | |
docker version | |
docker info | |
## Execute Docker image |
This file contains hidden or 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
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(); | |
const db = admin.firestore(); | |
db.settings({ timestampsInSnapshots: true }); | |
const { ethereumAccountCreate } = require("./ethereumAccountCreate"); |
This file contains hidden or 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
mkdir mvp-blockchain-serverless && cd $_ #creates a folder for your porject and enter it | |
touch .nvmrc && echo "8" >! .nvmrc && cd . #install nvm and put a nvmrc file on the directory | |
npm init #initialize npm package | |
npm install firebase-functions@latest firebase-admin@latest --save #install firebase tools locally | |
npm install -g firebase-tools #install firebase tools globally | |
firebase login #authenticates your computer to manage the firebase project |