![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.
@openzeppelin/defender-sdk-key-value-store-client
Advanced tools
The [Defender Actions](https://docs.openzeppelin.com/defender/v2/module/actions) service allows you to run small code snippets on a regular basis or via webhooks that can make calls to the Ethereum network or to external APIs. Thanks to tight integration
The Defender Actions service allows you to run small code snippets on a regular basis or via webhooks that can make calls to the Ethereum network or to external APIs. Thanks to tight integration to Defender Relayers, you can use Actions to automate regular operations on your contracts.
This client allows you to access a simple key-value data store from your Actions code, so you can persist data throughout executions and across different Actions.
Note that this package will not work outisde the Actions environment.
This package is included in the latest Actions runtime environment, so you do not need to bundle it in your code. To install it for local development and typescript type completion, run:
npm install @openzeppelin/defender-sdk-key-value-store
yarn add @openzeppelin/defender-sdk-key-value-store
You can interact with your key-value store through an instance of Defender
, which is initialized with the payload injected in the your Action handler
function. Once initialized, you can call kvstore.get
, kvstore.put
, or kvstore.del
.
const { Defender } = require('@openzeppelin/defender-sdk');
exports.handler = async function (event) {
// Creates an instance of the key-value store client
const client = new Defender(event);
// Associates myValue to myKey
await client.keyValueStore.put('myKey', 'myValue');
// Returns myValue associated to myKey
const value = await client.keyValueStore.get('myKey');
// Deletes the entry for myKey
await client.keyValueStore.del('myKey');
};
The Defender key-value store is only accessible from within an Action. To simplify local development, you can create an instance using Defender.localKVStoreClient
providing an object with a path
property. The client will use a local json file at that path for all operations.
const { Defender } = require('@openzeppelin/defender-sdk');
async function local() {
// Creates an instance of the client that will write to a local file
const store = Defender.localKVStoreClient({ path: '/tmp/foo/store.json' });
// The store.json file will contain { myKey: myValue }
await store.put('myKey', 'myValue');
}
put
into the store.FAQs
The [Defender Actions](https://docs.openzeppelin.com/defender/v2/module/actions) service allows you to run small code snippets on a regular basis or via webhooks that can make calls to the Ethereum network or to external APIs. Thanks to tight integration
The npm package @openzeppelin/defender-sdk-key-value-store-client receives a total of 1,489 weekly downloads. As such, @openzeppelin/defender-sdk-key-value-store-client popularity was classified as popular.
We found that @openzeppelin/defender-sdk-key-value-store-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.