Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
jesse-rif-id-daf
Advanced tools
rif-id-daf
RIF Identity - DAF
npm i @rsksmart/rif-id-daf
Extensions for uPort DAF agent.
uPort DAF provides an Identity provider module that is responsible for the creation of keys and derivation of the respective identity. Each time an identity is created, a new private key is generated. RIF model proposes to use deterministic derivation for private keys, making all the identities associated with a single mnemonic phrase.
The model uses a wallet account like derivation for identity keys:
TBD
derivation pathFor a better developer experience the extension also provides BIP-44 support. Use mnemonic phrase instead of hex keys.
To use this interface we provide:
IdentityMnemonic
. Now used to store one single mnemonic.SeedStore
class - interface to store a seedRIFIdKeyManagementSystem
class - wrapper for a daf
AbstractKeyManagementSystem
- responsible for creating private keys derived from the mnemonic's seed.RIFIdentityProvider
class - Extension for daf
IdentityProvider
enabling to import a mnemonicAll this modules can be plugged to uPort agent as explained in usage to provide uPort agent of this capabilities.
The identity recovery model is to be defined
To setup a DAF agent using RIF identity provider implementation:
import { Connection } from 'typeorm'
import { KeyStore, IdentityStore, Agent } from 'daf-core'
import { SecretBox, KeyManagementSystem } from 'daf-libsodium' // change for daf-react-native-libsodioum for React Native support
import { Entities, MnemonicStore, RIFIdKeyManagementSystem, RIFIdentityProvider } from '@rsksamrt/rid-id-daf'
const dbConnection = createConnection({
type: 'sqlite',
database: 'rif-identity.sqlite',
entities: [...Entities, ...DAFEntities],
logging: false,
synchronize: true
})
// key store
const secretKey = '0f3c04d7416607ba306997f9fd1920474aff39beb23b847da5c21215076cc9b3' // set your own secret key
const secretBox = new SecretBox(secretKey)
const keyStore = new KeyStore(dbConnection, secretBox)
const mnemonicStore = new MnemonicStore(dbConnection, secretBox)
// key management system
const keyManagementSystem = new KeyManagementSystem(keyStore)
const rifIdKeyManagementSystem = new RIFIdKeyManagementSystem(keyManagementSystem, keyStore, mnemonicStore)
// rif identity provider
const identityStore = new IdentityStore('rsk-testnet-ethr', dbConnection)
const rifIdentityProvider = new RIFIdentityProvider({
kms: rifIdKeyManagementSystem,
identityStore,
network: 'rsk',
rpcUrl: 'http://localhost:8545'
})
const agent = new Agent({
dbConnection,
identityProviders: [rifIdentityProvider],
didResolver: null
})
const mnemonic = generateMnemonic(12)
await rifIdentityProvider.importMnemonic(mnemonic)
const identity = await agent.identityManager.createIdentity()
From base repo directory run npm test
or any of the described test script variants.
FAQs
RIF Identity - DAF
The npm package jesse-rif-id-daf receives a total of 6 weekly downloads. As such, jesse-rif-id-daf popularity was classified as not popular.
We found that jesse-rif-id-daf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.