mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-28 16:15:49 +00:00
The documentation previously just stated that any array of integers was acceptable for providing as entropy, but it must be an array of length 16 where the values are from 0-255 (uint8) to ensure we have 16 bytes of entropy.
38 lines
1.4 KiB
JSON
38 lines
1.4 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
"title": "generateAddressParameters",
|
|
"type": "object",
|
|
"properties": {
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options to control how the address and secret are generated.",
|
|
"properties": {
|
|
"entropy": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 255
|
|
},
|
|
"description": "The entropy to use to generate the seed. Must be an array of length 16 with values from 0-255 (16 bytes of entropy)"
|
|
},
|
|
"algorithm": {
|
|
"type": "string",
|
|
"enum": ["ecdsa-secp256k1", "ed25519"],
|
|
"description": "The digital signature algorithm to generate an address for. Can be `ecdsa-secp256k1` (default) or `ed25519`."
|
|
},
|
|
"test": {
|
|
"type": "boolean",
|
|
"description": "Specifies whether the address is intended for use on a test network such as Testnet or Devnet. If `true`, the address should only be used for testing, and will start with `T`. If `false`, the address should only be used on mainnet, and will start with `X`."
|
|
},
|
|
"includeClassicAddress": {
|
|
"type": "boolean",
|
|
"description": "If `true`, return the classic address, in addition to the X-address."
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|