Skip to content

Commit

Permalink
chore: add sessions.EntityID helper
Browse files Browse the repository at this point in the history
Signed-off-by: Norman <[email protected]>
  • Loading branch information
n0izn0iz committed Dec 28, 2024
1 parent 68b6e6b commit e3d5f78
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/gno.land/r/demo/sessions/sessions.gno
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ func Authenticate(autok auth.Token) string {
return "/" + addr
}

// EntityID returns the full entity ID for an address
func EntityID(addr std.Address) string {
return "/" + source.Addr().String() + "/" + addr.String()
}

type token struct {
addr std.Address
sessionAddr std.Address
Expand Down

0 comments on commit e3d5f78

Please sign in to comment.