New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@safe-global/relay-kit

Package Overview
Dependencies
Maintainers
0
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@safe-global/relay-kit - npm Package Compare versions

Comparing version 3.4.3 to 4.0.0-alpha.0

dist/cjs/src/index.cjs

1

dist/src/constants.d.ts

@@ -7,1 +7,2 @@ export declare const GELATO_NATIVE_TOKEN_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";

export declare const GELATO_TRANSFER_GAS_COST = 15000;
//# sourceMappingURL=constants.d.ts.map

@@ -14,1 +14,2 @@ export type {

UserOperation } from '@safe-global/types-kit';
//# sourceMappingURL=deprecated.d.ts.map

@@ -5,5 +5,9 @@ export * from './deprecated';

export * from './packs/safe-4337/Safe4337Pack';
export { default as EthSafeOperation } from './packs/safe-4337/SafeOperation';
export { default as BaseSafeOperation } from './packs/safe-4337/BaseSafeOperation';
export { default as SafeOperationV07 } from './packs/safe-4337/SafeOperationV07';
export { default as SafeOperationV06 } from './packs/safe-4337/SafeOperationV06';
export { default as SafeOperationFactory } from './packs/safe-4337/SafeOperationFactory';
export * from './packs/safe-4337/estimators';
export * from './packs/safe-4337/types';
export * from './packs/safe-4337/utils';
export * from './RelayKitBasePack';

@@ -15,1 +19,2 @@ declare module 'abitype' {

}
//# sourceMappingURL=index.d.ts.map

@@ -104,1 +104,2 @@ import { RelayResponse, TransactionStatusResponse } from '@gelatonetwork/relay-sdk';

}
//# sourceMappingURL=GelatoRelayPack.d.ts.map

@@ -24,1 +24,2 @@ import Safe from '@safe-global/protocol-kit';

};
//# sourceMappingURL=types.d.ts.map

14

dist/src/packs/safe-4337/constants.d.ts
export declare const DEFAULT_SAFE_VERSION = "1.4.1";
export declare const DEFAULT_SAFE_MODULES_VERSION = "0.2.0";
export declare const EIP712_SAFE_OPERATION_TYPE: {
export declare const DEFAULT_SAFE_MODULES_VERSION = "0.3.0";
export declare const EIP712_SAFE_OPERATION_TYPE_V06: {
SafeOp: {

@@ -9,2 +9,8 @@ type: string;

};
export declare const EIP712_SAFE_OPERATION_TYPE_V07: {
SafeOp: {
type: string;
name: string;
}[];
};
export declare const ABI: readonly [{

@@ -102,3 +108,5 @@ readonly name: "enableModules";

CHAIN_ID = "eth_chainId",
SPONSOR_USER_OPERATION = "pm_sponsorUserOperation"
GET_PAYMASTER_STUB_DATA = "pm_getPaymasterStubData",
GET_PAYMASTER_DATA = "pm_getPaymasterData"
}
//# sourceMappingURL=constants.d.ts.map

@@ -1,2 +0,3 @@

import { PimlicoFeeEstimator } from './PimlicoFeeEstimator';
import { PimlicoFeeEstimator } from './pimlico/PimlicoFeeEstimator';
export { PimlicoFeeEstimator };
//# sourceMappingURL=index.d.ts.map

@@ -1,6 +0,5 @@

import { SigningMethod } from '@safe-global/protocol-kit';
import { RelayKitBasePack } from '../../RelayKitBasePack';
import { SafeOperationResponse } from '@safe-global/types-kit';
import EthSafeOperation from './SafeOperation';
import { EstimateFeeProps, Safe4337CreateTransactionProps, Safe4337ExecutableProps, Safe4337InitOptions, Safe4337Options, UserOperationReceipt, UserOperationWithPayload } from './types';
import { SafeOperationResponse, SigningMethod } from '@safe-global/types-kit';
import BaseSafeOperation from '../../packs/safe-4337/BaseSafeOperation';
import { EstimateFeeProps, Safe4337CreateTransactionProps, Safe4337ExecutableProps, Safe4337InitOptions, Safe4337Options, UserOperationReceipt, UserOperationWithPayload } from '../../packs/safe-4337/types';
/**

@@ -17,5 +16,5 @@ * Safe4337Pack class that extends RelayKitBasePack.

EstimateFeeProps: EstimateFeeProps;
EstimateFeeResult: EthSafeOperation;
EstimateFeeResult: BaseSafeOperation;
CreateTransactionProps: Safe4337CreateTransactionProps;
CreateTransactionResult: EthSafeOperation;
CreateTransactionResult: BaseSafeOperation;
ExecuteTransactionProps: Safe4337ExecutableProps;

@@ -46,7 +45,7 @@ ExecuteTransactionResult: string;

* @param {EstimateFeeProps} props - The parameters for the gas estimation.
* @param {EthSafeOperation} props.safeOperation - The SafeOperation to estimate the gas.
* @param {BaseSafeOperation} props.safeOperation - The SafeOperation to estimate the gas.
* @param {IFeeEstimator} props.feeEstimator - The function to estimate the gas.
* @return {Promise<EthSafeOperation>} The Promise object that will be resolved into the gas estimation.
* @return {Promise<BaseSafeOperation>} The Promise object that will be resolved into the gas estimation.
*/
getEstimateFee({ safeOperation, feeEstimator }: EstimateFeeProps): Promise<EthSafeOperation>;
getEstimateFee({ safeOperation, feeEstimator }: EstimateFeeProps): Promise<BaseSafeOperation>;
/**

@@ -57,15 +56,15 @@ * Creates a relayed transaction based on the provided parameters.

* @param options - Optional configuration options for the transaction creation.
* @return {Promise<EthSafeOperation>} The Promise object will resolve a SafeOperation.
* @return {Promise<BaseSafeOperation>} The Promise object will resolve a SafeOperation.
*/
createTransaction({ transactions, options }: Safe4337CreateTransactionProps): Promise<EthSafeOperation>;
createTransaction({ transactions, options }: Safe4337CreateTransactionProps): Promise<BaseSafeOperation>;
/**
* Signs a safe operation.
*
* @param {EthSafeOperation | SafeOperationResponse} safeOperation - The SafeOperation to sign. It can be:
* @param {BaseSafeOperation | SafeOperationResponse} safeOperation - The SafeOperation to sign. It can be:
* - A response from the API (Tx Service)
* - An instance of EthSafeOperation
* - An instance of SafeOperation
* @param {SigningMethod} signingMethod - The signing method to use.
* @return {Promise<EthSafeOperation>} The Promise object will resolve to the signed SafeOperation.
* @return {Promise<BaseSafeOperation>} The Promise object will resolve to the signed SafeOperation.
*/
signSafeOperation(safeOperation: EthSafeOperation | SafeOperationResponse, signingMethod?: SigningMethod): Promise<EthSafeOperation>;
signSafeOperation(safeOperation: BaseSafeOperation | SafeOperationResponse, signingMethod?: SigningMethod): Promise<BaseSafeOperation>;
/**

@@ -75,5 +74,5 @@ * Executes the relay transaction.

* @param {Safe4337ExecutableProps} props - The parameters for the transaction execution.
* @param {EthSafeOperation | SafeOperationResponse} props.executable - The SafeOperation to execute. It can be:
* @param {BaseSafeOperation | SafeOperationResponse} props.executable - The SafeOperation to execute. It can be:
* - A response from the API (Tx Service)
* - An instance of EthSafeOperation
* - An instance of SafeOperation
* @return {Promise<string>} The user operation hash.

@@ -111,1 +110,2 @@ */

}
//# sourceMappingURL=Safe4337Pack.d.ts.map
import { Account, Address, Chain, Hash, Hex, PublicClient, PublicRpcSchema, Transport } from 'viem';
import Safe, { DeploymentType, SafeProviderConfig, OnchainAnalyticsProps } from '@safe-global/protocol-kit';
import { EstimateGasData, MetaTransactionData, SafeOperationResponse, SafeVersion, UserOperation } from '@safe-global/types-kit';
import EthSafeOperation from './SafeOperation';
import { RPC_4337_CALLS } from './constants';
import BaseSafeOperation from '../../packs/safe-4337/BaseSafeOperation';
import { RPC_4337_CALLS } from '../../packs/safe-4337/constants';
type ExistingSafeOptions = {

@@ -18,3 +18,2 @@ safeAddress: string;

isSponsored: true;
paymasterUrl: string;
sponsorshipPolicyId?: string;

@@ -28,3 +27,5 @@ };

};
export type PaymasterOptions = SponsoredPaymasterOption | ERC20PaymasterOption | undefined;
export type PaymasterOptions = ({
paymasterUrl: string;
} & (SponsoredPaymasterOption | ERC20PaymasterOption)) | undefined;
export type Safe4337InitOptions = {

@@ -38,3 +39,3 @@ provider: SafeProviderConfig['provider'];

safe4337ModuleAddress?: string;
addModulesLibAddress?: string;
safeModulesSetupAddress?: string;
safeWebAuthnSharedSignerAddress?: string;

@@ -64,10 +65,14 @@ };

feeEstimator?: IFeeEstimator;
customNonce?: bigint;
};
};
export type Safe4337ExecutableProps = {
executable: EthSafeOperation | SafeOperationResponse;
executable: BaseSafeOperation | SafeOperationResponse;
};
export type EstimateSponsoredGasData = {
export type EstimateSponsoredGasData = ({
paymasterAndData: string;
} & EstimateGasData;
} | {
paymaster: string;
paymasterData: string;
}) & EstimateGasData;
type Log = {

@@ -119,21 +124,14 @@ logIndex: string;

entryPoint: string;
paymasterOptions?: PaymasterOptions;
};
export type EstimateFeeFunction = ({ userOperation, bundlerUrl, entryPoint }: EstimateFeeFunctionProps) => Promise<EstimateGasData>;
export type EstimateSponsoredFeeFunctionProps = {
userOperation: UserOperation;
paymasterUrl: string;
entryPoint: string;
sponsorshipPolicyId?: string;
};
export type EstimateSponsoredFeeFunction = ({ userOperation, paymasterUrl, entryPoint }: EstimateSponsoredFeeFunctionProps) => Promise<EstimateSponsoredGasData>;
export type EstimateFeeFunction = ({ userOperation, bundlerUrl, entryPoint, paymasterOptions }: EstimateFeeFunctionProps) => Promise<EstimateGasData>;
export interface IFeeEstimator {
setupEstimation?: EstimateFeeFunction;
adjustEstimation?: EstimateFeeFunction;
getPaymasterEstimation?: EstimateSponsoredFeeFunction;
preEstimateUserOperationGas?: EstimateFeeFunction;
postEstimateUserOperationGas?: EstimateFeeFunction;
}
export type EstimateFeeProps = {
safeOperation: EthSafeOperation;
safeOperation: BaseSafeOperation;
feeEstimator?: IFeeEstimator;
};
type UserOperationStringValues = Omit<UserOperation, 'callGasLimit' | 'verificationGasLimit' | 'preVerificationGas' | 'maxFeePerGas' | 'maxPriorityFeePerGas'> & {
export type UserOperationStringValues = Omit<UserOperation, 'callGasLimit' | 'verificationGasLimit' | 'preVerificationGas' | 'maxFeePerGas' | 'maxPriorityFeePerGas'> & {
callGasLimit: string;

@@ -145,31 +143,30 @@ verificationGasLimit: string;

};
export type PimlicoCustomRpcSchema = [
export type Safe4337RpcSchema = [
{
Method: 'pimlico_getUserOperationGasPrice';
Parameters: never;
Method: RPC_4337_CALLS.GET_PAYMASTER_STUB_DATA;
Parameters: [UserOperationStringValues, string, string, {
token: string;
}?];
ReturnType: {
slow: {
maxFeePerGas: string;
maxPriorityFeePerGas: string;
};
standard: {
maxFeePerGas: string;
maxPriorityFeePerGas: string;
};
fast: {
maxFeePerGas: string;
maxPriorityFeePerGas: string;
};
paymasterAndData: string;
} | {
paymaster: string;
paymasterData: string;
paymasterVerificationGasLimit?: string;
paymasterPostOpGasLimit?: string;
};
},
{
Method: 'pm_sponsorUserOperation';
Parameters: [UserOperationStringValues, string, {
sponsorshipPolicyId?: string;
Method: RPC_4337_CALLS.GET_PAYMASTER_DATA;
Parameters: [UserOperationStringValues, string, string, {
token: string;
}?];
ReturnType: {
paymasterAndData: string;
preVerificationGas: string;
verificationGasLimit: string;
callGasLimit: string;
verificationGasLimit: string;
preVerificationGas: string;
} | {
paymaster: string;
paymasterData: string;
};

@@ -189,2 +186,4 @@ },

preVerificationGas: string;
paymasterPostOpGasLimit?: string;
paymasterVerificationGasLimit?: string;
};

@@ -214,6 +213,13 @@ },

];
export type BundlerClient = PublicClient<Transport, Chain | undefined, Account | undefined, [
...PimlicoCustomRpcSchema,
...PublicRpcSchema
export type RpcSchemaEntry = {
Method: string;
Parameters: unknown[];
ReturnType: unknown;
};
export type BundlerClient<ProviderCustomRpcSchema extends RpcSchemaEntry[] = []> = PublicClient<Transport, Chain | undefined, Account | undefined, [
...PublicRpcSchema,
...Safe4337RpcSchema,
...ProviderCustomRpcSchema
]>;
export {};
//# sourceMappingURL=types.d.ts.map

@@ -0,1 +1,2 @@

import Safe from '@safe-global/protocol-kit';
export declare const EQ_OR_GT_0_3_0 = ">=0.3.0";

@@ -5,1 +6,4 @@ export declare function sameString(str1: string, str2: string): boolean;

export declare function isEntryPointV6(address: string): boolean;
export declare function isEntryPointV7(address: string): boolean;
export declare function getSafeNonceFromEntrypoint(protocolKit: Safe, safeAddress: string, entryPointAddress: string): Promise<bigint>;
//# sourceMappingURL=entrypoint.d.ts.map
export declare const getRelayKitVersion: () => string;
//# sourceMappingURL=getRelayKitVersion.d.ts.map

@@ -65,1 +65,2 @@ import Safe from '@safe-global/protocol-kit';

export {};
//# sourceMappingURL=RelayKitBasePack.d.ts.map
{
"name": "@safe-global/relay-kit",
"version": "3.4.3",
"version": "4.0.0-alpha.0",
"description": "SDK for Safe Smart Accounts with support for ERC-4337 and Relay",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"types": "dist/src/index.d.ts",
"main": "dist/cjs/src/index.js",
"module": "dist/esm/src/index.js",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"require": "./dist/cjs/src/index.cjs",
"import": "./dist/esm/src/index.mjs"
},
"./test-utils": {
"types": "./dist/test-utils/index.d.ts",
"require": "./dist/cjs/test-utils/index.cjs",
"import": "./dist/esm/test-utils/index.mjs"
}
},
"keywords": [

@@ -23,3 +36,6 @@ "Ethereum",

"prebuild": "node -p \"'export const getRelayKitVersion = () => \\'' + require('./package.json').version.split('-')[0] + '\\''\" > src/packs/safe-4337/utils/getRelayKitVersion.ts",
"build": "yarn unbuild && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json"
"build": "yarn unbuild && yarn build:esm && yarn build:cjs && yarn build:types",
"build:esm": "esbuild ./src/index ./test-utils/index --format=esm --bundle --metafile=meta-esm.json --packages=external --outdir=dist/esm --out-extension:.js=.mjs",
"build:cjs": "esbuild ./src/index ./test-utils/index --format=cjs --bundle --metafile=meta-cjs.json --packages=external --outdir=dist/cjs --out-extension:.js=.cjs",
"build:types": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json"
},

@@ -44,7 +60,7 @@ "repository": {

"@gelatonetwork/relay-sdk": "^5.5.0",
"@safe-global/protocol-kit": "^5.2.2",
"@safe-global/protocol-kit": "^6.0.0-alpha.0",
"@safe-global/safe-modules-deployments": "^2.2.5",
"@safe-global/types-kit": "^1.0.2",
"@safe-global/types-kit": "^2.0.0-alpha.0",
"viem": "^2.21.8"
}
}

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