This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@abacus-network/apps
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Abacus Token Bridge

Message Format

Bridge messages follow the following format:

TokenID (36 bytes)
    -  4 bytes - domain specifier
    - 32 bytes - id (address) on that domain

Actions (variable)
    EITHER
    - Transfer (64 bytes)
        - 32 bytes - to. local recipient
        - 32 bytes - amount. number of tokens to send
    - Details
        - 32 bytes - name. new name of token
        - 32 bytes - symbol. new symbol for token
        -  1 byte  - decimals. new decimal place count

Message (100 or 101 bytes)
    - TokenID (36 bytes)
    - Action  (64 or 65 bytes)

Given a message we know the following:

  • the TokenID is at indices 0-35
    • 0 - 3 Domain
    • 4 - 35 Id
  • the Action is at indices 36 - end.
    • the action type can be determined from the message length alone.
    • for Transfer actions
      • 36 - 67 To
      • 68 - 99 Amount
    • for Details actions
      • 36 - 67 Name
      • 68 - 99 Symbol
      • 100 Decimals

Readme

Keywords

none

Package Sidebar

Install

npm i @abacus-network/apps

Weekly Downloads

1

Version

0.1.1

License

MIT OR Apache-2.0

Unpacked Size

385 kB

Total Files

100

Last publish

Collaborators

  • asaj
  • jmrossy
  • nambrot
  • tkporter
  • yorhodes