Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InvalidAgentAddrErr = errors.New("invalid agent address") InvalidRequesterErr = errors.New("invalid requester") InvalidTokenErr = errors.New("invalid token") TokenExpiredErr = errors.New("token expired") )
View Source
var EXPIRATION_EPOCH_BUFFER = big.NewInt(5)
signatures last approx 2.5 minutes
View Source
var ZERO_ADDR = common.Address{}
Functions ¶
Types ¶
type RequestClaims ¶
type RequestClaims struct { jwt.MapClaims AgentAddr common.Address RequesterPubKey []byte Target address.Address Value *big.Int Method constants.Method EpochHeight *big.Int }
func VerifyJWS ¶
func VerifyJWS(ctx context.Context, jws string, query types.FEVMQueries, useStrVal bool) (*RequestClaims, error)
useStrVal is a boolean that informs the jwt parser to use a specific version of the claims type
Click to show internal directories.
Click to hide internal directories.