npm.io
8.0.0 • Published 3 months ago

@celo/connect

Licence
Apache-2.0
Version
8.0.0
Deps
7
Size
113 kB
Vulns
0
Weekly
0
Stars
44

@celo/connect

Connect to the Celo Blockchain. Connection provides the core of what you need to interact with Celo blockchain. The Core Difference between it and ContractKit is that it provides zero Contract Wrappers, and therefore leaves out convenience methods for example for setting FeeCurrency, or getting configs.

How we work

We are a GitHub-first team, which means we have a strong preference for communicating via GitHub. Please use GitHub to:

File a bug report

Ask a question

Suggest a feature

Contribute!

Report a security vulnerability

Please avoid messaging us via Slack, Telegram, or email. We are more likely to respond to you on GitHub than if you message us anywhere else. We actively monitor GitHub, and will get back to you shortly

Examples

Basic
import { Connection } from '@celo/connect'

const connection = new Connection('YOUR_RPC_URL')

For a raw transaction:

import { parseEther } from 'viem'

const oneCelo = parseEther('1')

const tx = connection.sendTransaction({
  from: myAddress,
  to: someAddress,
  value: oneCelo,
})
const hash = await tx.getHash()
const receipt = await tx.waitReceipt()

Keywords