SlideShare a Scribd company logo
1 of 18
Download to read offline
dApp <-> wallet integration
By the end of this session you will know how to:
Connect your dApp with a wallet
Call your contract on chain
Invoke txs from your dApp to your contract
Watch assets e.g. add new tokens to user wallet
Sign messages to be used in your contracts
Goals
Smart Contracts
E2E hands-on walkthrough
session for everything
wallet <-> smart contracts
get-starknet
StarkNet wallet <-> dApp bridge
https://www.npmjs.com/package/get-starknet
https://github.com/starknet-community-libs/get-starknet
Connect
Motivation
dApps <-> wallets available integration before get-starknet
access/lookup window.starknet directly (1/2)
⛔ no guarantees for the key to be used on future wallet versions
⛔ wallet APIs change over time. No way for a dApp to know
about deprecated or newly-added APIs
⛔ there could be no wallet installed.
dApp is forced to implement (and maintain) its own wallet-discovery UI
or just keep losing users
Motivation
dApps <-> wallets available integration before get-starknet
access/lookup window.starknet directly (2/2)
⛔ no built-in way for dApps to know which wallet they are connected to
(i.e. missing fields like name or icon to use by the dApp)
⛔ assumes there is only one wallet available.
other installed wallets aren't discoverable by the using dApp.
🔓 Allow dApps to seamlessly connect to any wallet on StarkNet
(devs should be spending the time building their new products.)
Ideation
Could we build something better?
🫂 Allow wallets to seamlessly connect to any dApp,
and get discovered by users which need a new wallet.
👥 An open source wallet/dApp API controlled by the community
- no legacies, StarkNet is still in its early days
- clear roadmap for new and deprecated APIs, community standardizations
🛡 An open source StarkNet wallet discovery list, moderated by the community
Solution
get-starknet, StarkNet wallet <-> dApp bridge
💃 integratable with zero burden for all existing dApps
Same window.starknet object APIs,
same connector APIs,
for all retrievable & discoverable wallets
Solution
get-starknet, StarkNet wallet <-> dApp bridge
Features:
- discovers all StarkNet wallets injected to the window object
- allows dApps to control which wallets to list, exclude or promote
- offers various wallet-connect modes (silent, visible or smart-defaults)
- allows dApps to switch wallets on runtime
- multi chain support
- 🧙 "one API to align them all" - for both dApp devs and wallet providers
- v2 (soon!), separating core/UI, even more power to devs 💪
Community
Used by all the major StarkNet dApps
(StarkGate, mySwap, briq, Aspect, MintSquare, ...)
Tools & Infrastructures
(Braavos, Starkscan, voyager, starknet-
react, ...)
Backed by
& hosted by StarkWare Libs
PRs are welcome!
Please join the discussion, and help us shape the future of StarkNet
https://github.com/starknet-community-libs/get-starknet
Call
Call entry-points on your contract
const readTokenBalance = async (
token_address: string = "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
): Promise<string | undefined> => {
const wallet = getWallet();
if (!wallet.isConnected) return undefined;
const address = wallet.account.address;
try {
const result = await wallet.provider.callContract(
{
contractAddress: token_address,
entrypoint: "balanceOf",
calldata: [BigInt(address).toString()],
},
{ blockIdentifier: "pending" }
);
const balance = composeUInt256(result.result[0], result.result[1]);
return balance;
} catch {
return undefined;
}
};
Invoke
mint tokens
const mint = async () => {
const wallet = getWallet();
if (wallet.isConnected) {
const erc20Contract = new Contract(
Erc20Abi as Abi,
"0x06e931246fbae79e0453f780ed58a4cb2ff91f7f1c702705c3c1de41a55d9e72",
wallet.account
);
return erc20Contract.mint(
wallet.account.address,
parseInputAmountToUint256("100")
);
}
};
Watch Assets
Add new tokens to the wallet
const watchAsset = async (): Promise<undefined | boolean> => {
const wallet = getWallet();
return !wallet.isConnected
? undefined
: wallet.request({
type: "wallet_watchAsset",
params: {
type: "ERC20", // The asset's interface, i.e. 'ERC20'
options: {
// The hexadecimal Ethereum address of the token contract
address: "0x03e85bfbb8e2a42b7bead9e88e9a1b19dbccf661471061807292120462396ec9",
// A ticker symbol or shorthand, up to 5 alphanumerical characters
symbol: "DAI",
// The number of asset decimals
decimals: 18,
// A string url of the token logo (optional)
image: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIi...",
},
},
});
};
Sign Messages
Sign Messages to be used by your contract (i.e. NFT listing for sell)
const sign = async (message: string): Promise<Signature | undefined> => {
const wallet = getWallet();
return !wallet.isConnected
? undefined
: wallet.account.signMessage({
domain: {
name: "StarkNet DApp",
chainId:"SN_GOERLI",
version: "0.0.1",
},
types: {
StarkNetDomain: [
{ name: "name", type: "felt" },
{ name: "chainId", type: "felt" },
{ name: "version", type: "felt" },
],
Message: [{ name: "message", type: "felt" }],
},
primaryType: "Message",
message: { message: "Braavos - first StarkNet mobile wallet" },
});
};
💪 devnet network
⛽ mint Goerli ETH inside
the wallet
🕶 Headless mode!
support on discord
Braavos ❤ devs
dApps on mobile ->
web3 mobile gaming!
Transactions ->
Explainer
THANK YOU

More Related Content

What's hot

Unsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST APIUnsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST APIMikhail Egorov
 
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesXXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesAbraham Aranguren
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentationritika1
 
Spark streaming , Spark SQL
Spark streaming , Spark SQLSpark streaming , Spark SQL
Spark streaming , Spark SQLYousun Jeong
 
Express JS Middleware Tutorial
Express JS Middleware TutorialExpress JS Middleware Tutorial
Express JS Middleware TutorialSimplilearn
 
Introduction to Rust language programming
Introduction to Rust language programmingIntroduction to Rust language programming
Introduction to Rust language programmingRodolfo Finochietti
 
ReCertifying Active Directory
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active DirectoryWill Schroeder
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)Manish Kumar
 
Understanding JWT Exploitation
Understanding JWT ExploitationUnderstanding JWT Exploitation
Understanding JWT ExploitationAkshaeyBhosale
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Moataz Kamel
 
Attacking ADFS Endpoints - DerbyCon
Attacking ADFS Endpoints - DerbyConAttacking ADFS Endpoints - DerbyCon
Attacking ADFS Endpoints - DerbyConKarl Fosaaen
 

What's hot (20)

Unsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST APIUnsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST API
 
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesXXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
 
iOS Keychain 介紹
iOS Keychain 介紹iOS Keychain 介紹
iOS Keychain 介紹
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
 
Spark streaming , Spark SQL
Spark streaming , Spark SQLSpark streaming , Spark SQL
Spark streaming , Spark SQL
 
Json web token
Json web tokenJson web token
Json web token
 
jQuery
jQueryjQuery
jQuery
 
Express JS Middleware Tutorial
Express JS Middleware TutorialExpress JS Middleware Tutorial
Express JS Middleware Tutorial
 
Security in NodeJS applications
Security in NodeJS applicationsSecurity in NodeJS applications
Security in NodeJS applications
 
Introduction to Rust language programming
Introduction to Rust language programmingIntroduction to Rust language programming
Introduction to Rust language programming
 
ReCertifying Active Directory
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active Directory
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)
 
JSON Web Tokens
JSON Web TokensJSON Web Tokens
JSON Web Tokens
 
Understanding JWT Exploitation
Understanding JWT ExploitationUnderstanding JWT Exploitation
Understanding JWT Exploitation
 
Secure Coding for Java
Secure Coding for JavaSecure Coding for Java
Secure Coding for Java
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
Javascript and DOM
Javascript and DOMJavascript and DOM
Javascript and DOM
 
Vps Hosting
Vps HostingVps Hosting
Vps Hosting
 
Ajax
AjaxAjax
Ajax
 
Attacking ADFS Endpoints - DerbyCon
Attacking ADFS Endpoints - DerbyConAttacking ADFS Endpoints - DerbyCon
Attacking ADFS Endpoints - DerbyCon
 

Similar to Braavos Wallet Workshop.pdf

Build on Streakk Chain - Blockchain
Build on Streakk Chain - BlockchainBuild on Streakk Chain - Blockchain
Build on Streakk Chain - BlockchainEarn.World
 
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1KlaraOrban
 
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_ethereumTomoaki Sato
 
All in-one-smart node-v1.2.4
All in-one-smart node-v1.2.4All in-one-smart node-v1.2.4
All in-one-smart node-v1.2.4SmartCash VN
 
leewayhertz.com-How to build a dApp on Avalanche blockchain
leewayhertz.com-How to build a dApp on Avalanche blockchainleewayhertz.com-How to build a dApp on Avalanche blockchain
leewayhertz.com-How to build a dApp on Avalanche blockchainMdSaifulIslam289
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dappsStefaan Ponnet
 
Example Cosmos SDK Application Tutorial
Example Cosmos SDK Application TutorialExample Cosmos SDK Application Tutorial
Example Cosmos SDK Application TutorialJim Yang
 
Programming smart contracts in solidity
Programming smart contracts in solidityProgramming smart contracts in solidity
Programming smart contracts in solidityEmanuel Mota
 
Blockchain School 2019 - Security of Smart Contracts.pdf
Blockchain School 2019 - Security of Smart Contracts.pdfBlockchain School 2019 - Security of Smart Contracts.pdf
Blockchain School 2019 - Security of Smart Contracts.pdfDavide Carboni
 
Swift on Raspberry Pi
Swift on Raspberry PiSwift on Raspberry Pi
Swift on Raspberry PiSally Shepard
 
Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017Zied GUESMI
 
Python packages for blockchain
Python packages for blockchainPython packages for blockchain
Python packages for blockchainCeline George
 
Liquid Farming by Envelop
Liquid Farming by EnvelopLiquid Farming by Envelop
Liquid Farming by Envelopssuser93c1aa
 
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...KAI CHU CHUNG
 
KDD 2016 Streaming Analytics Tutorial
KDD 2016 Streaming Analytics TutorialKDD 2016 Streaming Analytics Tutorial
KDD 2016 Streaming Analytics TutorialNeera Agarwal
 
OpenTelemetry Introduction
OpenTelemetry Introduction OpenTelemetry Introduction
OpenTelemetry Introduction DimitrisFinas1
 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchainBellaj Badr
 
Sandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooksSandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooksKarlFrank99
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingBertrand Delacretaz
 

Similar to Braavos Wallet Workshop.pdf (20)

Build on Streakk Chain - Blockchain
Build on Streakk Chain - BlockchainBuild on Streakk Chain - Blockchain
Build on Streakk Chain - Blockchain
 
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1
 
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
 
All in-one-smart node-v1.2.4
All in-one-smart node-v1.2.4All in-one-smart node-v1.2.4
All in-one-smart node-v1.2.4
 
leewayhertz.com-How to build a dApp on Avalanche blockchain
leewayhertz.com-How to build a dApp on Avalanche blockchainleewayhertz.com-How to build a dApp on Avalanche blockchain
leewayhertz.com-How to build a dApp on Avalanche blockchain
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dapps
 
Example Cosmos SDK Application Tutorial
Example Cosmos SDK Application TutorialExample Cosmos SDK Application Tutorial
Example Cosmos SDK Application Tutorial
 
Programming smart contracts in solidity
Programming smart contracts in solidityProgramming smart contracts in solidity
Programming smart contracts in solidity
 
Blockchain School 2019 - Security of Smart Contracts.pdf
Blockchain School 2019 - Security of Smart Contracts.pdfBlockchain School 2019 - Security of Smart Contracts.pdf
Blockchain School 2019 - Security of Smart Contracts.pdf
 
Chaincode Use Cases
Chaincode Use Cases Chaincode Use Cases
Chaincode Use Cases
 
Swift on Raspberry Pi
Swift on Raspberry PiSwift on Raspberry Pi
Swift on Raspberry Pi
 
Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017Blockchain Workshop - Software Freedom Day 2017
Blockchain Workshop - Software Freedom Day 2017
 
Python packages for blockchain
Python packages for blockchainPython packages for blockchain
Python packages for blockchain
 
Liquid Farming by Envelop
Liquid Farming by EnvelopLiquid Farming by Envelop
Liquid Farming by Envelop
 
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
 
KDD 2016 Streaming Analytics Tutorial
KDD 2016 Streaming Analytics TutorialKDD 2016 Streaming Analytics Tutorial
KDD 2016 Streaming Analytics Tutorial
 
OpenTelemetry Introduction
OpenTelemetry Introduction OpenTelemetry Introduction
OpenTelemetry Introduction
 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchain
 
Sandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooksSandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooks
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 

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 BifrostTinaBregovi
 
Urbit Launch Event
Urbit Launch EventUrbit Launch Event
Urbit Launch EventTinaBregovi
 
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 ComputeTinaBregovi
 
Layer Hack: zkSync - Intro to zkEVM
Layer Hack: zkSync - Intro to zkEVMLayer Hack: zkSync - Intro to zkEVM
Layer Hack: zkSync - Intro to zkEVMTinaBregovi
 
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 dAppsTinaBregovi
 
Layer Hack: AltLayer Workshop
Layer Hack: AltLayer WorkshopLayer Hack: AltLayer Workshop
Layer Hack: AltLayer WorkshopTinaBregovi
 
Layer Hack Launch Event
Layer Hack Launch EventLayer Hack Launch Event
Layer Hack Launch EventTinaBregovi
 
Bridging with StarkNet
Bridging with StarkNetBridging with StarkNet
Bridging with StarkNetTinaBregovi
 
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 BriqTinaBregovi
 
NFTs on StarkNet
NFTs on StarkNetNFTs on StarkNet
NFTs on StarkNetTinaBregovi
 
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 StarkNetTinaBregovi
 
StarkNet Autumn Hackathon Launch Event.pptx
StarkNet Autumn Hackathon Launch Event.pptxStarkNet Autumn Hackathon Launch Event.pptx
StarkNet Autumn Hackathon Launch Event.pptxTinaBregovi
 
Harmony Marketplace SDK.pptx
Harmony Marketplace SDK.pptxHarmony Marketplace SDK.pptx
Harmony Marketplace SDK.pptxTinaBregovi
 
Get Ready for Coinbase Node
Get Ready for Coinbase NodeGet Ready for Coinbase Node
Get Ready for Coinbase NodeTinaBregovi
 
MANIFOLD MEV Bounty Competition
MANIFOLD MEV Bounty CompetitionMANIFOLD MEV Bounty Competition
MANIFOLD MEV Bounty CompetitionTinaBregovi
 
Public SP Meeting
Public SP MeetingPublic SP Meeting
Public SP MeetingTinaBregovi
 
Welcome to the Web 3.0
Welcome to the Web 3.0Welcome to the Web 3.0
Welcome to the Web 3.0TinaBregovi
 
Introduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionIntroduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionTinaBregovi
 

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

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Braavos Wallet Workshop.pdf

  • 1.
  • 2. dApp <-> wallet integration By the end of this session you will know how to: Connect your dApp with a wallet Call your contract on chain Invoke txs from your dApp to your contract Watch assets e.g. add new tokens to user wallet Sign messages to be used in your contracts Goals
  • 3. Smart Contracts E2E hands-on walkthrough session for everything wallet <-> smart contracts
  • 4. get-starknet StarkNet wallet <-> dApp bridge https://www.npmjs.com/package/get-starknet https://github.com/starknet-community-libs/get-starknet Connect
  • 5. Motivation dApps <-> wallets available integration before get-starknet access/lookup window.starknet directly (1/2) ⛔ no guarantees for the key to be used on future wallet versions ⛔ wallet APIs change over time. No way for a dApp to know about deprecated or newly-added APIs ⛔ there could be no wallet installed. dApp is forced to implement (and maintain) its own wallet-discovery UI or just keep losing users
  • 6. Motivation dApps <-> wallets available integration before get-starknet access/lookup window.starknet directly (2/2) ⛔ no built-in way for dApps to know which wallet they are connected to (i.e. missing fields like name or icon to use by the dApp) ⛔ assumes there is only one wallet available. other installed wallets aren't discoverable by the using dApp.
  • 7. 🔓 Allow dApps to seamlessly connect to any wallet on StarkNet (devs should be spending the time building their new products.) Ideation Could we build something better? 🫂 Allow wallets to seamlessly connect to any dApp, and get discovered by users which need a new wallet. 👥 An open source wallet/dApp API controlled by the community - no legacies, StarkNet is still in its early days - clear roadmap for new and deprecated APIs, community standardizations 🛡 An open source StarkNet wallet discovery list, moderated by the community
  • 8. Solution get-starknet, StarkNet wallet <-> dApp bridge 💃 integratable with zero burden for all existing dApps Same window.starknet object APIs, same connector APIs, for all retrievable & discoverable wallets
  • 9. Solution get-starknet, StarkNet wallet <-> dApp bridge Features: - discovers all StarkNet wallets injected to the window object - allows dApps to control which wallets to list, exclude or promote - offers various wallet-connect modes (silent, visible or smart-defaults) - allows dApps to switch wallets on runtime - multi chain support - 🧙 "one API to align them all" - for both dApp devs and wallet providers - v2 (soon!), separating core/UI, even more power to devs 💪
  • 10. Community Used by all the major StarkNet dApps (StarkGate, mySwap, briq, Aspect, MintSquare, ...) Tools & Infrastructures (Braavos, Starkscan, voyager, starknet- react, ...) Backed by & hosted by StarkWare Libs PRs are welcome! Please join the discussion, and help us shape the future of StarkNet https://github.com/starknet-community-libs/get-starknet
  • 11. Call Call entry-points on your contract const readTokenBalance = async ( token_address: string = "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" ): Promise<string | undefined> => { const wallet = getWallet(); if (!wallet.isConnected) return undefined; const address = wallet.account.address; try { const result = await wallet.provider.callContract( { contractAddress: token_address, entrypoint: "balanceOf", calldata: [BigInt(address).toString()], }, { blockIdentifier: "pending" } ); const balance = composeUInt256(result.result[0], result.result[1]); return balance; } catch { return undefined; } };
  • 12. Invoke mint tokens const mint = async () => { const wallet = getWallet(); if (wallet.isConnected) { const erc20Contract = new Contract( Erc20Abi as Abi, "0x06e931246fbae79e0453f780ed58a4cb2ff91f7f1c702705c3c1de41a55d9e72", wallet.account ); return erc20Contract.mint( wallet.account.address, parseInputAmountToUint256("100") ); } };
  • 13. Watch Assets Add new tokens to the wallet const watchAsset = async (): Promise<undefined | boolean> => { const wallet = getWallet(); return !wallet.isConnected ? undefined : wallet.request({ type: "wallet_watchAsset", params: { type: "ERC20", // The asset's interface, i.e. 'ERC20' options: { // The hexadecimal Ethereum address of the token contract address: "0x03e85bfbb8e2a42b7bead9e88e9a1b19dbccf661471061807292120462396ec9", // A ticker symbol or shorthand, up to 5 alphanumerical characters symbol: "DAI", // The number of asset decimals decimals: 18, // A string url of the token logo (optional) image: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIi...", }, }, }); };
  • 14. Sign Messages Sign Messages to be used by your contract (i.e. NFT listing for sell) const sign = async (message: string): Promise<Signature | undefined> => { const wallet = getWallet(); return !wallet.isConnected ? undefined : wallet.account.signMessage({ domain: { name: "StarkNet DApp", chainId:"SN_GOERLI", version: "0.0.1", }, types: { StarkNetDomain: [ { name: "name", type: "felt" }, { name: "chainId", type: "felt" }, { name: "version", type: "felt" }, ], Message: [{ name: "message", type: "felt" }], }, primaryType: "Message", message: { message: "Braavos - first StarkNet mobile wallet" }, }); };
  • 15. 💪 devnet network ⛽ mint Goerli ETH inside the wallet 🕶 Headless mode! support on discord Braavos ❤ devs
  • 16. dApps on mobile -> web3 mobile gaming!