New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@monerium/sdk

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@monerium/sdk

Everything you need to interact with the Monerium API - an electronic money issuer.

  • 2.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
632
increased by40.76%
Maintainers
2
Weekly downloads
 
Created
Source

@monerium/sdk

Everything you need to interact with the Monerium API - an electronic money issuer.

This package is in development. Please make sure to check if any future updates contain commits that may change the behavior of your application before you upgrade.

SDK Documentation

Code coverage

Installing

# Node
yarn add @monerium/sdk

Usage

  • start: Run Vite in host mode for a local development environment (not included in production build)
  • watch: Run Vite in watch mode to detect changes to files during development
  • build: Run Vite to build a production release distributable

Getting started

If you are new here, we recommend starting in the Developer Portal. There you will more about client_id's and ways of authenticating.

import { MoneriumClient } from '@monerium/sdk'

const client = new MoneriumClient();

/** Authenticate using client credentials */

await client.auth({
 client_id: "your_client_credentials_uuid"
 client_secret: "your_client_secret"
})

// User is now authenticated, get authentication data
await client.getAuthContext()

/*************************************/
/** Or, authenticate using auth flow */

// Construct the authFlowUrl for your application and redirect your customer.
let authFlowUrl = client.getAuthFlowURI({
  client_id: "your_client_authflow_uuid"
  redirect_uri: "http://your-webpage.com/monerium-integration"
})
// Redirecting to the Monerium onboarding / Authentication flow.
window.location.replace(authFlowUrl)

// As the final step of the flow, the customer will be routed back to the `redirect_uri` with a `code` parameter attached to it.
// i.e. http://your-webpage.com/monerium-integration?code=1234abcd

await client.auth({
 client_id: "your_client_authflow_uuid",
 code: new URLSearchParams(window.location.search).get('code'),
 code_verifier: client.code_verifier,
 redirect_url: "http://your-webpage.com/monerium-integration"
})

// User is now authenticated, get authentication data
await client.getAuthContext()

Developing

We are using commitlint to enforce that developers format the commit messages according to the Conventional Commits guidelines.

Publishing

When changes are merged to the main branch that follows the conventional commits standard, release-please workflow creates a pull request, preparing for the next release. If kept open, the following commits will also be added to the PR. Merging that PR will create a new release, a workflow will publish it on NPM and tag it on Github.

FAQs

Package last updated on 06 Feb 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc