Skip to content

Commit 6c67ee7

Browse files
Add GetSignatureFormat method to return signature template
Co-Authored-By: Chris Li <chris.li.2046@gmail.com>
1 parent a354403 commit 6c67ee7

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

aggregator/auth.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,9 @@ func (r *RpcServer) verifyOperator(ctx context.Context, operatorAddr string) (bo
185185

186186
return auth.VerifyOperator(authRawHeaders[0], operatorAddr)
187187
}
188+
189+
func (r *RpcServer) GetSignatureFormat(ctx context.Context, req *avsproto.GetSignatureFormatReq) (*avsproto.GetSignatureFormatResp, error) {
190+
return &avsproto.GetSignatureFormatResp{
191+
Format: authTemplate,
192+
}, nil
193+
}

protobuf/avs.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,10 +658,21 @@ message DeleteSecretReq {
658658
string org_id = 3;
659659
}
660660

661+
message GetSignatureFormatReq {
662+
// Empty request
663+
}
664+
665+
message GetSignatureFormatResp {
666+
// The template format for signature messages
667+
string format = 1;
668+
}
661669

662670
service Aggregator {
663671
// Exchange for an Auth Key to authenticate in subsequent request
664672
rpc GetKey(GetKeyReq) returns (KeyResp) {};
673+
674+
// Get the signature format template used for authentication
675+
rpc GetSignatureFormat(GetSignatureFormatReq) returns (GetSignatureFormatResp) {};
665676

666677
// Smart Acccount Operation
667678
rpc GetNonce(NonceRequest) returns (NonceResp) {};

0 commit comments

Comments
 (0)