Skip to content

Add SDK method deprecation warning system #241

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

As the SDK evolves (e.g. pay_with_memo vs. newer patterns), there's no consistent way to warn integrators they're using a soon-to-be-removed method, beyond ad hoc code comments.

Technical Context

New src/deprecation.ts. deprecated(methodName, { removedInVersion, alternative }) decorator/wrapper applied to selected exported functions; logs a one-time-per-method console warning (via Issue 12's logger if present, else console.warn) on first call.

Acceptance Criteria

  • Wrapped methods still function identically — only adds a warning side effect
  • Warning fires once per method per process (not on every call) to avoid log spam
  • Warning message includes the suggested alternative
  • Tests: warning fires exactly once across multiple calls; message contains the alternative text

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions