issue

suspend fun issue(issuer: DeviceKey, subject: DidKey, scope: GrantScope, issuedAt: Long, notAfter: Long): Grant

issuer's grant letting subject back into scope from issuedAt until notAfter, with a fresh random id from the platform's cryptographically secure source.

Throws

when notAfter is not after issuedAt, or a GrantScope.Room id holds an unpaired surrogate or is longer than 65 534 UTF-8 bytes.

when issuer returns a signature that is not 64 bytes, or this platform's cryptographic provider cannot sign here.