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

@0xsequence/transactions

Package Overview
Dependencies
Maintainers
4
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.16.0 to 0.18.0

14

CHANGELOG.md
# @0xsequence/transactions
## 0.18.0
### Minor Changes
- relayer improvements and pending transaction handling
### Patch Changes
- Updated dependencies [undefined]
- @0xsequence/abi@0.18.0
- @0xsequence/chaind@0.18.0
- @0xsequence/network@0.18.0
- @0xsequence/utils@0.18.0
## 0.16.0

@@ -4,0 +18,0 @@

13

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

@@ -8,2 +8,3 @@ 'use strict';

var abi$1 = require('@0xsequence/abi');
var utils = require('@0xsequence/utils');

@@ -36,6 +37,12 @@ function _extends() {

)[]`;
function encodeMetaTransactionsData(...txs) {
function packMetaTransactionsData(...txs) {
const nonce = readSequenceNonce(...txs);
return ethers.ethers.utils.defaultAbiCoder.encode(['uint256', MetaTransactionsType], [nonce, sequenceTxAbiEncode(txs)]);
}
function digestOfTransactions(...txs) {
return ethers.ethers.utils.keccak256(packMetaTransactionsData(...txs));
}
function computeMetaTxnHash(address, chainId, ...txs) {
return utils.subDigestOf(address, chainId, digestOfTransactions(...txs)).replace(/^0x/, '');
}
async function toSequenceTransactions(wallet, txs, revertOnError = false, gasLimit = ethers.ethers.constants.Zero) {

@@ -188,4 +195,5 @@ // Bundles all transactions, including the auxiliary ones

exports.appendNonce = appendNonce;
exports.computeMetaTxnHash = computeMetaTxnHash;
exports.decodeNonce = decodeNonce;
exports.encodeMetaTransactionsData = encodeMetaTransactionsData;
exports.digestOfTransactions = digestOfTransactions;
exports.encodeNonce = encodeNonce;

@@ -199,2 +207,3 @@ exports.flattenAuxTransactions = flattenAuxTransactions;

exports.makeExpirable = makeExpirable;
exports.packMetaTransactionsData = packMetaTransactionsData;
exports.readSequenceNonce = readSequenceNonce;

@@ -201,0 +210,0 @@ exports.sequenceTxAbiEncode = sequenceTxAbiEncode;

@@ -8,2 +8,3 @@ 'use strict';

var abi$1 = require('@0xsequence/abi');
var utils = require('@0xsequence/utils');

@@ -36,6 +37,12 @@ function _extends() {

)[]`;
function encodeMetaTransactionsData(...txs) {
function packMetaTransactionsData(...txs) {
const nonce = readSequenceNonce(...txs);
return ethers.ethers.utils.defaultAbiCoder.encode(['uint256', MetaTransactionsType], [nonce, sequenceTxAbiEncode(txs)]);
}
function digestOfTransactions(...txs) {
return ethers.ethers.utils.keccak256(packMetaTransactionsData(...txs));
}
function computeMetaTxnHash(address, chainId, ...txs) {
return utils.subDigestOf(address, chainId, digestOfTransactions(...txs)).replace(/^0x/, '');
}
async function toSequenceTransactions(wallet, txs, revertOnError = false, gasLimit = ethers.ethers.constants.Zero) {

@@ -188,4 +195,5 @@ // Bundles all transactions, including the auxiliary ones

exports.appendNonce = appendNonce;
exports.computeMetaTxnHash = computeMetaTxnHash;
exports.decodeNonce = decodeNonce;
exports.encodeMetaTransactionsData = encodeMetaTransactionsData;
exports.digestOfTransactions = digestOfTransactions;
exports.encodeNonce = encodeNonce;

@@ -199,2 +207,3 @@ exports.flattenAuxTransactions = flattenAuxTransactions;

exports.makeExpirable = makeExpirable;
exports.packMetaTransactionsData = packMetaTransactionsData;
exports.readSequenceNonce = readSequenceNonce;

@@ -201,0 +210,0 @@ exports.sequenceTxAbiEncode = sequenceTxAbiEncode;

import { ethers } from 'ethers';
import { Interface } from '@ethersproject/abi';
import { walletContracts } from '@0xsequence/abi';
import { subDigestOf } from '@0xsequence/utils';

@@ -31,6 +32,12 @@ function _extends() {

)[]`;
function encodeMetaTransactionsData(...txs) {
function packMetaTransactionsData(...txs) {
const nonce = readSequenceNonce(...txs);
return ethers.utils.defaultAbiCoder.encode(['uint256', MetaTransactionsType], [nonce, sequenceTxAbiEncode(txs)]);
}
function digestOfTransactions(...txs) {
return ethers.utils.keccak256(packMetaTransactionsData(...txs));
}
function computeMetaTxnHash(address, chainId, ...txs) {
return subDigestOf(address, chainId, digestOfTransactions(...txs)).replace(/^0x/, '');
}
async function toSequenceTransactions(wallet, txs, revertOnError = false, gasLimit = ethers.constants.Zero) {

@@ -181,2 +188,2 @@ // Bundles all transactions, including the auxiliary ones

export { MetaTransactionsType, appendNonce, decodeNonce, encodeMetaTransactionsData, encodeNonce, flattenAuxTransactions, hasSequenceTransactions, isAsyncSendable, isSequenceTransaction, isSignedTransactions, makeAfterNonce, makeExpirable, readSequenceNonce, sequenceTxAbiEncode, toSequenceTransaction, toSequenceTransactions };
export { MetaTransactionsType, appendNonce, computeMetaTxnHash, decodeNonce, digestOfTransactions, encodeNonce, flattenAuxTransactions, hasSequenceTransactions, isAsyncSendable, isSequenceTransaction, isSignedTransactions, makeAfterNonce, makeExpirable, packMetaTransactionsData, readSequenceNonce, sequenceTxAbiEncode, toSequenceTransaction, toSequenceTransactions };

@@ -34,2 +34,3 @@ import { BigNumberish, BytesLike } from 'ethers';

export declare type SignedTransactions = {
digest: string;
chainId: BigNumberish;

@@ -36,0 +37,0 @@ config: WalletConfig;

4

dist/declarations/src/utils.d.ts

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

export declare const MetaTransactionsType = "tuple(\n bool delegateCall,\n bool revertOnError,\n uint256 gasLimit,\n address target,\n uint256 value,\n bytes data\n)[]";
export declare function encodeMetaTransactionsData(...txs: Transaction[]): string;
export declare function packMetaTransactionsData(...txs: Transaction[]): string;
export declare function digestOfTransactions(...txs: Transaction[]): string;
export declare function computeMetaTxnHash(address: string, chainId: BigNumberish, ...txs: Transaction[]): string;
export declare function toSequenceTransactions(wallet: Signer | string, txs: (Transaction | TransactionRequest)[], revertOnError?: boolean, gasLimit?: BigNumberish): Promise<Transaction[]>;

@@ -8,0 +10,0 @@ export declare function flattenAuxTransactions(txs: (Transactionish | Transactionish)[]): (TransactionRequest | Transaction)[];

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

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

"dependencies": {
"@0xsequence/abi": "^0.16.0",
"@0xsequence/chaind": "^0.16.0",
"@0xsequence/network": "^0.16.0",
"@0xsequence/abi": "^0.18.0",
"@0xsequence/chaind": "^0.18.0",
"@0xsequence/network": "^0.18.0",
"@0xsequence/utils": "^0.18.0",
"@ethersproject/abi": "^5.0.13",

@@ -22,0 +23,0 @@ "ethers": "^5.0.32"

@@ -42,2 +42,3 @@ import { BigNumberish, BytesLike } from 'ethers'

export type SignedTransactions = {
digest: string,
chainId: BigNumberish,

@@ -44,0 +45,0 @@ config: WalletConfig,

@@ -6,2 +6,3 @@ import { ethers, Signer, BigNumberish } from 'ethers'

import { Transaction, TransactionRequest, Transactionish, TransactionEncoded, NonceDependency, SignedTransactions } from './types'
import { subDigestOf } from '@0xsequence/utils'

@@ -17,3 +18,3 @@ export const MetaTransactionsType = `tuple(

export function encodeMetaTransactionsData(...txs: Transaction[]): string {
export function packMetaTransactionsData(...txs: Transaction[]): string {
const nonce = readSequenceNonce(...txs)

@@ -23,2 +24,10 @@ return ethers.utils.defaultAbiCoder.encode(['uint256', MetaTransactionsType], [nonce, sequenceTxAbiEncode(txs)])

export function digestOfTransactions(...txs: Transaction[]): string {
return ethers.utils.keccak256(packMetaTransactionsData(...txs))
}
export function computeMetaTxnHash(address: string, chainId: BigNumberish, ...txs: Transaction[]): string {
return subDigestOf(address, chainId, digestOfTransactions(...txs)).replace(/^0x/, '')
}
export async function toSequenceTransactions(

@@ -139,3 +148,3 @@ wallet: Signer | string,

if (!context || !context.sequenceUtils) {
if (!context || !context.sequenceUtils) {
throw new Error('Undefined sequenceUtils')

@@ -160,3 +169,3 @@ }

if (!context || !context.sequenceUtils) {
if (!context || !context.sequenceUtils) {
throw new Error('Undefined sequenceUtils')

@@ -198,6 +207,3 @@ }

return [
bnonce.div(shr),
bnonce.mod(shr)
]
return [bnonce.div(shr), bnonce.mod(shr)]
}

@@ -204,0 +210,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