Database Info

💡

In the following sample code, db represents the state variable of your database instance. For reference, see Initialize WeaveDB

getInfo

Get general information about your database.

await db.getInfo()

getVersion

Get contract version of your database.

await db.getVersion()

getHash

Get current hash of chained txs.

💡

WeaveDB contracts keep track of valid transactions by hashing chained txIds like a blockchain.
latest_hash = hash( [ last_hash, current_txId ] )

await db.getHash()

getEvolve

To get the stats related to evolve, use getEvolve.

await db.getEvolve()
// { canEvolve, history, evolve, isEvolving }

getOwner

Get contract owners of your database.

await db.getOwner()

getSchema

Get the schema of a collection

await db.getSchema(collection_name)

getCrons

await db.getCrons()

getRelayerJob

await db.getRelayerJob("your_jobID")

listRelayerJobs

await db.listRelayerJobs()