Skip to content

Commit

Permalink
feat: add bitgo api interaction, setup functions to use for transacti…
Browse files Browse the repository at this point in the history
…on signing
  • Loading branch information
Polybius93 committed Apr 22, 2024
1 parent 36b54c1 commit 873d805
Show file tree
Hide file tree
Showing 9 changed files with 4,805 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/actions/provision/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# @format

name: Provision
description: Set up Job with Tasks needed to run a Code Check
runs:
using: 'composite'
steps:
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 20

- uses: actions/cache@v3
id: cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
71 changes: 71 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# @format

name: Code Checks

on:
merge_group:
push:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: ./.github/actions/provision
with:
node-version: '20'

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build
lint-eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/provision

- name: Lint
run: yarn lint:eslint

lint-prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/provision

- name: Prettier
run: yarn lint:prettier

lint-unused-exports:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/provision

- name: Unused Exports
run: yarn lint:unused-exports

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/provision

- name: Typecheck
run: yarn lint:typecheck

lint-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Commit Message
uses: wagoid/commitlint-github-action@v4
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended);
52 changes: 52 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"type": "module",
"name": "dlc-btc-bridge-app",
"version": "1.0.0",
"description": "",
"main": "index.ts",
"scripts": {
"clean": "rm -rf dist && rm -rf node_modules",
"build": "tsc",
"start": "node dist/index.js",
"test": "ts-node index.ts",
"lint": "concurrently -g 'yarn lint:eslint' 'yarn lint:prettier' 'yarn run lint:unused-exports' 'yarn run lint:typecheck'",
"lint:eslint": "eslint \"src/**/*.{js,ts}\"",
"lint:eslint:fix": "eslint --fix \"src/**/*.{js,ts}\"",
"lint:prettier": "prettier --check \"{src}/**/*.{ts}\" \"*.{js,json}\"",
"lint:prettier:fix": "prettier --write \"{src}/**/*.{ts}\" *.js",
"lint:unused-exports": "ts-unused-exports tsconfig.json --ignoreFiles=tests",
"lint:typecheck": "tsc --noEmit"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"concurrently": "^8.2.2",
"eslint": "^9.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5",
"ts-node": "^10.9.2",
"typescript": "4.7.4",
"typescript-eslint": "^7.7.0"
},
"dependencies": {
"@bitgo/sdk-api": "^1.45.1",
"@bitgo/sdk-coin-btc": "^2.0.6",
"@bitgo/sdk-core": "^26.8.0",
"@scure/base": "^1.1.6",
"@scure/btc-signer": "^1.3.1",
"bip32": "^4.0.0",
"bitcoinjs-lib": "^6.1.5",
"decimal.js": "^10.4.3",
"dotenv": "^16.4.5",
"lint": "^0.8.19",
"ls-lint": "^0.1.2",
"noble": "^1.9.1",
"prettier-eslint": "^16.3.0",
"scure": "^1.6.0",
"tiny-secp256k1": "^2.2.3",
"ts-unused-exports": "^10.0.1",
"typecheck": "^0.1.2"
}
}
Loading

0 comments on commit 873d805

Please sign in to comment.