Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/k-nuth/go-api
Golang API
https://github.com/k-nuth/go-api
Last synced: 2 days ago
JSON representation
Golang API
- Host: GitHub
- URL: https://github.com/k-nuth/go-api
- Owner: k-nuth
- Created: 2020-01-30T03:36:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-30T04:05:46.000Z (almost 5 years ago)
- Last Synced: 2024-06-19T15:00:27.121Z (5 months ago)
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Authors: AUTHORS
Awesome Lists containing this project
README
# Bitcoin/Litecoin Full-Node Library written in Go Language
## Instructions to use the go-library. (Ubuntu)
*Note: the go-library is currently being developed, when it's finished the instructions to use it will be simplified.*### Install go-lang 1.8
```sh
sudo add-apt-repository ppa:gophers/archive
sudo apt update
sudo apt-get install golang-1.8-go
```
### Clone `bitprim-go`
```sh
git clone https://github.com/bitprim/bitprim-go
```### Export `GO` variables:
```sh
export PATH=$PATH:$(/usr/lib/go-1.8/bin/go env GOROOT)/bin
export GOPATH=$(go env GOPATH)
```### Export library path: (`bitprim-node-cint` build folder)
```sh
export LD_LIBRARY_PATH=/home/bitprim/bitprim/build/bitprim-node-cint:$LD_LIBRARY_PATH
```### Execute `go get` to copy the project to ~/go
```sh
go get github.com/bitprim/bitprim-go/rest-api
```### In the file `bitprim/executor_native.go` set the `c-api` location:
```
#cgo linux CFLAGS: -I/home/bitprim/bitprim/bitprim-node-cint/include
#cgo linux LDFLAGS: -L/home/bitprim/bitprim/build/bitprim-node-cint -lbitprim-node-cint
```### Run `go install`:
```sh
go install github.com/bitprim/bitprim-go/rest-api
```### Run the server:
```sh
~/go/bin/rest-api
```