6.1 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
- SQLite custom functions for BIP44 derivation
bip44_derive(pubkey_hex, chain)- Derive address from any public keybip44_derive_from_enclave(enclave_id, chain)- Derive from stored enclave- Supports:
sonr(Cosmos 118),ethereum(60),bitcoin(0)
- MPC signing via exec handlers
accounts sign- Sign with account's enclaveenclaves sign- Sign directly with enclave
- Multi-chain account initialization in
generate()- Creates accounts for sonr, ethereum, and bitcoin on enclave creation
Changed
generate()now returnsenclave_id,public_key, andaccountsarrayinternal/crypto/mpc/verify.gosimplified to use stdlib instead of external curves package
Removed
internal/enclave/package (unused encryption layer)internal/crypto/mpc/utils.go(dead code)
[0.1.0] - 2025-01
Added
Encryption & Serialization
-
internal/enclave/crypto.go- WebAuthn PRF key derivationDeriveEncryptionKey()using HKDF with SHA-256DeriveKeyWithContext()for purpose-specific keys- AES-256-GCM encryption/decryption (
Encrypt,Decrypt) EncryptBytes()/DecryptBytes()convenience functionsSecureZero()for memory clearing
-
internal/enclave/enclave.go- Encrypted database wrapperEnclavestruct wrappingKeybasewith encryptionSerializeEncrypted()/LoadEncrypted()methodsExport()/Import()withEncryptedBundleFromExisting()to wrap existing keybase
-
internal/keybase/conn.go- Native SQLite serializationSerialize()usingserdes.Serialize()from ncruces/go-sqlite3Load()usingserdes.Deserialize()RestoreFromDump()for encrypted bundle loading
Action Manager Extensions
-
internal/keybase/actions_verification.go- CreateVerificationMethod, ListVerificationMethodsFull
- GetVerificationMethod, DeleteVerificationMethod
-
internal/keybase/actions_service.go- CreateService, GetServiceByOrigin, GetServiceByID
- UpdateService, ListVerifiedServices
-
internal/keybase/actions_grant.go- CreateGrant, GetGrantByService, UpdateGrantScopes
- UpdateGrantLastUsed, SuspendGrant, ReactivateGrant, CountActiveGrants
-
internal/keybase/actions_credential.go- CreateCredential, UpdateCredentialCounter, RenameCredential
- DeleteCredential, CountCredentialsByDID
-
internal/keybase/actions_session.go- GetSessionByID, GetCurrentSession, UpdateSessionActivity
- SetCurrentSession, DeleteExpiredSessions
Plugin Exec Handlers
key_sharesresource - list, get, rotate, archive, deleteverification_methodsresource - list, get, deleteservicesresource - list, get, get_by_id
UCAN v1.0.0-rc.1 Database Integration
-
internal/migrations/schema.sql- v1.0.0-rc.1 tablesucan_delegations- CID-indexed delegation storage with envelope BLOBucan_invocations- CID-indexed invocation storage with execution trackingucan_revocations- Revocation records with reason and invocation CID- Updated
grantstable to usedelegation_cidinstead ofucan_id
-
internal/migrations/query.sql- CID-based queries- Delegation CRUD: Create, Get by CID, List by DID/Issuer/Audience/Subject/Command
- Invocation CRUD: Create, Get by CID, List by DID/Issuer/Command, Mark executed
- Revocation: Create, Check revoked, Get revocation, List by revoker
-
internal/keybase/actions_delegation.go- Delegation action handlers- StoreDelegation, GetDelegationByCID, GetDelegationEnvelope
- ListDelegations, ListDelegationsByIssuer, ListDelegationsByAudience
- ListDelegationsForCommand, IsDelegationRevoked, RevokeDelegation
- DeleteDelegation, CleanExpiredDelegations
-
internal/keybase/actions_invocation.go- Invocation action handlers- StoreInvocation, GetInvocationByCID, GetInvocationEnvelope
- ListInvocations, ListInvocationsByCommand, ListPendingInvocations
- MarkInvocationExecuted, CleanOldInvocations
-
main.go- Updated exec handlers for v1.0.0-rc.1executeUCANActionuses delegation methods (list, get, revoke, verify, cleanup)executeDelegationActionuses CID-based methods (list by issuer/audience/command)validateUCANusesIsDelegationRevokedinstead of oldIsUCANRevoked
UCAN v1.0.0-rc.1 Core
Using github.com/ucan-wg/go-ucan v1.1.0:
- Type re-exports from go-ucan (Delegation, Invocation, Command, Policy)
- Sonr command constants (/vault/, /did/, /dwn/*)
- DelegationBuilder fluent API with Sonr-specific helpers
- InvocationBuilder fluent API with Sonr-specific helpers
- PolicyBuilder fluent API with all operators
- Sonr policy helpers (VaultPolicy, DIDPolicy, ChainPolicy)
- ValidationError types matching TypeScript definitions
- Capability, ExecutionResult, and related types
Removed
Deprecated JWT-based UCAN
-
jwt.go- Old JWT token handling -
capability.go- Old Attenuation/Resource/Capability model -
verifier.go- Old JWT verification -
source.go- Old JWT token creation -
internal/crypto/mpc/spec/- Old MPC JWT integration -
github.com/golang-jwt/jwt/v5dependency -
Old action files:
internal/keybase/actions_ucan.go- Old JWT-based UCAN actionsinternal/keybase/actions_delegation.go- Old ID-based delegation actions
Deprecated
The following from the old TODO have been superseded by UCAN v1.0.0-rc.1:
- "Token Validation" (JWT parsing) -> Replaced by go-ucan validation
- "Capability Verification" (
can/withformat) -> Replaced by policy evaluation - "Proof Chain Validation" (JWT proof strings) -> Replaced by CID-based chain
- "UCAN Token Actions" (old format) -> Replaced by v1.0.0-rc.1 actions
- "Delegation Actions" (old model) -> Merged into CID-based actions
The old capability model (Attenuation, Resource, Capability interfaces) is replaced by:
sub(DID) - Subject of the capabilitycmd(Command) - Action being delegatedpol(Policy) - Constraints on invocation arguments