The allowedMethods params represents which contracts calls the user will authorize the dapp to send on his behalf.
Expiry is a security measure. After the expiry date, the session becomes invalid.
3. Creating a Session
// Compute the typed data to be signedconstsessionRequest=createSessionRequest({ sessionParams, chainId})// wallet is a StarknetWindowObject. There are others ways to sign typed data.// You could use the starknet-react hook useSignTypedDataconstauthorisationSignature=awaitwallet.request({ type:"wallet_signTypedData", params:sessionRequest.sessionTypedData})// Build session requestconstsession=awaitcreateSession({ sessionRequest,// SessionRequest address,// Account address chainId,// StarknetChainId authorisationSignature // Signature})// Create session account. This is the account that will be used to execute transactions. constsessionAccount=awaitbuildSessionAccount({ useCacheAuthorisation:false,// optional and defaulted to false, will be added in future developments session, sessionKey, provider:newRpcProvider({ nodeUrl:"<https://starknet-sepolia.public.blastapi.io/rpc/v0_7>", chainId:constants.StarknetChainId.SN_SEPOLIA }), argentSessionServiceBaseUrl:ARGENT_SESSION_SERVICE_BASE_URL// Optional: defaulted to mainnet url. This is basically the backend api. })