Skip to content

Make postConditionFromMode publicΒ #1772

@aryzing

Description

@aryzing

Problem

@stacksjs/transactions makes both post condition mode types available as exports:

https://github.com/hirosystems/stacks.js/blob/fd0bf26b5f29fc3c1bf79581d0ad9b89f0d7f15a/packages/transactions/src/postcondition-types.ts#L44

https://github.com/hirosystems/stacks.js/blob/fd0bf26b5f29fc3c1bf79581d0ad9b89f0d7f15a/packages/transactions/src/constants.ts#L88

but not the helper to that unifies into a single type,

https://github.com/hirosystems/stacks.js/blob/fd0bf26b5f29fc3c1bf79581d0ad9b89f0d7f15a/packages/transactions/src/postcondition.ts#L97

which makes it hard for clients to likewise allow for both types, and treat them in a stable manenr

Solution

Make postConditionModeFrom available for import for clients.

Additional context

Let me know if there's a better or preferred way of handling these two types, or if one will be soon deprecated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureBrand new functionality. New pages, workflows, endpoints, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions