UNPKG

@webwallet/schemas

Version:

Object schemas for transaction data validation.

162 lines (161 loc) 2.71 kB
{ "counters": {}, "items": { "transaction": { "unitsOfAccount": { "min": 1, "max": 1 } } }, "lengths": { "crypto": { "unitOfAccount": { "min": 26, "max": 35 } } }, "math": { "bignumber": { "length": { "integer": 101, "fractional": 101 }, "regex": { "decimal": { "integer": { "positive": "^[+]?[0-9]+$", "negative": "^-[0-9]+$", "signed": "^[-+]?[0-9]+$" }, "fractional": { "positive": "^[+]?[0-9]+(.[0-9]+)?$", "negative": "^-[0-9]+(.[0-9]+)?$", "signed": "^[-+]?[0-9]+(.[0-9]+)?$" } } } } }, "crypto": { "address": { "derivation": [ "sha256:ripemd160" ], "keys": { "array": { "max": 1 } }, "length": { "min": 26, "max": 35 } }, "hash": { "algorithms": [ "sha256", "sha256:sha256" ], "generation": [ "stringify:data", "merkle:data.inputs.hash.value" ], "length" : { "min": 64, "max": 64 } }, "publicKey": { "length": { "min": 64, "max": 130 } }, "signature": { "schemes": [ "ecdsa-ed25519", "eddsa-ed25519" ], "array": { "min": 0, "max": 2 }, "length": { "min": 128, "max": 140 } } }, "transaction": { "address": { "identities": { "array": { "min": 1 } } }, "events": { "array": { "min": 0, "max": 1 } }, "request": { "iou": { "domain": { "max": 100 }, "random": { "max": 100 }, "custom": { "keys": { "max": 10 } }, "solver": { "hashee": { "min": 1, "max": 100 } } }, "inputs": { "array": { "min": 1, "max": 100 } } }, "record": { "inputs": { "array": { "min": 1, "max": 100 } }, "outputs": { "array": { "min": 2, "max": 101 } }, "pointer": { "array": { "min": 0, "max": 10 }, "length": { "min": 67, "max": 67 }, "regex": "^([0-9a-fA-F]{2})+::[0-9]{1}$" } } }, "regex": { "base58": "^[1-9A-HJ-NP-Za-km-z]+$" } }