All files / evm-wallet-experiment/src index.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172                                                                                                                                                                                                                                                                                                                                                       
// Public API exports for @ocap/evm-wallet-experiment
 
// Constants
export {
  CHAIN_CONTRACTS,
  CHAIN_NAMES,
  DEFAULT_DELEGATION_MANAGER,
  DELEGATION_TYPES,
  ENFORCER_ADDRESSES,
  ETH_HD_PATH_PREFIX,
  PIMLICO_RPC_BASE_URL,
  PLACEHOLDER_CONTRACTS,
  ROOT_AUTHORITY,
  SEPOLIA_CHAIN_ID,
  SUPPORTED_CHAIN_IDS,
  getChainContracts,
  getPimlicoRpcUrl,
} from './constants.ts';
export type { ChainContracts } from './constants.ts';
 
// Cluster configuration
export { makeWalletClusterConfig } from './cluster-config.ts';
export type { WalletClusterConfigOptions } from './cluster-config.ts';
 
// Types
export type {
  Address,
  Action,
  Caveat,
  CaveatType,
  ChainConfig,
  CreateDelegationOptions,
  Delegation,
  DelegationMatchResult,
  DelegationStatus,
  Eip712Domain,
  Eip712TypedData,
  Execution,
  Hex,
  SigningRequest,
  SmartAccountConfig,
  SwapQuote,
  SwapResult,
  TransactionRequest,
  UserOperation,
  WalletCapabilities,
} from './types.ts';
 
export {
  ActionStruct,
  CaveatStruct,
  CaveatTypeValues,
  ChainConfigStruct,
  CreateDelegationOptionsStruct,
  DelegationStatusValues,
  DelegationStruct,
  Eip712DomainStruct,
  Eip712TypedDataStruct,
  ExecutionStruct,
  makeChainConfig,
  SigningRequestStruct,
  SmartAccountConfigStruct,
  SwapQuoteStruct,
  TransactionRequestStruct,
  UserOperationStruct,
  WalletCapabilitiesStruct,
} from './types.ts';
 
// Caveat utilities (for creating delegations externally)
export {
  encodeAllowedTargets,
  encodeAllowedMethods,
  encodeValueLte,
  encodeNativeTokenTransferAmount,
  encodeErc20TransferAmount,
  encodeLimitedCalls,
  encodeTimestamp,
  makeCaveat,
  getEnforcerAddress,
} from './lib/caveats.ts';
 
// ERC-20 utilities
export {
  encodeTransfer,
  encodeApprove,
  encodeAllowance,
  encodeBalanceOf,
  makeErc20TransferExecution,
  decodeTransferCalldata,
  decodeAllowanceResult,
  isErc20TransferCalldata,
  ERC20_TRANSFER_SELECTOR,
  ERC20_APPROVE_SELECTOR,
  ERC20_ALLOWANCE_SELECTOR,
} from './lib/erc20.ts';
 
// Delegation utilities
export {
  makeDelegation,
  prepareDelegationTypedData,
  delegationMatchesAction,
  explainDelegationMatch,
  finalizeDelegation,
  computeDelegationId,
  generateSalt,
} from './lib/delegation.ts';
 
// UserOperation utilities
export {
  buildDelegationUserOp,
  buildRedeemCallData,
  computeUserOpHash,
  encodeDelegationChain,
  encodeExecution,
  numberToHex,
  ENTRY_POINT_V07,
} from './lib/userop.ts';
 
// Bundler utilities (deprecated — use bundler-client.ts)
export {
  estimateUserOpGas,
  getUserOpReceipt,
  submitUserOp,
  waitForUserOp,
} from './lib/bundler.ts';
export type {
  BundlerConfig,
  UserOpGasEstimate,
  UserOpReceipt,
} from './lib/bundler.ts';
 
// Bundler client (viem-based replacement)
export { makeBundlerClient } from './lib/bundler-client.ts';
export type {
  BundlerClientConfig,
  PaymasterSponsorResult,
  UserOpReceiptResult,
  ViemBundlerClient,
} from './lib/bundler-client.ts';
 
// SDK adapter
export {
  resolveEnvironment,
  getDelegationManagerAddress,
  getEnforcerAddresses,
  toSdkDelegation,
  encodeSdkDelegations,
  buildBatchExecuteCallData,
  buildSdkBatchRedeemCallData,
  buildSdkDisableCallData,
  buildSdkRedeemCallData,
  createSdkExecution,
  computeSmartAccountAddress,
  Implementation,
  ExecutionMode,
} from './lib/sdk.ts';
export type { SmartAccountsEnvironment, SdkDelegation } from './lib/sdk.ts';
 
// Keyring utilities
export { generateMnemonicPhrase } from './lib/keyring.ts';
 
// MetaMask signing adapter
export {
  makeProviderSigner,
  connectMetaMaskSigner,
} from './lib/metamask-signer.ts';
export type {
  EthereumProvider,
  MetaMaskSigner,
  MetaMaskSignerOptions,
} from './lib/metamask-signer.ts';