Signing Payment Transaction
Signing Payment Transaction

Signing Payment Transaction

Setting things up

Installing Node and VS Code EditorInstalling Node and VS Code EditorInstalling "XRPL JS TS Demo" and DependenciesInstalling "XRPL JS TS Demo" and Dependencies

XRP Ledger accounts

Learning More About XRP Ledger AccountLearning More About XRP Ledger AccountGenerating XRPL AccountGenerating XRPL AccountDerive r-address From SecretDerive r-address From SecretBrief Overview of The XRP LedgerBrief Overview of The XRP Ledger

First XRPL interaction

Activate Existing XRPL Account on Test NetworkActivate Existing XRPL Account on Test NetworkConnecting and Interacting with XRP Ledger: account_infoConnecting and Interacting with XRP Ledger: account_infoInteracting with XRP Ledger using JSON-RPCInteracting with XRP Ledger using JSON-RPCError Handling and Best PracticesError Handling and Best PracticesBasics of XRP and Issued CurrencyBasics of XRP and Issued CurrencySigning Payment TransactionSigning Payment TransactionAssignment SolutionAssignment SolutionVerifying SignatureVerifying SignatureSubmit Transaction Signature To XRP LedgerSubmit Transaction Signature To XRP LedgerSubscription MethodsSubscription MethodsSubscription Methods To Build Responsive AppSubscription Methods To Build Responsive AppTransaction VerificationTransaction VerificationBalance DetailBalance DetailTransaction CostTransaction CostMeasures to Avoid Ledger SpammingMeasures to Avoid Ledger SpammingSource And Destination TagsSource And Destination TagsAccountSet Transaction: Domain, GravatarAccountSet Transaction: Domain, GravatarAccountSet Transaction: SetFlag, ClearFlagAccountSet Transaction: SetFlag, ClearFlagDeposit AuthorizationDeposit Authorization

Tokens, transactions

Issuing Token on XRPLIssuing Token on XRPLToken(IOU): Payment TransactionToken(IOU): Payment TransactionCommands To Fetch TrustLine InformationCommands To Fetch TrustLine InformationFreeze a TrustLineFreeze a TrustLineIssuer: Transfer FeesIssuer: Transfer FeesMore about TrustLineMore about TrustLineCurrency Code In Hex FormatCurrency Code In Hex FormatRemoving a TrustLineRemoving a TrustLineRequire authorization FlagRequire authorization Flag

Ledger features

AccountDelete TransactionAccountDelete TransactionTickets: TheoryTickets: TheoryTicketCreate TransactionTicketCreate TransactionDelete Ticket ObjectDelete Ticket Object

SetRegularKey

SetRegularKey: The ConceptSetRegularKey: The ConceptAssigning RegularKeyAssigning RegularKeyChange RegularKeyChange RegularKeyRemove RegularKeyRemove RegularKeyBlackhole An AccountBlackhole An Account

MultiSigning

MultiSigning: The ConceptMultiSigning: The ConceptCreate SignerListCreate SignerListReplace SignerListReplace SignerListMulti-signed Payment TransactionMulti-signed Payment TransactionRemoving SignerListRemoving SignerList

Signing Payment Transaction

Intro

Sign a payment transaction offline, and analyse the signature.

Video

Topics covered

  • Derive rAddress from familySeed.
  • Payment TransactionType.
  • Learn about all the fields in a Payment Transaction.
  • Learn more about payload signature.

References

  • Payment Transaction

Possible Error

When you change isValidAddress to isValidSeed, if you start getting error like below:

(node:33872) UnhandledPromiseRejectionWarning: 
TypeError: AddressCodec.isValidSeed is not a function

Then please run below command:

npm install xrpl-accountlib --save

Reason for the error: The older version of xrpl-accountlib library had this bug which was later fixed.

The above solution updates xrpl-accountlib library and also saves the version changes to your package.json file present in your project folder.

Easy Solution

I can go to XRPL-JS-TS-demo repository right now and change the version of xrpl-accountlib and push the changes. But I want you to encounter this error and then fix it with above solution. That way you know where to look for when you encounter similar problems in any of your projects in future.

Note:

If both Account and Destination are same in a transaction(i.e., both sender and receiver address are same), then it fails with following error code: temREDUNDANT.

But if you are a custodian of user funds and want to handle transactions where the sender and receiver accounts are same, then check the use-case section of Source And Destination Tags tutorial.

💡
Final tip: If you know the Sequence number of your account, you can sign any transaction completely offline.

← Previous

Basics of XRP and Tokens

Next →

Assignment Solution

  • Signing Payment Transaction
  • Intro
  • Video
  • Topics covered
  • References
  • Possible Error
  • Easy Solution
  • Note:
💠
https://xrpl-labs.com

Footer Social Icons

© XRPL Labs - https://xrpl-labs.com