1 | import { decodeLedgerData } from './ledger-hashes';
|
2 | import { JsonObject } from './types/serialized-type';
|
3 | import { XrplDefinitionsBase, TRANSACTION_TYPES, DEFAULT_DEFINITIONS } from './enums';
|
4 | import { TxFlags } from './enums/xrpl-definitions-base';
|
5 | import { XrplDefinitions } from './enums/xrpl-definitions';
|
6 | import { coreTypes } from './types';
|
7 | import { nativeAsset } from './nativeasset';
|
8 | /**
|
9 | * Decode a transaction
|
10 | *
|
11 | * @param binary hex-string of the encoded transaction
|
12 | * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
13 | * @returns the JSON representation of the transaction
|
14 | */
|
15 | declare function decode(binary: string, definitions?: XrplDefinitionsBase): JsonObject;
|
16 | /**
|
17 | * Encode a transaction
|
18 | *
|
19 | * @param json The JSON representation of a transaction
|
20 | * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
21 | *
|
22 | * @returns A hex-string of the encoded transaction
|
23 | */
|
24 | declare function encode(json: object, definitions?: XrplDefinitionsBase): string;
|
25 | /**
|
26 | * Encode a transaction and prepare for signing
|
27 | *
|
28 | * @param json JSON object representing the transaction
|
29 | * @param signer string representing the account to sign the transaction with
|
30 | * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
31 | * @returns a hex string of the encoded transaction
|
32 | */
|
33 | declare function encodeForSigning(json: object, definitions?: XrplDefinitionsBase): string;
|
34 | /**
|
35 | * Encode a transaction and prepare for signing with a claim
|
36 | *
|
37 | * @param json JSON object representing the transaction
|
38 | * @param signer string representing the account to sign the transaction with
|
39 | * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
40 | * @returns a hex string of the encoded transaction
|
41 | */
|
42 | declare function encodeForSigningClaim(json: object): string;
|
43 | /**
|
44 | * Encode a transaction and prepare for multi-signing
|
45 | *
|
46 | * @param json JSON object representing the transaction
|
47 | * @param signer string representing the account to sign the transaction with
|
48 | * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
49 | * @returns a hex string of the encoded transaction
|
50 | */
|
51 | declare function encodeForMultisigning(json: object, signer: string, definitions?: XrplDefinitionsBase): string;
|
52 | /**
|
53 | * Encode a quality value
|
54 | *
|
55 | * @param value string representation of a number
|
56 | * @returns a hex-string representing the quality
|
57 | */
|
58 | declare function encodeQuality(value: string): string;
|
59 | /**
|
60 | * Decode a quality value
|
61 | *
|
62 | * @param value hex-string of a quality
|
63 | * @returns a string representing the quality
|
64 | */
|
65 | declare function decodeQuality(value: string): string;
|
66 | export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, nativeAsset, };
|
67 | export type { TxFlags };
|