CosmosDriver
This page describes documentation specific to the Cosmos ChainDriver named as CosmosDriver created by the Blockin team.
Installation and Initialization
First, npm install blockin-cosmos-driver
Then, import via import CosmosDriver from 'blockin-cosmos-driver';
To initialize a new instance, run:
Signatures
See here for an example of implementing signatures in a compatible format using Keplr.
BitBadges
This driver is compatible with BitBadges and querying badge ownership.
Note to use the BitBadges API and query badges, you must set a valid environment variable for process.env.BITBADGES_API_KEY.
Scheme
For BitBadges, we use the collection ID the collectionId.
BitBadges assetIds must be in the form of [{ start: 1, end: 10 }, ....]
ownershipTimes (if blank, we query current time) can either be a valid JS Date string or in UNIX milliseconds via [{ start: 1, end: 1000000 }]
Ownership Times
To actually query if they owned at the current time, you must query the blockchain state at that time or provide a snapshot of it at that time. This is not supported currently.
Snapshots
Last updated