New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

wyre-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wyre-api

Node.js client library for the Wyre API.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Wyre

Node.js client library for the Wyre API.

Install

npm install wyre-api

Usage

const WyreClient = require('wyre-api').WyreClient
// import {WyreClient} from 'wyre-api'

let wyre = new WyreClient({
    apiKey: "P334FCDXQ4UVAWVPUZ4V",
    secretKey: "4AZEWMYB7CFJWWZMCEWX"
})

wyre.get("/account")
    .then(data => {
        // .. success
    },
    err => {
        // .. error
    })

wyre.get("/transfers", {
    limit: 1,
    offset: 1
})
    .then(successCallback, errorCallback)

wyre.post("/transfers", {
    sourceAmount: "10",
    sourceCurrency: "USD",
    dest: "email:test@sendwyre.com"
})
    .then(successCallback, errorCallback)

Ability to override options used by the Request client on both constructor and per request:

let wyre = new WyreClient({
    apiKey: "P334FCDXQ4UVAWVPUZ4V",
    secretKey: "4AZEWMYB7CFJWWZMCEWX",
    options: {
        timeout: 1500
    }
})
wyre.get("/rates", {}, {
    timeout: 1500
})
    .then(successCallback, errorCallback)

Errors

Example error response:

{
    language: "en",
    exceptionId: "8MAM48",
    compositeType: "Field deprecated",
    subType: "Field deprecated",
    message: "Field dest is required.",
    type: "FieldRequiredException",
    transient: false
}

Keywords

wyre

FAQs

Package last updated on 06 Jun 2018

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