ox 0.1.8 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/_cjs/core/Abi.js +0 -2
- package/_cjs/core/Abi.js.map +1 -1
- package/_cjs/core/AbiConstructor.js +0 -5
- package/_cjs/core/AbiConstructor.js.map +1 -1
- package/_cjs/core/AbiError.js +0 -5
- package/_cjs/core/AbiError.js.map +1 -1
- package/_cjs/core/AbiEvent.js +0 -7
- package/_cjs/core/AbiEvent.js.map +1 -1
- package/_cjs/core/AbiFunction.js +0 -5
- package/_cjs/core/AbiFunction.js.map +1 -1
- package/_cjs/core/AbiItem.js +0 -6
- package/_cjs/core/AbiItem.js.map +1 -1
- package/_cjs/core/AbiParameters.js +0 -5
- package/_cjs/core/AbiParameters.js.map +1 -1
- package/_cjs/core/Address.js +0 -5
- package/_cjs/core/Address.js.map +1 -1
- package/_cjs/core/AesGcm.js +0 -4
- package/_cjs/core/AesGcm.js.map +1 -1
- package/_cjs/core/Authorization.js +0 -11
- package/_cjs/core/Authorization.js.map +1 -1
- package/_cjs/core/Base58.js +0 -6
- package/_cjs/core/Base58.js.map +1 -1
- package/_cjs/core/Base64.js +0 -6
- package/_cjs/core/Base64.js.map +1 -1
- package/_cjs/core/Blobs.js +0 -11
- package/_cjs/core/Blobs.js.map +1 -1
- package/_cjs/core/Block.js +0 -2
- package/_cjs/core/Block.js.map +1 -1
- package/_cjs/core/Bloom.js +0 -2
- package/_cjs/core/Bloom.js.map +1 -1
- package/_cjs/core/Bls.js +0 -3
- package/_cjs/core/Bls.js.map +1 -1
- package/_cjs/core/BlsPoint.js +0 -4
- package/_cjs/core/BlsPoint.js.map +1 -1
- package/_cjs/core/Bytes.js +0 -22
- package/_cjs/core/Bytes.js.map +1 -1
- package/_cjs/core/ContractAddress.js +0 -3
- package/_cjs/core/ContractAddress.js.map +1 -1
- package/_cjs/core/Ens.js +0 -3
- package/_cjs/core/Ens.js.map +1 -1
- package/_cjs/core/Filter.js +0 -2
- package/_cjs/core/Filter.js.map +1 -1
- package/_cjs/core/Hash.js +0 -4
- package/_cjs/core/Hash.js.map +1 -1
- package/_cjs/core/HdKey.js +0 -4
- package/_cjs/core/HdKey.js.map +1 -1
- package/_cjs/core/Hex.js +0 -21
- package/_cjs/core/Hex.js.map +1 -1
- package/_cjs/core/Json.js +0 -2
- package/_cjs/core/Json.js.map +1 -1
- package/_cjs/core/Kzg.js +0 -1
- package/_cjs/core/Kzg.js.map +1 -1
- package/_cjs/core/Log.js +0 -2
- package/_cjs/core/Log.js.map +1 -1
- package/_cjs/core/Mnemonic.js +0 -5
- package/_cjs/core/Mnemonic.js.map +1 -1
- package/_cjs/core/P256.js +0 -3
- package/_cjs/core/P256.js.map +1 -1
- package/_cjs/core/PersonalMessage.js +0 -2
- package/_cjs/core/PersonalMessage.js.map +1 -1
- package/_cjs/core/Provider.js +0 -2
- package/_cjs/core/Provider.js.map +1 -1
- package/_cjs/core/PublicKey.js +0 -6
- package/_cjs/core/PublicKey.js.map +1 -1
- package/_cjs/core/Rlp.js +0 -6
- package/_cjs/core/Rlp.js.map +1 -1
- package/_cjs/core/RpcRequest.js +0 -2
- package/_cjs/core/RpcRequest.js.map +1 -1
- package/_cjs/core/RpcResponse.js +0 -1
- package/_cjs/core/RpcResponse.js.map +1 -1
- package/_cjs/core/RpcTransport.js +0 -1
- package/_cjs/core/RpcTransport.js.map +1 -1
- package/_cjs/core/Secp256k1.js +0 -4
- package/_cjs/core/Secp256k1.js.map +1 -1
- package/_cjs/core/Signature.js +0 -17
- package/_cjs/core/Signature.js.map +1 -1
- package/_cjs/core/Siwe.js +0 -1
- package/_cjs/core/Siwe.js.map +1 -1
- package/_cjs/core/Transaction.js +0 -2
- package/_cjs/core/Transaction.js.map +1 -1
- package/_cjs/core/TransactionEnvelopeEip1559.js +0 -8
- package/_cjs/core/TransactionEnvelopeEip1559.js.map +1 -1
- package/_cjs/core/TransactionEnvelopeEip2930.js +0 -8
- package/_cjs/core/TransactionEnvelopeEip2930.js.map +1 -1
- package/_cjs/core/TransactionEnvelopeEip4844.js +0 -8
- package/_cjs/core/TransactionEnvelopeEip4844.js.map +1 -1
- package/_cjs/core/TransactionEnvelopeEip7702.js +0 -7
- package/_cjs/core/TransactionEnvelopeEip7702.js.map +1 -1
- package/_cjs/core/TransactionEnvelopeLegacy.js +0 -8
- package/_cjs/core/TransactionEnvelopeLegacy.js.map +1 -1
- package/_cjs/core/TransactionReceipt.js +0 -2
- package/_cjs/core/TransactionReceipt.js.map +1 -1
- package/_cjs/core/TransactionRequest.js +0 -1
- package/_cjs/core/TransactionRequest.js.map +1 -1
- package/_cjs/core/TypedData.js +21 -15
- package/_cjs/core/TypedData.js.map +1 -1
- package/_cjs/core/ValidatorData.js +0 -2
- package/_cjs/core/ValidatorData.js.map +1 -1
- package/_cjs/core/Value.js +0 -6
- package/_cjs/core/Value.js.map +1 -1
- package/_cjs/core/WebAuthnP256.js +0 -8
- package/_cjs/core/WebAuthnP256.js.map +1 -1
- package/_cjs/core/WebCryptoP256.js +0 -3
- package/_cjs/core/WebCryptoP256.js.map +1 -1
- package/_cjs/core/Withdrawal.js +0 -2
- package/_cjs/core/Withdrawal.js.map +1 -1
- package/_cjs/core/internal/base58.js +0 -1
- package/_cjs/core/internal/base58.js.map +1 -1
- package/_cjs/core/internal/promise.js +0 -1
- package/_cjs/core/internal/promise.js.map +1 -1
- package/_cjs/core/internal/rpcTransport.js +0 -1
- package/_cjs/core/internal/rpcTransport.js.map +1 -1
- package/_cjs/core/internal/webauthn.js +3 -3
- package/_cjs/core/internal/webauthn.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/core/Abi.js +0 -6
- package/_esm/core/Abi.js.map +1 -1
- package/_esm/core/AbiConstructor.js +0 -15
- package/_esm/core/AbiConstructor.js.map +1 -1
- package/_esm/core/AbiError.js +0 -14
- package/_esm/core/AbiError.js.map +1 -1
- package/_esm/core/AbiEvent.js +0 -20
- package/_esm/core/AbiEvent.js.map +1 -1
- package/_esm/core/AbiFunction.js +0 -14
- package/_esm/core/AbiFunction.js.map +1 -1
- package/_esm/core/AbiItem.js +0 -16
- package/_esm/core/AbiItem.js.map +1 -1
- package/_esm/core/AbiParameters.js +0 -14
- package/_esm/core/AbiParameters.js.map +1 -1
- package/_esm/core/Address.js +0 -13
- package/_esm/core/Address.js.map +1 -1
- package/_esm/core/AesGcm.js +0 -12
- package/_esm/core/AesGcm.js.map +1 -1
- package/_esm/core/Authorization.js +0 -33
- package/_esm/core/Authorization.js.map +1 -1
- package/_esm/core/Base58.js +0 -18
- package/_esm/core/Base58.js.map +1 -1
- package/_esm/core/Base64.js +0 -18
- package/_esm/core/Base64.js.map +1 -1
- package/_esm/core/Blobs.js +0 -28
- package/_esm/core/Blobs.js.map +1 -1
- package/_esm/core/Block.js +0 -6
- package/_esm/core/Block.js.map +1 -1
- package/_esm/core/Bloom.js +0 -5
- package/_esm/core/Bloom.js.map +1 -1
- package/_esm/core/Bls.js +0 -8
- package/_esm/core/Bls.js.map +1 -1
- package/_esm/core/BlsPoint.js +0 -8
- package/_esm/core/BlsPoint.js.map +1 -1
- package/_esm/core/Bytes.js +0 -53
- package/_esm/core/Bytes.js.map +1 -1
- package/_esm/core/ContractAddress.js +0 -9
- package/_esm/core/ContractAddress.js.map +1 -1
- package/_esm/core/Ens.js +0 -9
- package/_esm/core/Ens.js.map +1 -1
- package/_esm/core/Filter.js +0 -6
- package/_esm/core/Filter.js.map +1 -1
- package/_esm/core/Hash.js +0 -8
- package/_esm/core/Hash.js.map +1 -1
- package/_esm/core/HdKey.js +0 -11
- package/_esm/core/HdKey.js.map +1 -1
- package/_esm/core/Hex.js +0 -45
- package/_esm/core/Hex.js.map +1 -1
- package/_esm/core/Json.js +0 -6
- package/_esm/core/Json.js.map +1 -1
- package/_esm/core/Kzg.js +0 -2
- package/_esm/core/Kzg.js.map +1 -1
- package/_esm/core/Log.js +0 -6
- package/_esm/core/Log.js.map +1 -1
- package/_esm/core/Mnemonic.js +0 -15
- package/_esm/core/Mnemonic.js.map +1 -1
- package/_esm/core/P256.js +0 -7
- package/_esm/core/P256.js.map +1 -1
- package/_esm/core/PersonalMessage.js +0 -4
- package/_esm/core/PersonalMessage.js.map +1 -1
- package/_esm/core/Provider.js +0 -5
- package/_esm/core/Provider.js.map +1 -1
- package/_esm/core/PublicKey.js +0 -18
- package/_esm/core/PublicKey.js.map +1 -1
- package/_esm/core/Rlp.js +0 -18
- package/_esm/core/Rlp.js.map +1 -1
- package/_esm/core/RpcRequest.js +0 -6
- package/_esm/core/RpcRequest.js.map +1 -1
- package/_esm/core/RpcResponse.js +0 -3
- package/_esm/core/RpcResponse.js.map +1 -1
- package/_esm/core/RpcTransport.js +0 -3
- package/_esm/core/RpcTransport.js.map +1 -1
- package/_esm/core/Secp256k1.js +0 -12
- package/_esm/core/Secp256k1.js.map +1 -1
- package/_esm/core/Signature.js +0 -49
- package/_esm/core/Signature.js.map +1 -1
- package/_esm/core/Siwe.js +0 -3
- package/_esm/core/Siwe.js.map +1 -1
- package/_esm/core/Transaction.js +0 -6
- package/_esm/core/Transaction.js.map +1 -1
- package/_esm/core/TransactionEnvelopeEip1559.js +0 -22
- package/_esm/core/TransactionEnvelopeEip1559.js.map +1 -1
- package/_esm/core/TransactionEnvelopeEip2930.js +0 -23
- package/_esm/core/TransactionEnvelopeEip2930.js.map +1 -1
- package/_esm/core/TransactionEnvelopeEip4844.js +0 -24
- package/_esm/core/TransactionEnvelopeEip4844.js.map +1 -1
- package/_esm/core/TransactionEnvelopeEip7702.js +0 -21
- package/_esm/core/TransactionEnvelopeEip7702.js.map +1 -1
- package/_esm/core/TransactionEnvelopeLegacy.js +0 -24
- package/_esm/core/TransactionEnvelopeLegacy.js.map +1 -1
- package/_esm/core/TransactionReceipt.js +0 -6
- package/_esm/core/TransactionReceipt.js.map +1 -1
- package/_esm/core/TransactionRequest.js +0 -3
- package/_esm/core/TransactionRequest.js.map +1 -1
- package/_esm/core/TypedData.js +20 -29
- package/_esm/core/TypedData.js.map +1 -1
- package/_esm/core/ValidatorData.js +0 -4
- package/_esm/core/ValidatorData.js.map +1 -1
- package/_esm/core/Value.js +0 -12
- package/_esm/core/Value.js.map +1 -1
- package/_esm/core/WebAuthnP256.js +0 -22
- package/_esm/core/WebAuthnP256.js.map +1 -1
- package/_esm/core/WebCryptoP256.js +0 -9
- package/_esm/core/WebCryptoP256.js.map +1 -1
- package/_esm/core/Withdrawal.js +0 -6
- package/_esm/core/Withdrawal.js.map +1 -1
- package/_esm/core/internal/base58.js +0 -3
- package/_esm/core/internal/base58.js.map +1 -1
- package/_esm/core/internal/promise.js +0 -3
- package/_esm/core/internal/promise.js.map +1 -1
- package/_esm/core/internal/rpcTransport.js +0 -4
- package/_esm/core/internal/rpcTransport.js.map +1 -1
- package/_esm/core/internal/webauthn.js +3 -3
- package/_esm/core/internal/webauthn.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/core/Abi.d.ts +0 -6
- package/_types/core/Abi.d.ts.map +1 -1
- package/_types/core/AbiConstructor.d.ts +0 -15
- package/_types/core/AbiConstructor.d.ts.map +1 -1
- package/_types/core/AbiError.d.ts +1 -16
- package/_types/core/AbiError.d.ts.map +1 -1
- package/_types/core/AbiEvent.d.ts +0 -21
- package/_types/core/AbiEvent.d.ts.map +1 -1
- package/_types/core/AbiFunction.d.ts +0 -15
- package/_types/core/AbiFunction.d.ts.map +1 -1
- package/_types/core/AbiItem.d.ts +0 -18
- package/_types/core/AbiItem.d.ts.map +1 -1
- package/_types/core/AbiParameters.d.ts +0 -15
- package/_types/core/AbiParameters.d.ts.map +1 -1
- package/_types/core/Address.d.ts +0 -15
- package/_types/core/Address.d.ts.map +1 -1
- package/_types/core/AesGcm.d.ts +0 -9
- package/_types/core/AesGcm.d.ts.map +1 -1
- package/_types/core/Authorization.d.ts +0 -33
- package/_types/core/Authorization.d.ts.map +1 -1
- package/_types/core/Base58.d.ts +0 -18
- package/_types/core/Base58.d.ts.map +1 -1
- package/_types/core/Base64.d.ts +0 -18
- package/_types/core/Base64.d.ts.map +1 -1
- package/_types/core/Blobs.d.ts +0 -33
- package/_types/core/Blobs.d.ts.map +1 -1
- package/_types/core/Block.d.ts +0 -6
- package/_types/core/Block.d.ts.map +1 -1
- package/_types/core/Bloom.d.ts +0 -6
- package/_types/core/Bloom.d.ts.map +1 -1
- package/_types/core/Bls.d.ts +0 -9
- package/_types/core/Bls.d.ts.map +1 -1
- package/_types/core/BlsPoint.d.ts +0 -12
- package/_types/core/BlsPoint.d.ts.map +1 -1
- package/_types/core/Bytes.d.ts +0 -66
- package/_types/core/Bytes.d.ts.map +1 -1
- package/_types/core/ContractAddress.d.ts +0 -9
- package/_types/core/ContractAddress.d.ts.map +1 -1
- package/_types/core/Ens.d.ts +0 -9
- package/_types/core/Ens.d.ts.map +1 -1
- package/_types/core/Filter.d.ts +0 -6
- package/_types/core/Filter.d.ts.map +1 -1
- package/_types/core/Hash.d.ts +0 -12
- package/_types/core/Hash.d.ts.map +1 -1
- package/_types/core/HdKey.d.ts +0 -12
- package/_types/core/HdKey.d.ts.map +1 -1
- package/_types/core/Hex.d.ts +0 -63
- package/_types/core/Hex.d.ts.map +1 -1
- package/_types/core/Json.d.ts +0 -6
- package/_types/core/Json.d.ts.map +1 -1
- package/_types/core/Kzg.d.ts +0 -3
- package/_types/core/Kzg.d.ts.map +1 -1
- package/_types/core/Log.d.ts +0 -6
- package/_types/core/Log.d.ts.map +1 -1
- package/_types/core/Mnemonic.d.ts +0 -15
- package/_types/core/Mnemonic.d.ts.map +1 -1
- package/_types/core/P256.d.ts +0 -9
- package/_types/core/P256.d.ts.map +1 -1
- package/_types/core/PersonalMessage.d.ts +0 -6
- package/_types/core/PersonalMessage.d.ts.map +1 -1
- package/_types/core/Provider.d.ts +0 -6
- package/_types/core/Provider.d.ts.map +1 -1
- package/_types/core/PublicKey.d.ts +0 -18
- package/_types/core/PublicKey.d.ts.map +1 -1
- package/_types/core/Rlp.d.ts +1 -18
- package/_types/core/Rlp.d.ts.map +1 -1
- package/_types/core/RpcRequest.d.ts +0 -6
- package/_types/core/RpcRequest.d.ts.map +1 -1
- package/_types/core/RpcResponse.d.ts +0 -3
- package/_types/core/RpcResponse.d.ts.map +1 -1
- package/_types/core/RpcTransport.d.ts +0 -3
- package/_types/core/RpcTransport.d.ts.map +1 -1
- package/_types/core/Secp256k1.d.ts +0 -12
- package/_types/core/Secp256k1.d.ts.map +1 -1
- package/_types/core/Signature.d.ts +0 -51
- package/_types/core/Signature.d.ts.map +1 -1
- package/_types/core/Siwe.d.ts +0 -3
- package/_types/core/Siwe.d.ts.map +1 -1
- package/_types/core/Transaction.d.ts +0 -6
- package/_types/core/Transaction.d.ts.map +1 -1
- package/_types/core/TransactionEnvelopeEip1559.d.ts +0 -24
- package/_types/core/TransactionEnvelopeEip1559.d.ts.map +1 -1
- package/_types/core/TransactionEnvelopeEip2930.d.ts +0 -24
- package/_types/core/TransactionEnvelopeEip2930.d.ts.map +1 -1
- package/_types/core/TransactionEnvelopeEip4844.d.ts +0 -24
- package/_types/core/TransactionEnvelopeEip4844.d.ts.map +1 -1
- package/_types/core/TransactionEnvelopeEip7702.d.ts +0 -21
- package/_types/core/TransactionEnvelopeEip7702.d.ts.map +1 -1
- package/_types/core/TransactionEnvelopeLegacy.d.ts +0 -24
- package/_types/core/TransactionEnvelopeLegacy.d.ts.map +1 -1
- package/_types/core/TransactionReceipt.d.ts +0 -6
- package/_types/core/TransactionReceipt.d.ts.map +1 -1
- package/_types/core/TransactionRequest.d.ts +0 -3
- package/_types/core/TransactionRequest.d.ts.map +1 -1
- package/_types/core/TypedData.d.ts +7 -30
- package/_types/core/TypedData.d.ts.map +1 -1
- package/_types/core/ValidatorData.d.ts +0 -6
- package/_types/core/ValidatorData.d.ts.map +1 -1
- package/_types/core/Value.d.ts +0 -18
- package/_types/core/Value.d.ts.map +1 -1
- package/_types/core/WebAuthnP256.d.ts +0 -24
- package/_types/core/WebAuthnP256.d.ts.map +1 -1
- package/_types/core/WebCryptoP256.d.ts +0 -9
- package/_types/core/WebCryptoP256.d.ts.map +1 -1
- package/_types/core/Withdrawal.d.ts +0 -6
- package/_types/core/Withdrawal.d.ts.map +1 -1
- package/_types/core/internal/base58.d.ts +1 -3
- package/_types/core/internal/base58.d.ts.map +1 -1
- package/_types/core/internal/promise.d.ts +1 -3
- package/_types/core/internal/promise.d.ts.map +1 -1
- package/_types/core/internal/rpcTransport.d.ts +0 -3
- package/_types/core/internal/rpcTransport.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/core/Abi.ts +0 -8
- package/core/AbiConstructor.ts +0 -20
- package/core/AbiError.ts +1 -20
- package/core/AbiEvent.ts +0 -27
- package/core/AbiFunction.ts +0 -19
- package/core/AbiItem.ts +0 -22
- package/core/AbiParameters.ts +0 -19
- package/core/Address.ts +0 -18
- package/core/AesGcm.ts +0 -16
- package/core/Authorization.ts +0 -44
- package/core/Base58.ts +0 -24
- package/core/Base64.ts +0 -24
- package/core/Blobs.ts +0 -39
- package/core/Block.ts +0 -8
- package/core/Bloom.ts +0 -7
- package/core/Bls.ts +0 -11
- package/core/BlsPoint.ts +0 -12
- package/core/Bytes.ts +0 -75
- package/core/ContractAddress.ts +0 -12
- package/core/Ens.ts +0 -12
- package/core/Filter.ts +0 -8
- package/core/Hash.ts +0 -12
- package/core/HdKey.ts +0 -15
- package/core/Hex.ts +0 -66
- package/core/Json.ts +0 -8
- package/core/Kzg.ts +0 -3
- package/core/Log.ts +0 -8
- package/core/Mnemonic.ts +0 -20
- package/core/P256.ts +0 -10
- package/core/PersonalMessage.ts +0 -7
- package/core/Provider.ts +0 -7
- package/core/PublicKey.ts +0 -24
- package/core/Rlp.ts +0 -23
- package/core/RpcRequest.ts +0 -8
- package/core/RpcResponse.ts +0 -4
- package/core/RpcTransport.ts +0 -4
- package/core/Secp256k1.ts +0 -16
- package/core/Signature.ts +0 -66
- package/core/Siwe.ts +0 -4
- package/core/Transaction.ts +0 -8
- package/core/TransactionEnvelopeEip1559.ts +0 -30
- package/core/TransactionEnvelopeEip2930.ts +0 -31
- package/core/TransactionEnvelopeEip4844.ts +0 -32
- package/core/TransactionEnvelopeEip7702.ts +0 -28
- package/core/TransactionEnvelopeLegacy.ts +0 -32
- package/core/TransactionReceipt.ts +0 -8
- package/core/TransactionRequest.ts +0 -4
- package/core/TypedData.ts +17 -38
- package/core/ValidatorData.ts +0 -7
- package/core/Value.ts +0 -18
- package/core/WebAuthnP256.ts +0 -31
- package/core/WebCryptoP256.ts +0 -12
- package/core/Withdrawal.ts +0 -8
- package/core/internal/base58.ts +0 -3
- package/core/internal/promise.ts +0 -3
- package/core/internal/rpcTransport.ts +0 -5
- package/core/internal/webauthn.ts +3 -3
- package/package.json +1 -1
- package/version.ts +1 -1
|
@@ -83,10 +83,6 @@ export declare namespace assert {
|
|
|
83
83
|
| Errors.GlobalErrorType
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
assert.parseError = (error: unknown) =>
|
|
87
|
-
/* v8 ignore next */
|
|
88
|
-
error as assert.ErrorType
|
|
89
|
-
|
|
90
86
|
/**
|
|
91
87
|
* Deserializes a {@link ox#TransactionEnvelopeEip2930.TransactionEnvelopeEip2930} from its serialized form.
|
|
92
88
|
*
|
|
@@ -181,9 +177,6 @@ export declare namespace deserialize {
|
|
|
181
177
|
type ErrorType = Errors.GlobalErrorType
|
|
182
178
|
}
|
|
183
179
|
|
|
184
|
-
/* v8 ignore next */
|
|
185
|
-
deserialize.parseError = (error: unknown) => error as deserialize.ErrorType
|
|
186
|
-
|
|
187
180
|
/**
|
|
188
181
|
* Converts an arbitrary transaction object into an EIP-2930 Transaction Envelope.
|
|
189
182
|
*
|
|
@@ -313,10 +306,6 @@ export declare namespace from {
|
|
|
313
306
|
| Errors.GlobalErrorType
|
|
314
307
|
}
|
|
315
308
|
|
|
316
|
-
from.parseError = (error: unknown) =>
|
|
317
|
-
/* v8 ignore next */
|
|
318
|
-
error as from.ErrorType
|
|
319
|
-
|
|
320
309
|
/**
|
|
321
310
|
* Returns the payload to sign for a {@link ox#TransactionEnvelopeEip2930.TransactionEnvelopeEip2930}.
|
|
322
311
|
*
|
|
@@ -357,10 +346,6 @@ export declare namespace getSignPayload {
|
|
|
357
346
|
type ErrorType = hash.ErrorType | Errors.GlobalErrorType
|
|
358
347
|
}
|
|
359
348
|
|
|
360
|
-
getSignPayload.parseError = (error: unknown) =>
|
|
361
|
-
/* v8 ignore next */
|
|
362
|
-
error as getSignPayload.ErrorType
|
|
363
|
-
|
|
364
349
|
/**
|
|
365
350
|
* Hashes a {@link ox#TransactionEnvelopeEip2930.TransactionEnvelopeEip2930}. This is the "transaction hash".
|
|
366
351
|
*
|
|
@@ -427,10 +412,6 @@ export declare namespace hash {
|
|
|
427
412
|
| Errors.GlobalErrorType
|
|
428
413
|
}
|
|
429
414
|
|
|
430
|
-
hash.parseError = (error: unknown) =>
|
|
431
|
-
/* v8 ignore next */
|
|
432
|
-
error as hash.ErrorType
|
|
433
|
-
|
|
434
415
|
/**
|
|
435
416
|
* Serializes a {@link ox#TransactionEnvelopeEip2930.TransactionEnvelopeEip2930}.
|
|
436
417
|
*
|
|
@@ -522,10 +503,6 @@ export declare namespace serialize {
|
|
|
522
503
|
| Errors.GlobalErrorType
|
|
523
504
|
}
|
|
524
505
|
|
|
525
|
-
serialize.parseError = (error: unknown) =>
|
|
526
|
-
/* v8 ignore next */
|
|
527
|
-
error as serialize.ErrorType
|
|
528
|
-
|
|
529
506
|
/**
|
|
530
507
|
* Converts an {@link ox#TransactionEnvelopeEip2930.TransactionEnvelopeEip2930} to an {@link ox#TransactionEnvelopeEip2930.Rpc}.
|
|
531
508
|
*
|
|
@@ -582,10 +559,6 @@ export declare namespace toRpc {
|
|
|
582
559
|
export type ErrorType = Signature.extract.ErrorType | Errors.GlobalErrorType
|
|
583
560
|
}
|
|
584
561
|
|
|
585
|
-
toRpc.parseError = (error: unknown) =>
|
|
586
|
-
/* v8 ignore next */
|
|
587
|
-
error as toRpc.ErrorType
|
|
588
|
-
|
|
589
562
|
/**
|
|
590
563
|
* Validates a {@link ox#TransactionEnvelopeEip2930.TransactionEnvelopeEip2930}. Returns `true` if the envelope is valid, `false` otherwise.
|
|
591
564
|
*
|
|
@@ -618,7 +591,3 @@ export function validate(
|
|
|
618
591
|
export declare namespace validate {
|
|
619
592
|
type ErrorType = Errors.GlobalErrorType
|
|
620
593
|
}
|
|
621
|
-
|
|
622
|
-
validate.parseError = (error: unknown) =>
|
|
623
|
-
/* v8 ignore next */
|
|
624
|
-
error as validate.ErrorType
|
|
@@ -108,10 +108,6 @@ export declare namespace assert {
|
|
|
108
108
|
| Errors.GlobalErrorType
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
assert.parseError = (error: unknown) =>
|
|
112
|
-
/* v8 ignore next */
|
|
113
|
-
error as assert.ErrorType
|
|
114
|
-
|
|
115
111
|
/**
|
|
116
112
|
* Deserializes a {@link ox#TransactionEnvelopeEip4844.TransactionEnvelopeEip4844} from its serialized form.
|
|
117
113
|
*
|
|
@@ -233,10 +229,6 @@ export declare namespace deserialize {
|
|
|
233
229
|
type ErrorType = Errors.GlobalErrorType
|
|
234
230
|
}
|
|
235
231
|
|
|
236
|
-
deserialize.parseError = (error: unknown) =>
|
|
237
|
-
/* v8 ignore next */
|
|
238
|
-
error as deserialize.ErrorType
|
|
239
|
-
|
|
240
232
|
/**
|
|
241
233
|
* Converts an arbitrary transaction object into an EIP-4844 Transaction Envelope.
|
|
242
234
|
*
|
|
@@ -386,10 +378,6 @@ export declare namespace from {
|
|
|
386
378
|
| Errors.GlobalErrorType
|
|
387
379
|
}
|
|
388
380
|
|
|
389
|
-
from.parseError = (error: unknown) =>
|
|
390
|
-
/* v8 ignore next */
|
|
391
|
-
error as from.ErrorType
|
|
392
|
-
|
|
393
381
|
/**
|
|
394
382
|
* Returns the payload to sign for a {@link ox#TransactionEnvelopeEip4844.TransactionEnvelopeEip4844}.
|
|
395
383
|
*
|
|
@@ -436,10 +424,6 @@ export declare namespace getSignPayload {
|
|
|
436
424
|
type ErrorType = hash.ErrorType | Errors.GlobalErrorType
|
|
437
425
|
}
|
|
438
426
|
|
|
439
|
-
getSignPayload.parseError = (error: unknown) =>
|
|
440
|
-
/* v8 ignore next */
|
|
441
|
-
error as getSignPayload.ErrorType
|
|
442
|
-
|
|
443
427
|
/**
|
|
444
428
|
* Hashes a {@link ox#TransactionEnvelopeEip4844.TransactionEnvelopeEip4844}. This is the "transaction hash".
|
|
445
429
|
*
|
|
@@ -504,10 +488,6 @@ export declare namespace hash {
|
|
|
504
488
|
| Errors.GlobalErrorType
|
|
505
489
|
}
|
|
506
490
|
|
|
507
|
-
hash.parseError = (error: unknown) =>
|
|
508
|
-
/* v8 ignore next */
|
|
509
|
-
error as hash.ErrorType
|
|
510
|
-
|
|
511
491
|
/**
|
|
512
492
|
* Serializes a {@link ox#TransactionEnvelopeEip4844.TransactionEnvelopeEip4844}.
|
|
513
493
|
*
|
|
@@ -650,10 +630,6 @@ export declare namespace serialize {
|
|
|
650
630
|
| Errors.GlobalErrorType
|
|
651
631
|
}
|
|
652
632
|
|
|
653
|
-
serialize.parseError = (error: unknown) =>
|
|
654
|
-
/* v8 ignore next */
|
|
655
|
-
error as serialize.ErrorType
|
|
656
|
-
|
|
657
633
|
/**
|
|
658
634
|
* Converts an {@link ox#TransactionEnvelopeEip4844.TransactionEnvelopeEip4844} to an {@link ox#TransactionEnvelopeEip4844.Rpc}.
|
|
659
635
|
*
|
|
@@ -722,10 +698,6 @@ export declare namespace toRpc {
|
|
|
722
698
|
export type ErrorType = Signature.extract.ErrorType | Errors.GlobalErrorType
|
|
723
699
|
}
|
|
724
700
|
|
|
725
|
-
toRpc.parseError = (error: unknown) =>
|
|
726
|
-
/* v8 ignore next */
|
|
727
|
-
error as toRpc.ErrorType
|
|
728
|
-
|
|
729
701
|
/**
|
|
730
702
|
* Validates a {@link ox#TransactionEnvelopeEip4844.TransactionEnvelopeEip4844}. Returns `true` if the envelope is valid, `false` otherwise.
|
|
731
703
|
*
|
|
@@ -758,7 +730,3 @@ export function validate(
|
|
|
758
730
|
export declare namespace validate {
|
|
759
731
|
type ErrorType = Errors.GlobalErrorType
|
|
760
732
|
}
|
|
761
|
-
|
|
762
|
-
validate.parseError = (error: unknown) =>
|
|
763
|
-
/* v8 ignore next */
|
|
764
|
-
error as validate.ErrorType
|
|
@@ -94,10 +94,6 @@ export declare namespace assert {
|
|
|
94
94
|
| Errors.GlobalErrorType
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
assert.parseError = (error: unknown) =>
|
|
98
|
-
/* v8 ignore next */
|
|
99
|
-
error as assert.ErrorType
|
|
100
|
-
|
|
101
97
|
/**
|
|
102
98
|
* Deserializes a {@link ox#TransactionEnvelopeEip7702.TransactionEnvelopeEip7702} from its serialized form.
|
|
103
99
|
*
|
|
@@ -203,10 +199,6 @@ export declare namespace deserialize {
|
|
|
203
199
|
type ErrorType = Errors.GlobalErrorType
|
|
204
200
|
}
|
|
205
201
|
|
|
206
|
-
deserialize.parseError = (error: unknown) =>
|
|
207
|
-
/* v8 ignore next */
|
|
208
|
-
error as deserialize.ErrorType
|
|
209
|
-
|
|
210
202
|
/**
|
|
211
203
|
* Converts an arbitrary transaction object into an EIP-7702 Transaction Envelope.
|
|
212
204
|
*
|
|
@@ -355,10 +347,6 @@ export declare namespace from {
|
|
|
355
347
|
| Errors.GlobalErrorType
|
|
356
348
|
}
|
|
357
349
|
|
|
358
|
-
from.parseError = (error: unknown) =>
|
|
359
|
-
/* v8 ignore next */
|
|
360
|
-
error as from.ErrorType
|
|
361
|
-
|
|
362
350
|
/**
|
|
363
351
|
* Returns the payload to sign for a {@link ox#TransactionEnvelopeEip7702.TransactionEnvelopeEip7702}.
|
|
364
352
|
*
|
|
@@ -401,10 +389,6 @@ export declare namespace getSignPayload {
|
|
|
401
389
|
type ErrorType = hash.ErrorType | Errors.GlobalErrorType
|
|
402
390
|
}
|
|
403
391
|
|
|
404
|
-
getSignPayload.parseError = (error: unknown) =>
|
|
405
|
-
/* v8 ignore next */
|
|
406
|
-
error as getSignPayload.ErrorType
|
|
407
|
-
|
|
408
392
|
/**
|
|
409
393
|
* Hashes a {@link ox#TransactionEnvelopeEip7702.TransactionEnvelopeEip7702}. This is the "transaction hash".
|
|
410
394
|
*
|
|
@@ -470,10 +454,6 @@ export declare namespace hash {
|
|
|
470
454
|
| Errors.GlobalErrorType
|
|
471
455
|
}
|
|
472
456
|
|
|
473
|
-
hash.parseError = (error: unknown) =>
|
|
474
|
-
/* v8 ignore next */
|
|
475
|
-
error as hash.ErrorType
|
|
476
|
-
|
|
477
457
|
/**
|
|
478
458
|
* Serializes a {@link ox#TransactionEnvelopeEip7702.TransactionEnvelopeEip7702}.
|
|
479
459
|
*
|
|
@@ -596,10 +576,6 @@ export declare namespace serialize {
|
|
|
596
576
|
| Errors.GlobalErrorType
|
|
597
577
|
}
|
|
598
578
|
|
|
599
|
-
serialize.parseError = (error: unknown) =>
|
|
600
|
-
/* v8 ignore next */
|
|
601
|
-
error as serialize.ErrorType
|
|
602
|
-
|
|
603
579
|
/**
|
|
604
580
|
* Validates a {@link ox#TransactionEnvelopeEip7702.TransactionEnvelopeEip7702}. Returns `true` if the envelope is valid, `false` otherwise.
|
|
605
581
|
*
|
|
@@ -633,7 +609,3 @@ export function validate(
|
|
|
633
609
|
export declare namespace validate {
|
|
634
610
|
type ErrorType = Errors.GlobalErrorType
|
|
635
611
|
}
|
|
636
|
-
|
|
637
|
-
validate.parseError = (error: unknown) =>
|
|
638
|
-
/* v8 ignore next */
|
|
639
|
-
error as validate.ErrorType
|
|
@@ -79,10 +79,6 @@ export declare namespace assert {
|
|
|
79
79
|
| Errors.GlobalErrorType
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
assert.parseError = (error: unknown) =>
|
|
83
|
-
/* v8 ignore next */
|
|
84
|
-
error as assert.ErrorType
|
|
85
|
-
|
|
86
82
|
/**
|
|
87
83
|
* Deserializes a {@link ox#TransactionEnvelopeLegacy.TransactionEnvelopeLegacy} from its serialized form.
|
|
88
84
|
*
|
|
@@ -175,10 +171,6 @@ export declare namespace deserialize {
|
|
|
175
171
|
type ErrorType = Errors.GlobalErrorType
|
|
176
172
|
}
|
|
177
173
|
|
|
178
|
-
deserialize.parseError = (error: unknown) =>
|
|
179
|
-
/* v8 ignore next */
|
|
180
|
-
error as deserialize.ErrorType
|
|
181
|
-
|
|
182
174
|
/**
|
|
183
175
|
* Converts an arbitrary transaction object into a legacy Transaction Envelope.
|
|
184
176
|
*
|
|
@@ -319,10 +311,6 @@ export declare namespace from {
|
|
|
319
311
|
| Errors.GlobalErrorType
|
|
320
312
|
}
|
|
321
313
|
|
|
322
|
-
from.parseError = (error: unknown) =>
|
|
323
|
-
/* v8 ignore next */
|
|
324
|
-
error as from.ErrorType
|
|
325
|
-
|
|
326
314
|
/**
|
|
327
315
|
* Returns the payload to sign for a {@link ox#TransactionEnvelopeLegacy.TransactionEnvelopeLegacy}.
|
|
328
316
|
*
|
|
@@ -363,10 +351,6 @@ export declare namespace getSignPayload {
|
|
|
363
351
|
type ErrorType = hash.ErrorType | Errors.GlobalErrorType
|
|
364
352
|
}
|
|
365
353
|
|
|
366
|
-
getSignPayload.parseError = (error: unknown) =>
|
|
367
|
-
/* v8 ignore next */
|
|
368
|
-
error as getSignPayload.ErrorType
|
|
369
|
-
|
|
370
354
|
/**
|
|
371
355
|
* Hashes a {@link ox#TransactionEnvelopeLegacy.TransactionEnvelopeLegacy}. This is the "transaction hash".
|
|
372
356
|
*
|
|
@@ -431,10 +415,6 @@ export declare namespace hash {
|
|
|
431
415
|
| Errors.GlobalErrorType
|
|
432
416
|
}
|
|
433
417
|
|
|
434
|
-
hash.parseError = (error: unknown) =>
|
|
435
|
-
/* v8 ignore next */
|
|
436
|
-
error as hash.ErrorType
|
|
437
|
-
|
|
438
418
|
/**
|
|
439
419
|
* Serializes a {@link ox#TransactionEnvelopeLegacy.TransactionEnvelopeLegacy}.
|
|
440
420
|
*
|
|
@@ -565,10 +545,6 @@ export declare namespace serialize {
|
|
|
565
545
|
| Errors.GlobalErrorType
|
|
566
546
|
}
|
|
567
547
|
|
|
568
|
-
serialize.parseError = (error: unknown) =>
|
|
569
|
-
/* v8 ignore next */
|
|
570
|
-
error as serialize.ErrorType
|
|
571
|
-
|
|
572
548
|
/**
|
|
573
549
|
* Converts an {@link ox#TransactionEnvelopeLegacy.TransactionEnvelopeLegacy} to an {@link ox#TransactionEnvelopeLegacy.Rpc}.
|
|
574
550
|
*
|
|
@@ -632,10 +608,6 @@ export declare namespace toRpc {
|
|
|
632
608
|
export type ErrorType = Signature.extract.ErrorType | Errors.GlobalErrorType
|
|
633
609
|
}
|
|
634
610
|
|
|
635
|
-
toRpc.parseError = (error: unknown) =>
|
|
636
|
-
/* v8 ignore next */
|
|
637
|
-
error as toRpc.ErrorType
|
|
638
|
-
|
|
639
611
|
/**
|
|
640
612
|
* Validates a {@link ox#TransactionEnvelopeLegacy.TransactionEnvelopeLegacy}. Returns `true` if the envelope is valid, `false` otherwise.
|
|
641
613
|
*
|
|
@@ -668,7 +640,3 @@ export function validate(
|
|
|
668
640
|
export declare namespace validate {
|
|
669
641
|
type ErrorType = Errors.GlobalErrorType
|
|
670
642
|
}
|
|
671
|
-
|
|
672
|
-
validate.parseError = (error: unknown) =>
|
|
673
|
-
/* v8 ignore next */
|
|
674
|
-
error as validate.ErrorType
|
|
@@ -249,10 +249,6 @@ export declare namespace fromRpc {
|
|
|
249
249
|
export type ErrorType = Log.fromRpc.ErrorType | Errors.GlobalErrorType
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
fromRpc.parseError = (error: unknown) =>
|
|
253
|
-
/* v8 ignore next */
|
|
254
|
-
error as fromRpc.ErrorType
|
|
255
|
-
|
|
256
252
|
/**
|
|
257
253
|
* Converts a {@link ox#TransactionReceipt.TransactionReceipt} to a {@link ox#TransactionReceipt.Rpc}.
|
|
258
254
|
*
|
|
@@ -335,7 +331,3 @@ export function toRpc(receipt: TransactionReceipt): Rpc {
|
|
|
335
331
|
export declare namespace toRpc {
|
|
336
332
|
export type ErrorType = Hex.fromNumber.ErrorType | Errors.GlobalErrorType
|
|
337
333
|
}
|
|
338
|
-
|
|
339
|
-
toRpc.parseError = (error: unknown) =>
|
|
340
|
-
/* v8 ignore next */
|
|
341
|
-
error as toRpc.ErrorType
|
package/core/TypedData.ts
CHANGED
|
@@ -157,7 +157,10 @@ export function assert<
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
// Validate domain types.
|
|
160
|
-
if (types.EIP712Domain && domain)
|
|
160
|
+
if (types.EIP712Domain && domain) {
|
|
161
|
+
if (typeof domain !== 'object') throw new InvalidDomainError({ domain })
|
|
162
|
+
validateData(types.EIP712Domain, domain)
|
|
163
|
+
}
|
|
161
164
|
|
|
162
165
|
// Validate message types.
|
|
163
166
|
if (primaryType !== 'EIP712Domain') {
|
|
@@ -181,10 +184,6 @@ export declare namespace assert {
|
|
|
181
184
|
| Errors.GlobalErrorType
|
|
182
185
|
}
|
|
183
186
|
|
|
184
|
-
assert.parseError = (error: unknown) =>
|
|
185
|
-
/* v8 ignore next */
|
|
186
|
-
error as assert.ErrorType
|
|
187
|
-
|
|
188
187
|
/**
|
|
189
188
|
* Creates [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) [`domainSeparator`](https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator) for the provided domain.
|
|
190
189
|
*
|
|
@@ -214,10 +213,6 @@ export declare namespace domainSeparator {
|
|
|
214
213
|
type ErrorType = hashDomain.ErrorType | Errors.GlobalErrorType
|
|
215
214
|
}
|
|
216
215
|
|
|
217
|
-
domainSeparator.parseError = (error: unknown) =>
|
|
218
|
-
/* v8 ignore next */
|
|
219
|
-
error as domainSeparator.ErrorType
|
|
220
|
-
|
|
221
216
|
/**
|
|
222
217
|
* Encodes typed data in [EIP-712 format](https://eips.ethereum.org/EIPS/eip-712): `0x19 ‖ 0x01 ‖ domainSeparator ‖ hashStruct(message)`.
|
|
223
218
|
*
|
|
@@ -320,9 +315,6 @@ export declare namespace encode {
|
|
|
320
315
|
| Errors.GlobalErrorType
|
|
321
316
|
}
|
|
322
317
|
|
|
323
|
-
/* v8 ignore next */
|
|
324
|
-
encode.parseError = (error: unknown) => error as encode.ErrorType
|
|
325
|
-
|
|
326
318
|
/**
|
|
327
319
|
* Encodes [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) schema for the provided primaryType.
|
|
328
320
|
*
|
|
@@ -372,9 +364,6 @@ export declare namespace encodeType {
|
|
|
372
364
|
type ErrorType = findTypeDependencies.ErrorType | Errors.GlobalErrorType
|
|
373
365
|
}
|
|
374
366
|
|
|
375
|
-
/* v8 ignore next */
|
|
376
|
-
encodeType.parseError = (error: unknown) => error as encodeType.ErrorType
|
|
377
|
-
|
|
378
367
|
/**
|
|
379
368
|
* Gets [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) schema for EIP-721 domain.
|
|
380
369
|
*
|
|
@@ -421,10 +410,6 @@ export declare namespace extractEip712DomainTypes {
|
|
|
421
410
|
type ErrorType = Errors.GlobalErrorType
|
|
422
411
|
}
|
|
423
412
|
|
|
424
|
-
extractEip712DomainTypes.parseError = (error: unknown) =>
|
|
425
|
-
/* v8 ignore next */
|
|
426
|
-
error as extractEip712DomainTypes.ErrorType
|
|
427
|
-
|
|
428
413
|
/**
|
|
429
414
|
* Gets the payload to use for signing typed data in [EIP-712 format](https://eips.ethereum.org/EIPS/eip-712).
|
|
430
415
|
*
|
|
@@ -484,10 +469,6 @@ export declare namespace getSignPayload {
|
|
|
484
469
|
| Errors.GlobalErrorType
|
|
485
470
|
}
|
|
486
471
|
|
|
487
|
-
getSignPayload.parseError = (error: unknown) =>
|
|
488
|
-
/* v8 ignore next */
|
|
489
|
-
error as getSignPayload.ErrorType
|
|
490
|
-
|
|
491
472
|
/**
|
|
492
473
|
* Hashes [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) domain.
|
|
493
474
|
*
|
|
@@ -537,9 +518,6 @@ export declare namespace hashDomain {
|
|
|
537
518
|
type ErrorType = hashStruct.ErrorType | Errors.GlobalErrorType
|
|
538
519
|
}
|
|
539
520
|
|
|
540
|
-
/* v8 ignore next */
|
|
541
|
-
hashDomain.parseError = (error: unknown) => error as hashDomain.ErrorType
|
|
542
|
-
|
|
543
521
|
/**
|
|
544
522
|
* Hashes [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) struct.
|
|
545
523
|
*
|
|
@@ -594,9 +572,6 @@ export declare namespace hashStruct {
|
|
|
594
572
|
| Errors.GlobalErrorType
|
|
595
573
|
}
|
|
596
574
|
|
|
597
|
-
/* v8 ignore next */
|
|
598
|
-
hashStruct.parseError = (error: unknown) => error as hashStruct.ErrorType
|
|
599
|
-
|
|
600
575
|
/**
|
|
601
576
|
* Serializes [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) schema into string.
|
|
602
577
|
*
|
|
@@ -655,9 +630,9 @@ export function serialize<
|
|
|
655
630
|
}
|
|
656
631
|
|
|
657
632
|
const domain = (() => {
|
|
658
|
-
if (!types.EIP712Domain) return {}
|
|
659
633
|
if (!domain_) return {}
|
|
660
|
-
|
|
634
|
+
const type = types.EIP712Domain ?? extractEip712DomainTypes(domain_)
|
|
635
|
+
return normalizeData(type, domain_)
|
|
661
636
|
})()
|
|
662
637
|
|
|
663
638
|
const message = (() => {
|
|
@@ -681,10 +656,6 @@ export declare namespace serialize {
|
|
|
681
656
|
type ErrorType = Json.stringify.ErrorType | Errors.GlobalErrorType
|
|
682
657
|
}
|
|
683
658
|
|
|
684
|
-
serialize.parseError = (error: unknown) =>
|
|
685
|
-
/* v8 ignore next */
|
|
686
|
-
error as serialize.ErrorType
|
|
687
|
-
|
|
688
659
|
/**
|
|
689
660
|
* Checks if [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) is valid.
|
|
690
661
|
*
|
|
@@ -734,9 +705,6 @@ export declare namespace validate {
|
|
|
734
705
|
type ErrorType = assert.ErrorType | Errors.GlobalErrorType
|
|
735
706
|
}
|
|
736
707
|
|
|
737
|
-
/* v8 ignore next */
|
|
738
|
-
validate.parseError = (error: unknown) => error as validate.ErrorType
|
|
739
|
-
|
|
740
708
|
/** Thrown when the bytes size of a typed data value does not match the expected size. */
|
|
741
709
|
export class BytesSizeMismatchError extends Errors.BaseError {
|
|
742
710
|
override readonly name = 'TypedData.BytesSizeMismatchError'
|
|
@@ -749,6 +717,17 @@ export class BytesSizeMismatchError extends Errors.BaseError {
|
|
|
749
717
|
}
|
|
750
718
|
}
|
|
751
719
|
|
|
720
|
+
/** Thrown when the domain is invalid. */
|
|
721
|
+
export class InvalidDomainError extends Errors.BaseError {
|
|
722
|
+
override readonly name = 'TypedData.InvalidDomainError'
|
|
723
|
+
|
|
724
|
+
constructor({ domain }: { domain: unknown }) {
|
|
725
|
+
super(`Invalid domain "${Json.stringify(domain)}".`, {
|
|
726
|
+
metaMessages: ['Must be a valid EIP-712 domain.'],
|
|
727
|
+
})
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
|
|
752
731
|
/** Thrown when the primary type of a typed data value is invalid. */
|
|
753
732
|
export class InvalidPrimaryTypeError extends Errors.BaseError {
|
|
754
733
|
override readonly name = 'TypedData.InvalidPrimaryTypeError'
|
package/core/ValidatorData.ts
CHANGED
|
@@ -45,9 +45,6 @@ export declare namespace encode {
|
|
|
45
45
|
| Errors.GlobalErrorType
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
/* v8 ignore next */
|
|
49
|
-
encode.parseError = (error: unknown) => error as encode.ErrorType
|
|
50
|
-
|
|
51
48
|
/**
|
|
52
49
|
* Gets the payload to use for signing [ERC-191 formatted](https://eips.ethereum.org/EIPS/eip-191#0x00) data with an intended validator.
|
|
53
50
|
*
|
|
@@ -81,7 +78,3 @@ export declare namespace getSignPayload {
|
|
|
81
78
|
| encode.ErrorType
|
|
82
79
|
| Errors.GlobalErrorType
|
|
83
80
|
}
|
|
84
|
-
|
|
85
|
-
/* v8 ignore next */
|
|
86
|
-
getSignPayload.parseError = (error: unknown) =>
|
|
87
|
-
error as getSignPayload.ErrorType
|
package/core/Value.ts
CHANGED
|
@@ -46,9 +46,6 @@ export declare namespace format {
|
|
|
46
46
|
type ErrorType = Errors.GlobalErrorType
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
/* v8 ignore next */
|
|
50
|
-
format.parseError = (error: unknown) => error as format.ErrorType
|
|
51
|
-
|
|
52
49
|
/**
|
|
53
50
|
* Formats a `bigint` Value (default: wei) to a string representation of Ether.
|
|
54
51
|
*
|
|
@@ -75,9 +72,6 @@ export declare namespace formatEther {
|
|
|
75
72
|
type ErrorType = format.ErrorType | Errors.GlobalErrorType
|
|
76
73
|
}
|
|
77
74
|
|
|
78
|
-
/* v8 ignore next */
|
|
79
|
-
formatEther.parseError = (error: unknown) => error as formatEther.ErrorType
|
|
80
|
-
|
|
81
75
|
/**
|
|
82
76
|
* Formats a `bigint` Value (default: wei) to a string representation of Gwei.
|
|
83
77
|
*
|
|
@@ -101,9 +95,6 @@ export declare namespace formatGwei {
|
|
|
101
95
|
type ErrorType = format.ErrorType | Errors.GlobalErrorType
|
|
102
96
|
}
|
|
103
97
|
|
|
104
|
-
/* v8 ignore next */
|
|
105
|
-
formatGwei.parseError = (error: unknown) => error as formatGwei.ErrorType
|
|
106
|
-
|
|
107
98
|
/**
|
|
108
99
|
* Parses a `string` representation of a Value to `bigint` (multiplied by the given exponent).
|
|
109
100
|
*
|
|
@@ -165,9 +156,6 @@ export declare namespace from {
|
|
|
165
156
|
type ErrorType = Errors.GlobalErrorType
|
|
166
157
|
}
|
|
167
158
|
|
|
168
|
-
/* v8 ignore next */
|
|
169
|
-
from.parseError = (error: unknown) => error as from.ErrorType
|
|
170
|
-
|
|
171
159
|
/**
|
|
172
160
|
* Parses a string representation of Ether to a `bigint` Value (default: wei).
|
|
173
161
|
*
|
|
@@ -194,9 +182,6 @@ export declare namespace fromEther {
|
|
|
194
182
|
type ErrorType = from.ErrorType | Errors.GlobalErrorType
|
|
195
183
|
}
|
|
196
184
|
|
|
197
|
-
/* v8 ignore next */
|
|
198
|
-
fromEther.parseError = (error: unknown) => error as fromEther.ErrorType
|
|
199
|
-
|
|
200
185
|
/**
|
|
201
186
|
* Parses a string representation of Gwei to a `bigint` Value (default: wei).
|
|
202
187
|
*
|
|
@@ -220,9 +205,6 @@ export declare namespace fromGwei {
|
|
|
220
205
|
type ErrorType = from.ErrorType | Errors.GlobalErrorType
|
|
221
206
|
}
|
|
222
207
|
|
|
223
|
-
/* v8 ignore next */
|
|
224
|
-
fromGwei.parseError = (error: unknown) => error as fromGwei.ErrorType
|
|
225
|
-
|
|
226
208
|
/**
|
|
227
209
|
* Thrown when a value is not a valid decimal number.
|
|
228
210
|
*
|
package/core/WebAuthnP256.ts
CHANGED
|
@@ -104,10 +104,6 @@ export declare namespace createCredential {
|
|
|
104
104
|
| Errors.GlobalErrorType
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
createCredential.parseError = (error: unknown) =>
|
|
108
|
-
/* v8 ignore next */
|
|
109
|
-
error as createCredential.ErrorType
|
|
110
|
-
|
|
111
107
|
/**
|
|
112
108
|
* Gets the authenticator data which contains information about the
|
|
113
109
|
* processing of an authenticator request (ie. from `WebAuthnP256.sign`).
|
|
@@ -158,10 +154,6 @@ export declare namespace getAuthenticatorData {
|
|
|
158
154
|
type ErrorType = Errors.GlobalErrorType
|
|
159
155
|
}
|
|
160
156
|
|
|
161
|
-
getAuthenticatorData.parseError = (error: unknown) =>
|
|
162
|
-
/* v8 ignore next */
|
|
163
|
-
error as getAuthenticatorData.ErrorType
|
|
164
|
-
|
|
165
157
|
/**
|
|
166
158
|
* Constructs the Client Data in stringified JSON format which represents client data that
|
|
167
159
|
* was passed to `credentials.get()` in {@link ox#WebAuthnP256.(sign:function)}.
|
|
@@ -221,10 +213,6 @@ export declare namespace getClientDataJSON {
|
|
|
221
213
|
type ErrorType = Errors.GlobalErrorType
|
|
222
214
|
}
|
|
223
215
|
|
|
224
|
-
getClientDataJSON.parseError = (error: unknown) =>
|
|
225
|
-
/* v8 ignore next */
|
|
226
|
-
error as getClientDataJSON.ErrorType
|
|
227
|
-
|
|
228
216
|
/**
|
|
229
217
|
* Returns the creation options for a P256 WebAuthn Credential to be used with
|
|
230
218
|
* the Web Authentication API.
|
|
@@ -363,10 +351,6 @@ export declare namespace getCredentialCreationOptions {
|
|
|
363
351
|
| Errors.GlobalErrorType
|
|
364
352
|
}
|
|
365
353
|
|
|
366
|
-
getCredentialCreationOptions.parseError = (error: unknown) =>
|
|
367
|
-
/* v8 ignore next */
|
|
368
|
-
error as getCredentialCreationOptions.ErrorType
|
|
369
|
-
|
|
370
354
|
/**
|
|
371
355
|
* Returns the request options to sign a challenge with the Web Authentication API.
|
|
372
356
|
*
|
|
@@ -432,9 +416,6 @@ export declare namespace getCredentialRequestOptions {
|
|
|
432
416
|
| Errors.GlobalErrorType
|
|
433
417
|
}
|
|
434
418
|
|
|
435
|
-
getCredentialRequestOptions.parseError = (error: unknown) =>
|
|
436
|
-
error as getCredentialRequestOptions.ErrorType
|
|
437
|
-
|
|
438
419
|
/**
|
|
439
420
|
* Constructs the final digest that was signed and computed by the authenticator. This payload includes
|
|
440
421
|
* the cryptographic `challenge`, as well as authenticator metadata (`authenticatorData` + `clientDataJSON`).
|
|
@@ -559,10 +540,6 @@ export declare namespace getSignPayload {
|
|
|
559
540
|
| Errors.GlobalErrorType
|
|
560
541
|
}
|
|
561
542
|
|
|
562
|
-
getSignPayload.parseError = (error: unknown) =>
|
|
563
|
-
/* v8 ignore next */
|
|
564
|
-
error as getSignPayload.ErrorType
|
|
565
|
-
|
|
566
543
|
/**
|
|
567
544
|
* Signs a challenge using a stored WebAuthn P256 Credential. If no Credential is provided,
|
|
568
545
|
* a prompt will be displayed for the user to select an existing Credential
|
|
@@ -666,10 +643,6 @@ export declare namespace sign {
|
|
|
666
643
|
| Errors.GlobalErrorType
|
|
667
644
|
}
|
|
668
645
|
|
|
669
|
-
sign.parseError = (error: unknown) =>
|
|
670
|
-
/* v8 ignore next */
|
|
671
|
-
error as sign.ErrorType
|
|
672
|
-
|
|
673
646
|
/**
|
|
674
647
|
* Verifies a signature using the Credential's public key and the challenge which was signed.
|
|
675
648
|
*
|
|
@@ -778,10 +751,6 @@ export declare namespace verify {
|
|
|
778
751
|
| Errors.GlobalErrorType
|
|
779
752
|
}
|
|
780
753
|
|
|
781
|
-
verify.parseError = (error: unknown) =>
|
|
782
|
-
/* v8 ignore next */
|
|
783
|
-
error as verify.ErrorType
|
|
784
|
-
|
|
785
754
|
/** Thrown when a WebAuthn P256 credential creation fails. */
|
|
786
755
|
export class CredentialCreationFailedError extends Errors.BaseError<Error> {
|
|
787
756
|
override readonly name = 'WebAuthnP256.CredentialCreationFailedError'
|
package/core/WebCryptoP256.ts
CHANGED
|
@@ -68,10 +68,6 @@ export declare namespace createKeyPair {
|
|
|
68
68
|
type ErrorType = PublicKey.from.ErrorType | Errors.GlobalErrorType
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
createKeyPair.parseError = (error: unknown) =>
|
|
72
|
-
/* v8 ignore next */
|
|
73
|
-
error as createKeyPair.ErrorType
|
|
74
|
-
|
|
75
71
|
/**
|
|
76
72
|
* Signs a payload with the provided `CryptoKey` private key and returns a P256 signature.
|
|
77
73
|
*
|
|
@@ -124,10 +120,6 @@ export declare namespace sign {
|
|
|
124
120
|
type ErrorType = Bytes.fromArray.ErrorType | Errors.GlobalErrorType
|
|
125
121
|
}
|
|
126
122
|
|
|
127
|
-
sign.parseError = (error: unknown) =>
|
|
128
|
-
/* v8 ignore next */
|
|
129
|
-
error as sign.ErrorType
|
|
130
|
-
|
|
131
123
|
/**
|
|
132
124
|
* Verifies a payload was signed by the provided public key.
|
|
133
125
|
*
|
|
@@ -184,7 +176,3 @@ export declare namespace verify {
|
|
|
184
176
|
|
|
185
177
|
type ErrorType = Errors.GlobalErrorType
|
|
186
178
|
}
|
|
187
|
-
|
|
188
|
-
verify.parseError = (error: unknown) =>
|
|
189
|
-
/* v8 ignore next */
|
|
190
|
-
error as verify.ErrorType
|
package/core/Withdrawal.ts
CHANGED
|
@@ -49,10 +49,6 @@ export declare namespace fromRpc {
|
|
|
49
49
|
export type ErrorType = Errors.GlobalErrorType
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
fromRpc.parseError = (error: unknown) =>
|
|
53
|
-
/* v8 ignore next */
|
|
54
|
-
error as fromRpc.ErrorType
|
|
55
|
-
|
|
56
52
|
/**
|
|
57
53
|
* Converts a {@link ox#Withdrawal.Withdrawal} to an {@link ox#Withdrawal.Rpc}.
|
|
58
54
|
*
|
|
@@ -89,7 +85,3 @@ export function toRpc(withdrawal: Withdrawal): Rpc {
|
|
|
89
85
|
export declare namespace toRpc {
|
|
90
86
|
export type ErrorType = Errors.GlobalErrorType
|
|
91
87
|
}
|
|
92
|
-
|
|
93
|
-
toRpc.parseError = (error: unknown) =>
|
|
94
|
-
/* v8 ignore next */
|
|
95
|
-
error as toRpc.ErrorType
|