Skip to content

grxkun/tea-berry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tea-Berry: Bridging EVM and Cosmos

Tea-Berry Logo

Tea-Berry is an innovative NPM package that harmoniously connects the EVM-based blockchain (think Ethereum) with the Cosmos chain. Imagine it as a delightful blend of your favorite tea and the sweet tanginess of berries—bringing together the best of both worlds.

Features 🌟

  • Interoperability: Seamlessly transfer assets and data between EVM and Cosmos.
  • Smart Contract Harmony: Execute EVM smart contracts on the Cosmos chain and vice versa.
  • State Synchronization: Keep your chai (state) consistent across the two realms.
  • Easy Brewing: Simple APIs for developers to stir into their projects.

Installation 🚀

Install the package using NPM:

npm install tea-berry

Usage 🍵

Connecting EVM to Cosmos

const { TeaBerry } = require('tea-berry');

// Initialize the connector
const connector = new TeaBerry({
  evmNodeUrl: 'https://ethereum-node-url',
  cosmosNodeUrl: 'https://cosmos-node-url',
  privateKey: 'your-private-key',
});

// Listen for EVM transactions
connector.onEvmTransaction((txData) => {
  // Translate EVM transaction data to Cosmos format
  const cosmosTx = translateToCosmosFormat(txData);

  // Sign and broadcast the Cosmos transaction
  connector.sendCosmosTransaction(cosmosTx);
});

Connecting Cosmos to EVM

// Listen for Cosmos transactions
connector.onCosmosTransaction((cosmosTx) => {
  // Translate Cosmos transaction data to EVM format
  const evmTx = translateToEvmFormat(cosmosTx);

  // Execute the EVM transaction
  connector.sendEvmTransaction(evmTx);
});

Examples 🌿

Check out the examples directory for aromatic usage samples.

Contributing 🌱

Contributions are steeped to perfection! Please follow our contribution guidelines.

License 🍓

This project is licensed under the MIT License—sip responsibly!


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published