Skip to content

Commit 7b5a78e

Browse files
Update GetSignatureFormat to return formatted message with example values
Co-Authored-By: Chris Li <chris.li.2046@gmail.com>
1 parent faf4dbe commit 7b5a78e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

aggregator/auth.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,14 @@ func (r *RpcServer) verifyOperator(ctx context.Context, operatorAddr string) (bo
187187
}
188188

189189
func (r *RpcServer) GetSignatureFormat(ctx context.Context, req *avsproto.GetSignatureFormatReq) (*avsproto.GetSignatureFormatResp, error) {
190+
chainId := int64(1) // Example Ethereum mainnet
191+
issuedAt := time.Now().UTC().Format("2006-01-02T15:04:05.000Z")
192+
expiredAt := time.Now().Add(time.Hour * 24).UTC().Format("2006-01-02T15:04:05.000Z")
193+
walletAddress := "0x0000000000000000000000000000000000000000" // Example address
194+
195+
formattedMessage := fmt.Sprintf(authTemplate, chainId, issuedAt, expiredAt, walletAddress)
196+
190197
return &avsproto.GetSignatureFormatResp{
191-
Format: authTemplate,
198+
Format: formattedMessage,
192199
}, nil
193200
}

0 commit comments

Comments
 (0)