Implementation
SDK implementation guide.
1. Install the package
pnpm add @argent/invisible-sdk2. Import dependencies in your project
import { ArgentWebWallet, SessionAccountInterface } from '@argent/invisible-sdk';3. Initialize the web wallet object with your app configuration:
const argentWebWallet = ArgentWebWallet.init({
environment: "sepolia", // "sepolia" | "mainnet" (Whitelisting required)
appName: "My App", // Your app name
sessionParams: {
allowedMethods: [
// List of contracts/methods allowed to be called by the session key
{
contract:
"0x036133c88c1954413150db74c26243e2af77170a4032934b275708d84ec5452f", // contract address
selector: "increment", //function selector
}
],
validityDays: 30 // optional - session validity (in days) - default: 30
},
paymasterParams: {
apiKey: "avnu paymaster api key"
}
});4. Paymaster
5. Request a connection
6. Check connection status
7. Connect to the wallet
8. Interact with Starknet using the account
9. Check account session status
10. Request approval
11. Clear session
Last updated
Was this helpful?