Skip to content

Conversation

coolaj86
Copy link
Member

@coolaj86 coolaj86 commented Aug 15, 2024

BREAKING CHANGE

  • empty strings are now considered valid memos
  • null is now the placeholder value for objects that complete the output interface
   let outputs = [
-   { satoshis: 10000, memo: '', message: '', address: 'xxxx' },
+   { satoshis: 10000, memo: null, message: null, address: 'xxxx' },
   ];

Previously an output that looked like this would be considered a payment to 'xxx'

let outputs = [
    { satoshis: 10000, memo: '', message: '', address: 'xxxx' },
];

Between this and #74 (which allows burn memos), it will now throw an error:

throw new Error(`memo outputs must not have 'address' or 'pubKeyHash'`);

Also, it seems that there may have been a regression of #56, because this does the same that that says in the title.

Tested, working

https://trpc.digitalcash.dev/#?method=getrawtransaction&params=["79e822ae946a2babb141291c052da999d3987f0529cbb3cece02cc2377997a59",1]&submit

@coolaj86 coolaj86 changed the title feat: allow NUL memos fix!: allow NUL memos Aug 15, 2024
@coolaj86 coolaj86 changed the title fix!: allow NUL memos fix!: allow empty memos (NULL op returns) Aug 15, 2024
@coolaj86 coolaj86 merged commit 1f7188c into main Aug 15, 2024
@coolaj86 coolaj86 deleted the feat-null-memo branch August 15, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant