-
Notifications
You must be signed in to change notification settings - Fork 6
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
server side signing #76
base: master
Are you sure you want to change the base?
Conversation
update import Tss key tests
replace call to multiple authorization server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
||
private coreKitInstance: Web3AuthMPCCoreKit; | ||
|
||
private authenticatorType: string = "authenticator"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the type of authenticatorType variable based on accepted values
// this.remoteClient = remoteClient || false; | ||
} | ||
|
||
getDescriptionsAndUpdate() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specify return type
src/interfaces.ts
Outdated
* Will request for authorization every signing or refresh if being set. | ||
* Required for remote client setup. | ||
*/ | ||
authorizationUrl?: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be sapphire service url, so you can derive it from fetch node details directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep this option internal
src/interfaces.ts
Outdated
* Allow no authorization requirement for remote client setup. | ||
* if AuthorizationUrl is set, this option will be ignored. | ||
*/ | ||
allowNoAuthorizationForRemoteClient?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this option should be removed.
const resp2 = await post<{ success?: boolean; code?: string }>(`${this.backendUrl}/api/v3/start`, startData); | ||
// eslint-disable-next-line no-console | ||
console.log(resp2); | ||
return resp2.code; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it only for testing, ideally otp should be sent only to mobile number?
return data ? new BN(data.factorKey, "hex") : undefined; | ||
} | ||
|
||
async verifyRemoteSetup(address: string, code: string): Promise<IRemoteClientState & { tssShareIndex: string }> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should move common functions to base class
return base32.encode(key).toString().replace(/=/g, ""); | ||
} | ||
|
||
async register(privKey: BN, secretKey: string): Promise<{ success: boolean; message?: string }> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whts the diff b/w private key and secret key? is their any example or flow diagram where i can see usage of this class
@@ -380,6 +441,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit { | |||
|
|||
public async inputFactorKey(factorKey: BN): Promise<void> { | |||
this.checkReady(); | |||
if (this.state.remoteClient) throw new Error("remoteClient is present, inputFactorKey are not allowed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so user cannot provide client side factor key while using server side factor key?
src/mpcCoreKit.ts
Outdated
return backupFactorKey; | ||
} | ||
// update to undefined for next major release | ||
return ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is going to be a major release so we can update to undefined here
remove random nodeIndexes
This pr containt
related sdk PR
#46
#62
#68
#75
related server PR
authenticator server( remote signing)
https://github.com/torusresearch/authenticator-server/pull/8
authorization server ( one time signature )
https://github.com/torusresearch/authorization-service/pull/2
demo
Web3Auth/mpc-core-kit-demo#11
require this http-helper fix for tests run log issue
torusresearch/http-helpers#39