{"id":19713357,"url":"https://github.com/corellium/corellium-typescript","last_synced_at":"2025-07-15T12:44:40.882Z","repository":{"id":238227185,"uuid":"796148482","full_name":"corellium/corellium-typescript","owner":"corellium","description":"A simple and beautiful TypeScript SDK for Corellium","archived":false,"fork":false,"pushed_at":"2025-06-01T11:36:01.000Z","size":910,"stargazers_count":1,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T12:19:24.872Z","etag":null,"topics":["corellium","openapi","sdk","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/corellium-typescript","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corellium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["haydenbleasel"]}},"created_at":"2024-05-05T04:40:53.000Z","updated_at":"2025-05-07T19:42:40.000Z","dependencies_parsed_at":"2024-05-08T17:12:45.247Z","dependency_job_id":"78aa29ca-7c1a-46a2-8dd0-9a5a8e8fee33","html_url":"https://github.com/corellium/corellium-typescript","commit_stats":null,"previous_names":["haydenbleasel/corellium-typescript"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/corellium/corellium-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fcorellium-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fcorellium-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fcorellium-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fcorellium-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corellium","download_url":"https://codeload.github.com/corellium/corellium-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fcorellium-typescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265437291,"owners_count":23765119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["corellium","openapi","sdk","typescript"],"created_at":"2024-11-11T22:21:12.866Z","updated_at":"2025-07-15T12:44:40.864Z","avatar_url":"https://github.com/corellium.png","language":"TypeScript","funding_links":["https://github.com/sponsors/haydenbleasel"],"categories":[],"sub_categories":[],"readme":"# corellium-typescript\n\n[![Version](https://img.shields.io/npm/v/corellium-typescript.svg)](https://www.npmjs.org/package/corellium-typescript) [![Build Status](https://github.com/haydenbleasel/corellium-typescript/actions/workflows/push.yml/badge.svg?branch=main)](https://github.com/haydenbleasel/corellium-typescript/actions?query=branch%3Amain)\n\n![Corellium TypeScript](/sample.png)\n\n`corellium-typescript` is a TypeScript library for interacting with the [Corellium](https://www.corellium.com/) API. It is a wrapper around the Corellium REST API, providing a more user-friendly interface for interacting with the API.\n\nThe key differences between `corellium-typescript` and official Corellium libraries are:\n\n- TypeScript types for all API responses\n- Improved naming of endpoints e.g. `corellium.devices.list` instead of `corellium.v1Instances`\n- Opinionated error handling (throws errors for all non-2xx responses so you can catch them)\n- Endpoints with device context e.g. `corellium.device('deviceId').app.run('com.corellium.cafe')`\n- Deep JSDoc comments for all methods and types\n- Adds undocumented endpoint payloads\n- Supports both ECMAScript Modules (ESM) and CommonJS (CJS) environments\n\n## Requirements\n\n- Node.js 18.x or later\n- A Corellium account\n\n## Installation\n\nYou can install `corellium-typescript` using any JavaScript package manager:\n\n```sh\n# npm\nnpm install corellium-typescript\n\n# yarn\nyarn add corellium-typescript\n\n# pnpm\npnpm add corellium-typescript\n\n# bun\nbun add corellium-typescript\n```\n\n## Usage\n\nTo use `corellium-typescript`, you will need to have a Corellium account and generate an API key. You can generate an API key by logging into the Corellium web interface and navigating to the \"API Keys\" section of your account settings.\n\n```ts\nimport { Corellium } from 'corellium-typescript';\n\nconst corellium = new Corellium('apiToken', {\n  // Optional: Set the API URL to use a different Corellium instance\n  endpoint: 'https://acme.enterprise.corellium.com',\n});\n```\n\nAlternatively, you can use an object containing `username` and `password`:\n\n```ts\nimport { Corellium } from 'corellium-typescript';\n\nconst corellium = new Corellium(\n  {\n    username: 'username',\n    password: 'password',\n  },\n  {\n    // Optional: Set the API URL to use a different Corellium instance\n    endpoint: 'https://acme.enterprise.corellium.com',\n  }\n);\n```\n\nThen, you can use the `corellium` object to interact with the Corellium API. The library is structured in a way that mirrors the Corellium UI, with methods for projects, devices, and apps e.g.\n\n```ts\nconst projects = await corellium.projects.list();\n```\n\n## Examples\n\n### Apps\n\n```ts\n// List all apps on a device\nconst apps = await corellium.device('deviceId').app.list();\n\n// Run an app on a device\nawait corellium.device('deviceId').app.run('com.corellium.cafe');\n\n// Install an app on a device\nawait corellium.device('123').app.install({ path: '/com.corellium.cafe.ipa' });\n\n// Uninstall an app from a device\nawait corellium.device('deviceId').app.uninstall('com.corellium.cafe');\n\n// Get statuses for all apps on a device\nconst statuses = await corellium.device('deviceId').app.statuses();\n\n// Get the icons for specified apps on a device\nconst icons = await corellium\n  .device('deviceId')\n  .app.icons(['com.corellium.cafe', 'com.apple.mobilesafari']);\n\n// Kill an app on a device\nawait corellium.device('deviceId').app.kill('com.corellium.cafe');\n\n// Install OpenGApps on an Android device\nawait corellium.device('deviceId').app.openGApps.install();\n```\n\n### AuthProviders\n\n```ts\n// Create an auth provider\nconst provider = await corellium.authProvider.create({\n  enabled: true,\n  providerType: 'open-id-connect',\n  label: \"Login with Custom Auth0\",\n  config: {\n    discoveryUrl: 'http://localhost:8080/realms/Corellium/.well-known/openid-configuration',\n    clientId: 'B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4',\n    clientSecret: 'itsasecret',\n    invitedOnly: false\n  }\n}\n\n// Delete an auth provider\nawait corellium.authProvider.delete('authProviderId');\n\n// List all auth providers\nconst providers = await corellium.authProvider.list();\n\n// Update an auth provider\nawait corellium.authProvider.update('authProviderId', {\n  enabled: false,\n  label: \"Login with Custom Auth0 (disabled)\"\n});\n```\n\n### Authentication\n\n```ts\n// Change the password for a user\nawait corellium.auth.changePassword({\n  userId: 'userId',\n  oldPassword: 'newpassword',\n  newPassword: 'oldpassword',\n});\n\n// Reset the password for a user using a token\nawait corellium.auth.resetPassword({\n  token: 'token',\n  totpToken: 'totpToken',\n  newPassword: 'newpassword',\n});\n\n// Send a password reset email to a user\nawait corellium.auth.sendPasswordResetEmail({\n  email: 'jane@acme.com',\n});\n\n// Consent to the terms of service\nawait corellium.auth.consent();\n```\n\n### Connect\n\n```ts\n// Get the QuickConnect URL for a device\nconst url = await corellium.device('deviceId').connect.quickConnect.get();\n\n// Get IP of eth0 (AOSP only)\nconst ip = await corellium.device('deviceId').connect.eth0IP.get();\n\n// Get ADB Auth Setting (AOSP only)\nconst auth = await corellium.device('deviceId').connect.adbAuthSetting.get();\n\n// Set ADB Auth Setting (AOSP only)\nawait corellium.device('deviceId').connect.adbAuthSetting.set({\n  enabled: true,\n});\n\n// Connect to WiFi\nawait corellium.device('deviceId').connect.wifi.connect();\n\n// Disconnect from WiFi\nawait corellium.device('deviceId').connect.wifi.disconnect();\n```\n\n### Console\n\n```ts\n// Get console websocket URL\nconst url = await corellium.device('deviceId').console.get();\n```\n\n### CoreTrace\n\n```ts\n// Start running CoreTrace on a device\nawait corellium.device('deviceId').coreTrace.start();\n\n// Stop running CoreTrace on a device\nawait corellium.device('deviceId').coreTrace.stop();\n\n// Get running CoreTrace threads on a device\nconst threads = await corellium.device('deviceId').coreTrace.threads();\n\n// Clear the CoreTrace data on a device\nawait corellium.device('deviceId').coreTrace.clear();\n```\n\n### Devices (General)\n\n```ts\n// List all devices\nconst devices = await corellium.devices.list();\n\n// Create a new device (Jailbroken / Rooted by default)\nconst device = await corellium.devices.create({\n  project: 'projectId',\n  name: 'My New Device',\n  flavor: 'ranchu',\n  os: '14.0.0',\n});\n\n// Search for devices by name\nconst search = await corellium.devices.search('My Device');\n```\n\n### Device (Specific)\n\n```ts\n// Get a device\nconst device = await corellium.device('deviceId').get();\n\n// Delete a device\nawait corellium.device('deviceId').delete();\n\n// Update a device\nawait corellium.device('deviceId').update({\n  name: 'My Updated Device',\n});\n\n// Start a device\nawait corellium.device('deviceId').start();\n\n// Stop a device\nawait corellium.device('deviceId').stop();\n\n// Reboot a device\nawait corellium.device('deviceId').reboot();\n\n// Pause a device\nawait corellium.device('deviceId').pause();\n\n// Resume a device\nawait corellium.device('deviceId').resume();\n\n// Lock a device (iOS only)\nawait corellium.device('deviceId').lock();\n\n// Unlock a device (iOS only)\nawait corellium.device('deviceId').unlock();\n\n// Get the Websocket URL for a device\nconst url = await corellium.device('deviceId').websocket.get();\n\n// Get the state of a device\nconst state = await corellium.device('deviceId').state.get();\n\n// Get the GPIO state of a device\nconst gpio = await corellium.device('deviceId').gpio.get();\n\n// Set the GPIO state of a device\nawait corellium.device('deviceId').gpio.set({\n  button: {\n    bitCount: 2,\n    banks: [\n      [0, 1],\n      [1, 0],\n    ],\n  },\n  switch: {\n    bitCount: 8,\n    banks: [[0, 1, 0, 1, 0, 1, 0, 1]],\n  },\n});\n\n// Get the device's sensors\nconst sensors = await corellium.device('deviceId').sensors.get();\n\n// Set the device's sensors\nawait corellium.device('deviceId').sensors.set({\n  acceleration: [0, 9.81, 0],\n  gyroscope: [0, 0, 0],\n  magnetic: [0, 45, 0],\n  orientation: [0, 0, 0],\n  temperature: 25,\n  proximity: 50,\n  light: 20,\n  pressure: 1013.25,\n  humidity: 55,\n});\n\n// Take a screenshot of a device\nconst screenshot = await corellium.device('deviceId').takeScreenshot('png');\n\n// Rotate a device\nawait corellium.device('deviceId').rotate('landscape');\n\n// Send input to a device\nawait corellium.device('deviceId').input([\n  {\n    buttons: ['finger'],\n    position: [[300, 600]],\n    wait: 0,\n  },\n  {\n    buttons: [],\n    wait: 100,\n  },\n]);\n\n// Upgrade a device's OS (iOS only)\nawait corellium.device('deviceId').upgrade({\n  os: '15.0.0',\n});\n\n// Check if a device is ready for interaction\nconst ready = await corellium.device('deviceId').ready();\n\n// Set the hostname of a device\nawait corellium.device('deviceId').hostname.set('my-hostname');\n\n// Get a system property (Android only)\nconst property = await corellium\n  .device('deviceId')\n  .property.get('corellium.opengapps');\n\n// Run Frida\nawait corellium.device('deviceId').frida.run('targetPid', 'targetName');\n\n// List Frida processes on the device.\nconst processes = await corellium.device('deviceId').frida.list();\n\n// Run Frida Kill\nawait corellium.device('deviceId').frida.kill();\n\n// Check if SSL Pinning is enabled\nconst isEnabled = await corellium.device('deviceId').sslPinning.get();\n\n// Enable SSL Pinning\nawait corellium.device('deviceId').sslPinning.set(true);\n\n// Disable SSL Pinning\nawait corellium.device('deviceId').sslPinning.set(false);\n\n// Enable UI Automation\nawait corellium.device('deviceId').uiAutomation.set(true);\n\n// Disable UI Automation\nawait corellium.device('deviceId').uiAutomation.set(false);\n\n// Acquire DisableAutolockAssertion\nawait corellium.device('deviceId').disableAutolockAssertion.acquire();\n\n// Release DisableAutolockAssertion\nconst commandResponse = await corellium\n  .device('deviceId')\n  .disableAutolockAssertion.release();\n\n// Send a commands directly into the device e.g. Run a shell command\nconst commandResponse = await corellium\n  .device('deviceId')\n  .send('app', 'shellExec', { cmd });\n```\n\n### Device (Specific) - MATRIX\n\n```ts\n// Run a MATRIX assessment\nawait corellium.device('deviceId').matrix.run({\n  bundleId: 'com.corellium.cafe',\n});\n\n// Get a MATRIX assessment\nconst assessment = await corellium\n  .device('deviceId')\n  .matrix.assessment.get('assessmentId');\n\n// Get all MATRIX assessments\nconst assessments = await corellium.device('deviceId').matrix.assessment.list();\n\n// Delete a MATRIX assessment\nawait corellium.device('deviceId').matrix.assessment.delete('assessmentId');\n\n// Download a MATRIX assessment\nconst assessment = await corellium\n  .device('deviceId')\n  .matrix.assessment.download('assessmentId', 'json');\n```\n\n### Files\n\n```ts\n// Get a file from a device\nconst file = await corellium.device('deviceId').file.get('/data/test.txt');\n\n// Put a file on a device\nawait corellium\n  .device('deviceId')\n  .file.create('/data/test.txt', 'Hello, World!');\n\n// Delete a file from a device\nawait corellium.device('deviceId').file.delete('/data/test.txt');\n\n// Update a file on a device\nawait corellium.device('deviceId').file.update('/data/test.txt', {\n  path: '/data/test.txt',\n  mode: 0,\n  uid: 0,\n  gid: 0,\n});\n\n// Generate a unique filename on a device\nconst filename = await corellium.device('deviceId').file.generateFilename();\n```\n\n### HyperTrace\n\n```ts\n// Start running HyperTrace on a device\nawait corellium.device('deviceId').hyperTrace.start();\n\n// Stop running HyperTrace on a device\nawait corellium.device('deviceId').hyperTrace.stop();\n\n// Get Kernel extension ranges\nconst ranges = await corellium.device('deviceId').hyperTrace.ranges();\n\n// Pre-authorize a HyperTrace download\nconst preauth = await corellium.device('deviceId').hyperTrace.authorize();\n\n// Clear the HyperTrace data on a device\nawait corellium.device('deviceId').hyperTrace.clear();\n```\n\n### Image\n\n```ts\n// List all images\nconst images = await corellium.image.list();\n\n// Create a new image\nconst image = await corellium.image.create({\n  type: 'binary',\n  encoding: 'plain',\n  encapsulated: false,\n  name: 'My New Image',\n  project: 'projectId',\n  instance: 'instanceId',\n  file: File,\n});\n\n// Get an image\nconst image = await corellium.image.get('imageId');\n\n// Update an image (contents)\nawait corellium.image.update('imageId', File);\n\n// Delete an image\nawait corellium.image.delete('imageId');\n```\n\n### Kernel Hooks\n\n```ts\n// List all kernel hooks on a device\nconst hooks = await corellium.device('deviceId').kernelHook.list();\n\n// Create a new kernel hook on a device\nconst hook = await corellium.device('deviceId').kernelHook.create({\n  label: 'TEST HOOK',\n  address: '0xfffffff006ae8864',\n  patch: `print(\"Hello, world\\n\");`,\n  patchType: 'csmfcc',\n});\n\n// Get a kernel hook on a device\nconst hook = await corellium.device('deviceId').kernelHook.get('hookId');\n\n// Update a kernel hook on a device\nawait corellium.device('deviceId').kernelHook.update('hookId', {\n  label: 'TEST HOOK (updated)',\n});\n\n// Delete a kernel hook on a device\nawait corellium.device('deviceId').kernelHook.delete('hookId');\n\n// Run kernel hooks on a device\nawait corellium.device('deviceId').kernelHook.run();\n\n// Clear kernel hooks on a device\nawait corellium.device('deviceId').kernelHook.clear();\n```\n\n### Media\n\n```ts\n// Start playing media file on a device\nawait corellium.device('deviceId').media.start({\n  url: 'http://example.com/video.mp4',\n});\n\n// Stop playing media file on a device\nawait corellium.device('deviceId').media.stop();\n```\n\n### Messaging\n\n```ts\n// Receive a message (iOS only)\nconst message = await corellium.device('deviceId').message.receive({\n  number: '+1234567890',\n  message: 'Hello, World!',\n});\n```\n\n### Models\n\n```ts\n// List all models\nconst models = await corellium.model.list();\n\n// List all software for a model\nconst software = await corellium.model.software.list('modelId');\n```\n\n### Network Monitor\n\n```ts\n// Start network monitoring on a device\nawait corellium.device('deviceId').networkMonitor.start();\n\n// Stop network monitoring on a device\nawait corellium.device('deviceId').networkMonitor.stop();\n\n// Download network monitoring data from a device (PCAP)\nconst pcap = await corellium.device('deviceId').networkMonitor.download();\n```\n\nYou can also use the Advanced Network Monitor, like so:\n\n```ts\n// Start advanced network monitoring on a device\nawait corellium.device('deviceId').networkMonitor.advanced.start({\n  ports: ['443', '80'],\n  processes: ['42'],\n});\n\n// Stop advanced network monitoring on a device\nawait corellium.device('deviceId').networkMonitor.advanced.stop();\n\n// Download advanced network monitoring data from a device (PCAP)\nconst pcap = await corellium\n  .device('deviceId')\n  .networkMonitor.advanced.download();\n```\n\n### Panics\n\n```ts\n// List all panics on a device\nconst panics = await corellium.device('deviceId').panic.list();\n\n// Clear all panics on a device\nawait corellium.device('deviceId').panic.clear();\n```\n\n### Profiles\n\n```ts\n// List all profiles on a device\nconst profiles = await corellium.device('deviceId').profile.list();\n\n// Install a profile on a device\nawait corellium.device('deviceId').profile.install(File);\n\n// Delete a profile from a device\nawait corellium.device('deviceId').profile.delete('profileId');\n```\n\n### Projects (General)\n\n```ts\n// List all projects\nconst projects = await corellium.projects.list();\n\n// Create a new project\nconst project = await corellium.projects.create({\n  name: 'My New Project',\n});\n\n// Search for projects by name\nconst search = await corellium.projects.search('My Project');\n```\n\n### Project (Specific)\n\n```ts\n// Get a project\nconst project = await corellium.project('projectId').get();\n\n// Update a project\nawait corellium.project('projectId').update({\n  name: 'My Updated Project',\n});\n\n// Delete a project\nawait corellium.project('projectId').delete();\n\n// Get devices in a project\nconst devices = await corellium.project('projectId').device.list();\n\n// Get the VPN configuration for a project\nconst vpn = await corellium.project('projectId').vpn.get();\n\n// List the SSH keys for a project\nconst keys = await corellium.project('projectId').keys.list();\n\n// Add an SSH key to a project\nawait corellium.project('projectId').keys.add({\n  kind: 'ssh',\n  label: 'My New Key',\n  key: 'ssh-ed25519 \u003ckey\u003e',\n});\n\n// Delete an SSH key from a project\nawait corellium.project('projectId').keys.delete('keyId');\n```\n\n### Roles\n\n```ts\n// List all roles\nconst roles = await corellium.role.list();\n\n// Add a user role to a project\nawait corellium.role.add('projectId', 'roleId', {\n  userId: 'userId',\n});\n\n// Remove a user role from a project\nawait corellium.role.remove('projectId', 'roleId', {\n  userId,\n});\n\n// Add a team role to a project\nawait corellium.role.add('projectId', 'roleId', {\n  teamId: 'teamId',\n});\n\n// Remove a team role from a project\nawait corellium.role.remove('projectId', 'roleId', {\n  teamId,\n});\n```\n\n### Snapshots\n\n```ts\n// List all snapshots\nconst snapshots = await corellium.snapshot.list('deviceId');\n\n// Create a new snapshot\nconst snapshot = await corellium.snapshot.create('deviceId', {\n  name: 'My New Snapshot',\n});\n\n// Get a snapshot\nconst snapshot = await corellium.snapshot.get('deviceId', 'snapshotId');\n\n// Update a snapshot\nawait corellium.snapshot.update('deviceId', 'snapshotId', {\n  name: 'My Updated Snapshot',\n});\n\n// Delete a snapshot\nawait corellium.snapshot.delete('deviceId', 'snapshotId');\n\n// Restore a snapshot\nawait corellium.snapshot.restore('deviceId', 'snapshotId');\n\n// List shared snapshots\nconst sharedSnapshots = await corellium.snapshot.sharing.list();\n\n// Share a snapshot\nawait corellium.snapshot.sharing.create('snapshotId', {\n  sharingType: 'passwordPublicLink',\n  password: 'password',\n});\n\n// Set the sharing policy for a snapshot\nawait corellium.snapshot.sharing.allow('snapshotId', {\n  members: ['jane@acme.com', 'john@acme.com'],\n});\n\n// Revoke the sharing policy for a snapshot\nawait corellium.snapshot.sharing.revoke('snapshotId', {\n  members: ['jane@acme.com', 'john@acme.com'],\n});\n\n// Accept a shared snapshot\nawait corellium.snapshot.sharing.accept({\n  sharingType: 'passwordPublicLink',\n  password: 'abcd',\n});\n```\n\nYou can run a couple of these commands without a device context, like so:\n\n```ts\n// Get a snapshot\nconst snapshots = await corellium.snapshot.get('snapshotId');\n\n// Delete a snapshot\nawait corellium.snapshot.delete('snapshotId');\n\n// Update a snapshot\nawait corellium.snapshot.update('snapshotId', {\n  name: 'My Updated Snapshot',\n});\n```\n\n### Team\n\n```ts\n// List all teams\nconst teams = await corellium.team.list();\n\n// Get a team\nconst team = await corellium.team.get('teamId');\n\n// Create a new team\nconst team = await corellium.team.create({\n  name: 'My New Team',\n});\n\n// Update a team\nawait corellium.team.update('teamId', {\n  name: 'My Updated Team',\n});\n\n// Delete a team\nawait corellium.team.delete('teamId');\n\n// Add a user to a team\nawait corellium.team.user.create('teamId', 'userId');\n\n// Remove a user from a team\nawait corellium.team.user.delete('teamId', 'userId');\n```\n\n## Tokens (API)\n\n```ts\n// Create an API Token for the current user.\nconst token = await corellium.token.create();\n\n// Delete the current user's API Token.\nawait corellium.token.delete();\n```\n\n### Users\n\n```ts\n// Delete a user\nawait corellium.user.delete('userId');\n```\n\n### Webplayer\n\n```ts\n// List all Webplayer sessions\nconst sessions = await corellium.webplayer.list();\n\n// Create a new Webplayer session\nconst session = await corellium.webplayer.create({\n  projectId: 'projectId',\n  instanceId: 'instanceId',\n  expiresIn: 3600, // 1 hour\n  features: {\n    apps: true,\n    console: true,\n    files: true,\n  },\n});\n\n// Get a Webplayer session\nconst session = await corellium.webplayer.get('sessionId');\n\n// Refresh a Webplayer session\nawait corellium.webplayer.refresh('sessionId');\n\n// Delete a Webplayer session\nawait corellium.webplayer.delete('sessionId');\n\n// Retrieve the list of allowed domains for all Webplayer sessions\nconst domains = await corellium.webplayer.domains.list();\n```\n\n## Recipes\n\n### Hold down two buttons concurrently for 3 seconds\n\n```ts\nimport { Corellium } from 'corellium-typescript';\n\nconst corellium = new Corellium('apiToken');\n\nawait corellium\n  .device('deviceId')\n  .input([\n    { buttons: ['volumeUp', 'volumeDown'] },\n    { buttons: [], wait: 3000 },\n  ]);\n```\n\n### Run network monitor for 10 seconds and download the PCAP\n\n```ts\nimport { Corellium } from 'corellium-typescript';\n\nconst corellium = new Corellium('apiToken');\n\nawait corellium.device('deviceId').networkMonitor.start();\n\nawait new Promise((resolve) =\u003e setTimeout(resolve, 10000));\n\nconst pcap = await corellium.device('deviceId').networkMonitor.download();\n```\n\n### Create a kernel hook and run all hooks on a device\n\n```ts\nimport { Corellium } from 'corellium-typescript';\n\nconst corellium = new Corellium('apiToken');\n\nconst hook = await corellium.device('deviceId').kernelHook.create({\n  label: 'TEST HOOK',\n  address: '0xfffffff006ae8864',\n  patch: `print(\"Hello, world\\n\");`,\n  patchType: 'csmfcc',\n});\n\nawait corellium.device('deviceId').kernelHook.run();\n```\n\n### Create a new project and add a user to it\n\n```ts\nimport { Corellium } from 'corellium-typescript';\n\nconst corellium = new Corellium('apiToken');\n\nconst project = await corellium.projects.create({\n  name: 'My New Project',\n});\n\nconst roles = await corellium.role.list();\n\nawait corellium.role.add(project.id, roles[0].id, {\n  userId,\n});\n```\n\n### Spin up 10 Android devices concurrently\n\n```ts\nimport { Corellium } from 'corellium-typescript';\n\nconst corellium = new Corellium('apiToken');\n\nconst project = await corellium.projects.create({\n  name: 'My New Project',\n});\n\nconst devices = await Promise.allSettled(\n  Array.from({ length: 10 }).map(() =\u003e\n    corellium.devices.create({\n      project: project.id,\n      name: 'My New Device',\n      flavor: 'ranchu',\n      os: '14.0.0',\n    })\n  )\n);\n\n// Errors will contain the devices that failed to create\nconst errors = devices.filter((device) =\u003e device.status === 'rejected');\nconst successes = devices.filter((device) =\u003e device.status === 'fulfilled');\n\nif (errors.length) {\n  console.error(errors);\n}\n\nconsole.log(\n  `Successfully created ${successes.length} / ${devices.length} devices`\n);\n```\n\n### Create an iPhone XS and wait for it to be ready\n\n```ts\nimport { Corellium } from 'corellium-typescript';\n\nconst corellium = new Corellium('apiToken');\n\nconst device = await corellium.devices.create({\n  project: 'projectId',\n  name: 'My New Device',\n  flavor: 'iphone-xs',\n  os: '14.0.0',\n});\n\nwhile (!(await corellium.device(device.id).ready())) {\n  // Wait 1 minute before checking again\n  await new Promise((resolve) =\u003e setTimeout(resolve, 60000));\n}\n\nconsole.log('Device is ready!');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorellium%2Fcorellium-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorellium%2Fcorellium-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorellium%2Fcorellium-typescript/lists"}