KeyAuthorization.toRpcUnsigned
Converts unsigned authorization fields to RPC before owner signing.
Imports
import { KeyAuthorization } from 'ox/tempo'Examples
import { KeyAuthorization } from 'ox/tempo'
const authorization = KeyAuthorization.toRpcUnsigned({
address: '0x2222222222222222222222222222222222222222',
chainId: 1n,
type: 'secp256k1',
})Definition
function toRpcUnsigned(
authorization: Unsigned,
): UnsignedRpcSource: src/tempo/KeyAuthorization.ts
Parameters
authorization
- Type:
Unsigned
authorization.account
- Type:
addressType
Required parent account binding for a multisig grant.
authorization.address
- Type:
addressType
Address derived from the public key of the key type.
authorization.chainId
- Type:
bigintType
Chain ID for replay protection.
authorization.expiry
- Type:
numberType - Optional
Unix timestamp when key expires (undefined = never expires).
authorization.fundingPolicy
- Type:
Authorization - Optional
Existing funding policy ID or inline policy creation.
authorization.isAdmin
- Type:
boolean - Optional
Whether this authorization provisions an admin access key.
authorization.limits
- Type:
readonly TokenLimit[] - Optional
TIP20 spending limits for this key.
authorization.scopes
- Type:
readonly Scope[] - Optional
Call scopes restricting which contracts/selectors this key can call.
undefined= unrestricted key (any call allowed)[]= scoped mode with no calls allowed[...]= only listed contract+selector combinations allowed
authorization.signature
- Type:
Primitive - Optional
authorization.type
- Type:
"multisig"
Multisig key type.
authorization.witness
- Type:
0x${string} - Optional
Optional 32-byte witness bound into the signing hash.
Applications use this to bind a single signature to an arbitrary offchain context (e.g. a server-issued challenge), or as a revocation handle that can be burned onchain to invalidate the authorization before submission.
Return Type
UnsignedRpc

