HomePhabricator

[ecash-script] Add new function getStackArray

Description

[ecash-script] Add new function getStackArray

Summary:
T3196

Add new function getStackArray to convert a valid eCash OP_RETURN outputScript to an array of data pushes.
`
consumeNextPush` and consume are available for more customized processing (e.g. alias-server uses the returnedWith pushdata from consumeNextData to validate for minimum pushes).

getStackArray is a simple and common use case.

Also validating for max OP_RETURN size since this is a difficult param for devs to find if they are not intimately familiar with the eCash codebase.

Test Plan: npm test

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

Differential Revision: https://reviews.bitcoinabc.org/D14075

Details

Provenance
bytesofmanAuthored on Jun 17 2023, 17:13
bytesofmanPushed on Jun 20 2023, 16:05
Reviewer
Restricted Project
Differential Revision
D14075: [ecash-script] Add new function getStackArray
Parents
rABC1e517c19b277: [chronik-swap] switch default chronik servers
Branches
Unknown
Tags
Unknown