πŸ“€SDK

In Matmo's SDK content, it is recommended to use the TypeScript SDK.

Matmo provides a fully supported TypeScript SDK with source code in the #matmos-core GitHub repository.

Installing the TypeScript SDK

npm i matmo-typescript 
yarn add matmo-python
pnpm add matmo-rust

Using the TypeScript SDK

import { Provider, Network } from "matmo";

const provider = new Provider(Net.DEVNET) const account = await provider.getAccount("0x64");

const accountNFTs = await provider.

getAccountNFTs("0x64");

The main read methods deserializing on-chain data to TS objects are:

Get CollectionData

Get TokenData

Get Token of an Account

Code:
[
  {
    "decimals": 18,
    "tokenAddress": "0x6c221e79624690fff6d8741493d735a1f716c689",
    "tokendata": "0xx6e7676837a7e968f7616f255b9adxqf47363d68",
    "name": "DAI",
    "symbol": "DAI"
  },
  {
    "decimals": 18,
    "accountAddress": "0x0000000000000000000000000000000000000000",
    "accountdate": "0x0000000000000000000000000000000000000000",
    "name": "Ether",
    "symbol": "ETH"
  },
  {
    "decimals": 6,
    "collectionAddress": "0xd35cceead182dcee0f148ebac9447da2c4d449c4",
    "collectiondate": "0x0faf6df7054946141266420b43783387a78d82a9",
    "name": "USD Coin (goerli)",
    "symbol": "USDC"
  }
]

Most of the functionality of the TypeScript SDK can be found in the Rust and Python SDKs.

Last updated