Signature.extract
Extracts a Signature.Signature
from an arbitrary object that may include signature properties.
Imports
Named
import { Signature } from 'ox'
Examples
import { Signature } from 'ox'
Signature.extract({
baz: 'barry',
foo: 'bar',
r: 49782753348462494199823712700004552394425719014458918871452329774910450607807n,
s: 33726695977844476214676913201140481102225469284307016937915595756355928419768n,
yParity: 1,
zebra: 'stripes',
})
{ r: 49782753348462494199823712700004552394425719014458918871452329774910450607807n, s: 33726695977844476214676913201140481102225469284307016937915595756355928419768n, yParity: 1 }
Definition
function extract(
value: extract.Value,
): Signature | undefined
Source: src/core/Signature.ts
Parameters
value
- Type:
extract.Value
The arbitrary object to extract the signature from.
value.r
- Type:
bigint | 0x${string}
- Optional
value.s
- Type:
bigint | 0x${string}
- Optional
value.v
- Type:
number | 0x${string}
- Optional
value.yParity
- Type:
number | 0x${string}
- Optional
Return Type
The extracted Signature.Signature
.
Signature | undefined