cennznet / cennznet/api.js

standaone cennznet utils

Open
#419 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10
Forks
9
PR merge metrics
No merged PRs in 30d

Description

need a small package for cennznet/evm development.
it should be split from here so it doesn't have the complexity of the `@polkadot` packages (i.e. usable with current ethereum dapps without any changes)

functions needed:
- evm to cennznet address conversion
- generic asset id to address
- nft id to address

derive NFT address
```
AAAAAAAA + bytes(collectionId) + bytes(seriesId) + padRight(0, 4)
```

derive GA address
```
CCCCCCCC + bytes(assetId) + padRight(0, 12)
e.g. 16000 = 0xCCCCCCCC00003e80000000000000000000000000
```

cc #411

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.