@0xsequence/account
Advanced tools
Comparing version 0.0.0-20230920213211 to 0.0.0-20230922164806
@@ -1,2 +0,2 @@ | ||
export * from "./declarations/src/index"; | ||
export * from "../src/index"; | ||
//# sourceMappingURL=0xsequence-account.cjs.d.ts.map |
@@ -1,7 +0,16 @@ | ||
'use strict'; | ||
"use strict"; | ||
// this file might look strange and you might be wondering what it's for | ||
// it's lets you import your source files by importing this entrypoint | ||
// as you would import it if it was built with preconstruct build | ||
// this file is slightly different to some others though | ||
// it has a require hook which compiles your code with Babel | ||
// this means that you don't have to set up @babel/register or anything like that | ||
// but you can still require this module and it'll be compiled | ||
if (process.env.NODE_ENV === "production") { | ||
module.exports = require("./0xsequence-account.cjs.prod.js"); | ||
} else { | ||
module.exports = require("./0xsequence-account.cjs.dev.js"); | ||
} | ||
// this bit of code imports the require hook and registers it | ||
let unregister = require("../../../node_modules/.pnpm/@preconstruct+hook@0.4.0/node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../..", ".."); | ||
// this re-exports the source file | ||
module.exports = require("../src/index.ts"); | ||
unregister(); |
{ | ||
"name": "@0xsequence/account", | ||
"version": "0.0.0-20230920213211", | ||
"version": "0.0.0-20230922164806", | ||
"description": "tools for migrating sequence wallets to new versions", | ||
@@ -13,9 +13,9 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/account", | ||
"ethers": "^5.5.2", | ||
"@0xsequence/core": "0.0.0-20230920213211", | ||
"@0xsequence/migration": "0.0.0-20230920213211", | ||
"@0xsequence/network": "0.0.0-20230920213211", | ||
"@0xsequence/sessions": "0.0.0-20230920213211", | ||
"@0xsequence/relayer": "0.0.0-20230920213211", | ||
"@0xsequence/utils": "0.0.0-20230920213211", | ||
"@0xsequence/wallet": "0.0.0-20230920213211" | ||
"@0xsequence/migration": "0.0.0-20230922164806", | ||
"@0xsequence/network": "0.0.0-20230922164806", | ||
"@0xsequence/relayer": "0.0.0-20230922164806", | ||
"@0xsequence/core": "0.0.0-20230922164806", | ||
"@0xsequence/utils": "0.0.0-20230922164806", | ||
"@0xsequence/sessions": "0.0.0-20230922164806", | ||
"@0xsequence/wallet": "0.0.0-20230922164806" | ||
}, | ||
@@ -25,4 +25,4 @@ "devDependencies": { | ||
"nyc": "^15.1.0", | ||
"@0xsequence/signhub": "0.0.0-20230920213211", | ||
"@0xsequence/tests": "0.0.0-20230920213211" | ||
"@0xsequence/tests": "0.0.0-20230922164806", | ||
"@0xsequence/signhub": "0.0.0-20230922164806" | ||
}, | ||
@@ -29,0 +29,0 @@ "files": [ |
import { commons, universal } from '@0xsequence/core' | ||
import { migrator, defaults, version } from '@0xsequence/migration' | ||
import { ChainId, NetworkConfig } from '@0xsequence/network' | ||
import { NetworkConfig } from '@0xsequence/network' | ||
import { FeeOption, FeeQuote, isRelayer, Relayer, RpcRelayer } from '@0xsequence/relayer' | ||
@@ -10,3 +10,2 @@ import { tracker } from '@0xsequence/sessions' | ||
import { ethers, TypedDataDomain, TypedDataField } from 'ethers' | ||
import { AccountSigner, AccountSignerOptions } from './signer' | ||
@@ -111,6 +110,2 @@ export type AccountStatus = { | ||
getSigner(chainId: ChainId, options?: AccountSignerOptions): AccountSigner { | ||
return new AccountSigner(this, chainId, options) | ||
} | ||
static async new(options: { | ||
@@ -173,3 +168,3 @@ config: commons.config.SimpleConfig | ||
providerFor(chainId: ethers.BigNumberish): ethers.providers.Provider { | ||
provider(chainId: ethers.BigNumberish): ethers.providers.Provider { | ||
const found = this.network(chainId) | ||
@@ -191,3 +186,3 @@ if (!found.provider && !found.rpcUrl) throw new Error(`Provider not found for chainId ${chainId}`) | ||
// and we should default to the on-chain reader | ||
return new commons.reader.OnChainReader(this.providerFor(chainId)) | ||
return new commons.reader.OnChainReader(this.provider(chainId)) | ||
} | ||
@@ -620,6 +615,3 @@ | ||
chainId: ethers.BigNumberish, | ||
pstatus?: AccountStatus, | ||
options?: { | ||
nonceSpace?: ethers.BigNumberish | ||
} | ||
pstatus?: AccountStatus | ||
): Promise<commons.transaction.SignedTransactionBundle> { | ||
@@ -630,3 +622,3 @@ const status = pstatus || (await this.status(chainId)) | ||
const wallet = this.walletForStatus(chainId, status) | ||
const signed = await wallet.signTransactions(txs, options?.nonceSpace && { space: options?.nonceSpace }) | ||
const signed = await wallet.signTransactions(txs) | ||
@@ -805,11 +797,7 @@ return { | ||
skipPreDecorate: boolean = false, | ||
callback?: (bundle: commons.transaction.IntendedTransactionBundle) => void, | ||
options?: { | ||
nonceSpace?: ethers.BigNumberish | ||
} | ||
callback?: (bundle: commons.transaction.IntendedTransactionBundle) => void | ||
): Promise<ethers.providers.TransactionResponse> { | ||
const status = await this.status(chainId) | ||
const predecorated = skipPreDecorate ? txs : await this.predecorateTransactions(txs, status, chainId) | ||
const signed = await this.signTransactions(predecorated, chainId, undefined, options) | ||
const signed = await this.signTransactions(predecorated, chainId) | ||
// TODO: is it safe to pass status again here? | ||
@@ -816,0 +804,0 @@ return this.sendSignedTransactions(signed, chainId, quote, undefined, callback) |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1
47053
7
759
1
+ Added@0xsequence/abi@0.0.0-20230922164806(transitive)
+ Added@0xsequence/core@0.0.0-20230922164806(transitive)
+ Added@0xsequence/indexer@0.0.0-20230922164806(transitive)
+ Added@0xsequence/migration@0.0.0-20230922164806(transitive)
+ Added@0xsequence/network@0.0.0-20230922164806(transitive)
+ Added@0xsequence/relayer@0.0.0-20230922164806(transitive)
+ Added@0xsequence/replacer@0.0.0-20230922164806(transitive)
+ Added@0xsequence/sessions@0.0.0-20230922164806(transitive)
+ Added@0xsequence/signhub@0.0.0-20230922164806(transitive)
+ Added@0xsequence/utils@0.0.0-20230922164806(transitive)
+ Added@0xsequence/wallet@0.0.0-20230922164806(transitive)
- Removed@0xsequence/abi@0.0.0-20230920213211(transitive)
- Removed@0xsequence/core@0.0.0-20230920213211(transitive)
- Removed@0xsequence/indexer@0.0.0-20230920213211(transitive)
- Removed@0xsequence/migration@0.0.0-20230920213211(transitive)
- Removed@0xsequence/network@0.0.0-20230920213211(transitive)
- Removed@0xsequence/relayer@0.0.0-20230920213211(transitive)
- Removed@0xsequence/replacer@0.0.0-20230920213211(transitive)
- Removed@0xsequence/sessions@0.0.0-20230920213211(transitive)
- Removed@0xsequence/signhub@0.0.0-20230920213211(transitive)
- Removed@0xsequence/utils@0.0.0-20230920213211(transitive)
- Removed@0xsequence/wallet@0.0.0-20230920213211(transitive)