Authorization.fromTupleList
Converts an Authorization.TupleList
to an Authorization.List
.
Imports
Named
import { Authorization } from 'ox'
Examples
import { Authorization } from 'ox'
const authorizationList = Authorization.fromTupleList([
['0x1', '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', '0x3'],
['0x3', '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', '0x14'],
])
[ { address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', chainId: 1, nonce: 3n, }, { address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', chainId: 3, nonce: 20n, }, ]
It is also possible to append a Signature tuple to the end of an Authorization tuple.
import { Authorization } from 'ox'
const authorizationList = Authorization.fromTupleList([
['0x1', '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', '0x3', '0x1', '0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90', '0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'],
['0x3', '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', '0x14', '0x1', '0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90', '0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'],
])
[ { address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', chainId: 1, nonce: 3n, r: BigInt('0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90'), s: BigInt('0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'), yParity: 0, }, { address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', chainId: 3, nonce: 20n, r: BigInt('0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90'), s: BigInt('0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'), yParity: 0, }, ]
Definition
function fromTupleList<tupleList>(
tupleList: tupleList,
): fromTupleList.ReturnType<tupleList>
Source: src/Authorization.ts
Parameters
tupleList
- Type:
tupleList
The EIP-7702 Authorization tuple list.
Return Type
fromTupleList.ReturnType<tupleList>