![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ipfs-cpinner-client-test
Advanced tools
@rsksmart/ipfs-cpinner-client
RIF Identity - IPFS Centralized Pinner Client
A Web Client to simplify the way the services provided by the IPFS Centralized Data Vault Service are consumed.
Manage authentication according to the DID Auth protocol
CRUD operations over the RIF Data Vault
Stores the authentication credentials in the given storage
Encrypts/decrypts data prior to save/return using the user wallet provider
import DataVaultWebClient from '@rsksmart/ipfs-cpinner-client'
const serviceUrl = 'http://your-ipfs-cpinner-service.com'
// the following fields are required just to perform write operations
const serviceDid = 'did:ethr:rsk:0x123456789....abc'
const address = '0xabcdef....123' // user's address
const did = `did:ethr:rsk:${address}`
// these are examples with Metamask
const personalSign = (data: string) => window.ethereum.request({ method: 'personal_sign', params: [address, data] })
const decrypt = (hexCypher: string) => window.ethereum.request({ method: 'eth_decrypt', params: [hexCypher, address] })
const getEncryptionPublicKey = () => window.ethereum.request.request({ method: 'eth_getEncryptionPublicKey', params: [address] })
const client = new DataVaultWebClient({
serviceUrl,
authManager: new AuthManager({ did, serviceUrl, personalSign }),
encryptionManager: new EncryptionManager({ getEncryptionPublicKey, decrypt })
})
Note: this approach use the browser
localStorage
as the package store. Please refer to the documentation to check custom storage options.
import DataVaultWebClient from '@rsksmart/ipfs-cpinner-client'
const client = new DataVaultWebClient({ serviceUrl, decrypt, did, rpcPersonalSign })
const key = 'EmailCredential'
const credentials = await client.get({ did, key })
import DataVaultWebClient from '@rsksmart/ipfs-cpinner-client'
const client = new DataVaultWebClient({ serviceUrl, did, rpcPersonalSign, serviceDid })
const keys = await client.getKeys()
import DataVaultWebClient from '@rsksmart/ipfs-cpinner-client'
const client = new DataVaultWebClient({ serviceUrl, did, rpcPersonalSign, serviceDid })
const storage = await client.getStorageInformation()
console.log(`Used: ${storage.used}`)
console.log(`Available: ${storage.available}`)
import DataVaultWebClient from '@rsksmart/ipfs-cpinner-client'
const client = new DataVaultWebClient({ serviceUrl, did, rpcPersonalSign, serviceDid })
const backup = await client.getBackup()
console.log('This is the keys and cids you have stored in the DV')
console.log(backup)
import DataVaultWebClient from '@rsksmart/ipfs-cpinner-client'
const client = new DataVaultWebClient({ serviceUrl, did, rpcPersonalSign, serviceDid, getEncryptionPublicKey })
const key = 'MyKey'
const content = 'this is my content'
const id = await client.create({ key, content })
import DataVaultWebClient from '@rsksmart/ipfs-cpinner-client'
const client = new DataVaultWebClient({ serviceUrl, did, rpcPersonalSign, serviceDid, getEncryptionPublicKey })
const key = 'MyKey'
const content = 'this is my content'
const id = await client.swap({ key, content })
import DataVaultWebClient from '@rsksmart/ipfs-cpinner-client'
const client = new DataVaultWebClient({ serviceUrl, did, rpcPersonalSign, serviceDid })
const key = 'MyKey'
await client.delete({ key })
See our documentation
From base repo directory run npm test
or any of the described test script variants.
FAQs
RIF Data Vault - IPFS centralized pinner client
The npm package ipfs-cpinner-client-test receives a total of 4 weekly downloads. As such, ipfs-cpinner-client-test popularity was classified as not popular.
We found that ipfs-cpinner-client-test 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.