Class XChainAttestationSigner
Witness-side signing of XLS-38 bridge attestations. A witness that saw an
XChainCommit or XChainCreateAccountCommit on one chain attests it on the
other by submitting XChainAddClaimAttestation /
XChainAddAccountCreateAttestation carrying its public key and a signature over
the attested facts. The signed message is the canonical serialization of an STObject
holding exactly those facts (rippled AttestationClaim::message /
AttestationCreateAccount::message): no hash prefix, no transaction fields, so the
same bytes verify regardless of which account submits the attestation transaction.
Inheritance
object
XChainAttestationSigner
Assembly: Xrpl.dll
Syntax
public static class XChainAttestationSigner
Methods
|
Edit this page
View Source
AccountCreateMessage(XChainBridgeModel, string, Currency, Currency, string, string, bool, string)
Builds the bytes a witness signs for an account-create attestation.
Declaration
public static byte[] AccountCreateMessage(XChainBridgeModel bridge, string otherChainSource, Currency amount, Currency signatureReward, string destination, string attestationRewardAccount, bool wasLockingChainSend, string xChainAccountCreateCount)
Parameters
| Type |
Name |
Description |
| XChainBridgeModel |
bridge |
|
| string |
otherChainSource |
|
| Currency |
amount |
|
| Currency |
signatureReward |
|
| string |
destination |
|
| string |
attestationRewardAccount |
|
| bool |
wasLockingChainSend |
|
| string |
xChainAccountCreateCount |
|
Returns
|
Edit this page
View Source
ClaimMessage(XChainBridgeModel, string, Currency, string, bool, string, string?)
Builds the bytes a witness signs for a claim attestation, from the fields the
attestation transaction will carry.
Declaration
public static byte[] ClaimMessage(XChainBridgeModel bridge, string otherChainSource, Currency amount, string attestationRewardAccount, bool wasLockingChainSend, string xChainClaimId, string? destination)
Parameters
| Type |
Name |
Description |
| XChainBridgeModel |
bridge |
|
| string |
otherChainSource |
|
| Currency |
amount |
|
| string |
attestationRewardAccount |
|
| bool |
wasLockingChainSend |
|
| string |
xChainClaimId |
|
| string |
destination |
|
Returns
|
Edit this page
View Source
SignAccountCreateAttestation(XChainAddAccountCreateAttestation, XrplWallet)
Declaration
public static XChainAddAccountCreateAttestation SignAccountCreateAttestation(XChainAddAccountCreateAttestation attestation, XrplWallet witness)
Parameters
Returns
|
Edit this page
View Source
SignClaimAttestation(XChainAddClaimAttestation, XrplWallet)
Signs the attestation with the witness key: fills PublicKey and
Signature from the transaction's own fields, and
AttestationSignerAccount with the witness address when it is not set.
The submitting Account may be any funded account.
Declaration
public static XChainAddClaimAttestation SignClaimAttestation(XChainAddClaimAttestation attestation, XrplWallet witness)
Parameters
Returns
|
Edit this page
View Source
VerifyAccountCreateAttestation(XChainAddAccountCreateAttestation)
Declaration
public static bool VerifyAccountCreateAttestation(XChainAddAccountCreateAttestation attestation)
Parameters
Returns
|
Edit this page
View Source
VerifyClaimAttestation(XChainAddClaimAttestation)
Checks the attestation's signature against its own fields and public key,
the way rippled's attestationPreflight does (temXCHAIN_BAD_PROOF otherwise).
Declaration
public static bool VerifyClaimAttestation(XChainAddClaimAttestation attestation)
Parameters
Returns