Skip to content

Add Multi-Token (NEP-245) Support to @near-js/tokens #1622

@denbite

Description

@denbite

Have you read the Contributing Guidelines?

Description

The @near-js/tokens package currently supports Native and Fungible tokens. To improve interoperability and align with standards, we'd like to add support for the Multi-Token Standard (NEP-245).

This is a great opportunity for community contributors to kick in. Contributions should include tests and follow the existing coding conventions in @near-js/tokens.

Has this been requested on GitHub Discussions?

No response

Motivation

With the rise of NEAR Intents, developers are increasingly working with Multi-Tokens (NEP-245) and supporting this standard directly in the core @near-js/tokens package will drastically reduce boilerplate code.

API design

  • Add a new MultiToken class, following the same design principles as FungibleToken and NativeToken.
  • Implement view methods getBalance, getBatchedBalance
  • Implement call methods transfer, transferCall, batchTransfer

Self-service

  • I'd be willing to contribute and develop this feature myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    NEW❗

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions