xrpl 2.12.0-beta.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/xrpl-latest-min.js +1 -1
- package/build/xrpl-latest-min.js.map +1 -1
- package/build/xrpl-latest.js +139 -312
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/models/common/index.d.ts +2 -1
- package/dist/npm/models/common/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/AMM.d.ts +5 -3
- package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.d.ts +1 -0
- package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +11 -1
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +10 -1
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.d.ts +2 -1
- package/dist/npm/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.js.map +1 -1
- package/dist/npm/models/methods/accountObjects.d.ts +3 -3
- package/dist/npm/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/models/methods/ammInfo.d.ts +4 -3
- package/dist/npm/models/methods/ammInfo.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerEntry.d.ts +4 -4
- package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/models/methods/serverInfo.d.ts +6 -0
- package/dist/npm/models/methods/serverInfo.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMBid.d.ts +3 -3
- package/dist/npm/models/transactions/AMMBid.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMBid.js.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js +5 -26
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js.map +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +11 -68
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js +10 -59
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainClaim.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainClaim.js +5 -30
- package/dist/npm/models/transactions/XChainClaim.js.map +1 -1
- package/dist/npm/models/transactions/XChainCommit.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainCommit.js +4 -24
- package/dist/npm/models/transactions/XChainCommit.js.map +1 -1
- package/dist/npm/models/transactions/XChainCreateBridge.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainCreateBridge.js +3 -17
- package/dist/npm/models/transactions/XChainCreateBridge.js.map +1 -1
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainCreateClaimID.js +3 -19
- package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -1
- package/dist/npm/models/transactions/XChainModifyBridge.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainModifyBridge.js +3 -14
- package/dist/npm/models/transactions/XChainModifyBridge.js.map +1 -1
- package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/accountSet.js.map +1 -1
- package/dist/npm/models/transactions/checkCash.d.ts.map +1 -1
- package/dist/npm/models/transactions/checkCash.js.map +1 -1
- package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/models/transactions/common.d.ts +4 -0
- package/dist/npm/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/models/transactions/common.js +33 -38
- package/dist/npm/models/transactions/common.js.map +1 -1
- package/dist/npm/models/transactions/depositPreauth.d.ts.map +1 -1
- package/dist/npm/models/transactions/depositPreauth.js.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.d.ts +1 -1
- package/dist/npm/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.js +5 -3
- package/dist/npm/models/transactions/escrowCancel.js.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts +1 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.js +5 -3
- package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/models/transactions/offerCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/offerCreate.js.map +1 -1
- package/dist/npm/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/models/transactions/payment.js.map +1 -1
- package/dist/npm/models/transactions/paymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/models/transactions/paymentChannelClaim.js.map +1 -1
- package/dist/npm/models/transactions/paymentChannelCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/paymentChannelCreate.js.map +1 -1
- package/dist/npm/models/transactions/signerListSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/signerListSet.js.map +1 -1
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js.map +1 -1
- package/dist/npm/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/models/utils/flags.js.map +1 -1
- package/dist/npm/snippets/src/bridgeTransfer.js +12 -10
- package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -1
- package/dist/npm/src/models/common/index.d.ts +2 -1
- package/dist/npm/src/models/common/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AMM.d.ts +5 -3
- package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.d.ts +1 -0
- package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +11 -1
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +10 -1
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.d.ts +2 -1
- package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.js.map +1 -1
- package/dist/npm/src/models/methods/accountObjects.d.ts +3 -3
- package/dist/npm/src/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ammInfo.d.ts +4 -3
- package/dist/npm/src/models/methods/ammInfo.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerEntry.d.ts +4 -4
- package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/methods/serverInfo.d.ts +6 -0
- package/dist/npm/src/models/methods/serverInfo.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMBid.d.ts +3 -3
- package/dist/npm/src/models/transactions/AMMBid.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMBid.js.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js +5 -26
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +11 -68
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +10 -59
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainClaim.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainClaim.js +5 -30
- package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.js +4 -24
- package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateBridge.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateBridge.js +3 -17
- package/dist/npm/src/models/transactions/XChainCreateBridge.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js +3 -19
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainModifyBridge.js +3 -14
- package/dist/npm/src/models/transactions/XChainModifyBridge.js.map +1 -1
- package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
- package/dist/npm/src/models/transactions/checkCash.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/checkCash.js.map +1 -1
- package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/common.d.ts +4 -0
- package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/common.js +33 -38
- package/dist/npm/src/models/transactions/common.js.map +1 -1
- package/dist/npm/src/models/transactions/depositPreauth.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/depositPreauth.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.d.ts +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.js +5 -3
- package/dist/npm/src/models/transactions/escrowCancel.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.d.ts +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.js +5 -3
- package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/src/models/transactions/offerCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/offerCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/payment.js.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelClaim.js.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/signerListSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/signerListSet.js.map +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js.map +1 -1
- package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/src/models/utils/flags.js.map +1 -1
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/src/utils/getXChainClaimID.d.ts +3 -0
- package/dist/npm/src/utils/getXChainClaimID.d.ts.map +1 -0
- package/dist/npm/src/utils/getXChainClaimID.js +29 -0
- package/dist/npm/src/utils/getXChainClaimID.js.map +1 -0
- package/dist/npm/src/utils/index.d.ts +2 -1
- package/dist/npm/src/utils/index.d.ts.map +1 -1
- package/dist/npm/src/utils/index.js +3 -1
- package/dist/npm/src/utils/index.js.map +1 -1
- package/dist/npm/src/utils/signPaymentChannelClaim.d.ts +1 -1
- package/dist/npm/src/utils/signPaymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/src/utils/signPaymentChannelClaim.js +2 -2
- package/dist/npm/src/utils/signPaymentChannelClaim.js.map +1 -1
- package/dist/npm/src/utils/verifyPaymentChannelClaim.d.ts +1 -1
- package/dist/npm/src/utils/verifyPaymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/src/utils/verifyPaymentChannelClaim.js +2 -2
- package/dist/npm/src/utils/verifyPaymentChannelClaim.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/dist/npm/utils/getXChainClaimID.d.ts +3 -0
- package/dist/npm/utils/getXChainClaimID.d.ts.map +1 -0
- package/dist/npm/utils/getXChainClaimID.js +29 -0
- package/dist/npm/utils/getXChainClaimID.js.map +1 -0
- package/dist/npm/utils/index.d.ts +2 -1
- package/dist/npm/utils/index.d.ts.map +1 -1
- package/dist/npm/utils/index.js +3 -1
- package/dist/npm/utils/index.js.map +1 -1
- package/dist/npm/utils/signPaymentChannelClaim.d.ts +1 -1
- package/dist/npm/utils/signPaymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/utils/signPaymentChannelClaim.js +2 -2
- package/dist/npm/utils/signPaymentChannelClaim.js.map +1 -1
- package/dist/npm/utils/verifyPaymentChannelClaim.d.ts +1 -1
- package/dist/npm/utils/verifyPaymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/utils/verifyPaymentChannelClaim.js +2 -2
- package/dist/npm/utils/verifyPaymentChannelClaim.js.map +1 -1
- package/package.json +6 -7
- package/src/models/common/index.ts +2 -1
- package/src/models/ledger/AMM.ts +11 -3
- package/src/models/ledger/AccountRoot.ts +6 -0
- package/src/models/ledger/XChainOwnedClaimID.ts +18 -2
- package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +16 -2
- package/src/models/ledger/index.ts +3 -0
- package/src/models/methods/accountObjects.ts +3 -0
- package/src/models/methods/ammInfo.ts +8 -3
- package/src/models/methods/ledgerEntry.ts +4 -4
- package/src/models/methods/serverInfo.ts +21 -0
- package/src/models/transactions/AMMBid.ts +5 -6
- package/src/models/transactions/AMMDeposit.ts +0 -1
- package/src/models/transactions/AMMWithdraw.ts +0 -1
- package/src/models/transactions/XChainAccountCreateCommit.ts +9 -47
- package/src/models/transactions/XChainAddAccountCreateAttestation.ts +34 -138
- package/src/models/transactions/XChainAddClaimAttestation.ts +33 -116
- package/src/models/transactions/XChainClaim.ts +15 -41
- package/src/models/transactions/XChainCommit.ts +14 -35
- package/src/models/transactions/XChainCreateBridge.ts +7 -29
- package/src/models/transactions/XChainCreateClaimID.ts +7 -32
- package/src/models/transactions/XChainModifyBridge.ts +7 -23
- package/src/models/transactions/accountSet.ts +0 -2
- package/src/models/transactions/checkCash.ts +0 -1
- package/src/models/transactions/checkCreate.ts +0 -1
- package/src/models/transactions/common.ts +82 -53
- package/src/models/transactions/depositPreauth.ts +0 -1
- package/src/models/transactions/escrowCancel.ts +8 -4
- package/src/models/transactions/escrowCreate.ts +0 -1
- package/src/models/transactions/escrowFinish.ts +8 -4
- package/src/models/transactions/offerCreate.ts +0 -1
- package/src/models/transactions/payment.ts +0 -1
- package/src/models/transactions/paymentChannelClaim.ts +0 -1
- package/src/models/transactions/paymentChannelCreate.ts +0 -1
- package/src/models/transactions/signerListSet.ts +0 -1
- package/src/models/transactions/transaction.ts +0 -1
- package/src/models/utils/flags.ts +0 -1
- package/src/sugar/autofill.ts +0 -2
- package/src/utils/getXChainClaimID.ts +64 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/signPaymentChannelClaim.ts +3 -3
- package/src/utils/verifyPaymentChannelClaim.ts +3 -3
- package/dist/npm/snippets/tsconfig.tsbuildinfo +0 -1
@@ -1,3 +1,5 @@
|
|
1
|
+
import { Amount } from 'ripple-binary-codec/dist/types'
|
2
|
+
|
1
3
|
import { XChainBridge } from '../common'
|
2
4
|
|
3
5
|
import BaseLedgerEntry from './BaseLedgerEntry'
|
@@ -35,14 +37,28 @@ export default interface XChainOwnedClaimID extends BaseLedgerEntry {
|
|
35
37
|
*/
|
36
38
|
OtherChainSource: string
|
37
39
|
|
38
|
-
// TODO: type this better
|
39
40
|
/**
|
40
41
|
* Attestations collected from the witness servers. This includes the parameters
|
41
42
|
* needed to recreate the message that was signed, including the amount, which
|
42
43
|
* chain (locking or issuing), optional destination, and reward account for that
|
43
44
|
* signature.
|
44
45
|
*/
|
45
|
-
XChainClaimAttestations:
|
46
|
+
XChainClaimAttestations: Array<{
|
47
|
+
// TODO: add docs
|
48
|
+
XChainClaimProofSig: {
|
49
|
+
Amount: Amount
|
50
|
+
|
51
|
+
AttestationRewardAccount: string
|
52
|
+
|
53
|
+
AttestationSignerAccount: string
|
54
|
+
|
55
|
+
Destination?: string
|
56
|
+
|
57
|
+
PublicKey: string
|
58
|
+
|
59
|
+
WasLockingChainSend: 0 | 1
|
60
|
+
}
|
61
|
+
}>
|
46
62
|
|
47
63
|
/**
|
48
64
|
* The total amount to pay the witness servers for their signatures. It must be at
|
@@ -27,7 +27,6 @@ export default interface XChainOwnedCreateAccountClaimID
|
|
27
27
|
*/
|
28
28
|
XChainAccountCreateCount: number
|
29
29
|
|
30
|
-
// TODO: type this better
|
31
30
|
/**
|
32
31
|
* Attestations collected from the witness servers. This includes the parameters
|
33
32
|
* needed to recreate the message that was signed, including the amount, destination,
|
@@ -35,7 +34,22 @@ export default interface XChainOwnedCreateAccountClaimID
|
|
35
34
|
* exception of the reward account, all signatures must sign the message created with
|
36
35
|
* common parameters.
|
37
36
|
*/
|
38
|
-
XChainCreateAccountAttestations:
|
37
|
+
XChainCreateAccountAttestations: Array<{
|
38
|
+
// TODO: add docs
|
39
|
+
XChainCreateAccountProofSig: {
|
40
|
+
Amount: string
|
41
|
+
|
42
|
+
AttestationRewardAccount: string
|
43
|
+
|
44
|
+
AttestationSignerAccount: string
|
45
|
+
|
46
|
+
Destination: string
|
47
|
+
|
48
|
+
PublicKey: string
|
49
|
+
|
50
|
+
WasLockingChainSend: 0 | 1
|
51
|
+
}
|
52
|
+
}>
|
39
53
|
|
40
54
|
/**
|
41
55
|
* A bit-map of boolean flags. No flags are defined for,
|
@@ -3,6 +3,7 @@ import AccountRoot, {
|
|
3
3
|
AccountRootFlagsInterface,
|
4
4
|
} from './AccountRoot'
|
5
5
|
import Amendments, { Majority, AMENDMENTS_ID } from './Amendments'
|
6
|
+
import AMM, { VoteSlot } from './AMM'
|
6
7
|
import Bridge from './Bridge'
|
7
8
|
import Check from './Check'
|
8
9
|
import DepositPreauth from './DepositPreauth'
|
@@ -33,6 +34,7 @@ export {
|
|
33
34
|
AccountRootFlagsInterface,
|
34
35
|
AMENDMENTS_ID,
|
35
36
|
Amendments,
|
37
|
+
AMM,
|
36
38
|
Bridge,
|
37
39
|
Check,
|
38
40
|
DepositPreauth,
|
@@ -61,4 +63,5 @@ export {
|
|
61
63
|
Ticket,
|
62
64
|
XChainOwnedClaimID,
|
63
65
|
XChainOwnedCreateAccountClaimID,
|
66
|
+
VoteSlot,
|
64
67
|
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import {
|
2
|
+
AMM,
|
2
3
|
Bridge,
|
3
4
|
Check,
|
4
5
|
DepositPreauth,
|
@@ -15,6 +16,7 @@ import {
|
|
15
16
|
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
16
17
|
|
17
18
|
export type AccountObjectType =
|
19
|
+
| 'amm'
|
18
20
|
| 'bridge'
|
19
21
|
| 'check'
|
20
22
|
| 'deposit_preauth'
|
@@ -70,6 +72,7 @@ export interface AccountObjectsRequest
|
|
70
72
|
* PayChannel, a SignerList, a Ticket, or a RippleState.
|
71
73
|
*/
|
72
74
|
export type AccountObject =
|
75
|
+
| AMM
|
73
76
|
| Bridge
|
74
77
|
| Check
|
75
78
|
| DepositPreauth
|
@@ -11,15 +11,20 @@ import { BaseRequest, BaseResponse } from './baseMethod'
|
|
11
11
|
export interface AMMInfoRequest extends BaseRequest {
|
12
12
|
command: 'amm_info'
|
13
13
|
|
14
|
+
/**
|
15
|
+
* The address of the AMM Account to look up.
|
16
|
+
*/
|
17
|
+
amm_account?: string
|
18
|
+
|
14
19
|
/**
|
15
20
|
* One of the assets of the AMM pool to look up.
|
16
21
|
*/
|
17
|
-
asset
|
22
|
+
asset?: Currency
|
18
23
|
|
19
24
|
/**
|
20
25
|
* The other asset of the AMM pool.
|
21
26
|
*/
|
22
|
-
asset2
|
27
|
+
asset2?: Currency
|
23
28
|
}
|
24
29
|
|
25
30
|
/**
|
@@ -93,7 +98,7 @@ export interface AMMInfoResponse extends BaseResponse {
|
|
93
98
|
* The amount, in LP Tokens, that the auction slot holder paid to win the auction slot.
|
94
99
|
* This affects the price to outbid the current slot holder.
|
95
100
|
*/
|
96
|
-
price:
|
101
|
+
price: IssuedCurrencyAmount
|
97
102
|
|
98
103
|
/**
|
99
104
|
* The current 72-minute time interval this auction slot is in, from 0 to 19.
|
@@ -158,23 +158,23 @@ export interface LedgerEntryRequest extends BaseRequest, LookupByLedgerRequest {
|
|
158
158
|
|
159
159
|
bridge?: XChainBridge
|
160
160
|
|
161
|
-
|
161
|
+
xchain_owned_claim_id?:
|
162
162
|
| {
|
163
163
|
locking_chain_door: string
|
164
164
|
locking_chain_issue: Currency
|
165
165
|
issuing_chain_door: string
|
166
166
|
issuing_chain_issue: Currency
|
167
|
-
|
167
|
+
xchain_owned_claim_id: string | number
|
168
168
|
}
|
169
169
|
| string
|
170
170
|
|
171
|
-
|
171
|
+
xchain_owned_create_account_claim_id?:
|
172
172
|
| {
|
173
173
|
locking_chain_door: string
|
174
174
|
locking_chain_issue: Currency
|
175
175
|
issuing_chain_door: string
|
176
176
|
issuing_chain_issue: Currency
|
177
|
-
|
177
|
+
xchain_owned_create_account_claim_id: string | number
|
178
178
|
}
|
179
179
|
| string
|
180
180
|
}
|
@@ -33,6 +33,22 @@ export interface JobType {
|
|
33
33
|
in_progress?: number
|
34
34
|
}
|
35
35
|
|
36
|
+
export type protocol =
|
37
|
+
| 'http'
|
38
|
+
| 'https'
|
39
|
+
| 'grpc'
|
40
|
+
| 'peer'
|
41
|
+
| 'ws'
|
42
|
+
| 'ws2'
|
43
|
+
| 'wss'
|
44
|
+
| 'wss2'
|
45
|
+
|
46
|
+
export interface ServerPort {
|
47
|
+
port: string
|
48
|
+
/** The values in protocol are sorted in alphabetical order */
|
49
|
+
protocol: protocol[]
|
50
|
+
}
|
51
|
+
|
36
52
|
// The states for validating and proposing do not exist in the field state_accounting
|
37
53
|
// See https://github.com/XRPLF/rippled/blob/develop/src/ripple/app/misc/NetworkOPs.cpp#L4545
|
38
54
|
// https://github.com/XRPLF/rippled/blob/develop/src/ripple/app/misc/NetworkOPs.h#L66
|
@@ -181,6 +197,11 @@ export interface ServerInfoResponse extends BaseResponse {
|
|
181
197
|
network_ledger?: 'waiting'
|
182
198
|
/** How many other rippled servers this one is currently connected to. */
|
183
199
|
peers: number
|
200
|
+
/**
|
201
|
+
* What Websocket/RPC ports rippled is listening on. This allows crawlers to build a richer topology without needing to
|
202
|
+
* port-scan nodes. For non-admin users (including peers), info about admin ports is excluded.
|
203
|
+
*/
|
204
|
+
ports: ServerPort[]
|
184
205
|
/**
|
185
206
|
* Public key used to verify this server for peer-to-peer communications.
|
186
207
|
* This node key pair is automatically generated by the server the first
|
@@ -1,6 +1,5 @@
|
|
1
|
-
/* eslint-disable complexity -- required for validateAMMBid */
|
2
1
|
import { ValidationError } from '../../errors'
|
3
|
-
import {
|
2
|
+
import { AuthAccount, Currency, IssuedCurrencyAmount } from '../common'
|
4
3
|
|
5
4
|
import {
|
6
5
|
BaseTransaction,
|
@@ -33,18 +32,18 @@ export interface AMMBid extends BaseTransaction {
|
|
33
32
|
Asset2: Currency
|
34
33
|
|
35
34
|
/**
|
36
|
-
* Pay at least this amount for the slot.
|
35
|
+
* Pay at least this LPToken amount for the slot.
|
37
36
|
* Setting this value higher makes it harder for others to outbid you.
|
38
37
|
* If omitted, pay the minimum necessary to win the bid.
|
39
38
|
*/
|
40
|
-
BidMin?:
|
39
|
+
BidMin?: IssuedCurrencyAmount
|
41
40
|
|
42
41
|
/**
|
43
|
-
* Pay at most this amount for the slot.
|
42
|
+
* Pay at most this LPToken amount for the slot.
|
44
43
|
* If the cost to win the bid is higher than this amount, the transaction fails.
|
45
44
|
* If omitted, pay as much as necessary to win the bid.
|
46
45
|
*/
|
47
|
-
BidMax?:
|
46
|
+
BidMax?: IssuedCurrencyAmount
|
48
47
|
|
49
48
|
/**
|
50
49
|
* A list of up to 4 additional accounts that you allow to trade at the discounted fee.
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { isString } from 'lodash'
|
2
|
+
|
2
3
|
import { Amount, XChainBridge } from '../common'
|
3
4
|
|
4
5
|
import {
|
@@ -6,6 +7,7 @@ import {
|
|
6
7
|
isAmount,
|
7
8
|
isXChainBridge,
|
8
9
|
validateBaseTransaction,
|
10
|
+
validateRequiredField,
|
9
11
|
} from './common'
|
10
12
|
|
11
13
|
/**
|
@@ -47,61 +49,21 @@ export interface XChainAccountCreateCommit extends BaseTransaction {
|
|
47
49
|
}
|
48
50
|
|
49
51
|
/**
|
50
|
-
* Verify the form and type of
|
52
|
+
* Verify the form and type of an XChainAccountCreateCommit at runtime.
|
51
53
|
*
|
52
|
-
* @param tx -
|
54
|
+
* @param tx - An XChainAccountCreateCommit Transaction.
|
53
55
|
* @throws When the XChainAccountCreateCommit is malformed.
|
54
56
|
*/
|
55
|
-
// eslint-disable-next-line max-lines-per-function -- okay for this function, there's a lot of things to check
|
56
57
|
export function validateXChainAccountCreateCommit(
|
57
58
|
tx: Record<string, unknown>,
|
58
59
|
): void {
|
59
60
|
validateBaseTransaction(tx)
|
60
61
|
|
61
|
-
|
62
|
-
throw new ValidationError(
|
63
|
-
'XChainAccountCreateCommit: missing field XChainBridge',
|
64
|
-
)
|
65
|
-
}
|
66
|
-
|
67
|
-
if (!isXChainBridge(tx.XChainBridge)) {
|
68
|
-
throw new ValidationError(
|
69
|
-
'XChainAccountCreateCommit: invalid field XChainBridge',
|
70
|
-
)
|
71
|
-
}
|
72
|
-
|
73
|
-
if (tx.SignatureReward == null) {
|
74
|
-
throw new ValidationError(
|
75
|
-
'XChainAccountCreateCommit: missing field SignatureReward',
|
76
|
-
)
|
77
|
-
}
|
78
|
-
|
79
|
-
if (
|
80
|
-
typeof tx.SignatureReward !== 'number' &&
|
81
|
-
typeof tx.SignatureReward !== 'string'
|
82
|
-
) {
|
83
|
-
throw new ValidationError(
|
84
|
-
'XChainAccountCreateCommit: invalid field SignatureReward',
|
85
|
-
)
|
86
|
-
}
|
87
|
-
|
88
|
-
if (tx.Destination == null) {
|
89
|
-
throw new ValidationError(
|
90
|
-
'XChainAccountCreateCommit: missing field Destination',
|
91
|
-
)
|
92
|
-
}
|
62
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
93
63
|
|
94
|
-
|
95
|
-
throw new ValidationError(
|
96
|
-
'XChainAccountCreateCommit: invalid field Destination',
|
97
|
-
)
|
98
|
-
}
|
64
|
+
validateRequiredField(tx, 'SignatureReward', isAmount)
|
99
65
|
|
100
|
-
|
101
|
-
throw new ValidationError('XChainAccountCreateCommit: missing field Amount')
|
102
|
-
}
|
66
|
+
validateRequiredField(tx, 'Destination', isString)
|
103
67
|
|
104
|
-
|
105
|
-
throw new ValidationError('XChainAccountCreateCommit: invalid field Amount')
|
106
|
-
}
|
68
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
107
69
|
}
|
@@ -1,11 +1,13 @@
|
|
1
|
-
import { ValidationError } from '../../errors'
|
2
1
|
import { Amount, XChainBridge } from '../common'
|
3
2
|
|
4
3
|
import {
|
5
4
|
BaseTransaction,
|
6
5
|
isAmount,
|
6
|
+
isNumber,
|
7
|
+
isString,
|
7
8
|
isXChainBridge,
|
8
9
|
validateBaseTransaction,
|
10
|
+
validateRequiredField,
|
9
11
|
} from './common'
|
10
12
|
|
11
13
|
/**
|
@@ -77,149 +79,43 @@ export interface XChainAddAccountCreateAttestation extends BaseTransaction {
|
|
77
79
|
}
|
78
80
|
|
79
81
|
/**
|
80
|
-
* Verify the form and type of
|
82
|
+
* Verify the form and type of an XChainAddAccountCreateAttestation at runtime.
|
81
83
|
*
|
82
|
-
* @param tx -
|
84
|
+
* @param tx - An XChainAddAccountCreateAttestation Transaction.
|
83
85
|
* @throws When the XChainAddAccountCreateAttestation is malformed.
|
84
86
|
*/
|
85
|
-
// eslint-disable-next-line max-lines-per-function, max-statements, complexity -- okay for this function, lots of things to check
|
86
87
|
export function validateXChainAddAccountCreateAttestation(
|
87
88
|
tx: Record<string, unknown>,
|
88
89
|
): void {
|
89
90
|
validateBaseTransaction(tx)
|
90
91
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
if (typeof tx.AttestationSignerAccount !== 'string') {
|
122
|
-
throw new ValidationError(
|
123
|
-
'XChainAddAccountCreateAttestation: invalid field AttestationSignerAccount',
|
124
|
-
)
|
125
|
-
}
|
126
|
-
|
127
|
-
if (tx.Destination == null) {
|
128
|
-
throw new ValidationError(
|
129
|
-
'XChainAddAccountCreateAttestation: missing field Destination',
|
130
|
-
)
|
131
|
-
}
|
132
|
-
|
133
|
-
if (typeof tx.Destination !== 'string') {
|
134
|
-
throw new ValidationError(
|
135
|
-
'XChainAddAccountCreateAttestation: invalid field Destination',
|
136
|
-
)
|
137
|
-
}
|
138
|
-
|
139
|
-
if (tx.OtherChainSource == null) {
|
140
|
-
throw new ValidationError(
|
141
|
-
'XChainAddAccountCreateAttestation: missing field OtherChainSource',
|
142
|
-
)
|
143
|
-
}
|
144
|
-
|
145
|
-
if (typeof tx.OtherChainSource !== 'string') {
|
146
|
-
throw new ValidationError(
|
147
|
-
'XChainAddAccountCreateAttestation: invalid field OtherChainSource',
|
148
|
-
)
|
149
|
-
}
|
150
|
-
|
151
|
-
if (tx.PublicKey == null) {
|
152
|
-
throw new ValidationError(
|
153
|
-
'XChainAddAccountCreateAttestation: missing field PublicKey',
|
154
|
-
)
|
155
|
-
}
|
156
|
-
|
157
|
-
if (typeof tx.PublicKey !== 'string') {
|
158
|
-
throw new ValidationError(
|
159
|
-
'XChainAddAccountCreateAttestation: invalid field PublicKey',
|
160
|
-
)
|
161
|
-
}
|
162
|
-
|
163
|
-
if (tx.Signature == null) {
|
164
|
-
throw new ValidationError(
|
165
|
-
'XChainAddAccountCreateAttestation: missing field Signature',
|
166
|
-
)
|
167
|
-
}
|
168
|
-
|
169
|
-
if (typeof tx.Signature !== 'string') {
|
170
|
-
throw new ValidationError(
|
171
|
-
'XChainAddAccountCreateAttestation: invalid field Signature',
|
172
|
-
)
|
173
|
-
}
|
174
|
-
|
175
|
-
if (tx.SignatureReward == null) {
|
176
|
-
throw new ValidationError(
|
177
|
-
'XChainAddAccountCreateAttestation: missing field SignatureReward',
|
178
|
-
)
|
179
|
-
}
|
180
|
-
|
181
|
-
if (!isAmount(tx.SignatureReward)) {
|
182
|
-
throw new ValidationError(
|
183
|
-
'XChainAddAccountCreateAttestation: invalid field SignatureReward',
|
184
|
-
)
|
185
|
-
}
|
186
|
-
|
187
|
-
if (tx.WasLockingChainSend == null) {
|
188
|
-
throw new ValidationError(
|
189
|
-
'XChainAddAccountCreateAttestation: missing field WasLockingChainSend',
|
190
|
-
)
|
191
|
-
}
|
192
|
-
|
193
|
-
if (tx.WasLockingChainSend !== 0 && tx.WasLockingChainSend !== 1) {
|
194
|
-
throw new ValidationError(
|
195
|
-
'XChainAddAccountCreateAttestation: invalid field WasLockingChainSend',
|
196
|
-
)
|
197
|
-
}
|
198
|
-
|
199
|
-
if (tx.XChainAccountCreateCount == null) {
|
200
|
-
throw new ValidationError(
|
201
|
-
'XChainAddAccountCreateAttestation: missing field XChainAccountCreateCount',
|
202
|
-
)
|
203
|
-
}
|
204
|
-
|
205
|
-
if (
|
206
|
-
typeof tx.XChainAccountCreateCount !== 'string' &&
|
207
|
-
typeof tx.XChainAccountCreateCount !== 'number'
|
208
|
-
) {
|
209
|
-
throw new ValidationError(
|
210
|
-
'XChainAddAccountCreateAttestation: invalid field XChainAccountCreateCount',
|
211
|
-
)
|
212
|
-
}
|
213
|
-
|
214
|
-
if (tx.XChainBridge == null) {
|
215
|
-
throw new ValidationError(
|
216
|
-
'XChainAddAccountCreateAttestation: missing field XChainBridge',
|
217
|
-
)
|
218
|
-
}
|
219
|
-
|
220
|
-
if (!isXChainBridge(tx.XChainBridge)) {
|
221
|
-
throw new ValidationError(
|
222
|
-
'XChainAddAccountCreateAttestation: invalid field XChainBridge',
|
223
|
-
)
|
224
|
-
}
|
92
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
93
|
+
|
94
|
+
validateRequiredField(tx, 'AttestationRewardAccount', isString)
|
95
|
+
|
96
|
+
validateRequiredField(tx, 'AttestationSignerAccount', isString)
|
97
|
+
|
98
|
+
validateRequiredField(tx, 'Destination', isString)
|
99
|
+
|
100
|
+
validateRequiredField(tx, 'OtherChainSource', isString)
|
101
|
+
|
102
|
+
validateRequiredField(tx, 'PublicKey', isString)
|
103
|
+
|
104
|
+
validateRequiredField(tx, 'Signature', isString)
|
105
|
+
|
106
|
+
validateRequiredField(tx, 'SignatureReward', isAmount)
|
107
|
+
|
108
|
+
validateRequiredField(
|
109
|
+
tx,
|
110
|
+
'WasLockingChainSend',
|
111
|
+
(inp) => inp === 0 || inp === 1,
|
112
|
+
)
|
113
|
+
|
114
|
+
validateRequiredField(
|
115
|
+
tx,
|
116
|
+
'XChainAccountCreateCount',
|
117
|
+
(inp) => isNumber(inp) || isString(inp),
|
118
|
+
)
|
119
|
+
|
120
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
225
121
|
}
|