
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@opacity-labs/capacitor-opacity
Advanced tools
Opacity SDK for CapacitorJS. Only works on iOS and Android.
npm install capacitor-opacity
npx cap sync
You need to modify your project root gradle to include jitpack.io and mozilla's maven repos:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url "https://maven.mozilla.org/maven2/" } // ADD THIS
maven { url 'https://jitpack.io' } // ADD THIS
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.2'
classpath 'com.google.gms:google-services:4.4.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: "variables.gradle"
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://maven.mozilla.org/maven2/" } // ADD THIS
maven { url 'https://jitpack.io' } // ADD THIS
}
}
Bump the minSdk version to 25, in variables.gradle
:
ext {
minSdkVersion = 25
...
}
You need to initialize the SDK first before calling the get function to get the requested resource:
import { Opacity, OpacityEnvironment } from 'capacitor-opacity';
const apiKey = import.meta.env.VITE_OPACITY_API_KEY;
window.initializeSDK = async () => {
try {
await Opacity.initialize({ apiKey, dryRun: false, environment: OpacityEnvironment.Production });
console.log('SDK Initialized');
} catch (e) {
console.error(`SDK Not Initialized: ${e}`);
}
};
window.getGithubProfile = async () => {
try {
const res = await Opacity.get({ name: 'flow:github:profile' });
console.log('GOT GITHUB PROFILE! 🟦🟩🟩');
console.log(JSON.stringify(res));
} catch (e) {
console.error(`Error: ${e}`);
}
};
window.getUberRiderProfile = async () => {
try {
const res = await Opacity.get({ name: 'flow:uber_rider:profile' });
console.log('GOT UBER RIDER PROFILE! 🟦🟩🟩');
console.log(JSON.stringify(res));
} catch (e) {
console.error(`Error: ${e}`);
}
};
FAQs
Opacity SDK for CapacitorJS
We found that @opacity-labs/capacitor-opacity 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.