SlideShare a Scribd company logo
Table of Contents
● Understanding Ethereum Accounts
○ How it works
○ Limitations
● Account Abstraction
○ How it works
○ The IAccount interface
○ What it means for Dapp developers
● Use Cases
○ Fraud monitoring
○ Social Recovery
○ Secure Enclave
● How to build with Argent X
Ethereum Accounts 101
There is 2 types of Accounts on Ethereum:
- Externally Owned Accounts (EOA)
- Contract Accounts (CA)
The state of Ethereum S is the state of all the Accounts (EOA + CA)
The state can only be updated by transactions: S’ = T(S)
Every transaction T must be initiated (a.k.a start) from an EOA
from: <an EOA>
to: …
value: …
data: …
Ethereum Accounts 101
An (EOA) Account has:
- an address for identification
- a nonce to make sure transactions are unique
- a balance in ETH to pay fees
The EOA is “owned” by an external user through a pair of cryptographic keys:
- The address of the account is derived from the public key
- Transactions from the account must be signed by the private key
Ethereum Accounts 101
A cryptographic Signer is a pair of private and public key (kpriv
, kpub
) such that:
- The public key can be derived from the private key: kpriv
→ kpub
- The private key cannot be computed from the public key: kpub
→ kpriv
The private key can generate a signature Sig(m) for a message m such that:
- Anyone with kpub
can verify that the signature is valid for kpriv
- Only kpriv
can generate a valid signature for kpriv
The signature scheme of Ethereum is ECDSA on the elliptic curve secp256k1.
ECDSA has the additional property that (Sig(m), m) → kpub
Ethereum Accounts 101
address = keccak(kpub
)[0:19]
nonce + balance
EVM logic to validate and execute transactions
EOA Account
(kpriv
, kpub
)
Signer
Ethereum
User
ECDSA on Secp256k1
Ethereum Accounts 101
address = keccak(kpub
)[0:19]
nonce + balance
EVM logic to validate and execute transactions
EOA Account
(kpriv
, kpub
)
Signer
Ethereum
User
The concept of Account and the concept of Signer are merged.
ECDSA on Secp256k1
Holds your tokens Authorised to spend your tokens
Ethereum Account: Problems?
- The Signer IS the Account, and vice versa
→ You can derive the address of the Account from the Signer
→ You can verify a signature for the Account using the Signer (ecrecover)
- But:
- If you loose the Signer you loose the Account!
- If the Signer is compromised the Account is compromised!
- Everybody must use the same cryptography (ECDSA on secp256k1)
→ This will not work for mainstream adoption!
Account Abstraction
Goal: Decouple the relation between Account and Signer
→ Signer = Account
The account is a smart-contract that defines what a valid transaction is:
- Different Signature scheme?
- Different elliptic curve?
- Multiple Signers?
- Signer can be replaced?
On StarkNet the account must implement the IAccount interface.
IAccount interface
namespace IAccount {
struct Call:
member to: felt
member selector: felt
member data_len: felt
member data: felt*
}
func get_nonce() -> (res : felt):
func is_valid_signature(hash: felt, signature_len: felt, signature: felt*) -> (success:
felt):
func __execute__(calls_len: felt, calls: Call*) -> (response_len: felt, response: felt);
func __validate__(calls_len: felt, calls: Call*) -> (success: felt);
}
https://github.com/OpenZeppelin/cairo-contracts/blob/main/openzeppelin/account/Account.cairo
https://github.com/argentlabs/argent-contracts-starknet/blob/develop/contracts/ArgentAccount.cairo
IAccount interface
interface IAccount {
struct Call:
member to: felt
member selector: felt
member data_len: felt
member data: felt*
}
func get_nonce() -> (res : felt):
func is_valid_signature(hash: felt, signature_len: felt, signature: felt*) -> (success:
felt):
func __execute__(calls_len: felt, calls: Call*) -> (response_len: felt, response: felt);
func __validate__(calls_len: felt, calls: Call*) -> (success: felt);
}
https://github.com/OpenZeppelin/cairo-contracts/blob/main/openzeppelin/account/Account.cairo
https://github.com/argentlabs/argent-contracts-starknet/blob/develop/contracts/ArgentAccount.cairo
Verify off-chain signatures
IAccount interface
interface IAccount {
struct Call:
member to: felt
member selector: felt
member data_len: felt
member data: felt*
}
func get_nonce() -> (res : felt):
func is_valid_signature(hash: felt, signature_len: felt, signature: felt*) -> (success:
felt):
func __execute__(calls_len: felt, calls: Call*) -> (response_len: felt, response: felt);
func __validate__(calls_len: felt, calls: Call*) -> (success: felt);
}
https://github.com/OpenZeppelin/cairo-contracts/blob/main/openzeppelin/account/Account.cairo
https://github.com/argentlabs/argent-contracts-starknet/blob/develop/contracts/ArgentAccount.cairo
Used by the sequencer to validate
and execute a transaction
IAccount interface
interface IAccount {
struct Call:
member to: felt
member selector: felt
member data_len: felt
member data: felt*
}
func get_nonce() -> (res : felt):
func is_valid_signature(hash: felt, signature_len: felt, signature: felt*) -> (success:
felt):
func __execute__(calls_len: felt, calls: Call*) -> (response_len: felt, response: felt);
func __validate__(calls_len: felt, calls: Call*) -> (success: felt);
}
https://github.com/OpenZeppelin/cairo-contracts/blob/main/openzeppelin/account/Account.cairo
https://github.com/argentlabs/argent-contracts-starknet/blob/develop/contracts/ArgentAccount.cairo
Yeah Multicalls!
What it means for Dapp developers
1. The Account is a smart-contract
2. The address of the Account is not derived from the Signer
3. Transactions can have multiple signatures
→ sig = [sig1, sig2, …, sigN]
4. Off-chain signatures must be validated on-chain by the Account
→ You cannot use ecrecover(m, sig) locally!
→ You must use account.is_valid_signature(m, sig)
5. Bonus: You can use multicalls!
What it means for Dapp developers
1. The Account is a smart-contract
2. The address of the Account is not derived from the Signer
3. Transactions can have multiple signatures
→ sig = [sig1, sig2, …, sigN]
4. Off-chain signatures must be validated on-chain by the Account
→ You cannot use ecrecover(m, sig) locally
→ You must use account.is_valid_signature(m, sig)
5. Bonus: You can use multicalls!
All you need to remember!
Argent X?
● First Wallet on StarkNet
● Chrome extension
● Multi-account
● Multi (StarkNet) network
● Send and receive tokens
● Interact with dapps
How Argent X works
Argent X
Account Contract
StarkNet
func __execute__():
execute(doSomething, )
How Argent X works
Argent X
Account Contract Dapp Contract
Do Something
StarkNet
sendTransaction(doSomething) doSomething()
func __execute__(): func doSomething():
execute(doSomething, )
Signer
How Argent X works (developers)
Argent X
Account Contract Dapp Contract
Do Something
StarkNet
doSomething()
func __execute__(): func doSomething():
starknet.js
Js library to interact with StarkNet
execute(doSomething, , )
Use case 1: Fraud Monitoring
Argent X
Account Contract Dapp Contract
Do Something
StarkNet
sendTransaction(doSomething) doSomething()
func __execute__(): func doSomething():
Approve? -> YES +
Fraud Monitoring Service
Use case 1: Fraud Monitoring
Argent X
Account Contract Evil Contract
Do Something
StarkNet
sendTransaction(doEvil) doSomething()
func __execute__(): func doEvil():
Approve? -> No
Fraud Monitoring Service
X
escape( )
Use case 2: (Social) Recovery
Argent X
Account Contract
StarkNet
func __execute__():
Recovery Service
?
Use case 2: (Social) Recovery
Argent X
Account Contract
StarkNet
func __execute__():
Recovery Service
● Time delay of 7 days
● Can be canceled
● 100% non-custodial
● No more seed-phrases
Use case 3: Use the Secure Enclave
Argent X
Account Contract
StarkNet
func __execute__():
Secure Enclave*
* Uses a different elliptic curve (secp256r1) approved by the NIST
import { getStarknet } from "@argent/get-starknet"
// check if wallet extension is installed and initialized. Shows a modal prompting the user to download
// ArgentX otherwise.
const starknet = getStarknet({ showModal: true })
// may throws when no extension is detected
, or shows a modal prompting the user to download Argent X.
const [userAccountAddress] = await starknet.enable({ showModal: true }
)
// check if connection was successful
if(starknet.isConnected) {
// If the extension was installed and successfully connected, you have access to a
//starknet.js Signer object to do all kind of requests through the users wallet contract.
starknet.signer.invokeFunction
({ ... })
} else {
// In case the extension wasn't successfully connected you still have access to a
// starknet.js Provider to read starknet states and sent anonymous transactions
starknet.provider.callContract( ... )
}
How to get started
Time to Build!
● Download Argent X
https://chrome.google.com/webstore/detail/argent-x-starknet-wallet/dlcobpjiigpikoobohmabehhmhfoodbb?hl=fr
● npm install get-starknet
https://www.npmjs.com/package/@argent/get-starknet
● Contribute
https://github.com/argentlabs/argent-x
https://github.com/seanjameshan/starknet.js
● Join us on Discord #argent-extension

More Related Content

What's hot

Bitcoin Lightning Network - Presentation
Bitcoin Lightning Network - Presentation Bitcoin Lightning Network - Presentation
Bitcoin Lightning Network - Presentation
Jim Brysland
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
Philippe Camacho, Ph.D.
 
ERC20 Step-by-Step - Creating Your First Ethereum Token
ERC20 Step-by-Step - Creating Your First Ethereum TokenERC20 Step-by-Step - Creating Your First Ethereum Token
ERC20 Step-by-Step - Creating Your First Ethereum Token
CodeOps Technologies LLP
 
Understanding the NFT Ecosystem
Understanding the NFT Ecosystem Understanding the NFT Ecosystem
Understanding the NFT Ecosystem
Andres Guadamuz
 
Hyperledger
HyperledgerHyperledger
Hyperledger
Roshan Ranabhat
 
Asset Tokenization as an Industry Game Changer
Asset Tokenization as an Industry Game ChangerAsset Tokenization as an Industry Game Changer
Asset Tokenization as an Industry Game Changer
Jongseung Kim
 
StarkNet Intro
StarkNet IntroStarkNet Intro
StarkNet Intro
TinaBregovi
 
Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainBitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & Blockchain
Jitendra Chittoda
 
Creating Smart Contract
Creating Smart ContractCreating Smart Contract
Creating Smart Contract
Deepak Aryal
 
The Lightning Network - A gentle introduction
The Lightning Network - A gentle introductionThe Lightning Network - A gentle introduction
The Lightning Network - A gentle introduction
Roland Stadler
 
Asset tokenization Real Estate Reinvented
Asset tokenization Real Estate ReinventedAsset tokenization Real Estate Reinvented
Asset tokenization Real Estate Reinvented
Jongseung Kim
 
Algorand Technical Workshop 2021
Algorand Technical Workshop 2021Algorand Technical Workshop 2021
Algorand Technical Workshop 2021
DanielBohnemann
 
StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721
TinaBregovi
 
Paxos and Raft Distributed Consensus Algorithm
Paxos and Raft Distributed Consensus AlgorithmPaxos and Raft Distributed Consensus Algorithm
Paxos and Raft Distributed Consensus Algorithm
宇 傅
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
Malak Abu Hammad
 
Blockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSysBlockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSys
WithTheBest
 
Blockchain 101 + Use Cases + Why Blockchain As a Service
Blockchain 101 + Use Cases + Why Blockchain As a ServiceBlockchain 101 + Use Cases + Why Blockchain As a Service
Blockchain 101 + Use Cases + Why Blockchain As a Service
Kaleido
 
Stablecoin
StablecoinStablecoin
Stablecoin
Hu Kenneth
 
Blockchain Consensus Protocols
Blockchain Consensus ProtocolsBlockchain Consensus Protocols
Blockchain Consensus Protocols
Melanie Swan
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Svetlin Nakov
 

What's hot (20)

Bitcoin Lightning Network - Presentation
Bitcoin Lightning Network - Presentation Bitcoin Lightning Network - Presentation
Bitcoin Lightning Network - Presentation
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
 
ERC20 Step-by-Step - Creating Your First Ethereum Token
ERC20 Step-by-Step - Creating Your First Ethereum TokenERC20 Step-by-Step - Creating Your First Ethereum Token
ERC20 Step-by-Step - Creating Your First Ethereum Token
 
Understanding the NFT Ecosystem
Understanding the NFT Ecosystem Understanding the NFT Ecosystem
Understanding the NFT Ecosystem
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
Asset Tokenization as an Industry Game Changer
Asset Tokenization as an Industry Game ChangerAsset Tokenization as an Industry Game Changer
Asset Tokenization as an Industry Game Changer
 
StarkNet Intro
StarkNet IntroStarkNet Intro
StarkNet Intro
 
Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainBitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & Blockchain
 
Creating Smart Contract
Creating Smart ContractCreating Smart Contract
Creating Smart Contract
 
The Lightning Network - A gentle introduction
The Lightning Network - A gentle introductionThe Lightning Network - A gentle introduction
The Lightning Network - A gentle introduction
 
Asset tokenization Real Estate Reinvented
Asset tokenization Real Estate ReinventedAsset tokenization Real Estate Reinvented
Asset tokenization Real Estate Reinvented
 
Algorand Technical Workshop 2021
Algorand Technical Workshop 2021Algorand Technical Workshop 2021
Algorand Technical Workshop 2021
 
StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721
 
Paxos and Raft Distributed Consensus Algorithm
Paxos and Raft Distributed Consensus AlgorithmPaxos and Raft Distributed Consensus Algorithm
Paxos and Raft Distributed Consensus Algorithm
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Blockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSysBlockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSys
 
Blockchain 101 + Use Cases + Why Blockchain As a Service
Blockchain 101 + Use Cases + Why Blockchain As a ServiceBlockchain 101 + Use Cases + Why Blockchain As a Service
Blockchain 101 + Use Cases + Why Blockchain As a Service
 
Stablecoin
StablecoinStablecoin
Stablecoin
 
Blockchain Consensus Protocols
Blockchain Consensus ProtocolsBlockchain Consensus Protocols
Blockchain Consensus Protocols
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
 

Similar to Starkware: Account Abstraction

BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
병완 임
 
以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12
Aludirk Wong
 
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK ShyamasundarRobust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Napier University
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereumDappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Tomoaki Sato
 
Ethereum hackers
Ethereum hackersEthereum hackers
Ethereum hackers
gavofyork
 
A simplified Bitcoin Implementation in GO
A simplified Bitcoin Implementation in GOA simplified Bitcoin Implementation in GO
A simplified Bitcoin Implementation in GO
Brian Yap
 
Ethereummeetuppresentation01 170105172132
Ethereummeetuppresentation01 170105172132Ethereummeetuppresentation01 170105172132
Ethereummeetuppresentation01 170105172132
Rihazudin Razik MBCS
 
Ethereum Smart Contract Tutorial
Ethereum Smart Contract TutorialEthereum Smart Contract Tutorial
Ethereum Smart Contract Tutorial
Arnold Pham
 
DevDay: Getting Started with Tokens and Accounts, R3
DevDay: Getting Started with Tokens and Accounts, R3DevDay: Getting Started with Tokens and Accounts, R3
DevDay: Getting Started with Tokens and Accounts, R3
R3
 
Ethereum: Coding Society
Ethereum: Coding SocietyEthereum: Coding Society
Ethereum: Coding Society
gavofyork
 
Droid on Chain - Berry Ventura Lev, Kik
Droid on Chain - Berry Ventura Lev, KikDroid on Chain - Berry Ventura Lev, Kik
Droid on Chain - Berry Ventura Lev, Kik
DroidConTLV
 
A Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts BytecodeA Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts Bytecode
Shakacon
 
Features to required create erc 20
Features to required create erc 20 Features to required create erc 20
Features to required create erc 20
Alladin Nasir
 
Uni v2 eth-dai analysis
Uni v2 eth-dai analysisUni v2 eth-dai analysis
Uni v2 eth-dai analysis
JonnyHimalaya
 
Braavos Wallet Workshop.pdf
Braavos Wallet Workshop.pdfBraavos Wallet Workshop.pdf
Braavos Wallet Workshop.pdf
TinaBregovi
 
Switcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart ContractsSwitcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart Contracts
Switcheo
 
Build on Streakk Chain - Blockchain
Build on Streakk Chain - BlockchainBuild on Streakk Chain - Blockchain
Build on Streakk Chain - Blockchain
Earn.World
 
The world computer
The world computerThe world computer
The world computer
gavofyork
 
How to be a smart contract engineer
How to be a smart contract engineerHow to be a smart contract engineer
How to be a smart contract engineer
Oded Noam
 
Study Notes: Google Percolator
Study Notes: Google PercolatorStudy Notes: Google Percolator
Study Notes: Google Percolator
Gao Yunzhong
 

Similar to Starkware: Account Abstraction (20)

BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
 
以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12
 
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK ShyamasundarRobust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereumDappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
 
Ethereum hackers
Ethereum hackersEthereum hackers
Ethereum hackers
 
A simplified Bitcoin Implementation in GO
A simplified Bitcoin Implementation in GOA simplified Bitcoin Implementation in GO
A simplified Bitcoin Implementation in GO
 
Ethereummeetuppresentation01 170105172132
Ethereummeetuppresentation01 170105172132Ethereummeetuppresentation01 170105172132
Ethereummeetuppresentation01 170105172132
 
Ethereum Smart Contract Tutorial
Ethereum Smart Contract TutorialEthereum Smart Contract Tutorial
Ethereum Smart Contract Tutorial
 
DevDay: Getting Started with Tokens and Accounts, R3
DevDay: Getting Started with Tokens and Accounts, R3DevDay: Getting Started with Tokens and Accounts, R3
DevDay: Getting Started with Tokens and Accounts, R3
 
Ethereum: Coding Society
Ethereum: Coding SocietyEthereum: Coding Society
Ethereum: Coding Society
 
Droid on Chain - Berry Ventura Lev, Kik
Droid on Chain - Berry Ventura Lev, KikDroid on Chain - Berry Ventura Lev, Kik
Droid on Chain - Berry Ventura Lev, Kik
 
A Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts BytecodeA Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts Bytecode
 
Features to required create erc 20
Features to required create erc 20 Features to required create erc 20
Features to required create erc 20
 
Uni v2 eth-dai analysis
Uni v2 eth-dai analysisUni v2 eth-dai analysis
Uni v2 eth-dai analysis
 
Braavos Wallet Workshop.pdf
Braavos Wallet Workshop.pdfBraavos Wallet Workshop.pdf
Braavos Wallet Workshop.pdf
 
Switcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart ContractsSwitcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart Contracts
 
Build on Streakk Chain - Blockchain
Build on Streakk Chain - BlockchainBuild on Streakk Chain - Blockchain
Build on Streakk Chain - Blockchain
 
The world computer
The world computerThe world computer
The world computer
 
How to be a smart contract engineer
How to be a smart contract engineerHow to be a smart contract engineer
How to be a smart contract engineer
 
Study Notes: Google Percolator
Study Notes: Google PercolatorStudy Notes: Google Percolator
Study Notes: Google Percolator
 

More from TinaBregovi

Building LSD Use Cases on Bifrost
Building LSD Use Cases on BifrostBuilding LSD Use Cases on Bifrost
Building LSD Use Cases on Bifrost
TinaBregovi
 
Urbit Launch Event
Urbit Launch EventUrbit Launch Event
Urbit Launch Event
TinaBregovi
 
Layer Hack: Boba Network: Understanding Hybrid Compute
Layer Hack: Boba Network: Understanding Hybrid ComputeLayer Hack: Boba Network: Understanding Hybrid Compute
Layer Hack: Boba Network: Understanding Hybrid Compute
TinaBregovi
 
Layer Hack: zkSync - Intro to zkEVM
Layer Hack: zkSync - Intro to zkEVMLayer Hack: zkSync - Intro to zkEVM
Layer Hack: zkSync - Intro to zkEVM
TinaBregovi
 
Rollup-as-a-service and why it matters to the next-gen of dApps
Rollup-as-a-service and why it matters to the next-gen of dAppsRollup-as-a-service and why it matters to the next-gen of dApps
Rollup-as-a-service and why it matters to the next-gen of dApps
TinaBregovi
 
Layer Hack: AltLayer Workshop
Layer Hack: AltLayer WorkshopLayer Hack: AltLayer Workshop
Layer Hack: AltLayer Workshop
TinaBregovi
 
Layer Hack Launch Event
Layer Hack Launch EventLayer Hack Launch Event
Layer Hack Launch Event
TinaBregovi
 
Bridging with StarkNet
Bridging with StarkNetBridging with StarkNet
Bridging with StarkNet
TinaBregovi
 
How To Build Better NFTs with Briq
How To Build Better NFTs with BriqHow To Build Better NFTs with Briq
How To Build Better NFTs with Briq
TinaBregovi
 
NFTs on StarkNet
NFTs on StarkNetNFTs on StarkNet
NFTs on StarkNet
TinaBregovi
 
How to build a dApp in StarkNet
How to build a dApp in StarkNetHow to build a dApp in StarkNet
How to build a dApp in StarkNet
TinaBregovi
 
StarkNet Autumn Hackathon Launch Event.pptx
StarkNet Autumn Hackathon Launch Event.pptxStarkNet Autumn Hackathon Launch Event.pptx
StarkNet Autumn Hackathon Launch Event.pptx
TinaBregovi
 
Harmony Marketplace SDK.pptx
Harmony Marketplace SDK.pptxHarmony Marketplace SDK.pptx
Harmony Marketplace SDK.pptx
TinaBregovi
 
Coinbase Node
Coinbase NodeCoinbase Node
Coinbase Node
TinaBregovi
 
Get Ready for Coinbase Node
Get Ready for Coinbase NodeGet Ready for Coinbase Node
Get Ready for Coinbase Node
TinaBregovi
 
MANIFOLD MEV Bounty Competition
MANIFOLD MEV Bounty CompetitionMANIFOLD MEV Bounty Competition
MANIFOLD MEV Bounty Competition
TinaBregovi
 
Public SP Meeting
Public SP MeetingPublic SP Meeting
Public SP Meeting
TinaBregovi
 
Ecosystem WG
Ecosystem WGEcosystem WG
Ecosystem WG
TinaBregovi
 
Welcome to the Web 3.0
Welcome to the Web 3.0Welcome to the Web 3.0
Welcome to the Web 3.0
TinaBregovi
 
Introduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionIntroduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer version
TinaBregovi
 

More from TinaBregovi (20)

Building LSD Use Cases on Bifrost
Building LSD Use Cases on BifrostBuilding LSD Use Cases on Bifrost
Building LSD Use Cases on Bifrost
 
Urbit Launch Event
Urbit Launch EventUrbit Launch Event
Urbit Launch Event
 
Layer Hack: Boba Network: Understanding Hybrid Compute
Layer Hack: Boba Network: Understanding Hybrid ComputeLayer Hack: Boba Network: Understanding Hybrid Compute
Layer Hack: Boba Network: Understanding Hybrid Compute
 
Layer Hack: zkSync - Intro to zkEVM
Layer Hack: zkSync - Intro to zkEVMLayer Hack: zkSync - Intro to zkEVM
Layer Hack: zkSync - Intro to zkEVM
 
Rollup-as-a-service and why it matters to the next-gen of dApps
Rollup-as-a-service and why it matters to the next-gen of dAppsRollup-as-a-service and why it matters to the next-gen of dApps
Rollup-as-a-service and why it matters to the next-gen of dApps
 
Layer Hack: AltLayer Workshop
Layer Hack: AltLayer WorkshopLayer Hack: AltLayer Workshop
Layer Hack: AltLayer Workshop
 
Layer Hack Launch Event
Layer Hack Launch EventLayer Hack Launch Event
Layer Hack Launch Event
 
Bridging with StarkNet
Bridging with StarkNetBridging with StarkNet
Bridging with StarkNet
 
How To Build Better NFTs with Briq
How To Build Better NFTs with BriqHow To Build Better NFTs with Briq
How To Build Better NFTs with Briq
 
NFTs on StarkNet
NFTs on StarkNetNFTs on StarkNet
NFTs on StarkNet
 
How to build a dApp in StarkNet
How to build a dApp in StarkNetHow to build a dApp in StarkNet
How to build a dApp in StarkNet
 
StarkNet Autumn Hackathon Launch Event.pptx
StarkNet Autumn Hackathon Launch Event.pptxStarkNet Autumn Hackathon Launch Event.pptx
StarkNet Autumn Hackathon Launch Event.pptx
 
Harmony Marketplace SDK.pptx
Harmony Marketplace SDK.pptxHarmony Marketplace SDK.pptx
Harmony Marketplace SDK.pptx
 
Coinbase Node
Coinbase NodeCoinbase Node
Coinbase Node
 
Get Ready for Coinbase Node
Get Ready for Coinbase NodeGet Ready for Coinbase Node
Get Ready for Coinbase Node
 
MANIFOLD MEV Bounty Competition
MANIFOLD MEV Bounty CompetitionMANIFOLD MEV Bounty Competition
MANIFOLD MEV Bounty Competition
 
Public SP Meeting
Public SP MeetingPublic SP Meeting
Public SP Meeting
 
Ecosystem WG
Ecosystem WGEcosystem WG
Ecosystem WG
 
Welcome to the Web 3.0
Welcome to the Web 3.0Welcome to the Web 3.0
Welcome to the Web 3.0
 
Introduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionIntroduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer version
 

Recently uploaded

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 

Starkware: Account Abstraction

  • 1.
  • 2. Table of Contents ● Understanding Ethereum Accounts ○ How it works ○ Limitations ● Account Abstraction ○ How it works ○ The IAccount interface ○ What it means for Dapp developers ● Use Cases ○ Fraud monitoring ○ Social Recovery ○ Secure Enclave ● How to build with Argent X
  • 3. Ethereum Accounts 101 There is 2 types of Accounts on Ethereum: - Externally Owned Accounts (EOA) - Contract Accounts (CA) The state of Ethereum S is the state of all the Accounts (EOA + CA) The state can only be updated by transactions: S’ = T(S) Every transaction T must be initiated (a.k.a start) from an EOA from: <an EOA> to: … value: … data: …
  • 4. Ethereum Accounts 101 An (EOA) Account has: - an address for identification - a nonce to make sure transactions are unique - a balance in ETH to pay fees The EOA is “owned” by an external user through a pair of cryptographic keys: - The address of the account is derived from the public key - Transactions from the account must be signed by the private key
  • 5. Ethereum Accounts 101 A cryptographic Signer is a pair of private and public key (kpriv , kpub ) such that: - The public key can be derived from the private key: kpriv → kpub - The private key cannot be computed from the public key: kpub → kpriv The private key can generate a signature Sig(m) for a message m such that: - Anyone with kpub can verify that the signature is valid for kpriv - Only kpriv can generate a valid signature for kpriv The signature scheme of Ethereum is ECDSA on the elliptic curve secp256k1. ECDSA has the additional property that (Sig(m), m) → kpub
  • 6. Ethereum Accounts 101 address = keccak(kpub )[0:19] nonce + balance EVM logic to validate and execute transactions EOA Account (kpriv , kpub ) Signer Ethereum User ECDSA on Secp256k1
  • 7. Ethereum Accounts 101 address = keccak(kpub )[0:19] nonce + balance EVM logic to validate and execute transactions EOA Account (kpriv , kpub ) Signer Ethereum User The concept of Account and the concept of Signer are merged. ECDSA on Secp256k1 Holds your tokens Authorised to spend your tokens
  • 8. Ethereum Account: Problems? - The Signer IS the Account, and vice versa → You can derive the address of the Account from the Signer → You can verify a signature for the Account using the Signer (ecrecover) - But: - If you loose the Signer you loose the Account! - If the Signer is compromised the Account is compromised! - Everybody must use the same cryptography (ECDSA on secp256k1) → This will not work for mainstream adoption!
  • 9. Account Abstraction Goal: Decouple the relation between Account and Signer → Signer = Account The account is a smart-contract that defines what a valid transaction is: - Different Signature scheme? - Different elliptic curve? - Multiple Signers? - Signer can be replaced? On StarkNet the account must implement the IAccount interface.
  • 10. IAccount interface namespace IAccount { struct Call: member to: felt member selector: felt member data_len: felt member data: felt* } func get_nonce() -> (res : felt): func is_valid_signature(hash: felt, signature_len: felt, signature: felt*) -> (success: felt): func __execute__(calls_len: felt, calls: Call*) -> (response_len: felt, response: felt); func __validate__(calls_len: felt, calls: Call*) -> (success: felt); } https://github.com/OpenZeppelin/cairo-contracts/blob/main/openzeppelin/account/Account.cairo https://github.com/argentlabs/argent-contracts-starknet/blob/develop/contracts/ArgentAccount.cairo
  • 11. IAccount interface interface IAccount { struct Call: member to: felt member selector: felt member data_len: felt member data: felt* } func get_nonce() -> (res : felt): func is_valid_signature(hash: felt, signature_len: felt, signature: felt*) -> (success: felt): func __execute__(calls_len: felt, calls: Call*) -> (response_len: felt, response: felt); func __validate__(calls_len: felt, calls: Call*) -> (success: felt); } https://github.com/OpenZeppelin/cairo-contracts/blob/main/openzeppelin/account/Account.cairo https://github.com/argentlabs/argent-contracts-starknet/blob/develop/contracts/ArgentAccount.cairo Verify off-chain signatures
  • 12. IAccount interface interface IAccount { struct Call: member to: felt member selector: felt member data_len: felt member data: felt* } func get_nonce() -> (res : felt): func is_valid_signature(hash: felt, signature_len: felt, signature: felt*) -> (success: felt): func __execute__(calls_len: felt, calls: Call*) -> (response_len: felt, response: felt); func __validate__(calls_len: felt, calls: Call*) -> (success: felt); } https://github.com/OpenZeppelin/cairo-contracts/blob/main/openzeppelin/account/Account.cairo https://github.com/argentlabs/argent-contracts-starknet/blob/develop/contracts/ArgentAccount.cairo Used by the sequencer to validate and execute a transaction
  • 13. IAccount interface interface IAccount { struct Call: member to: felt member selector: felt member data_len: felt member data: felt* } func get_nonce() -> (res : felt): func is_valid_signature(hash: felt, signature_len: felt, signature: felt*) -> (success: felt): func __execute__(calls_len: felt, calls: Call*) -> (response_len: felt, response: felt); func __validate__(calls_len: felt, calls: Call*) -> (success: felt); } https://github.com/OpenZeppelin/cairo-contracts/blob/main/openzeppelin/account/Account.cairo https://github.com/argentlabs/argent-contracts-starknet/blob/develop/contracts/ArgentAccount.cairo Yeah Multicalls!
  • 14. What it means for Dapp developers 1. The Account is a smart-contract 2. The address of the Account is not derived from the Signer 3. Transactions can have multiple signatures → sig = [sig1, sig2, …, sigN] 4. Off-chain signatures must be validated on-chain by the Account → You cannot use ecrecover(m, sig) locally! → You must use account.is_valid_signature(m, sig) 5. Bonus: You can use multicalls!
  • 15. What it means for Dapp developers 1. The Account is a smart-contract 2. The address of the Account is not derived from the Signer 3. Transactions can have multiple signatures → sig = [sig1, sig2, …, sigN] 4. Off-chain signatures must be validated on-chain by the Account → You cannot use ecrecover(m, sig) locally → You must use account.is_valid_signature(m, sig) 5. Bonus: You can use multicalls! All you need to remember!
  • 16. Argent X? ● First Wallet on StarkNet ● Chrome extension ● Multi-account ● Multi (StarkNet) network ● Send and receive tokens ● Interact with dapps
  • 17. How Argent X works Argent X Account Contract StarkNet func __execute__():
  • 18. execute(doSomething, ) How Argent X works Argent X Account Contract Dapp Contract Do Something StarkNet sendTransaction(doSomething) doSomething() func __execute__(): func doSomething():
  • 19. execute(doSomething, ) Signer How Argent X works (developers) Argent X Account Contract Dapp Contract Do Something StarkNet doSomething() func __execute__(): func doSomething(): starknet.js Js library to interact with StarkNet
  • 20. execute(doSomething, , ) Use case 1: Fraud Monitoring Argent X Account Contract Dapp Contract Do Something StarkNet sendTransaction(doSomething) doSomething() func __execute__(): func doSomething(): Approve? -> YES + Fraud Monitoring Service
  • 21. Use case 1: Fraud Monitoring Argent X Account Contract Evil Contract Do Something StarkNet sendTransaction(doEvil) doSomething() func __execute__(): func doEvil(): Approve? -> No Fraud Monitoring Service X
  • 22. escape( ) Use case 2: (Social) Recovery Argent X Account Contract StarkNet func __execute__(): Recovery Service ?
  • 23. Use case 2: (Social) Recovery Argent X Account Contract StarkNet func __execute__(): Recovery Service ● Time delay of 7 days ● Can be canceled ● 100% non-custodial ● No more seed-phrases
  • 24. Use case 3: Use the Secure Enclave Argent X Account Contract StarkNet func __execute__(): Secure Enclave* * Uses a different elliptic curve (secp256r1) approved by the NIST
  • 25. import { getStarknet } from "@argent/get-starknet" // check if wallet extension is installed and initialized. Shows a modal prompting the user to download // ArgentX otherwise. const starknet = getStarknet({ showModal: true }) // may throws when no extension is detected , or shows a modal prompting the user to download Argent X. const [userAccountAddress] = await starknet.enable({ showModal: true } ) // check if connection was successful if(starknet.isConnected) { // If the extension was installed and successfully connected, you have access to a //starknet.js Signer object to do all kind of requests through the users wallet contract. starknet.signer.invokeFunction ({ ... }) } else { // In case the extension wasn't successfully connected you still have access to a // starknet.js Provider to read starknet states and sent anonymous transactions starknet.provider.callContract( ... ) } How to get started
  • 26. Time to Build! ● Download Argent X https://chrome.google.com/webstore/detail/argent-x-starknet-wallet/dlcobpjiigpikoobohmabehhmhfoodbb?hl=fr ● npm install get-starknet https://www.npmjs.com/package/@argent/get-starknet ● Contribute https://github.com/argentlabs/argent-x https://github.com/seanjameshan/starknet.js ● Join us on Discord #argent-extension