@imtbl/passport 2.10.6 → 2.10.7-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +8 -409
- package/dist/node/index.cjs +27 -437
- package/dist/node/index.js +8 -409
- package/dist/types/Passport.d.ts +37 -36
- package/dist/types/index.d.ts +4 -4
- package/dist/types/starkEx/passportImxProvider.d.ts +2 -4
- package/dist/types/starkEx/passportImxProviderFactory.d.ts +2 -4
- package/dist/types/starkEx/workflows/order.d.ts +1 -1
- package/dist/types/starkEx/workflows/registerOffchain.d.ts +1 -1
- package/dist/types/starkEx/workflows/trades.d.ts +1 -1
- package/dist/types/starkEx/workflows/transfer.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/utils/metrics.d.ts +1 -3
- package/package.json +11 -18
- package/dist/types/Passport.int.test.d.ts +0 -1
- package/dist/types/Passport.test.d.ts +0 -1
- package/dist/types/authManager.d.ts +0 -62
- package/dist/types/authManager.test.d.ts +0 -1
- package/dist/types/confirmation/confirmation.d.ts +0 -28
- package/dist/types/confirmation/confirmation.test.d.ts +0 -1
- package/dist/types/confirmation/embeddedLoginPrompt.d.ts +0 -10
- package/dist/types/confirmation/embeddedLoginPrompt.test.d.ts +0 -1
- package/dist/types/confirmation/index.d.ts +0 -3
- package/dist/types/confirmation/popup.d.ts +0 -8
- package/dist/types/confirmation/popup.test.d.ts +0 -1
- package/dist/types/confirmation/types.d.ts +0 -33
- package/dist/types/guardian/index.d.ts +0 -58
- package/dist/types/guardian/index.test.d.ts +0 -1
- package/dist/types/magic/index.d.ts +0 -1
- package/dist/types/magic/magicTEESigner.d.ts +0 -24
- package/dist/types/magic/magicTEESigner.test.d.ts +0 -1
- package/dist/types/mocks/zkEvm/msw.d.ts +0 -39
- package/dist/types/network/chains.d.ts +0 -32
- package/dist/types/network/constants.d.ts +0 -3
- package/dist/types/network/retry.d.ts +0 -8
- package/dist/types/network/retry.test.d.ts +0 -1
- package/dist/types/overlay/confirmationOverlay.d.ts +0 -17
- package/dist/types/overlay/confirmationOverlay.test.d.ts +0 -1
- package/dist/types/overlay/constants.d.ts +0 -7
- package/dist/types/overlay/elements.d.ts +0 -12
- package/dist/types/overlay/embeddedLoginPromptOverlay.d.ts +0 -7
- package/dist/types/overlay/embeddedLoginPromptOverlay.test.d.ts +0 -1
- package/dist/types/starkEx/passportImxProvider.test.d.ts +0 -1
- package/dist/types/starkEx/passportImxProviderFactory.test.d.ts +0 -1
- package/dist/types/starkEx/workflows/exchange.test.d.ts +0 -1
- package/dist/types/starkEx/workflows/order.test.d.ts +0 -1
- package/dist/types/starkEx/workflows/registerOffchain.test.d.ts +0 -1
- package/dist/types/starkEx/workflows/trades.test.d.ts +0 -1
- package/dist/types/starkEx/workflows/transfer.test.d.ts +0 -1
- package/dist/types/storage/LocalForageAsyncStorage.d.ts +0 -11
- package/dist/types/storage/device_credentials_manager.d.ts +0 -6
- package/dist/types/test/mocks.d.ts +0 -56
- package/dist/types/utils/metrics.test.d.ts +0 -1
- package/dist/types/utils/string.d.ts +0 -1
- package/dist/types/utils/string.test.d.ts +0 -1
- package/dist/types/utils/token.d.ts +0 -2
- package/dist/types/utils/token.test.d.ts +0 -1
- package/dist/types/utils/typedEventEmitter.d.ts +0 -6
- package/dist/types/utils/typedEventEmitter.test.d.ts +0 -1
- package/dist/types/zkEvm/JsonRpcError.d.ts +0 -25
- package/dist/types/zkEvm/index.d.ts +0 -2
- package/dist/types/zkEvm/personalSign.d.ts +0 -15
- package/dist/types/zkEvm/personalSign.test.d.ts +0 -1
- package/dist/types/zkEvm/provider/eip6963.d.ts +0 -3
- package/dist/types/zkEvm/relayerClient.d.ts +0 -60
- package/dist/types/zkEvm/relayerClient.test.d.ts +0 -1
- package/dist/types/zkEvm/sendDeployTransactionAndPersonalSign.d.ts +0 -6
- package/dist/types/zkEvm/sendDeployTransactionAndPersonalSign.test.d.ts +0 -1
- package/dist/types/zkEvm/sendTransaction.d.ts +0 -6
- package/dist/types/zkEvm/sendTransaction.test.d.ts +0 -1
- package/dist/types/zkEvm/sessionActivity/errorBoundary.d.ts +0 -1
- package/dist/types/zkEvm/sessionActivity/request.d.ts +0 -15
- package/dist/types/zkEvm/sessionActivity/sessionActivity.d.ts +0 -2
- package/dist/types/zkEvm/signEjectionTransaction.d.ts +0 -6
- package/dist/types/zkEvm/signEjectionTransaction.test.d.ts +0 -1
- package/dist/types/zkEvm/signTypedDataV4.d.ts +0 -14
- package/dist/types/zkEvm/signTypedDataV4.test.d.ts +0 -1
- package/dist/types/zkEvm/transactionHelpers.d.ts +0 -31
- package/dist/types/zkEvm/transactionHelpers.test.d.ts +0 -1
- package/dist/types/zkEvm/types.d.ts +0 -120
- package/dist/types/zkEvm/user/index.d.ts +0 -1
- package/dist/types/zkEvm/user/registerZkEvmUser.d.ts +0 -13
- package/dist/types/zkEvm/user/registerZkEvmUser.test.d.ts +0 -1
- package/dist/types/zkEvm/walletHelpers.d.ts +0 -33
- package/dist/types/zkEvm/walletHelpers.test.d.ts +0 -1
- package/dist/types/zkEvm/zkEvmProvider.d.ts +0 -25
- package/dist/types/zkEvm/zkEvmProvider.test.d.ts +0 -1
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BigNumberish, Signer, JsonRpcProvider } from 'ethers';
|
|
2
|
-
import { MetaTransaction, MetaTransactionNormalised, TypedDataPayload } from './types';
|
|
3
|
-
export declare const getNormalisedTransactions: (txs: MetaTransaction[]) => MetaTransactionNormalised[];
|
|
4
|
-
export declare const digestOfTransactionsAndNonce: (nonce: BigNumberish, normalisedTransactions: MetaTransactionNormalised[]) => string;
|
|
5
|
-
export declare const encodedTransactions: (normalisedTransactions: MetaTransactionNormalised[]) => string;
|
|
6
|
-
/**
|
|
7
|
-
* This helper function is used to coerce the type <BigNumber | undefined> to BigNumber for the
|
|
8
|
-
* getNonce function above.
|
|
9
|
-
* @param {BigNumber} nonceSpace - An unsigned 256 bit value that can be used to encode a nonce into a distinct space.
|
|
10
|
-
* @returns {BigNumber} The passed in nonceSpace or instead initialises the nonce to 0.
|
|
11
|
-
*/
|
|
12
|
-
export declare const coerceNonceSpace: (nonceSpace?: bigint) => bigint;
|
|
13
|
-
/**
|
|
14
|
-
* This helper function is used to encode the nonce into a 256 bit value where the space is encoded into
|
|
15
|
-
* the first 160 bits, and the nonce the remaining 96 bits.
|
|
16
|
-
* @param {BigNumber} nonceSpace - An unsigned 256 bit value that can be used to encode a nonce into a distinct space.
|
|
17
|
-
* @param nonce {BigNumber} nonce - Sequential number starting at 0, and incrementing in single steps e.g. 0,1,2,...
|
|
18
|
-
* @returns {BigNumber} The encoded value where the space is left shifted 96 bits, and the nonce is in the first 96 bits.
|
|
19
|
-
*/
|
|
20
|
-
export declare const encodeNonce: (nonceSpace: bigint, nonce: bigint) => bigint;
|
|
21
|
-
/**
|
|
22
|
-
* When we retrieve a nonce for a smart contract wallet we can retrieve the nonce in a given 256 bit space.
|
|
23
|
-
* Nonces in each 256 bit space need to be sequential per wallet address. Nonces across 256 bit spaces per
|
|
24
|
-
* wallet address do not. This function overload can be used to invoke transactions in parallel per smart
|
|
25
|
-
* contract wallet if required.
|
|
26
|
-
*/
|
|
27
|
-
export declare const getNonce: (rpcProvider: JsonRpcProvider, smartContractWalletAddress: string, nonceSpace?: bigint) => Promise<bigint>;
|
|
28
|
-
export declare const encodeMessageSubDigest: (chainId: bigint, walletAddress: string, digest: string) => string;
|
|
29
|
-
export declare const signMetaTransactions: (metaTransactions: MetaTransaction[], nonce: BigNumberish, chainId: bigint, walletAddress: string, signer: Signer) => Promise<string>;
|
|
30
|
-
export declare const packSignatures: (EOASignature: string, EOAAddress: string, relayerSignature: string) => string;
|
|
31
|
-
export declare const signAndPackTypedData: (typedData: TypedDataPayload, relayerSignature: string, chainId: bigint, walletAddress: string, signer: Signer) => Promise<string>;
|
|
32
|
-
export declare const signERC191Message: (chainId: bigint, payload: string, signer: Signer, walletAddress: string) => Promise<string>;
|
|
33
|
-
export declare const getEip155ChainId: (chainId: number) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { MultiRollupApiClients } from '@imtbl/generated-clients';
|
|
2
|
-
import { Signer } from 'ethers';
|
|
3
|
-
import { Provider, RequestArguments } from './types';
|
|
4
|
-
import AuthManager from '../authManager';
|
|
5
|
-
import TypedEventEmitter from '../utils/typedEventEmitter';
|
|
6
|
-
import { PassportConfiguration } from '../config';
|
|
7
|
-
import { PassportEventMap, User } from '../types';
|
|
8
|
-
import GuardianClient from '../guardian';
|
|
9
|
-
export type ZkEvmProviderInput = {
|
|
10
|
-
authManager: AuthManager;
|
|
11
|
-
config: PassportConfiguration;
|
|
12
|
-
multiRollupApiClients: MultiRollupApiClients;
|
|
13
|
-
passportEventEmitter: TypedEventEmitter<PassportEventMap>;
|
|
14
|
-
guardianClient: GuardianClient;
|
|
15
|
-
ethSigner: Signer;
|
|
16
|
-
user: User | null;
|
|
17
|
-
};
|
|
18
|
-
export declare class ZkEvmProvider implements Provider {
|
|
19
|
-
#private;
|
|
20
|
-
readonly isPassport: boolean;
|
|
21
|
-
constructor({ authManager, config, multiRollupApiClients, passportEventEmitter, guardianClient, ethSigner, user, }: ZkEvmProviderInput);
|
|
22
|
-
request(request: RequestArguments): Promise<any>;
|
|
23
|
-
on(event: string, listener: (...args: any[]) => void): void;
|
|
24
|
-
removeListener(event: string, listener: (...args: any[]) => void): void;
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|