
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@http-samc/hyper
Advanced tools
A Javascript SDK for Hyper's API
npm install @http-samc/hyper
Coming soon!
The Hyper API Client is the default export and needs to be supplied to all calls. It validates and holds your API secret key and an (optional) logger function for development purposes. Import and initialize it as follows:
import { Client } from 'hyper'
const client = Hyper('my-hyper-secret-key')
Besides the API Client, each 'category' of endpoints are able to be imported on an as-needed basis via named imports. These are provided as namespaces and their methods correspond to available API calls. You can import them as follows:
import { License, Link, Payment, Product, Waitlist } from 'hyper'
// Use the API by calling the methods of the imported namespaces
License.get(...)
If you want to call the namespaces something different, import them directly from their respective directory as follows (you can change the names as you wish):
import * as License from './license'
import * as Link from './link'
import * as Payment from './payment'
import * as Product from './product'
import * as Waitlist from './waitlist'
// Use the API by calling the methods of the imported namespaces
License.get(...)
This library is asynchronous, meaning that you'll need to use either await
or .then()
to wait for a resolved value. All endpoints return a Promise
that resolves to a HyperApiResponse. This object contains the response json as-is, straight from the server with the addition of an ok
boolean property for easy error checking.
Some endpoints resolve to a HyperApiPaginatedResponse, a child of HyperApiResponse. This type of response adds an intuitive .next()
and .previous
property, which can be used to quickly navigate paginated endpoints. They return null
once you reach a page that doesn't exist, so use the has_more
property (supplied on all paginated endpoints) and make sure you aren't calling a page less than 1 before calling either method.
This library is open-sourced under an MIT license and was written by Samarth Chitgopekar. It is not officially recognized, endorsed, or maintained by Hyper.
FAQs
A Javascript SDK for Hyper's API
The npm package @http-samc/hyper receives a total of 1 weekly downloads. As such, @http-samc/hyper popularity was classified as not popular.
We found that @http-samc/hyper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.