Skip to content

Typescript support #1

@Psycarlo

Description

@Psycarlo

Description

Missing decode function in TypeScript type declarations bolt12.d.ts.

Suggested fix

Add to bolt12.d.ts:

type Section = {
  name: string;
  value: unknown;
};

type DecodedOffer = {
  offerRequest: string;
  sections: Section[];
};

declare function decode(offerRequest: string): DecodedOffer;

export {
  // ... existing exports
  decode,
  type DecodedOffer,
  type Section,
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions