| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa
Contents
Description
Version information and shared operation errors. Import domain modules
qualified, for example Cometa.Crypto.Blake2b as Blake2b.
import qualified Cometa main :: IO () main = Cometa.nativeVersion >>= print
Synopsis
- nativeVersion :: IO Text
- data Error
- = NativeError !Text !ErrorCode !Text
- | InvalidBuildingRequest !Text
- | InvalidTransactionPlan !Text
- | InvalidSlotConfig !Text
- | InvalidHashLength !Int
- | EmptyHash
- | InvalidHex
- | SigningKeyClosed
- | InvalidEd25519SigningKeyLength !Int !Int
- | KeyHandlerClosed
- | KeyHandlerBusy
- | InvalidKeyHandlerPasswordLength !Int
- | InvalidKeyHandlerStorage
- | InvalidEd25519PublicKeyLength !Int
- | InvalidEd25519SignatureLength !Int
- | Bip32PrivateKeyClosed
- | InvalidBip32PrivateKeyLength !Int
- | InvalidBip32PublicKeyLength !Int
- | InvalidBip39EntropyLength !Int
- | InvalidBip39WordCount !Int
- | InvalidBip39Word !Int
- | UnknownBip39Word
- | InvalidBip39Checksum
- | EmptyPbkdf2Salt
- | InvalidPbkdf2Iterations !Integer
- | InvalidPbkdf2OutputLength !Integer
- | InvalidEmip3PlaintextLength !Int
- | InvalidEmip3EnvelopeLength !Int
- | InvalidDerivationIndex !Integer
- | HardenedPublicDerivation !Word32
- | InvalidCborInteger !Integer
- | InvalidCborUtf8
- | InvalidAssetNameLength !Int
- | InvalidAssetNameCbor !Text
- | InvalidAssetIdLength !Int
- | InvalidPolicyIdLength !Int
- | InvalidCredentialHashLength !Int
- | InvalidCredentialCbor !Text
- | InvalidHashCbor !Text
- | InvalidNetworkId !Integer
- | UnsupportedAddressType !Word8
- | InvalidShelleyAddress
- | InvalidShelleyAddressText
- | InvalidPlutusDataCbor !Text
- | InvalidMetadataInteger !Integer
- | InvalidMetadataBytesLength !Int
- | InvalidMetadataTextLength !Int
- | InvalidMetadataCbor !Text
- | DuplicateMetadataLabel !Word64
- | InvalidMetadataJson !Text
- | InvalidScriptCbor !Text
- | InvalidScriptJson !Text
- | EmptyPlutusScript
- | InvalidProtocolRational !Integer !Integer
- | InvalidIntegerRadix !Int
- | InvalidIntegerText !Text
- | InvalidModulus !Integer
- | NoModularInverse !Integer !Integer
- | InvalidProtocolDouble
- | InvalidUnitIntervalDouble
- | InvalidUnitInterval !Integer !Integer
- | InvalidExUnits !Integer !Integer
- | InvalidProtocolVersion !Integer !Integer
- | InvalidProtocolCbor !Text
- | InvalidTransactionCbor !Text
- | InvalidTransactionOutputValue !Integer
- | InvalidValueQuantity !Integer
- | InvalidValueCbor !Text
- | InvalidGovernanceActionText !Text
- | InvalidGovernanceActionTextIndex !Word64
- | InvalidDRepText !Text
- | InvalidTransactionHashLength !Int
- | InvalidTransactionField !Text
- | InvalidWitnessCbor !Text
- | InvalidRedeemerCbor !Text
- | InvalidAuxiliaryDataCbor !Text
- | InvalidBootstrapChainCodeLength !Int
- | WitnessConflict !Text
- | InvalidByronAddress !Text
- | InvalidByronAddressText
- | ProviderHttpError !Text !Int
- | ProviderTransportError !Text !Text
- | InvalidProviderResponse !Text
- | InvalidProviderConfiguration !Text
- | UnsupportedOperation !Text
- | RuntimeClosed
- | RuntimeBusy
- | InvalidCallbackResult !Text
- | InvalidParameterSnapshot !Text
- | InvalidSelectionRequest !Text
- | InvalidSelection !Text
- | InvalidEvaluationRequest !Text
- | InvalidEvaluationResult !Text
- | InvalidPoolCbor !Text
- | InvalidPoolHashLength !Int
- | InvalidPoolMetadataUrl !Text
- | InvalidPoolMetadataHashLength !Int
- | InvalidPoolDnsName !Text
- | InvalidPoolIpLength !Int !Int
- | InvalidPoolIpText !Text
- | InvalidPoolBlsKeyLength !Int !Int
- | InvalidCertificateCbor !Text
- | InvalidProposalCbor !Text
- | DuplicateTreasuryWithdrawal
- | DuplicateCommitteeMember
- | DuplicateProtocolUpdate
- | InvalidCostModelLength !Int
- | InvalidProtocolParametersCbor !Text
- | InvalidReferenceScriptCostStride !Integer
- | InvalidProtocolNonceLength !Int
- | InvalidAnchorUrlLength !Int
- | InvalidAnchorUrl
- | InvalidAnchorDataHashLength !Int
- | InvalidTransactionIdLength !Int
- | InvalidGovernanceCbor !Text
- | DuplicateGovernanceVote
- | NativeContractViolation !Text
Version information
nativeVersion :: IO Text Source #
Return the version of cardano-c used by the running application. This is independent of the Cometa.hs package version.
Errors
Expected failures returned by Cometa operations. Equality compares every
payload, including diagnostic text. Show is diagnostic output.
Constructors
| NativeError | An operation failed with a cardano-c status code. Unknown numeric codes
remain available through |
| InvalidBuildingRequest !Text | A transaction-building request has invalid context or inconsistent inputs. |
| InvalidTransactionPlan !Text | Transaction requirements conflict or cannot form a valid build request. |
| InvalidSlotConfig !Text | A slot configuration or conversion is outside its supported time range. |
| InvalidHashLength | The requested BLAKE2b digest length is outside 16 through 64 bytes. |
Fields
| |
| EmptyHash | The digest byte sequence is empty. |
| InvalidHex | Hexadecimal input is empty, has an odd number of digits, or contains characters other than ASCII hexadecimal digits. Both cases are accepted. |
| SigningKeyClosed | An Ed25519 signing-key operation used a handle that has been closed. |
| InvalidEd25519SigningKeyLength | An Ed25519 signing-key input has the wrong byte length for its format. |
| KeyHandlerClosed | A software key handler has closed. |
| KeyHandlerBusy | A software key handler already has an active operation. |
| InvalidKeyHandlerPasswordLength !Int | A software handler password is outside 1 through 128 bytes. |
| InvalidKeyHandlerStorage | Software storage framing, type or secret length is invalid. |
| InvalidEd25519PublicKeyLength | An Ed25519 public key does not contain exactly 32 bytes. |
Fields
| |
| InvalidEd25519SignatureLength | An Ed25519 signature does not contain exactly 64 bytes. |
Fields
| |
| Bip32PrivateKeyClosed | A BIP32 private-key handle has closed. |
| InvalidBip32PrivateKeyLength | A BIP32 private key must contain exactly 96 bytes. |
Fields
| |
| InvalidBip32PublicKeyLength | A BIP32 public key must contain exactly 64 bytes. |
Fields
| |
| InvalidBip39EntropyLength | BIP39 entropy must contain 16, 20, 24, 28 or 32 bytes. |
Fields
| |
| InvalidBip39WordCount | A mnemonic requires 12, 15, 18, 21 or 24 words. |
Fields
| |
| InvalidBip39Word | A mnemonic word is empty or contains characters outside lowercase ASCII. |
Fields
| |
| UnknownBip39Word | At least one word is absent from the English BIP39 dictionary. |
| InvalidBip39Checksum | The mnemonic checksum does not agree with its entropy. |
| EmptyPbkdf2Salt | PBKDF2 requires a nonempty salt. |
| InvalidPbkdf2Iterations | PBKDF2 iteration count is outside 1 through 4294967295 inclusive. |
Fields
| |
| InvalidPbkdf2OutputLength | PBKDF2 output byte count is outside its documented bounds. |
Fields
| |
| InvalidEmip3PlaintextLength | EMIP3 plaintext exceeds its documented size bounds. |
Fields
| |
| InvalidEmip3EnvelopeLength | EMIP3 envelope is outside its documented size bounds. |
Fields
| |
| InvalidDerivationIndex | An unencoded derivation component is outside 0 through 2147483647. |
Fields
| |
| HardenedPublicDerivation | Public derivation requires soft indices below 2^31. |
Fields
| |
| InvalidCborInteger | A CBOR integer is outside the supported primitive range, from
|
Fields
| |
| InvalidCborUtf8 | A decoded CBOR text string contains invalid UTF-8. |
| InvalidAssetNameLength !Int | A native-asset name exceeds 32 bytes. |
| InvalidAssetNameCbor !Text | Asset-name CBOR is malformed or does not contain a name of 0 through 32 bytes. |
| InvalidAssetIdLength !Int | A native-asset identity encoding does not contain 28 through 60 bytes. |
| InvalidPolicyIdLength !Int | A native-asset policy identifier does not contain exactly 28 bytes. |
| InvalidCredentialHashLength !Int | A credential hash does not contain exactly 28 bytes. |
| InvalidCredentialCbor !Text | A credential CBOR item has invalid syntax, shape or kind. |
| InvalidHashCbor !Text | A digest CBOR item has invalid syntax or is not one byte string. |
| InvalidNetworkId !Integer | A Shelley network tag is outside 0 through 15 inclusive. |
| UnsupportedAddressType !Word8 | The four-bit header selects an address form unsupported by the chosen payment-address or reward-account decoder. |
| InvalidShelleyAddress | Address bytes are empty or have an incorrect exact length. |
| InvalidShelleyAddressText | Address text is malformed, mixed-case, has an invalid checksum or bit padding, or has a prefix inconsistent with its network/address form. |
| InvalidPlutusDataCbor !Text | Plutus data CBOR is malformed or contains unsupported data forms. |
| InvalidMetadataInteger !Integer | A metadata integer is outside -2^64 through 2^64 - 1 inclusive. |
| InvalidMetadataBytesLength !Int | A metadata byte string exceeds 64 bytes. |
| InvalidMetadataTextLength !Int | A metadata text string exceeds 64 UTF-8 bytes. |
| InvalidMetadataCbor !Text | Metadata CBOR is malformed or violates metadata bounds. |
| DuplicateMetadataLabel !Word64 | A transaction metadata label occurs more than once. |
| InvalidMetadataJson !Text | Detailed metadata JSON is malformed or violates metadata bounds. |
| InvalidScriptCbor !Text | Script CBOR is malformed or has an unsupported script form. |
| InvalidScriptJson !Text | Native script construction JSON is malformed or violates script bounds. |
| EmptyPlutusScript | Compiled Plutus script bytes are empty. |
| InvalidProtocolRational !Integer !Integer | A protocol fraction has a negative or oversized component, or a zero denominator. |
| InvalidIntegerRadix !Int | An integer text radix or uppercase rendering radix is unsupported. |
| InvalidIntegerText !Text | Integer text contains invalid digits or no digits; payload is diagnostic. |
| InvalidModulus !Integer | A modular operation has a zero or otherwise unsupported modulus. |
| NoModularInverse !Integer !Integer | The given integer has no inverse for the given modulus. |
| InvalidProtocolDouble | A floating-point protocol fraction is nonfinite, negative or has an oversized whole part. |
| InvalidUnitIntervalDouble | A floating-point unit interval is nonfinite or outside zero through one. |
| InvalidUnitInterval !Integer !Integer | A unit interval fraction lies outside zero through one inclusive. |
| InvalidExUnits !Integer !Integer | An execution budget component is outside the unsigned 64-bit range. |
| InvalidProtocolVersion !Integer !Integer | A protocol version exceeds its unsigned major/minor bounds. |
| InvalidProtocolCbor !Text | A protocol value has malformed CBOR or violates its field constraints. |
| InvalidTransactionCbor !Text | Transaction CBOR is malformed or violates its field constraints. |
| InvalidTransactionOutputValue !Integer | A transaction output contains an unsupported quantity. |
| InvalidValueQuantity !Integer | A standalone value has Ada outside 0..2^63-1 or a native quantity outside int64. |
| InvalidValueCbor !Text | Standalone value CBOR is malformed or violates its quantity constraints. |
| InvalidGovernanceActionText !Text | Governance action identifier text is malformed or has an invalid prefix or payload. |
| InvalidGovernanceActionTextIndex !Word64 | An action index exceeds the one-byte CIP-129 text representation. |
| InvalidDRepText !Text | A DRep identifier has an invalid checksum, prefix, header or payload. |
| InvalidTransactionHashLength !Int | A transaction digest does not contain exactly 32 bytes. |
| InvalidTransactionField !Text | A transaction field violates its domain constraints. |
| InvalidWitnessCbor !Text | Witness CBOR is malformed or violates its field constraints. |
| InvalidRedeemerCbor !Text | Redeemer CBOR is malformed or violates its field constraints. |
| InvalidAuxiliaryDataCbor !Text | Auxiliary data CBOR is malformed or violates its field constraints. |
| InvalidBootstrapChainCodeLength !Int | A bootstrap witness chain code does not contain 32 bytes. |
| WitnessConflict !Text | Witnesses contain conflicting values for the same identity. |
| InvalidByronAddress !Text | Byron address bytes or attributes are malformed or have a bad checksum. |
| InvalidByronAddressText | Byron address text is not a valid Base58 address. |
| ProviderHttpError !Text !Int | A backend rejected an HTTP request. The payload contains the operation name and HTTP status, without response bodies or credentials. |
| ProviderTransportError !Text !Text | A backend request could not complete. The payload contains the operation name and a credential-free description of the transport failure. |
| InvalidProviderResponse !Text | A backend response violates the named operation's data contract. |
| InvalidProviderConfiguration !Text | A backend configuration is invalid. The diagnostic excludes credentials. |
| UnsupportedOperation !Text | The requested service capability is not supplied. |
| RuntimeClosed | An operation used a resource after its scope ended. |
| RuntimeBusy | An overlapping operation is already using the same resource. |
| InvalidCallbackResult !Text | An injected callback returned a result outside its contract. |
| InvalidParameterSnapshot !Text | A parameter snapshot is incomplete or outside supported bounds. |
| InvalidSelectionRequest !Text | Coin-selection inputs are inconsistent or outside supported bounds. |
| InvalidSelection !Text | A selection violates eligibility, balance or change requirements. |
| InvalidEvaluationRequest !Text | An evaluation target or resolved input snapshot is inconsistent. |
| InvalidEvaluationResult !Text | Evaluation budgets do not match the transaction's redeemer identities. |
| InvalidPoolCbor !Text | Pool CBOR is malformed or violates a field constraint. |
| InvalidPoolHashLength !Int | A pool VRF key hash does not contain 32 bytes. |
| InvalidPoolMetadataUrl !Text | A pool metadata URL violates its byte-length or NUL constraint. |
| InvalidPoolMetadataHashLength !Int | A pool metadata hash does not contain 32 bytes. |
| InvalidPoolDnsName !Text | A relay DNS name violates its byte-length or NUL constraint. |
| InvalidPoolIpLength !Int !Int | An IP address has an incorrect byte count: expected, then actual. |
| InvalidPoolIpText !Text | An IP address text representation is malformed. |
| InvalidPoolBlsKeyLength | A BLS key or possession proof has an incorrect byte count. |
| InvalidCertificateCbor !Text | A certificate has malformed CBOR or invalid fields. |
| InvalidProposalCbor !Text | A governance proposal has malformed CBOR or invalid fields. |
| DuplicateTreasuryWithdrawal | A reward account occurs more than once in treasury withdrawals. |
| DuplicateCommitteeMember | A committee credential occurs more than once. |
| DuplicateProtocolUpdate | A genesis key occurs more than once in a proposed update map. |
| InvalidCostModelLength !Int | A cost model contains an unsupported number of coefficients. |
| InvalidProtocolParametersCbor !Text | A parameter update has malformed CBOR or invalid fields. |
| InvalidReferenceScriptCostStride !Integer | A reference script cost stride is outside 1 through 4294967295 bytes. |
| InvalidProtocolNonceLength !Int | A nonneutral protocol nonce does not contain exactly 32 bytes. |
| InvalidAnchorUrlLength !Int | An anchor URL is outside 1 through 128 UTF-8 bytes. |
| InvalidAnchorUrl | An anchor URL contains a NUL character. |
| InvalidAnchorDataHashLength !Int | An anchor data digest does not contain exactly 32 bytes. |
| InvalidTransactionIdLength !Int | A transaction identifier does not contain exactly 32 bytes. |
| InvalidGovernanceCbor !Text | Governance CBOR is malformed or violates the selected value's schema. |
| DuplicateGovernanceVote | A voter/action pair is present more than once. |
| NativeContractViolation | An operation reported success but did not produce a valid result. |
Fields
| |