@xo-cash/crypto
v0.0.1
Published
XO Cash crypto
Downloads
86
Maintainers
Readme
@xo-cash/crypto
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
Installation
npm install @xo-cash/cryptoUsage
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.Documentation
High-level flow
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]Links
License
MIT - See LICENSE for details.
