mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
feat(types): add LedgerClosedEvent and export more types (#1333)
- Export AccountInfoResponse and other types
This commit is contained in:
27
src/api.ts
27
src/api.ts
@@ -451,4 +451,29 @@ class RippleAPI extends EventEmitter {
|
|||||||
isValidSecret = schemaValidator.isValidSecret
|
isValidSecret = schemaValidator.isValidSecret
|
||||||
}
|
}
|
||||||
|
|
||||||
export {RippleAPI}
|
export {
|
||||||
|
RippleAPI
|
||||||
|
}
|
||||||
|
|
||||||
|
export type {
|
||||||
|
AccountObjectsRequest,
|
||||||
|
AccountObjectsResponse,
|
||||||
|
AccountOffersRequest,
|
||||||
|
AccountOffersResponse,
|
||||||
|
AccountInfoRequest,
|
||||||
|
AccountInfoResponse,
|
||||||
|
AccountLinesRequest,
|
||||||
|
AccountLinesResponse,
|
||||||
|
BookOffersRequest,
|
||||||
|
BookOffersResponse,
|
||||||
|
GatewayBalancesRequest,
|
||||||
|
GatewayBalancesResponse,
|
||||||
|
LedgerRequest,
|
||||||
|
LedgerResponse,
|
||||||
|
LedgerDataRequest,
|
||||||
|
LedgerDataResponse,
|
||||||
|
LedgerEntryRequest,
|
||||||
|
LedgerEntryResponse,
|
||||||
|
ServerInfoRequest,
|
||||||
|
ServerInfoResponse
|
||||||
|
}
|
||||||
|
|||||||
@@ -21,3 +21,17 @@ export interface Ledger {
|
|||||||
accountState?: any[]
|
accountState?: any[]
|
||||||
validated?: boolean
|
validated?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://xrpl.org/subscribe.html#ledger-stream
|
||||||
|
export type LedgerClosedEvent = {
|
||||||
|
type: 'ledgerClosed'
|
||||||
|
fee_base: number
|
||||||
|
fee_ref: number
|
||||||
|
ledger_hash: string
|
||||||
|
ledger_index: number
|
||||||
|
ledger_time: number
|
||||||
|
reserve_base: number
|
||||||
|
reserve_inc: number
|
||||||
|
txn_count: number
|
||||||
|
validated_ledgers: string
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
export {RippleAPI} from './api'
|
export * from './api'
|
||||||
|
|
||||||
export {FormattedTransactionType} from './transaction/types'
|
export * from './transaction/types'
|
||||||
|
|
||||||
|
export * from './common/types/objects/ledger'
|
||||||
|
|
||||||
// Broadcast api is experimental
|
// Broadcast api is experimental
|
||||||
export {RippleAPIBroadcast} from './broadcast'
|
export {RippleAPIBroadcast} from './broadcast'
|
||||||
|
|||||||
Reference in New Issue
Block a user