Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@dydxprotocol/v4-abacus
Advanced tools
Shared front-end and mobile logic written in Kotlin Multiplatform (https://kotlinlang.org/docs/multiplatform.html).
The library generates Swift framework for iOS, JVM library for Android, and Javascript code for Web.
https://www.oracle.com/java/technologies/downloads/#java11
Abacus uses Cocoapods to integrate with iOS project. The gradle configuration contains the steps needed to generate the .podspec file. Run
./gradlew podspec
to generate abacus.podspec. Configure your iOS project (https://github.com/dydxprotocol/native-ios) to import abacus.podspec.
You can also build the Abacus for iOS by running:
./gradlew assembleXCFramework
This generates the iOS framework in build/XCFrameworks folder.
Debugging on iOS directly from XCode is possible with a plugin (https://github.com/touchlab/xcode-kotlin)
Abacus builds and pushes the JVM target as a Github package with the following command:
./publish_android.sh
The Android app (https://github.com/dydxprotocol/native-android) has the Gradle build step to pull the Abacus target from GithubPackage.
If you are using v4-abacus with the v4-web repo, follow local development instructions here.
Abacus generates a Javascript / Typescript UMD module with the following command:
./gradlew assembleJsPackage
This outputs into build/packages/js.
A local npm package can be built with:
./gradlew packJsPackage
A tarball of the package should be created in build/packages and you can install it to your project for local testing:
npm install PATH_TO_TARBALL
Abacus is published to an npm library (https://www.npmjs.com/package/@dydxprotocol/v4-abacus).
Shared code should have unit tests written in Kotlin residing in the src/CommonTest directory. Run the tests with the following command
./gradlew jvmtest
Integration tests can be written to call Abacus from non-Kotlin code (i.e., Swift, JS). Sample integration projects can be found in the integration directory.
./bump_version.sh
Enable pre-commit to auto-lint/auto-format your changes before git commit:
brew install pre-commit pre-commit install
// create a state machine
val stateMachine = PerpTradingStateMachine()
// send socket payload to the state machine and get the state
// the param is the complete socket text
val state = stateMachine.socket(payloadText)
// See src/commonTest/kotlin/exchange.dydx.abacus/PerpV3Tests.kt for testing code
Misc:
state (top state)
processing:
step 1: processor (dynamic objects - dictionaries, list, not typed)
step 2 calculator (dynamic)
step 3 validator (from postOrder and postAllOrders states)
step 4 output (structs, typed data)
step 5 responses
test (supporting classes, mostly mocks) utils (just utilities)
AppStateMachine (app)
payload (test StateMachine payload and interaction)
app (test AppStateMachine IO requests)
FAQs
Unknown package
The npm package @dydxprotocol/v4-abacus receives a total of 130 weekly downloads. As such, @dydxprotocol/v4-abacus popularity was classified as not popular.
We found that @dydxprotocol/v4-abacus 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.