Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates sfa service provider #1

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
>=18.x
22 changes: 22 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

#production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
/packages/*/types
5 changes: 5 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# .prettierrc or .prettierrc.yaml
printWidth: 150
singleQuote: false
semi: true
trailingComma: es5
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true
},
}
3,600 changes: 1,553 additions & 2,047 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,29 @@
"@babel/runtime": "7.x"
},
"dependencies": {
"@tkey/common-types": "^10.1.0",
"@tkey/service-provider-base": "^10.1.0",
"@web3auth/single-factor-auth": "^6.5.0",
"@tkey/common-types": "^11.0.2",
"@tkey/service-provider-base": "^11.0.2",
"@web3auth/single-factor-auth": "^7.0.1",
"bn.js": "^5.2.1"
},
"devDependencies": {
"@babel/register": "^7.22.5",
"@babel/runtime": "^7.22.10",
"@toruslabs/config": "^2.0.1",
"@toruslabs/eslint-config-typescript": "^3.0.0",
"@toruslabs/torus-scripts": "^5.0.2",
"@types/assert": "^1.5.6",
"@types/bn.js": "^5.1.1",
"@babel/register": "^7.22.15",
"@babel/runtime": "^7.23.1",
"@toruslabs/config": "^2.0.2",
"@toruslabs/eslint-config-typescript": "^3.0.1",
"@toruslabs/torus-scripts": "^5.0.5",
"@types/assert": "^1.5.7",
"@types/bn.js": "^5.1.2",
"@types/node": "^20",
"cross-env": "^7.0.3",
"dotenv": "^16.3.1",
"eslint": "^8.46.0",
"eslint": "^8.50.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"lint-staged": "^14.0.1",
"nyc": "^15.1.0",
"prettier": "^3.0.1",
"prettier": "^3.0.3",
"rimraf": "^5.0.1",
"typescript": "^5.1.6"
"typescript": "^5.2.2"
},
"bugs": {
"url": "https://github.com/tkey/tkey/issues"
Expand Down
4 changes: 3 additions & 1 deletion src/SfaServiceProvider.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { SfaServiceProviderArgs, StringifiedType } from "@tkey/common-types";
import { StringifiedType } from "@tkey/common-types";
import { ServiceProviderBase } from "@tkey/service-provider-base";
import { LoginParams, PrivateKeyProvider, Web3Auth, Web3AuthOptions } from "@web3auth/single-factor-auth";
import BN from "bn.js";

import { SfaServiceProviderArgs } from "./interfaces";

class SfaServiceProvider extends ServiceProviderBase {
web3AuthOptions: Web3AuthOptions;

Expand Down
6 changes: 6 additions & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { type ServiceProviderArgs } from "@tkey/common-types";
import { type Web3AuthOptions } from "@web3auth/single-factor-auth";

export interface SfaServiceProviderArgs extends ServiceProviderArgs {
web3AuthOptions: Web3AuthOptions;
}
4 changes: 1 addition & 3 deletions torus.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
module.exports = {
analyzerMode: "static",
};
module.exports = require("@toruslabs/config/torus.config")