This commit is contained in:
nitowa
2023-08-15 22:28:03 +02:00
commit 1dae68b1c7
5529 changed files with 1659171 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
export const MSG_DELIM: string = ' '
export const MSG_DATA_MAX: number = 925
export const PUBKEY_LEN: number = 66
export const NON_ZERO_TX_HASH = new RegExp(`[0-9A-F]{64}`)
export const PTR_FORMAT = new RegExp(`^((${NON_ZERO_TX_HASH.source})|0)`)
export const DATA_FORMAT = new RegExp(`(.{1,${MSG_DATA_MAX}})`)
export const SIGNATURE_FORMAT = new RegExp(`(\\S{140}|\\S{142})$`)
export const SIGNER_FORMAT = new RegExp(`(\\S{${PUBKEY_LEN}})`)
export const MSG_FORMAT = new RegExp(`${PTR_FORMAT.source}${MSG_DELIM}${DATA_FORMAT.source}`, 'm')
export const AMOUNT_DECIMALS = 18
export const MAX_SUPPLY = 20_000_000
export const AMOUNT_FORMAT = new RegExp(`\d+(\.\d{1,${AMOUNT_DECIMALS}})?`)
export const MIN_XRP_FEE = "0.00001"
export const MIN_XRP_TX_VALUE = "0.000001"
export const XRP_ADDRESS = new RegExp(`^([r])([1-9A-HJ-NP-Za-km-z]{24,34})`)