LogoLogo
  • General
    • 👋Welcome to Kinto
    • 📔Terminology
    • 📃Litepaper
    • 📄One Pager
    • 🔗Links
    • 🤝Partners and Collaborators
    • ❓FAQ
  • User Guides
    • 🌟Sign Up Walkthrough
    • 🗝️KYC Walkthrough
      • 🔑Synaps Walkthrough
      • 🔑Plaid Walkthrough
    • 📄KYB Walkthrough
    • 🪟Passkeys on Windows Walkthrough
    • Setting up a 1Password Passkey
    • ❔Troubleshooting/Help
    • 💰Kinto Deposits
      • Onramp on Kinto
    • 💸Kinto Withdrawals
      • 🗝️Recover funds from my Passkey address
      • 🎁Wrapping ETH in your Kinto Wallet
      • Offramp on Kinto
    • Swap on Kinto
    • Lending & Borrowing
    • Hyperliquid
      • Fees
      • Deposits
      • Creating Orders
      • Closing an Order
      • Withdrawals
    • Send to other Kinto Wallets
    • Token Sale Participation
    • Full Account Recovery
    • $K Transfer
      • Withdraw $K
      • Send $K on Kinto
      • Deposit $K
      • Swap $K on Kinto
    • Recover Funds from an X Signer
    • $K Lend and Borrow Market
      • Supply USDC to $K Lending Market
      • Withdraw USDC from $K Lending Market
      • Add $K and Borrow USDC
      • Repay USDC and Withdraw $K
  • Security/KYC/AML
    • 🔑Securing Kinto
    • 📃Security One Pager
    • 🔐Security and Risk Management
    • 🛡️Wallet Insurance
    • ⚙️User Owned KYC
    • 🏳️Enabled Countries
    • 🔒Beware of Scams
    • ✅Kinto Validators
    • 🤺Security Council
  • Building on Kinto
    • ℹ️Network Information
    • 🧱Kinto Rollup Architecture
    • ❕Differences with other rollups
    • 🤖Rollup Features
      • ⚙️Create2
      • 🔥Kinto Account Abstraction
      • 🛡️KintoWallet
      • 🪢Musubi - Chain Abstraction
    • 💻Development guide
      • 1️⃣1️⃣ Setup your Deployer EOA
      • 2️⃣2️⃣ Environment setup
      • 3️⃣3️⃣ Creating your Kinto App
    • ⛩️Interacting with your Kinto App
      • 🤖Interacting with contracts
      • 👩‍🏭Create a Web Dapp
    • 📗Smart Contract Reference
      • KintoAppRegistry
      • KintoID
      • KintoWalletFactory
      • Kinto Wallet
      • SponsorPaymaster
      • Kinto EntryPoint
      • KYCViewer
      • Faucet
      • EngenCredits
      • EngenGovernance
    • 🌍Kinto Wallet Web SDK
    • 🏪Running kinto nodes
    • ⚒️Tools
      • ⛈️Node RPC
      • 🏗️Build Tools
      • 🗺️Block Explorer
      • 🐞Debugging and monitoring
      • 🔮Oracle - Pyth
      • Firewall - Venn
    • 🚀ICO Platform
  • Governance
    • 🧠Introduction to the Kinto DAO
    • 📓Kinto Constitution
    • 📃KIP Proposal Template
    • 🌄Engen Proto-Governance
    • ⛩️Kinto Token
      • Information, addresses and links
  • 💧Liquidity Programs
    • 🛠️Mining Program
    • ⚫Engen - Launch Program
    • 🪙K Token Sale
  • Sakura Mining Season
Powered by GitBook
On this page
  • Basics
  • State functions
  • View Functions
  1. Building on Kinto
  2. Smart Contract Reference

Kinto Wallet

PreviousKintoWalletFactoryNextSponsorPaymaster

Last updated 9 months ago

Deployment Address

Mainnet implementation:

Code:

Interface:


Basics

  • Executes transactions according to the Account Abstraction standard.

  • Validates user operations signatures.

  • Manages signers and signers policy.

  • The emergency recovery process can be triggered through a unique signer.

  • Approves applications explicitly.

  • Manages the funder whitelist.

  • Implements an insurance policy system.


State functions

initialize(address anOwner, address _recoverer) external virtual initializer onlyFactory

execute(address dest, uint256 value, bytes calldata func) external override

executeBatch(address[] calldata dest, uint256[] calldata values, bytes[] calldata func) external override

setSignerPolicy(uint8 newPolicy) public override onlySelf

resetSigners(address[] calldata newSigners, uint8 newPolicy) external override onlySelf

setFunderWhitelist(address[] calldata newWhitelist, bool[] calldata flags) external override onlySelf

whitelistApp(address[] calldata apps, bool[] calldata flags) external override onlySelf

setAppKey(address app, address signer) public override onlySelf

whitelistAppAndSetKey(address app, address signer) external override onlySelf

startRecovery() external override onlyFactory

completeRecovery(address[] calldata newSigners) external override onlyFactory

changeRecoverer(address newRecoverer) external override onlyFactory

cancelRecovery() public override onlySelf

setInsurancePolicy(uint256 newPolicy, address paymentToken) external override onlySelf

1. initialize (Factory only)

Initializes the KintoWallet with an owner and a recoverer.

function initialize(address anOwner, address _recoverer) external virtual initializer onlyFactory;
Parameter
Type
Explanation

anOwner

address

The initial owner of the KintoWallet.

_recoverer

address

The address designated as the recoverer for the wallet.

2. execute (EntryPoint only)

Executes a transaction.

function execute(address dest, uint256 value, bytes calldata func) external override;
Parameter
Type
Explanation

dest

address

The destination address.

value

uint256

The value to be transferred.

func

bytes

The calldata of the function.

3. executeBatch (EntryPoint only)

Executes a batch of transactions.

function executeBatch(address[] calldata dest, uint256[] calldata values, bytes[] calldata func) external override;
Parameter
Type
Explanation

dest

address[]

Array of destination addresses.

values

uint256[]

Array of values to be transferred.

func

bytes[]

Array of calldata for each function.

4. setSignerPolicy (only callable by Wallet itself)

Sets the signer policy of the wallet.

function setSignerPolicy(uint8 newPolicy) public override onlySelf;
Parameter
Type
Explanation

newPolicy

uint8

The new signer policy.

5. resetSigners (only callable by Wallet itself)

Resets the signers of the wallet.

function resetSigners(address[] calldata newSigners, uint8 newPolicy) external override onlySelf;
Parameter
Type
Explanation

newSigners

address[]

Array of new signers.

newPolicy

uint8

The signer policy to apply.

6. setFunderWhitelist (only callable by Wallet itself)

Sets the funder whitelist.

function setFunderWhitelist(address[] calldata newWhitelist, bool[] calldata flags) external override onlySelf;
Parameter
Type
Explanation

newWhitelist

address[]

Array of addresses to whitelist.

flags

bool[]

Flags to allow or disallow funders.

7. whitelistApp (only callable by Wallet itself)

Sets the app whitelist.

function whitelistApp(address[] calldata apps, bool[] calldata flags) external override onlySelf;
Parameter
Type
Explanation

apps

address[]

Array of app addresses.

flags

bool[]

Flags to allow or disallow apps.

8. setAppKey (only callable by Wallet itself)

Sets the app key for a specific app.

function setAppKey(address app, address signer) public override onlySelf;
Parameter
Type
Explanation

app

address

Address of the app.

signer

address

Address of the app signer.

9. whitelistAppAndSetKey (only callable by Wallet itself)

Whitelists an app and sets its app key.

function whitelistAppAndSetKey(address app, address signer) external override onlySelf;
Parameter
Type
Explanation

app

address

Address of the app.

signer

address

Address of the app signer.

10. startRecovery (only callable by Wallet Factory)

Starts the recovery process.

function startRecovery() external override onlyFactory;

No parameters.

11. completeRecovery (only callable by Wallet Factory)

Completes the recovery process and resets the signers.

function completeRecovery(address[] calldata newSigners) external override onlyFactory;
Parameter
Type
Explanation

newSigners

address[]

Array of new signers.

12. changeRecoverer (only callable by Wallet Factory)

Changes the recoverer.

function changeRecoverer(address newRecoverer) external override onlyFactory;
Parameter
Type
Explanation

newRecoverer

address

Address of the new recoverer.

13. cancelRecovery (only callable by Wallet itself)

Cancels the recovery process.

function cancelRecovery() public override onlySelf;

No parameters.

14. setInsurancePolicy (only callable by Wallet itself)

Sets the insurance policy for the wallet.

function setInsurancePolicy(uint256 newPolicy, address paymentToken) external override onlySelf;
Parameter
Type
Explanation

newPolicy

uint256

The new insurance policy to set.

paymentToken

address

The token address used for payment.


View Functions

isFunderWhitelisted(address funder) external view override returns (bool)

entryPoint() public view virtual override returns (IEntryPoint)

getNonce() public view virtual override(BaseAccount, IKintoWallet) returns (uint256)

getOwnersCount() external view override returns (uint256)

getOwners() external view override returns (address[] memory)

getInsurancePrice(uint256 newPolicy, address paymentToken) public pure override returns (uint256)

1. isFunderWhitelisted

Checks if a funder is whitelisted.

function isFunderWhitelisted(address funder) external view override returns (bool);
Parameter
Type
Explanation

funder

address

The funder address to check.

2. entryPoint

Returns the entry point of the wallet.

function entryPoint() public view virtual override returns (IEntryPoint);

No parameters.

3. getNonce

Gets the current nonce of the wallet.

function getNonce() public view virtual override(BaseAccount, IKintoWallet) returns (uint256);

No parameters.

4. getOwnersCount

Returns the count of owners of the wallet.

function getOwnersCount() external view override returns (uint256);

No parameters.

5. getOwners

Returns an array of the wallet's owners.

function getOwners() external view override returns (address[] memory);

No parameters.

6. getInsurancePrice

Returns the price of the insurance policy.

function getInsurancePrice(uint256 newPolicy, address paymentToken) public pure override returns (uint256);
Parameter
Type
Explanation

newPolicy

uint256

The insurance policy to price.

paymentToken

address

The token address used for payment.

📗
0x51c676fC24C776eBcb78B8ca3e6Ca2E810Dd6B80
KintoWallet.sol
IKintoWallet.sol