ledger_entry

[Source]

The ledger_entry method returns a single ledger entry from the XRP Ledger in its raw format. See ledger entry types for information on the different types of entries you can retrieve.

The Credentials amendment makes no changes to the request or response formats for most types of ledger entries.

Get DepositPreauth Entry

Retrieve a DepositPreauth entry, which tracks preauthorization for payments to accounts requiring Deposit Authorization.

FieldTypeRequired?Description
deposit_preauthObject or StringYesSpecify the DepositPreauth to retrieve. If a string, must be the ledger entry ID of the DepositPreauth entry, as hexadecimal. If an object, requires owner sub-field and either authorized or authorize_credentials sub-field.
deposit_preauth.ownerString - AddressYesThe account that provided the preauthorization.
deposit_preauth.authorizedString - AddressNoThe account that received the preauthorization.
deposit_preauth.authorize_credentialsArrayNoA set of credentials that received the preauthorization.

Each member of the deposit_preauth.authorize_credentials array, if provided, must include the following nested fields:

FieldTypeRequired?Description
issuerString - AddressYesThe address of the account that issued the credential.
credential_typeString - HexadecimalYesThe type of the credential, as issued.

Get Credential Entry

Retrieve a Credential entry, which represents an attestation by one account about another account.

FieldTypeRequired?Description
credentialObject or StringYesSpecify the Credential to retrieve. If a string, must be the ledger entry ID of the entry, as hexadecimal. If an object, requires subject, issuer, and credential_type sub-fields.
credential.subjectString - AddressYesThe account that is the subject of the credential.
credential.issuerString - AddressYesThe account that issued the credential.
credential.credential_typeString - HexadecimalYesThe type of the credential, as issued.

WebSocket:

{
  "id": "example_get_credential",
  "command": "ledger_entry",
  "credential": {
    "subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
    "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
    "credential_type": "6D795F63726564656E7469616C"
  },
  "ledger_index": "validated"
}

JSON-RPC:

{
  "method": "ledger_entry",
  "params": [{
    "credential": {
      "subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
      "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
      "credential_type": "6D795F63726564656E7469616C"
    },
    "ledger_index": "validated"
  }]
}

Commandline:

rippled json ledger_entry '{ "credential": {"subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX","credential_type": "6D795F63726564656E7469616C"}, "ledger_index": "validated" }'