/
XChainOwnedClaimID.ts
81 lines (66 loc) · 2.36 KB
/
XChainOwnedClaimID.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { Amount } from 'ripple-binary-codec/dist/types'
import { XChainBridge } from '../common'
import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
/**
* An XChainOwnedClaimID object represents one cross-chain transfer of value
* and includes information of the account on the source chain that locks or
* burns the funds on the source chain.
*
* @category Ledger Entries
*/
export default interface XChainOwnedClaimID
extends BaseLedgerEntry,
HasPreviousTxnID {
LedgerEntryType: 'XChainOwnedClaimID'
/** The account that checked out this unique claim ID value. */
Account: string
/**
* The door accounts and assets of the bridge this object correlates to.
*/
XChainBridge: XChainBridge
/**
* The unique sequence number for a cross-chain transfer.
*/
XChainClaimID: string
/**
* The account that must send the corresponding {@link XChainCommit} on the
* source chain. The destination may be specified in the {@link XChainCommit}
* transaction, which means that if the OtherChainSource isn't specified,
* another account can try to specify a different destination and steal the
* funds. This also allows tracking only a single set of signatures, since we
* know which account will send the {@link XChainCommit} transaction.
*/
OtherChainSource: string
/**
* Attestations collected from the witness servers. This includes the parameters
* needed to recreate the message that was signed, including the amount, which
* chain (locking or issuing), optional destination, and reward account for that
* signature.
*/
XChainClaimAttestations: Array<{
// TODO: add docs
XChainClaimProofSig: {
Amount: Amount
AttestationRewardAccount: string
AttestationSignerAccount: string
Destination?: string
PublicKey: string
WasLockingChainSend: 0 | 1
}
}>
/**
* The total amount to pay the witness servers for their signatures. It must be at
* least the value of the SignatureReward in the {@link Bridge} ledger object.
*/
SignatureReward: string
/**
* A bit-map of boolean flags. No flags are defined for XChainOwnedClaimIDs,
* so this value is always 0.
*/
Flags: 0
/**
* A hint indicating which page of the sender's owner directory links to this
* object, in case the directory consists of multiple pages.
*/
OwnerNode: string
}