Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
poly-rodr committed Sep 15, 2023
1 parent dca85a9 commit 1f69173
Showing 234 changed files with 246 additions and 49,004 deletions.
2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint & Test

on:
push:
branches: [main,"go*"]
pull_request:
branches: ["*"]

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Checkout Code
uses: actions/checkout@v3

- name: Configure git
run: git config --global url.https://[email protected]/.insteadOf https://github.com/

- name: Lint
run: make lint

- name: Test
run: make test

env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
GO_VERSION: '1.21'
47 changes: 47 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Options for analysis running.
run:
# The default concurrency value is the number of available CPU.
concurrency: 4

# Timeout for analysis, e.g. 30s, 5m.
timeout: 10m

# Exit code when at least one issue was found.
# Default: 1
issues-exit-code: 2

# Enables skipping of directories:
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
# Default: true
skip-dirs-use-default: true

# If set we pass it to "go list -mod={option}". From "go help modules":
# If invoked with -mod=readonly, the go command is disallowed from the implicit
# automatic updating of go.mod described above. Instead, it fails when any changes
# to go.mod are needed. This setting is most useful to check that go.mod does
# not need updates, such as in a continuous integration and testing system.
# If invoked with -mod=vendor, the go command assumes that the vendor
# directory holds the correct copies of dependencies and ignores
# the dependency descriptions in go.mod.
#
# Allowed values: readonly|vendor|mod
# By default, it isn't set.
modules-download-mode: readonly

# Allow multiple parallel golangci-lint instances running.
# If false (default) - golangci-lint acquires file lock on start.
allow-parallel-runners: true

go: '1.21'

# output configuration options
output:
# Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity
#
# Multiple can be specified by separating them by comma, output can be provided
# for each of them by separating format name and path by colon symbol.
# Output path can be either `stdout`, `stderr` or path to the file to write to.
# Example: "checkstyle:report.xml,json:stdout,colored-line-number"
#
# Default: colored-line-number
format: github-actions
11 changes: 0 additions & 11 deletions .goreleaser.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

119 changes: 0 additions & 119 deletions Gopkg.lock

This file was deleted.

46 changes: 0 additions & 46 deletions Gopkg.toml

This file was deleted.

67 changes: 28 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,43 +1,32 @@
.PHONY: all
all: build

.PHONY: install
install:
@go get -u github.com/miguelmota/go-ethereum-hdwallet

.PHONY: build
build:
@go build . -o bin/hdwallet
#######################################################
############## formats, lint, and tests ###############
#######################################################

.PHONY: fmt
fmt:
@echo "----------------------------------------------------------------"
@echo " ⚙️ Formatting code..."
@echo "----------------------------------------------------------------"
gofmt -s -w ./.

.PHONY: lint
lint:
@echo "----------------------------------------------------------------"
@echo " ⚙️ Linting code..."
@echo "----------------------------------------------------------------"
go install github.com/golangci/golangci-lint/cmd/[email protected]
golangci-lint run ./... -E gofmt --config=.golangci.yaml
go mod tidy
@echo "Linting complete!"

.PHONY: test
test:
@go test -v .

.PHONY: ensure
ensure:
@dep ensure

.PHONY: deps/fix
deps/fix:
@cp -r "${GOPATH}/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1" "vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/"
@echo "----------------------------------------------------------------"
@echo " ⚙️ Testign the code..."
@echo "----------------------------------------------------------------"
GOPRIVATE=${PRIVATE_REPOS} go test ./... -v
@echo "Tests complete!"

.PHONY: run/example/1
run/example/1:
@go run example/derive.go

.PHONY: run/example/2
run/example/2:
@go run example/sign.go

.PHONY: run/example/3
run/example/3:
@go run example/seed.go

.PHONY: run/example/4
run/example/4:
@go run example/keys.go

.PHONY: release
release:
@rm -rf dist
@goreleaser
.PHONE: build
build:
@echo
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -12,19 +12,19 @@
[![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/miguelmota/go-ethereum-hdwallet/master/LICENSE)
[![Build Status](https://travis-ci.org/miguelmota/go-ethereum-hdwallet.svg?branch=master)](https://travis-ci.org/miguelmota/go-ethereum-hdwallet)
[![Go Report Card](https://goreportcard.com/badge/github.com/miguelmota/go-ethereum-hdwallet?)](https://goreportcard.com/report/github.com/miguelmota/go-ethereum-hdwallet)
[![GoDoc](https://godoc.org/github.com/miguelmota/go-ethereum-hdwallet?status.svg)](https://godoc.org/github.com/miguelmota/go-ethereum-hdwallet)
[![Go Report Card](https://goreportcard.com/badge/github.com/polymarket/go-ethereum-hdwallet?)](https://goreportcard.com/report/github.com/polymarket/go-ethereum-hdwallet)
[![GoDoc](https://godoc.org/github.com/polymarket/go-ethereum-hdwallet?status.svg)](https://godoc.org/github.com/polymarket/go-ethereum-hdwallet)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#contributing)

## Install

```bash
go get -u github.com/miguelmota/go-ethereum-hdwallet
go get -u github.com/polymarket/go-ethereum-hdwallet
```

## Documenation

[https://godoc.org/github.com/miguelmota/go-ethereum-hdwallet](https://godoc.org/github.com/miguelmota/go-ethereum-hdwallet)
[https://godoc.org/github.com/polymarket/go-ethereum-hdwallet](https://godoc.org/github.com/polymarket/go-ethereum-hdwallet)

## Getting started

@@ -35,7 +35,7 @@ import (
"fmt"
"log"

"github.com/miguelmota/go-ethereum-hdwallet"
"github.com/polymarket/go-ethereum-hdwallet"
)

func main() {
@@ -75,7 +75,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/miguelmota/go-ethereum-hdwallet"
"github.com/polymarket/go-ethereum-hdwallet"
)

func main() {
@@ -111,7 +111,7 @@ func main() {
## CLI

```bash
go install github.com/miguelmota/go-ethereum-hdwallet/cmd/geth-hdwallet@latest
go install github.com/polymarket/go-ethereum-hdwallet/cmd/geth-hdwallet@latest
```

```bash
Loading

0 comments on commit 1f69173

Please sign in to comment.