Skip to content

npm package for interacting with the idetix protocol

Notifications You must be signed in to change notification settings

bc-ticketing/idetix-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idetix-utils

npm package for interacting with the idetix protocol.

Installation

Use the follwoing command to add this package to your project:

npm install -s idetix-utils

Utils

Convert IPFS hashes from/to its components

Check out the link for IPFS hash conversion.

Also see detail gas cost analysis of different types of different ways to store IPFS hashes in solidity.

Smart contract constants

fungibleBaseId: The first fungible ticket type that is created will have this id. This is due to the encoding: 1<<128 = 1000...000

nonFungibleBaseId: The first non-fungible ticket type that is created will have this id. This is due to the encoding: (1<<128 | TYPE_NF_BIT) where TYPE_NF_BIT=1<<256.

Note: uint256 from solidity are too large for Javascript. Thus, we use bignumber.js.

About

npm package for interacting with the idetix protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published