KeyAuthorization.fromRpc
Converts an AuthorizationTempo.Rpc to an AuthorizationTempo.AuthorizationTempo.
Imports
Named
import { KeyAuthorization } from 'ox/tempo'Examples
import { KeyAuthorization } from 'ox/tempo'
const keyAuthorization = KeyAuthorization.fromRpc({
expiry: '0x174876e800',
keyId: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
keyType: 'secp256k1',
limits: [{ token: '0x20c0000000000000000000000000000000000001', limit: '0xf4240' }],
signature: {
type: 'secp256k1',
r: '0x635dc2033e60185bb36709c29c75d64ea51dfbd91c32ef4be198e4ceb169fb4d',
s: '0x50c2667ac4c771072746acfdcf1f1483336dcca8bd2df47cd83175dbe60f0540',
yParity: '0x0'
},
})Definition
function fromRpc(
authorization: Rpc,
): SignedSource: src/tempo/KeyAuthorization.ts
Parameters
authorization
- Type:
Rpc
The RPC-formatted Key Authorization.
authorization.keyId
- Type:
abitype_Address
authorization.keyType
- Type:
"secp256k1" | "p256" | "webAuthn"
authorization.signature
- Type:
SignatureEnvelopeRpc
Return Type
A signed AuthorizationTempo.AuthorizationTempo.
Signed

