File tree 3 files changed +30
-321
lines changed
3 files changed +30
-321
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export class AuthWitnessAccountEntrypoint implements IAuthWitnessAccountEntrypoi
66
66
return this . signer . constructSignature ( message , this . privateKey ) . toBuffer ( ) ;
67
67
}
68
68
69
- async createAuthWitness ( message : Buffer , _opts ?: CreateTxRequestOpts ) : Promise < Fr [ ] > {
69
+ async createAuthWitness ( message : Buffer ) : Promise < Fr [ ] > {
70
70
const signature = this . sign ( message ) ;
71
71
const publicKey = await generatePublicKey ( this . privateKey ) ;
72
72
Original file line number Diff line number Diff line change @@ -153,19 +153,8 @@ export class AuthWitnessEntrypointWallet extends BaseWallet {
153
153
* @param messageHash - The message hash to sign
154
154
* @param opts - The options.
155
155
*/
156
- async signAndGetAuthWitness ( messageHash : Buffer , opts : CreateTxRequestOpts = { } ) : Promise < Fr [ ] > {
157
- return await this . accountImpl . createAuthWitness ( messageHash , opts ) ;
158
- }
159
-
160
- /**
161
- * Signs the `messageHash` and adds the witness to the RPC.
162
- * This is useful for signing messages that are not directly part of the transaction payload, such as
163
- * approvals .
164
- * @param messageHash - The message hash to sign
165
- * @param opts - The options.
166
- */
167
- async signAndAddAuthWitness ( messageHash : Buffer , opts : CreateTxRequestOpts = { } ) : Promise < void > {
168
- const witness = await this . accountImpl . createAuthWitness ( messageHash , opts ) ;
156
+ async signAndAddAuthWitness ( messageHash : Buffer ) : Promise < void > {
157
+ const witness = await this . accountImpl . createAuthWitness ( messageHash ) ;
169
158
await this . rpc . addAuthWitness ( Fr . fromBuffer ( messageHash ) , witness ) ;
170
159
return Promise . resolve ( ) ;
171
160
}
You can’t perform that action at this time.
0 commit comments