import { Models } from '@open-rights-exchange/chain-js' // sign transaction default parameters export const DEFAULT_TRANSACTION_EXPIRY_IN_SECONDS = 300 // 5 minutes export const DEFAULT_TRANSACTION_BLOCKS_BEHIND_REF_BLOCK = 3 export const TRANSACTION_ENCODING = 'utf8' export const CHAIN_BLOCK_FREQUENCY = 0.5 // time between blocks produced in seconds export const ACCOUNT_NAME_MAX_LENGTH = 12 /** number of chain blocks to poll after submitting a transaction before failing */ export const DEFAULT_BLOCKS_TO_CHECK = 20 /** time to wait (in ms) between checking chain for a new block (to see if transaction appears within it) */ export const DEFAULT_CHECK_INTERVAL = 500 /** number of times to attempt to read a chain endpoint before failing the read */ export const DEFAULT_GET_BLOCK_ATTEMPTS = 10 /** default prefix for an autogenerate account name */ export const DEFAULT_ACCOUNT_NAME_PREFIX = '' export const DEFAULT_CREATEESCROW_CONTRACT = 'createescrow' export const DEFAULT_ORE_ACCOUNT_TIER = 1 export const DEFAULT_CREATEESCROW_APPNAME = 'free' // The symbol for the native token/currency on the chain export const NATIVE_CHAIN_TOKEN_SYMBOL = 'EOS' /** The chain address of the native (default) token contract (if any) */ export const NATIVE_CHAIN_TOKEN_ADDRESS = 'eosio.token' /** The number of decimal places for the EOS token */ export const NATIVE_CHAIN_TOKEN_PRECISION = 4 /** The number of seconds in the future a transaction can be valid for */ export const EOS_MAX_TRANSACTION_LIFESPAN_SECONDS = 3600 // comes from EOSIO node config.ini max-transaction-time (in milliseconds) /** Transaction expiration constraints */ export const EOS_TRANSACTION_EXPIRATION_OPTIONS: Models.TransactionExpirationOptions = { /** Type of expiration constraint */ transactionExpirationType: Models.TransactionExpirationType.Deadline, /** the maximum number of seconds that a transaction can valid for from current time */ // maxWindowSeconds: EOS_MAX_TRANSACTION_LIFESPAN_SECONDS, // was deferred_trx_expiration_window - Depricated in EOS 2.0 maxFutureSeconds: EOS_MAX_TRANSACTION_LIFESPAN_SECONDS, }