Migrating from aleph-js

We're slowly rolling out the aleph-js package, here are the main differences between both implementation.

While the Typescript SDK and the aleph-js follow the same global patterns here are some of the notable differences.

Naming convention

All the the methods related to messages and accounts are PascalCase (camel case, with a leading uppercase)

Example 1: Creating an account

import { ethereum } from 'aleph-js'

const { account } = await ethereum.new_account()

Example 2: Publish a Post message

Using the ethereum we created in the previous example we can now send a post message.

import { posts } from 'aleph-js'

await posts.submit(
    { body: 'test' },
         account: account,
         channel: 'TEST',
         api_server: 'https://api2.aleph.im'

Last updated