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

@0xsequence/transactions

Package Overview
Dependencies
Maintainers
5
Versions
205
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/transactions - npm Package Compare versions

Comparing version 0.41.3 to 0.42.0

25

dist/0xsequence-transactions.cjs.dev.js

@@ -66,14 +66,21 @@ 'use strict';

function flattenAuxTransactions(txs) {
if (!Array.isArray(txs)) return flattenAuxTransactions([txs]);
return txs.reduce(function (p, c) {
if (Array.isArray(c)) {
return p.concat(flattenAuxTransactions(c));
}
if (!Array.isArray(txs)) {
if ('auxiliary' in txs) {
const aux = txs.auxiliary;
if (c.auxiliary) {
return p.concat([c, ...flattenAuxTransactions(c.auxiliary)]);
const tx = _extends({}, txs);
delete tx.auxiliary;
if (aux) {
return [tx, ...flattenAuxTransactions(aux)];
} else {
return [tx];
}
} else {
return [txs];
}
}
return p.concat(c);
}, []);
return txs.flatMap(flattenAuxTransactions);
}

@@ -80,0 +87,0 @@ async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.ethers.constants.Zero, nonce) {

@@ -66,14 +66,21 @@ 'use strict';

function flattenAuxTransactions(txs) {
if (!Array.isArray(txs)) return flattenAuxTransactions([txs]);
return txs.reduce(function (p, c) {
if (Array.isArray(c)) {
return p.concat(flattenAuxTransactions(c));
}
if (!Array.isArray(txs)) {
if ('auxiliary' in txs) {
const aux = txs.auxiliary;
if (c.auxiliary) {
return p.concat([c, ...flattenAuxTransactions(c.auxiliary)]);
const tx = _extends({}, txs);
delete tx.auxiliary;
if (aux) {
return [tx, ...flattenAuxTransactions(aux)];
} else {
return [tx];
}
} else {
return [txs];
}
}
return p.concat(c);
}, []);
return txs.flatMap(flattenAuxTransactions);
}

@@ -80,0 +87,0 @@ async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.ethers.constants.Zero, nonce) {

@@ -62,14 +62,21 @@ import { ethers } from 'ethers';

function flattenAuxTransactions(txs) {
if (!Array.isArray(txs)) return flattenAuxTransactions([txs]);
return txs.reduce(function (p, c) {
if (Array.isArray(c)) {
return p.concat(flattenAuxTransactions(c));
}
if (!Array.isArray(txs)) {
if ('auxiliary' in txs) {
const aux = txs.auxiliary;
if (c.auxiliary) {
return p.concat([c, ...flattenAuxTransactions(c.auxiliary)]);
const tx = _extends({}, txs);
delete tx.auxiliary;
if (aux) {
return [tx, ...flattenAuxTransactions(aux)];
} else {
return [tx];
}
} else {
return [txs];
}
}
return p.concat(c);
}, []);
return txs.flatMap(flattenAuxTransactions);
}

@@ -76,0 +83,0 @@ async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.constants.Zero, nonce) {

@@ -11,3 +11,3 @@ import { Signer, BigNumberish } from 'ethers';

export declare function toSequenceTransactions(wallet: Signer | string, txs: (Transaction | TransactionRequest)[], revertOnError?: boolean, gasLimit?: BigNumberish): Promise<Transaction[]>;
export declare function flattenAuxTransactions(txs: (Transactionish | Transactionish)[]): (TransactionRequest | Transaction)[];
export declare function flattenAuxTransactions(txs: Transactionish | Transactionish[]): (TransactionRequest | Transaction)[];
export declare function toSequenceTransaction(wallet: Signer | string, tx: TransactionRequest | Transaction, revertOnError?: boolean, gasLimit?: BigNumberish, nonce?: BigNumberish): Promise<Transaction>;

@@ -14,0 +14,0 @@ export declare function isAsyncSendable(target: any): any;

{
"name": "@0xsequence/transactions",
"version": "0.41.3",
"version": "0.42.0",
"description": "transactions sub-package for Sequence",

@@ -17,5 +17,5 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/transactions",

"dependencies": {
"@0xsequence/abi": "^0.41.3",
"@0xsequence/network": "^0.41.3",
"@0xsequence/utils": "^0.41.3",
"@0xsequence/abi": "^0.42.0",
"@0xsequence/network": "^0.42.0",
"@0xsequence/utils": "^0.42.0",
"@ethersproject/abi": "^5.5.0",

@@ -22,0 +22,0 @@ "ethers": "^5.5.2"

@@ -59,15 +59,21 @@ import { ethers, Signer, BigNumberish } from 'ethers'

export function flattenAuxTransactions(txs: (Transactionish | Transactionish)[]): (TransactionRequest | Transaction)[] {
if (!Array.isArray(txs)) return flattenAuxTransactions([txs])
return txs.reduce(function (p: Transactionish[], c: Transactionish) {
if (Array.isArray(c)) {
return p.concat(flattenAuxTransactions(c))
}
export function flattenAuxTransactions(txs: Transactionish | Transactionish[]): (TransactionRequest | Transaction)[] {
if (!Array.isArray(txs)) {
if ('auxiliary' in txs) {
const aux = txs.auxiliary
if ((<TransactionRequest>c).auxiliary) {
return p.concat([c, ...flattenAuxTransactions((<TransactionRequest>c).auxiliary!)])
const tx = { ...txs }
delete tx.auxiliary
if (aux) {
return [tx, ...flattenAuxTransactions(aux)]
} else {
return [tx]
}
} else {
return [txs]
}
}
return p.concat(c)
}, []) as (TransactionRequest | Transaction)[]
return txs.flatMap(flattenAuxTransactions)
}

@@ -74,0 +80,0 @@

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