advaitbd / go-hd-wallets

[WIP] Package to support Watch-Only signing with HD Wallets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HD Watch-Only Signing Tool

Description

This repository holds the code for a simple backend service to support air-gapped transaction signing using a HD Wallet.

Installation

  1. Clone the repository:
git clone https://github.com/crustyapples/go-keystone-backend.git
  1. Change to the project directory:
cd go-keystone
  1. Install dependencies:
go mod download

Usage

  1. Build the project: go build
  2. Run the project: go run main.go

API Docs

Get Fingerprint

POST /get-fingerprint

Request Body

{
  "urData": "string"
}

Response Body

{
  "sourceFingerprint": "string"
}

Get Sign Request

POST /get-sign-request

Request Body

{
  "txData": {
    "Nonce": "uint64",
    "To": "string",
    "Value": "uint64",
    "GasLimit": "uint64",
    "GasPrice": "uint64",
    "Data": "string",
    "ChainID": "int"
  },
  "fingerprint": "string"
}

Response Body

{
  "ethSignRequestCbor": "byte array"
}

Sign Transaction

POST /sign-transaction

Request Body

{
  "signature": "string",
  "txData": {
    "Nonce": "uint64",
    "To": "string",
    "Value": "uint64",
    "GasLimit": "uint64",
    "GasPrice": "uint64",
    "Data": "string",
    "ChainID": "int"
  },
  "signer": "string"
}

Response

{
"signedTxn": "string"
}

License

This project is licensed under the MIT License.

About

[WIP] Package to support Watch-Only signing with HD Wallets


Languages

Language:Go 100.0%