Skip to content

art-by-city/molecule

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@decentdotland/molecule

reusable code blocks for EXM contracts

Synopsis

Molecule is a developer tooling API for EXM developers that's built on top of the deterministicFetch EXM feature. molecule.sh is composed of multiple reusable EXM components/codes to facilitate writing EXM functions.

Build & run

git pull https://github.com/decentldotland/molecule.git

touch .env 

npm install && npm run molecules

Note: copy the parameters from the .env.example and fill the values with your API tokens

CHAT_API_TOKEN=...
OPENAI_API_KEY=...
OPENAI_ORGANIZATION=...

molecule.sh structure

Tree

molecules/
├── ar/
│   └── tx-gql ~> atom
└── evm/
├── └── signer
└── sol/ ~> molecule
├── └── auth
└── zil/
├── └── zil-auth
├── stx/
│   └── stx-auth
└── substrate/
├── └── substrate-auth
└── trx/
    └── trx-auth
└── ark/
├── ├── resolve
├── └── state
│   └── soark/domain
└── ai/
└── └── chatgpt
└── └── gpt3

Endpoints

molecule endpoint atoms stability
Arweave (ar) ar.molecule.sh tx-gql ota 🟩
EVM (evm) evm.molecule.sh signer 🟩
Solana (sol) sol.molecule.sh auth 🟩
Zilliqa (zil) zil.molecule.sh zil-auth 🟩
Stacks (stx) stx.molecule.sh stx-auth 🟩
Substrate.io (substrate) substrate.molecule.sh substrate-auth 🟩
TRON (trx) trx.molecule.sh trx-auth 🟩
Ark Protocol (ark) ark.molecule.sh state resolve soark/domain 🟩/🟨
Randomization (rand) rand.molecule.sh generate 🟩/🟨
AI (ai) ai.molecule.sh gpt3 chatgpt 🟩/🟨

API path structure

{molecule-name}.molecule.sh/{atom-name}/{argument1}/{argument2}

Examples

The following EXM contracts integrate molecule.sh atoms to achieve certain functionalities:

  • EXM with EVM : allows EXM contracts to be fully compatible with action.caller as EVM EOA. example

  • Fetch Arweave TX metadata: fetch L1 or bundled Arweave TX object. example

  • Convert an Arweave public key to Arweave address. example

  • Lucky draw by randomization powered by random.org - example

  • Solana authentication: Simple name registry contract. example

  • Zilliqa authentication: Simple name registry contract. example

  • Stacks authentication: Simple name registry contract. example

  • Substrate.io authentication: Simple name registry contract. example

  • TRON authentication: Simple name registry contract. example

  • Getting Ark Protocol identity object. example

  • Interacting with ChatGPT from EXM smart contracts. example

  • GPT3 integration in a smart contract. example

License

This project is licensed under the MIT License

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.6%
  • Other 0.4%