XO crypto package, deals with private keys, public keys, generation of bytecode.
⚠️ This project is in early development phase. Use it only if you understand what you are doing and accept the risks. Do not use funds you are not willing to lose. Minor version bumps may introduce breaking changes
npm install @xo-cash/crypto
import { Crypto } from '@xo-cash/crypto';
const crypto = new Crypto(seed);
const signedCommit = crypto.signInvitationCommitWithSchnorr({
invitationCommit: unsignedCommit,
invitationIdentifier,
rootCommitIdentifier,
templateIdentifier,
actionIdentifier,
});
// `rootCommitIdentifier` is the commit identifier where this entity first joined the invitation.
flowchart TD
mnemonic[Mnemonic] --> convertSeed[convertMnemonicToSeedBytes]
convertSeed --> seedBytes[SeedBytes]
seedBytes --> cryptoCtor[Crypto.constructor]
cryptoCtor --> purposeNode[Purpose HD node m/2415']
purposeNode --> invitationSigning[Invitation signing]
purposeNode --> templateLocking[Template locking]
invitationSigning -->|HD input templateId and rootCommitId| genSigned[generateSchnorrSignedInvitationCommit]
genSigned -->|signing payload includes invitationId| signedCommit[SignedInvitationCommit]
templateLocking -->|deriveUseCaseChildNode| compilerKeys[derivePrivateKeyRecordForCompiler]
MIT - See LICENSE for details.