Skip to content

Commit fd2c6ed

Browse files
Fabrice BascoulergueSegfault
Fabrice Bascoulergue
and
Segfault
authored
Fix dependencies for nodejs clients (#8)
* CI/CD pipes improvement, added contributing file * Move types declaration dependencies in production from dev dependencies * Update auto generated docs * 0.3.4 Co-authored-by: Segfault <[email protected]>
1 parent a37366f commit fd2c6ed

File tree

5 files changed

+92
-17
lines changed

5 files changed

+92
-17
lines changed

.github/workflows/cd.yml renamed to .github/workflows/merge.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CD
1+
name: Send built code in production when a merge commit is created
22

33
on:
44
push:
@@ -8,8 +8,8 @@ on:
88
jobs:
99
build:
1010
name: Release & Publish
11-
1211
runs-on: ubuntu-latest
12+
environment: production
1313

1414
strategy:
1515
matrix:
@@ -27,21 +27,19 @@ jobs:
2727

2828
- name: Install dependencies
2929
run: yarn --frozen-lockfile
30-
- name: Run code formatter
31-
run: yarn format
32-
- name: Run code linter
33-
run: yarn lint
34-
- name: Run unit tests
35-
run: yarn test
3630

3731
- name: Run clean
3832
run: yarn clean
33+
3934
- name: Run build lib and types
4035
run: yarn build:lib
36+
4137
- name: Copy LICENSE
4238
run: cp LICENSE build/LICENSE
39+
4340
- name: Copy README
4441
run: cp README.md build/README.md
42+
4543
- name: Copy package.json
4644
run: cp package.json build/package.json
4745

.github/workflows/ci.yml renamed to .github/workflows/pull_request.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: CI
1+
name: Format and unit test the code when a pull request is opened
22

33
on:
44
pull_request:
55
branches:
66
- master
77
- develop
8+
types: [opened, edited, synchronize, reopened]
89

910
jobs:
1011
build:

CONTRIBUTING.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish to make via issue,
4+
email, or any other method with the owners of this repository before making a change.
5+
6+
Please note we have a code of conduct, please follow it in all your interactions with the project.
7+
8+
## Pull Request Process
9+
10+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
11+
2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
12+
3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
13+
4. You may merge the Pull Request in once you have the approval of one core team member, or if you do not have permission to do that, you may request a reviewer to merge it for you.
14+
15+
## Code of Conduct
16+
17+
### Our Pledge
18+
19+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and
20+
our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience,
21+
nationality, personal appearance, race, religion, or sexual identity and orientation.
22+
23+
### Our Standards
24+
25+
Examples of behavior that contributes to creating a positive environment
26+
include:
27+
28+
* Using welcoming language
29+
* Being respectful of differing viewpoints and experiences
30+
* Gracefully accepting constructive criticism
31+
* Focusing on what is best for the community
32+
* Showing empathy towards other community members
33+
34+
Examples of unacceptable behavior by participants include:
35+
36+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
37+
* Trolling, insulting/derogatory comments, and personal or political attacks
38+
* Public or private harassment
39+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
40+
* Other conduct which could reasonably be considered inappropriate in a professional setting
41+
42+
### Our Responsibilities
43+
44+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in
45+
response to any instances of unacceptable behavior.
46+
47+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions
48+
that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate,
49+
threatening, offensive, or harmful.
50+
51+
### Scope
52+
53+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
54+
Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed
55+
representative at an online or offline event.
56+
Representation of a project may be further defined and clarified by project maintainers.
57+
58+
### Enforcement
59+
60+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact [ at ] lum.network.
61+
All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
62+
The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
63+
Further details of specific enforcement policies may be posted separately.
64+
65+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
### Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
71+
72+
[homepage]: http://contributor-covenant.org
73+
[version]: http://contributor-covenant.org/version/1/4/

docs/lib/modules/lumutils.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,14 @@ ___
585585

586586
`Const`**verifySignMsg**(`msg`: [*SignMsg*](../interfaces/lumtypes.signmsg.md)): *Promise*<boolean\>
587587

588+
Verify that a message is signed by the provided publicKey
589+
Will also verify that the address is indeed derivated by the provided publicKey
590+
588591
#### Parameters:
589592

590-
Name | Type |
591-
:------ | :------ |
592-
`msg` | [*SignMsg*](../interfaces/lumtypes.signmsg.md) |
593+
Name | Type | Description |
594+
:------ | :------ | :------ |
595+
`msg` | [*SignMsg*](../interfaces/lumtypes.signmsg.md) | Message to verify such as generated by the LumWallet.signMessage method |
593596

594597
**Returns:** *Promise*<boolean\>
595598

@@ -599,13 +602,13 @@ ___
599602

600603
`Const`**verifySignature**(`signature`: *Uint8Array*, `signedBytes`: *Uint8Array*, `publicKey`: *Uint8Array*): *Promise*<boolean\>
601604

602-
Verify that a transaction signature is valid
605+
Verify that a signature is valid
603606

604607
#### Parameters:
605608

606609
Name | Type | Description |
607610
:------ | :------ | :------ |
608-
`signature` | *Uint8Array* | transaction signature (as generated by the generateSignature function) |
611+
`signature` | *Uint8Array* | signature (as generated by the generateSignature function) |
609612
`signedBytes` | *Uint8Array* | signed bytes (as generated by the generateSignDocBytes function or by the signMessage function) |
610613
`publicKey` | *Uint8Array* | public key of the signing key pair (secp256k1) |
611614

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lum-network/sdk-javascript",
3-
"version": "0.3.3",
3+
"version": "0.3.4",
44
"license": "Apache-2.0",
55
"description": "Javascript SDK library for NodeJS and Web browsers to interact with the Lum Network.",
66
"homepage": "https://github.com/lum-network/sdk-javascript#readme",
@@ -49,6 +49,8 @@
4949
"@cosmjs/utils": "^0.24.0-alpha.26",
5050
"@ledgerhq/hw-app-cosmos": "^5.46.0",
5151
"@ledgerhq/hw-transport": "^5.46.0",
52+
"@types/crypto-js": "^4.0.1",
53+
"@types/ledgerhq__hw-transport": "^4.21.3",
5254
"@types/uuid": "^8.3.0",
5355
"crypto-browserify": "^3.12.0",
5456
"crypto-js": "^4.0.0",
@@ -63,9 +65,7 @@
6365
"@babel/plugin-transform-runtime": "^7.12.10",
6466
"@babel/preset-env": "^7.8.3",
6567
"@babel/preset-typescript": "^7.8.3",
66-
"@types/crypto-js": "^4.0.1",
6768
"@types/jest": "^26.0.20",
68-
"@types/ledgerhq__hw-transport": "^4.21.3",
6969
"@types/ledgerhq__hw-transport-node-hid": "^4.22.2",
7070
"cross-env": "^7.0.3",
7171
"eslint": "^7.19.0",

0 commit comments

Comments
 (0)