-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add type aliases, and make sep24 example use env vars (#66) * add type aliases * make example use env vars * Account setup and recovery using SEP-30 (#65) * Add AccountRecover class * Add Recovery class * Add builderExtra param * Fix importing * Swallow 404 error on registerRecoveryServerSigners function * Remove todo comment * Use plural * Add basic testing * increase timeout * Move private functions to the bottom * Make AccountRecover abstract * Rename type to WalletRecoveryServers * add Customer / SEP-12 code (#71) * add type aliases * make example use env vars * finish tests * add types * cleanup * comment update * use getCustomer * jsdoc * for binary data * clean up * cleanup * use sep9BinaryInfo * cleanup * add gha and linting (#72) * add type aliases * make example use env vars * finish tests * add types * cleanup * add gha * clean up all files * add prettier lint * sep12 stuff linting * cleanup * move to devdeps * add jsdocs to all major functions (#73) * add type aliases * make example use env vars * finish tests * add types * cleanup * add gha * clean up all files * add prettier lint * sep12 stuff linting * cleanup * add for all classes * more comments * more fixes * more changes * cleanup * small fixes to Recovery code (#75) * small fixes * fix path payment test * add sep6 get info (#76) * add SEP6 deposit and withdrawal (#77) * add sep6 deposit and withdrawal * comment * make better response * remove wrapper type * add exchange endpoints (#78) * adding recovery integration tests (#74) * first cut * try workflow * run daemon * print logs * restart on failure * try this * try * try * try * try * cross fingers * fix * works hopefully * fix * add back * cleanup * image versions and readme * add watcher and polling to sep6 (#79) * upgrade stellar-sdk to v11.0.0-beta.6 (#80) * add authToken class (#81) * add authToken class * make account optional * cleanup * remove un-needed account * adding some helper methods (#82) * account merge and premade assets (#83) * add sep38 info, price, and prices (#84) * sep38 getinfo * add prices info, cleanup * move authToken to optional arg * add jsdoc * throw if both buy and sell amount given * add sep38 quote (#85) * sep38 getinfo * add prices info, cleanup * first cut * move authToken to optional arg * cleanup * add jsdoc * throw if both buy and sell amount given * make context type right (#86) * fix test * bumping package version --------- Co-authored-by: Alec Charbonneau <[email protected]> Co-authored-by: Cássio Marcos Goulart <[email protected]>
- Loading branch information
1 parent
b852646
commit dd4b52a
Showing
59 changed files
with
4,388 additions
and
397 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,76 @@ | ||
module.exports = { | ||
ignorePatterns: ["lib/", "node_modules/", "docs/"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: ["tsconfig.json", "examples/tsconfig.json", "test/tsconfig.json"], | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint", "jsdoc"], | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
], | ||
rules: { | ||
// Off | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
"@typescript-eslint/no-floating-promises": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/prefer-regexp-exec": "off", | ||
"@typescript-eslint/restrict-template-expressions": "off", | ||
"@typescript-eslint/no-inferrable-types": "off", | ||
"@typescript-eslint/no-misused-promises": "off", | ||
"@typescript-eslint/no-base-to-string": "off", | ||
|
||
// Warn | ||
"jsdoc/check-param-names": "warn", | ||
"jsdoc/require-returns": "warn", | ||
"jsdoc/require-returns-description": "warn", | ||
"jsdoc/require-returns-type": "warn", | ||
"jsdoc/require-param": "warn", | ||
"jsdoc/check-types": "warn", | ||
"jsdoc/require-param-description": "warn", | ||
"jsdoc/require-param-name": "warn", | ||
"jsdoc/require-param-type": "warn", | ||
"jsdoc/require-property": "warn", | ||
"jsdoc/require-property-description": "warn", | ||
"jsdoc/require-property-name": "warn", | ||
"jsdoc/require-property-type": "warn", | ||
"jsdoc/check-property-names": "warn", | ||
"jsdoc/empty-tags": "warn", | ||
|
||
// Error | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-unused-expressions": "error", | ||
"@typescript-eslint/no-var-requires": "error", | ||
"@typescript-eslint/prefer-for-of": "error", | ||
"@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/prefer-namespace-keyword": "error", | ||
"@typescript-eslint/triple-slash-reference": [ | ||
"error", | ||
{ | ||
path: "always", | ||
types: "prefer-import", | ||
lib: "always", | ||
}, | ||
], | ||
"@typescript-eslint/unified-signatures": "error", | ||
"@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
"jsdoc/check-alignment": "error", | ||
"jsdoc/check-indentation": "error", | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["test/**", "examples/**"], | ||
rules: { | ||
"@typescript-eslint/no-shadow": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
}, | ||
}, | ||
], | ||
}; |
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: Recovery Signer Integration Test | ||
on: [pull_request] | ||
jobs: | ||
test-ci: | ||
name: integration test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Start docker | ||
run: docker-compose -f test/docker/docker-compose.yml up -d | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn test:integration:ci | ||
- name: Print Docker Logs | ||
if: always() # This ensures that the logs are printed even if the tests fail | ||
run: docker-compose -f test/docker/docker-compose.yml logs |
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,14 @@ | ||
name: Run Tests | ||
on: [pull_request] | ||
jobs: | ||
test-ci: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn test:ci |
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 |
---|---|---|
|
@@ -23,3 +23,5 @@ node_modules | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
.env |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn pretty-quick --staged | ||
yarn lint-staged |
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
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,4 @@ | ||
ANCHOR_DOMAIN=testanchor.stellar.org | ||
ASSET_CODE=USDC | ||
ASSET_ISSUER=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5 | ||
RUN_MAINNET=false |
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
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
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,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": true, | ||
"baseUrl": "./", | ||
"outDir": "lib", | ||
"declaration": true, | ||
"declarationDir": "lib" | ||
}, | ||
"include": ["./"] | ||
} |
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
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,9 @@ | ||
module.exports = { | ||
rootDir: "./", | ||
preset: "ts-jest", | ||
transform: { | ||
"^.+\\.(ts|tsx)?$": "ts-jest", | ||
"^.+\\.(js|jsx)$": "babel-jest", | ||
}, | ||
testMatch: ["**/*integration.test.ts"], | ||
}; |
Oops, something went wrong.