testing/role_grant_helpers.ts view source
(args: RoleGrantOfferAndAcceptArgs): Promise<{ offer_id: string & $brand<"Uuid">; role_grant_id: string & $brand<"Uuid">; }> Drive the full consent flow (grantor offer → recipient accept) over the production RPC surface and return the materialized role_grant id.
grantor and recipient carry both the account id (for to_account_id
derivation) and the create_session_headers factory (for cookie-threaded
auth) — closing that loop on a single object per party rules out
caller-side header/account mismatch.
args
returns
Promise<{ offer_id: string & $brand<"Uuid">; role_grant_id: string & $brand<"Uuid">; }>