@komenci/kit
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta1 • Public • Published

KomenciKit

The KomenciKit library is a wrapper for the Komenci Service API, which is used for fee-less onboarding by allowing the consumer to execute fee-less attestations with the help of MetaTransactions.

The main actions that KomenciKit exposes are:

  • startSession: Initiate a Komenci session with a solved captcha
  • deployWallet: deploy a MTW for Valora's EOA
  • requestAttestations: request attestations fee-lessly
  • selectIssuers: wrapper for Attestation.selectIssuers as meta-tx
  • completeAttestation: wrapper for Attestations.complete as a meta-tax
  • setAccount: wrapper for Accounts.setAccount as a meta-tx
  • submitMetaTransaction: submit arbitrary allowed meta transactions via Komenci

User Guide

KomenciKit requires an instance of contractKit, an EOA that's managed by the contractKit instance and options which must at least include the URL of the Komenci API to point to.

import { newKit } from '@celo/contractkit'
import { KomenciKit } from "@komenci/kit"

const contractkit = newKit('https://alfajores-forno.celo-testnet.org:8545')

const komenciKit = new KomenciKit(contractkit, "0xaaaa...aaaa", {
    url: 'api.komenci.celo.org' // I made this up
})

See examples/attestation-flow.ts for an example of a full attestation flow executed via KomenciKit

Package Sidebar

Install

npm i @komenci/kit

Weekly Downloads

41

Version

1.0.0-beta1

License

Apache-2.0

Unpacked Size

101 kB

Total Files

27

Last publish

Collaborators

  • dckesler
  • bowd