
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.
@upvest/tenancy-api
Advanced tools
This API encompasses operations for managing users within your tenancy.
A tenancy is your "area" of Upvest, where you will be registering your users before authenticating them with OAuth2. When registering a user, you will be provided with a recovery kit to forward on to the user.
This API client is based on axios.
Features
Using yarn:
$ yarn add @upvest/tenancy-api
Using npm:
$ npm install @upvest/tenancy-api
In order to retrieve your API credentials for using this client, you'll need to sign up with Upvest.
The Upvest API uses the notion of tenants, which represent customers that build their platform upon the Upvest API. The end-users of the tenant (i.e. your customers), are referred to as clientele users. A tenant is able to manage their users directly (CRUD operations for the user instance) and is also able to initiate actions on the user's behalf (create wallets, send transactions).
The authentication via API keys and secret allows you to perform all tenant related operations. Please create an API key pair within the Upvest account management.
The default BASE_URL
for both authentication objects is https://api.playground.upvest.co
, but feel free to adjust it, once you retrieve your live keys.
const { UpvestTenancyAPI } = require("@upvest/tenancy-api");
const config = {
baseURL: "https://api-playground.eu.upvest.co/1.0/",
apikey: {
key: API_KEY,
secret: API_SECRET,
passphrase: API_PASSPHRASE
}
};
The response objects are designed around users, wallets, transactions and assets. If you retrieve more than one object (for example: tenancy.users.list()
) an array of those objects will be returned.
The user response object has the following properties:
let user = tenancy.users.retrieve("username");
const { username, recoverykit } = user;
Create an UpvestTenancyAPI
object in order to authenticate your API calls
const tenancy = new UpvestTenancyAPI(
config.baseURL,
config.apikey.key,
config.apikey.secret,
config.apikey.passphrase
);
and set-up user credentials
const USERNAME = "Example_user";
const PASSWORD = "ex@mp1e_p@55w0rd";
(async () => {
try {
let newUser = await tenancy.users.create(USERNAME, PASSWORD);
console.log(newUser);
} catch (_) {}
})();
(async () => {
try {
let user = await this.tenancy.users.retrieve(USERNAME);
console.log(user);
} catch (err) {
console.log(err.response.statusText);
}
})();
(async () => {
let users = [];
for await (let user of this.tenancy.users.list()) users.push(user);
console.log(users);
})();
const NEW_PASSWORD = "n3w p@55w0rd";
(async () => {
try {
await tenancy.users.updatePassword(USERNAME, PASSWORD, NEW_PASSWORD);
console.log("Password was updated.");
} catch (_) {}
})();
(async () => {
try {
await tenancy.users.delete(USERNAME);
console.log("User was deleted.");
} catch (_) {}
})();
For more examples, please check out our test-suite at https://www.npmjs.com/package/@upvest/api-tests
This software is released under the MIT License
FAQs
An axios-based client for the Upvest Tenancy API
The npm package @upvest/tenancy-api receives a total of 1 weekly downloads. As such, @upvest/tenancy-api popularity was classified as not popular.
We found that @upvest/tenancy-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
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.