Skip to content

Commit

Permalink
Merge pull request #10 from symbol/dev
Browse files Browse the repository at this point in the history
Releasing v0.1.0
  • Loading branch information
yilmazbahadir authored Jan 26, 2022
2 parents fa434ce + e19d78a commit 3e8d05f
Show file tree
Hide file tree
Showing 20 changed files with 5,954 additions and 1,491 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
build/
dist/
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
};
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 140,
"tabWidth": 4
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CHANGELOG
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.1.0][v0.1.0] - 14-Jan-2022

- fix: corrupted paper-wallet backup.

[v0.1.0]: https://github.com/symbol/wallets-lib/releases/tag/v0.1.0
76 changes: 76 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
pipeline {
agent any

options {
skipStagesAfterUnstable()
}

parameters {
string(name: 'VERSION_NUMBER', defaultValue: '0.1.0', description: 'Version Number')
string(name: 'DEPLOY_ALPHA_BRANCH', defaultValue: 'dev', description: 'Deploy Alpha Branch Name')
string(name: 'DEPLOY_RELEASE_BRANCH', defaultValue: 'main', description: 'Deploy Release Branch Name')
}

environment {
RUNNING_ON_CI = 'true'
VERSION_NUMBER = "${params.VERSION_NUMBER}"
ALPHA_BUILD_NUMBER = sh(script: "echo `date +%Y%m%d%H%M`", returnStdout: true).trim()
DEPLOY_ALPHA_BRANCH = "${params.DEPLOY_ALPHA_BRANCH}"
DEPLOY_RELEASE_BRANCH = "${params.DEPLOY_RELEASE_BRANCH}"
NPM_TOKEN_ID = credentials("NPM_TOKEN_ID")
}

stages {
stage('Install & Build') {
steps {
sh "node --version"
sh "npm --version"
sh "npm ci"
}
}

stage ('Lint') {
steps {
sh "npm run lint"
}
}

stage ('Test') {
steps {
sh "echo 'Currently there are no tests to run!'"
}
}

stage ('Publish - Alpha') {
when {
expression {
BRANCH_NAME == DEPLOY_ALPHA_BRANCH
}
}
steps {
sh "echo //registry.npmjs.org/:_authToken=${NPM_TOKEN_ID} >> .npmrc"

sh "npm version ${VERSION_NUMBER}-alpha-${ALPHA_BUILD_NUMBER} --commit-hooks false --git-tag-version false"
sh "npm publish --tag alpha"
}
}

stage ('Publish - Release') {
when {
expression {
BRANCH_NAME == DEPLOY_RELEASE_BRANCH
}
}
steps {
sh "echo //registry.npmjs.org/:_authToken=${NPM_TOKEN_ID} >> .npmrc"

sh "npm publish"
}
}
}
post {
always {
cleanWs()
}
}
}
18 changes: 11 additions & 7 deletions packages/paper-wallets/README.md → README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
# Symbol Paper Wallets
# Symbol Wallets Lib

Symbol paper wallet generator
1. [Requirements](#requirements)
2. [Installation](#installation)
2. [Paper Wallet Usage](#paper-wallet-usage)

1. [Installation](#installation)
2. [Usage](#usage)
## Requirements <a name="requirements"></a>

- Node.js 12 or above

## Installation <a name="installation"></a>

To install the npm module on your typescript or node project run:

`npm install symbol-paper-wallets --save`
`npm install symbol-wallets-lib --save`

And install plugin dependencies:

`npm install symbol-sdk symbol-hd-wallets --save`

## Usage <a name="usage"></a>
## Usage
### Paper Wallet <a name="paper-wallet-usage"></a>

Prepare some constants for use the module:

```javascript
import { SymbolPaperWallet } from 'symbol-paper-wallet';
import { SymbolPaperWallet } from 'symbol-wallets-lib';

const hdRootAccount = {
mnemonic: "guess welcome coconut forum cricket unfold welcome still ticket cluster buddy fan decrease cotton model drive student assault cloth protect random equal this congress",
Expand Down
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './packages/paper-wallets';
Loading

0 comments on commit 3e8d05f

Please sign in to comment.