Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@casual-simulation/crypto
Advanced tools
A common set of crypto helpers.
Defines a common interface for crypto implementations between web browsers and Node.js. (Currently only signing/verification and SHA-256 hashing is implemented)
npm install @casual-simulation/crypto
// ES6-style imports are required.
// If you are running in an environment that does not support ES Modules,
// then use Webpack or Babel to transpile to the format you want. (like CommonJS)
import { getHash, parsePublicPEMKey } from '@casual-simulation/crypto';
let myHash = getHash('Hello, World');
console.log('Hash: ', myHash);
// Hash: 03675ac53ff9cd1535ccc7dfcdfa2c458c5218371f418dc136f2d19ac1fbe8a5
let publicKeyPEM = `-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAryQICCl6NZ5gDKrnSztO
3Hy8PEUcuyvg/ikC+VcIo2SFFSf18a3IMYldIugqqqZCs4/4uVW3sbdLs/6PfgdX
7O9D22ZiFWHPYA2k2N744MNiCD1UE+tJyllUhSblK48bn+v1oZHCM0nYQ2NqUkvS
j+hwUU3RiWl7x3D2s9wSdNt7XUtW05a/FXehsPSiJfKvHJJnGOX0BgTvkLnkAOTd
OrUZ/wK69Dzu4IvrN4vs9Nes8vbwPa/ddZEzGR0cQMt0JBkhk9kU/qwqUseP1QRJ
5I1jR4g8aYPL/ke9K35PxZWuDp3U0UPAZ3PjFAh+5T+fc7gzCs9dPzSHloruU+gl
FQIDAQAB
-----END PUBLIC KEY-----`;
let publicKeyBytes = parsePublicPEMKey(publicKeyPEM);
console.log(publicKeyBytes.byteLength);
V3.0.0
Added the os.openImageClassifier(options)
and os.closeImageClassifier()
functions.
@onClick
tag and put the following code in it (replacing MY_MODEL_URL
with the shareable link):
await os.openImageClassifier({
modelUrl: 'MY_MODEL_URL',
});
options
is an object with the following properties:
modelUrl
- The sharable link that was generated from Teachable Machine.modelJsonUrl
- Is optional and can be used in advanced scenarios where you want to control where the model is stored.modelMetadataUrl
- Is optional and can be used in advanced scenarios where you want to control where the model is stored.cameraType
- Is optional and is the type of camera that should be preferred. Can be "front" or "rear".Created the oai-1
appBundle.
This appBundle is currently a simple ab that can query the OpenAI GPT-3 API via a shout.
The ab has the following features:
A single manager bot in the oai-1
dimension and systemPortal as oai-1.manager
.
@generateTextResponse
is a listener that asks GPT-3 to respond to a given text prompt.
It takes the following parameters:
apiKey
- The API key that should be used to access the API. You can get an API key at https://beta.openai.com/overview.prompt
- The text that the AI should respond to. An example is "Write a tagline for an ice cream shop.". Also see this guide: https://beta.openai.com/docs/guides/completion.engine
- The engine that should be used to process the prompt. Defaults to "text-davinci-001"
if not specified. You can find a list of engines is available here: https://beta.openai.com/docs/engines.options
- An object that contains additional options for the request. You can find the documentation for these options here: https://beta.openai.com/docs/api-reference/completions/create.It returns a promise that contains a list of generated choices.
Example:
let oai = getBot('system', 'oai-1.manager');
const response = await oai.generateTextResponse({
apiKey: 'myAPIKey',
prompt: 'Write a tagline for an ice cream shop.',
});
if (response.choices.length > 0) {
os.toast('Best choice: ' + response.choices[0]);
} else {
os.toast('No choices.');
}
os.listData()
where it was impossible to list data items unless a starting address was provided.FAQs
Crypto helpers used by AUX
The npm package @casual-simulation/crypto receives a total of 125 weekly downloads. As such, @casual-simulation/crypto popularity was classified as not popular.
We found that @casual-simulation/crypto 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.