The identity triple
Three values identify your application to OMS:
One subject maps to one EVM wallet. Changing the subject addresses a different wallet, so treat it as permanent once you have funded the wallet it maps to.
Register the issuer
Your issuer must be reachable over public HTTPS and serve OIDC discovery and JWKS documents. Register its URL and audience with your OMS project before the SDK can authenticate. Keep the issuer signing key stable across restarts and deployments. A new key invalidates tokens that OMS has already cached against your published JWKS.Supply ID tokens
tokenProvider issues a fresh ES256 ID token on demand:
expiresAt is Unix time in seconds, not milliseconds. A millisecond value puts the expiry far in the future and stops the SDK from refreshing the token when it should.
The SDK generates its own P-256 credential, commits the token’s hash, completes authentication, and binds the wallet for your identity. Your ID token never becomes the wallet credential.
Credential lifetime and renewal
Credentials last six hours by default. SetsessionLifetimeSeconds to change that.
The SDK renews a credential once it comes within sixty seconds of expiring, so ordinary operation needs no renewal code. It also recovers on its own from a verified response reporting an unknown, expired, or revoked credential, by reauthenticating once and retrying.
Persistent authorization failures propagate to your caller instead of retrying in a loop. Treat a repeated authorization failure as a configuration problem, not a transient one.
Inspect the current state
inspect reads persisted state without authenticating and without returning private material:
Rotate a credential
rotate self-revokes the current credential and then authenticates a fresh one. Use it on a schedule, or when you suspect a credential is exposed.
Disable and re-enable
Identity errors
Do not clear persisted state to make a mismatch go away. A mismatch means the identity and the stored wallet disagree, and erasing the record loses the mapping rather than repairing it.
CREATION_UNCERTAIN exists for the same reason: it blocks creating a replacement wallet until the original result is reconciled with OMS.
Continue with storage and concurrency for the persistence this page assumes.