-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Miguel_LZPF <[email protected]> Signed-off-by: Mario Francia <[email protected]> Co-authored-by: Mario Francia <[email protected]>
- Loading branch information
1 parent
d94198e
commit f36291c
Showing
47 changed files
with
11,685 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# * Fireblocks Service Account Configuration | ||
FIREBLOCKS_API_SECRET_KEY= | ||
FIREBLOCKS_API_KEY= | ||
FIREBLOCKS_BASE_URL= | ||
FIREBLOCKS_ASSET_ID= | ||
FIREBLOCKS_VAULT_ACCOUNT_ID= | ||
FIREBLOCKS_PUBLIC_KEY= | ||
FIREBLOCKS_HEDERA_ACCOUNT_ID= | ||
|
||
# * DFNS Service Account Configuration | ||
DFNS_SERVICE_ACCOUNT_AUTHORIZATION_TOKEN= | ||
DFNS_SERVICE_ACCOUNT_PRIVATE_KEY= | ||
DFNS_SERVICE_ACCOUNT_CREDENTIAL_ID= | ||
DFNS_APP_ORIGIN= | ||
DFNS_APP_ID= | ||
DFNS_BASE_URL= | ||
DFNS_WALLET_ID= | ||
DFNS_WALLET_PUBLIC_KEY= | ||
DFNS_WALLET_HEDERA_ACCOUNT_ID= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/**/*.js | ||
/**/*d.ts | ||
/tmp | ||
/example | ||
/src_old | ||
package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"env": { | ||
"browser": false, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "tsconfig.json", | ||
"sourceType": "module", | ||
"ecmaVersion": 2020 | ||
}, | ||
"plugins": ["@typescript-eslint", "jest", "license-header"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:jest/recommended", | ||
"prettier" | ||
], | ||
"ignorePatterns": ["__tests__/**/*", "src/**/*.test.ts", "src/**/*.spec.ts"], | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": "warn", | ||
"@typescript-eslint/no-var-requires": 0, | ||
"license-header/header": ["error", "./resources/license-header.js"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
|
||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
|
||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
## Description | ||
|
||
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. 📝 | ||
|
||
Fixes # (issue) 🛠️ | ||
|
||
## Type of change | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) 🐞 | ||
- [ ] New feature (non-breaking change which adds functionality) ✨ | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 💥 | ||
- [ ] This change requires a documentation update 📖 | ||
|
||
## How Has This Been Tested? | ||
|
||
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. 🧪 | ||
|
||
- [ ] Local Tests (npm run test) | ||
- [ ] Local Example (npx tsx examples/index.ts) | ||
- [ ] Local Github Actions (act pull_request) | ||
|
||
**Test Configuration**: | ||
|
||
- Node version (latest LTS): | ||
- [ ] 16 | ||
- [ ] 18 | ||
- [ ] 20 | ||
|
||
### Test Results (if any) | ||
|
||
## Checklist: | ||
|
||
- **Style Guidelines** (My code follows the style guidelines of this project) ✅ | ||
- **Self-Review** (I have performed a self-review of my own code) 👀 | ||
- **Code Comments** (I have commented my code, particularly in hard-to-understand areas) 💬 | ||
- **Documentation Updates** (I have made corresponding changes to the documentation) 📚 | ||
- **Warning-Free Changes** (My changes generate no new warnings) ⚠️ | ||
- **Effective Tests** (I have added tests that prove my fix is effective or that my feature works) ✔️ | ||
- **Local Test Pass** (New and existing unit tests pass locally with my changes) ✅ | ||
- **Dependency Updates** (Any dependent changes have been merged and published in downstream modules) 🔄 | ||
- **Spellcheck** (I have checked my code and corrected any misspellings) 📝 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | ||
|
||
name: Node.js Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
env: | ||
# Disable Husky during the workflow | ||
HUSKY: 0 | ||
|
||
jobs: | ||
#! Test bypassed for now | ||
# test: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: '20.x' | ||
# - run: npm ci | ||
# - run: npm test | ||
|
||
publish-npm: | ||
# needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
env: | ||
# Disable Husky during the workflow | ||
HUSKY: 0 | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
env: | ||
NODE_OPTIONS: '--max-old-space-size=32768' | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node Environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Cache npm dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Create file | ||
run: | | ||
touch .env | ||
echo "FIREBLOCKS_API_SECRET_KEY_PATH=${{secrets.FIREBLOCKS_API_SECRET_KEY_PATH}}" >> .env | ||
echo "FIREBLOCKS_API_KEY=${{secrets.FIREBLOCKS_API_KEY}}" >> .env | ||
if [ -z "${{ secrets.FIREBLOCKS_BASE_URL }}" ]; then | ||
echo "FIREBLOCKS_BASE_URL=https://api.fireblocks.io" >> .env | ||
else | ||
echo "FIREBLOCKS_BASE_URL=${{ secrets.FIREBLOCKS_BASE_URL }}" >> .env | ||
fi | ||
if [ -z "${{ secrets.FIREBLOCKS_ASSET_ID }}" ]; then | ||
echo "FIREBLOCKS_ASSET_ID=HBAR_TEST" >> .env | ||
else | ||
echo "FIREBLOCKS_ASSET_ID=${{ secrets.FIREBLOCKS_ASSET_ID }}" >> .env | ||
fi | ||
if [ -z "${{ secrets.FIREBLOCKS_VAULT_ACCOUNT_ID }}" ]; then | ||
echo "FIREBLOCKS_VAULT_ACCOUNT_ID=2" >> .env | ||
else | ||
echo "FIREBLOCKS_VAULT_ACCOUNT_ID=${{ secrets.FIREBLOCKS_VAULT_ACCOUNT_ID }}" >> .env | ||
fi | ||
echo "FIREBLOCKS_HEDERA_ACCOUNT_PUBLIC_KEY=${{secrets.FIREBLOCKS_HEDERA_ACCOUNT_PUBLIC_KEY}}" >> .env | ||
echo "FIREBLOCKS_HEDERA_ACCOUNT_ID=${{secrets.FIREBLOCKS_HEDERA_ACCOUNT_ID}}" >> .env | ||
echo "DFNS_SERVICE_ACCOUNT_AUTHORIZATION_TOKEN=${{secrets.DFNS_SERVICE_ACCOUNT_AUTHORIZATION_TOKEN}}" >> .env | ||
echo "DFNS_SERVICE_ACCOUNT_PRIVATE_KEY_PATH=${{secrets.DFNS_SERVICE_ACCOUNT_PRIVATE_KEY_PATH}}" >> .env | ||
echo "DFNS_SERVICE_ACCOUNT_CREDENTIAL_ID=${{secrets.DFNS_SERVICE_ACCOUNT_CREDENTIAL_ID}}" >> .env | ||
if [ -z "${{ secrets.DFNS_APP_ORIGIN }}" ]; then | ||
echo "DFNS_APP_ORIGIN=http://stablecoin.es" >> .env | ||
else | ||
echo "DFNS_APP_ORIGIN=${{ secrets.DFNS_APP_ORIGIN }}" >> .env | ||
fi | ||
echo "DFNS_APP_ID=${{secrets.DFNS_APP_ID}}" >> .env | ||
if [ -z "${{ secrets.DFNS_BASE_URL }}" ]; then | ||
echo "DFNS_BASE_URL=https://api.dfns.ninja" >> .env | ||
else | ||
echo "DFNS_BASE_URL=${{ secrets.DFNS_BASE_URL }}" >> .env | ||
fi | ||
echo "DFNS_WALLET_ID=${{secrets.DFNS_WALLET_ID}}" >> .env | ||
echo "DFNS_WALLET_PUBLIC_KEY=${{secrets.DFNS_WALLET_PUBLIC_KEY}}" >> .env | ||
echo "DFNS_WALLET_HEDERA_ACCOUNT_ID=${{secrets.DFNS_WALLET_HEDERA_ACCOUNT_ID}}" >> .env | ||
- name: Test custodialwalletutils | ||
run: | | ||
npm run test:ci |
Oops, something went wrong.