Jump to content

Search the Community

Showing results for tags 'tx'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • XRP
    • Please Read Before Posting
    • Press
    • General Discussion
    • Technical Discussion
    • Codius and Smart Contracts
    • Marketplace
    • Problem Solving
  • Interledger Protocol
    • Interledger Protocol Discussion
  • Other Technology
    • Alt-Coins and General Fintech
  • More
    • Coil Posts and Fan Submissions
    • Off-Topic
    • Meta
    • Languages
  • Canadian Zerpers's Topics
  • Vegemite Ripplers's Topics
  • 2 the Moon! For Real. The Club's Topics
  • NY Zerpers - aka bitlicense island's Topics
  • Brackish Waters Club's Topics
  • Trading Places's Topics
  • Anti-Club Club's Topics
  • The Irish Brigade's Topics
  • Saloon's Request
  • XRP Trading And Price Speculation's Topics
  • The Crypto Buffett's Topics
  • Alt-Coin Trading And Price Speculation's Topics
  • Super serious Ripple club's Topics
  • Making Millions!'s Topics
  • Ripple - India's Topics
  • SWELL's Topics
  • Gospel Hour's Topics
  • Korean XRP Holders's Topics
  • Strayans lovin your work XRP!!!'s Topics
  • Technical Analysis (TA) Area's Topics
  • BTC diving deep club's Topics
  • Ripple Enamel Pin Club's Topics
  • XRP Wave Surfers's Topics
  • FUDster's retreat's Topics
  • Cooking with Snoopy's Topics
  • How it's all going to happen..'s Topics
  • Chocolate Fish's Topics
  • The Round Table's Topics
  • UK Hodlers's Topics
  • ˜”*°• Zerpmania •°*”˜'s Topics
  • XRP YouTube Videos's Topics
  • CRY ROOM's Topics
  • Night's Watch's Topics
  • CasinoCoin's Topics
  • XRP Think Tank's Topics
  • Allvor's Topics
  • TeXRP's Topics
  • COIL Think Tank's Topics
  • Bob's Book Club's Topics
  • XRP FAQS's XRP Q an A’s

Calendars

  • Ripple Events
  • Vegemite Ripplers's Events
  • NY Zerpers - aka bitlicense island's Events
  • Brackish Waters Club's Events
  • Trading Places's Events
  • Anti-Club Club's Events
  • The Irish Brigade's Events
  • Saloon's Calendar
  • XRP Trading And Price Speculation's Events
  • The Crypto Buffett's Calendar
  • Alt-Coin Trading And Price Speculation's Events
  • Super serious Ripple club's Events
  • Making Millions!'s Events
  • Ripple - India's Events
  • SWELL's Events
  • Gospel Hour's Events
  • Korean XRP Holders's Events
  • Strayans lovin your work XRP!!!'s Events
  • Technical Analysis (TA) Area's Events
  • BTC diving deep club's Events
  • Ripple Enamel Pin Club's Events
  • XRP Wave Surfers's Events
  • FUDster's retreat's Events
  • Cooking with Snoopy's Events
  • Chocolate Fish's Events
  • The Round Table's Events
  • UK Hodlers's Events
  • XRP YouTube Videos's Events
  • CRY ROOM's Events
  • XRP Think Tank's Events
  • Allvor's Events
  • TeXRP's Events
  • COIL Think Tank's Events
  • Bob's Book Club's Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Interests


Location


Occupation


Country


Ripple Address


Biography


Location


Interests


Occupation

Found 2 results
Minimum search term is 4 characters long. Can't find what you want? Click here for the custom google search instead.

  1. Hi folks, I'm using RippleAPI (the NodeJS library) to write a quick proof-of-concept for an idea I have. Basically what I'm trying to do is store some data in the Memo field. I can do it easily enough with some plain text (e.g., "Here is text" below): const preparedTx = await api.prepareTransaction( { TransactionType: "Payment", Account: ADDRESS, Amount: api.xrpToDrops("22"), // Same as "Amount": "22000000" Destination: "rUCzEr6jrEyMpjhs4wSdQdz4g8Y382NxfM", Memos: [ Memo: { MemoData: Buffer.from("Here is text", "utf8") .toString("hex") .toUpperCase() } } ] }, { // Expire this transaction if it doesn't execute within ~5 minutes: maxLedgerVersionOffset: 5 } ); After submitting the tx I just do this to get the text: let data = tx.specification.memos[0].data; console.log(Buffer.from(data, "hex").toString("utf-8")); // => "Here is text" What I'm having difficulty doing is submitting encrypted data in the memo field, e.g.: const preparedTx = await api.prepareTransaction( { TransactionType: "Payment", Account: ADDRESS, Amount: api.xrpToDrops("22"), // Same as "Amount": "22000000" Destination: "rUCzEr6jrEyMpjhs4wSdQdz4g8Y382NxfM", Memos: [ { Memo: { MemoData: encrypted.toUpperCase() } } ] }, { // Expire this transaction if it doesn't execute within ~5 minutes: maxLedgerVersionOffset: 5 } ); console.log(preparedTx); // => {"TransactionType":"Payment","Account":"rHVQntm23skDRzDrrjtFjr7iWkZvwTPvYd","Amount":"22000000","Destination":"rUCzEr6jrEyMpjhs4wSdQdz4g8Y382NxfM","Memos":[{"Memo":{"MemoData":"EB8C1317FBD61EBF271022486402753A4373E80A6ED498DEB437B27E44E07DB9AC4A8B5BF635E10232A236CE784DCBFC"}}],"Flags":2147483648,"LastLedgerSequence":2617395,"Fee":"12","Sequence":2614128} It looks like the memo field is properly in hex format, but when I print `tx.specification.memos` after submitting the tx, the memo data field looks unrecognizable: [ { data: `�\u0013\u0017��\u001e�'\u0010"Hd\u0002u:Cs�\nnԘ޴7�~D�}��J�[�5�\u00022�6�xM��` } ] How do I fix this to show the hex memo data? (I'm not good with encodings, please forgive me if I'm not using the right terms) Without going too much into the specifics, here is the encryption function: function encrypt(text, secret) { const IV_LENGTH = 16; let iv = crypto.randomBytes(IV_LENGTH); console.log("SECRET_LENGTH", secret.length * 4); let cipher = crypto.createCipheriv( "aes-" + secret.length * 4 + "-cbc", Buffer.from(secret, "hex"), iv ); let encrypted = cipher.update(text); encrypted = Buffer.concat([encrypted, cipher.final()]); return iv.toString("hex") + encrypted.toString("hex"); }
  2. Trying to understand the date field in a TX overview. Which date is: date : 561896261
×
×
  • Create New...