You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

protocol.constants.ts 767B

1234567891011121314
  1. export const MSG_DELIM: string = ' '
  2. export const MSG_DATA_MAX: number = 925
  3. export const PUBKEY_LEN: number = 66
  4. export const NON_ZERO_TX_HASH = new RegExp(`[0-9A-F]{64}`)
  5. export const PTR_FORMAT = new RegExp(`^((${NON_ZERO_TX_HASH.source})|0)`)
  6. export const DATA_FORMAT = new RegExp(`(.{1,${MSG_DATA_MAX}})`)
  7. export const SIGNATURE_FORMAT = new RegExp(`(\\S{140}|\\S{142})$`)
  8. export const SIGNER_FORMAT = new RegExp(`(\\S{${PUBKEY_LEN}})`)
  9. export const MSG_FORMAT = new RegExp(`${PTR_FORMAT.source}${MSG_DELIM}${DATA_FORMAT.source}`, 'm')
  10. export const AMOUNT_DECIMALS = 18
  11. export const MAX_SUPPLY = 20_000_000
  12. export const AMOUNT_FORMAT = new RegExp(`\d+(\.\d{1,${AMOUNT_DECIMALS}})?`)
  13. export const MIN_XRP_FEE = "0.00001"
  14. export const MIN_XRP_TX_VALUE = "0.000001"