Files
xahau.js/packages/ripple-binary-codec/src/enums/index.ts
Denis Angell 25f267b81f Hooks (#12)
* feature `Hooks`

update definitions

add network id to base transaction

add set hook

update required

update definitions

make network id required

* update hook

update hook

add test and validation

add estimate fee func

fix estimated fee error

add hook utils

* update hookon transaction types

* add invoke tx

* ledger entry objects

* remove sugar export

* update definitions

* remove network id

* export transaction type map from definitions

* lint

* fix error

* fixup unit test

* update hook on calcaulator

* update tests

* update definitions

update definitions

update definitions
2023-03-28 20:33:42 +00:00

37 lines
969 B
TypeScript

import * as enums from './definitions.json'
import {
XrplDefinitionsBase,
FieldInstance,
Bytes,
} from './xrpl-definitions-base'
/**
* By default, coreTypes from the `types` folder is where known type definitions are initialized to avoid import cycles.
*/
const DEFAULT_DEFINITIONS = new XrplDefinitionsBase(enums, {})
const Type = DEFAULT_DEFINITIONS.type
const LedgerEntryType = DEFAULT_DEFINITIONS.ledgerEntryType
const TransactionType = DEFAULT_DEFINITIONS.transactionType
const TransactionResult = DEFAULT_DEFINITIONS.transactionResult
const Field = DEFAULT_DEFINITIONS.field
/*
* @brief: All valid transaction types
*/
const TRANSACTION_TYPES = DEFAULT_DEFINITIONS.transactionNames
const TRANSACTION_TYPE_MAP = DEFAULT_DEFINITIONS.transactionMap
export {
Bytes,
XrplDefinitionsBase,
DEFAULT_DEFINITIONS,
Field,
FieldInstance,
Type,
LedgerEntryType,
TransactionResult,
TransactionType,
TRANSACTION_TYPES,
TRANSACTION_TYPE_MAP,
}