Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@moneybutton/paymail-client

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@moneybutton/paymail-client - npm Package Compare versions

Comparing version 0.33.0 to 0.34.0

19

dist/paymail-client.cjs.js

@@ -361,7 +361,6 @@ 'use strict';

buildBodySendTx(transactions, metadata, reference) {
buildBodySendTx(hexTransaction, metadata) {
return {
transactions,
metadata,
reference
hex: hexTransaction,
metadata
};

@@ -579,13 +578,9 @@ }

async sendRawTx(targetPaymail, transactions = [], metadata = {}, reference = null) {
if (!transactions.every(tx => tx.hex)) {
throw new Error('Transactions should include "hex" field');
async sendRawTx(targetPaymail, hexTransaction, metadata = {}) {
if (!hexTransaction) {
throw new Error('transaction hex cannot be empty');
}
if (transactions.length === 0) {
throw new Error('Transaction array should not be empty.');
}
let receiveTxUrl = await this.resolver.getSendTxUrlFor(targetPaymail);
const response = await this.http.postJson(receiveTxUrl, this.requestBodyFactory.buildBodySendTx(transactions, metadata, reference));
const response = await this.http.postJson(receiveTxUrl, this.requestBodyFactory.buildBodySendTx(hexTransaction, metadata));

@@ -592,0 +587,0 @@ if (!response.ok) {

@@ -355,7 +355,6 @@ import AbortController from 'abort-controller';

buildBodySendTx(transactions, metadata, reference) {
buildBodySendTx(hexTransaction, metadata) {
return {
transactions,
metadata,
reference
hex: hexTransaction,
metadata
};

@@ -573,13 +572,9 @@ }

async sendRawTx(targetPaymail, transactions = [], metadata = {}, reference = null) {
if (!transactions.every(tx => tx.hex)) {
throw new Error('Transactions should include "hex" field');
async sendRawTx(targetPaymail, hexTransaction, metadata = {}) {
if (!hexTransaction) {
throw new Error('transaction hex cannot be empty');
}
if (transactions.length === 0) {
throw new Error('Transaction array should not be empty.');
}
let receiveTxUrl = await this.resolver.getSendTxUrlFor(targetPaymail);
const response = await this.http.postJson(receiveTxUrl, this.requestBodyFactory.buildBodySendTx(transactions, metadata, reference));
const response = await this.http.postJson(receiveTxUrl, this.requestBodyFactory.buildBodySendTx(hexTransaction, metadata));

@@ -586,0 +581,0 @@ if (!response.ok) {

{
"name": "@moneybutton/paymail-client",
"version": "0.33.0",
"version": "0.34.0",
"description": "Money Button isomorphic Paymail utilities.",

@@ -68,3 +68,3 @@ "main": "dist/paymail-client.cjs.js",

},
"gitHead": "72284f2574b939451f0b1cf59b17502125165758"
"gitHead": "924f8c35fb44d25117aea894876ace691b7c8fd8"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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