Show / Hide Table of Contents

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
Namespace: Xrpl.Wallet
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
Type Description
byte[]
| 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
Type Description
byte[]
| Edit this page View Source

SignAccountCreateAttestation(XChainAddAccountCreateAttestation, XrplWallet)

Signs the account-create attestation with the witness key; see SignClaimAttestation(XChainAddClaimAttestation, XrplWallet).

Declaration
public static XChainAddAccountCreateAttestation SignAccountCreateAttestation(XChainAddAccountCreateAttestation attestation, XrplWallet witness)
Parameters
Type Name Description
XChainAddAccountCreateAttestation attestation
XrplWallet witness
Returns
Type Description
XChainAddAccountCreateAttestation
| 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
Type Name Description
XChainAddClaimAttestation attestation
XrplWallet witness
Returns
Type Description
XChainAddClaimAttestation
| Edit this page View Source

VerifyAccountCreateAttestation(XChainAddAccountCreateAttestation)

Checks the account-create attestation's signature; see VerifyClaimAttestation(XChainAddClaimAttestation), including what it does not check.

Declaration
public static bool VerifyAccountCreateAttestation(XChainAddAccountCreateAttestation attestation)
Parameters
Type Name Description
XChainAddAccountCreateAttestation attestation
Returns
Type Description
bool
| 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
Type Name Description
XChainAddClaimAttestation attestation
Returns
Type Description
bool
Remarks

Cryptographic only. It says the signature matches the fields and the key, and nothing about whether that key may speak for AttestationSignerAccount or whether that account is on the door's SignerList. rippled decides both at preclaim (checkAttestationPublicKey: tecNO_PERMISSION, or tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR when the key is neither the master nor the regular key of that account), and it needs a ledger to do it.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX