Argent
  • Build with Argent
  • Argent Wallets
    • Argent X
      • Adding Custom RPCs
      • Network Switcher for Dapps
      • Verify signature of undeployed account
      • WalletAccount
    • Argent Mobile
      • Argent Mobile for your web app
      • Argent Mobile for your react native app
    • Web Wallet
      • Set up guide
      • Web Wallet UX
      • API reference
      • Key Management
    • Argent Multisig
      • How multisig works
      • Create a multisig
        • With Argent signer
        • With Ledger signer
      • Join a multisig
        • With Argent signer
        • With Ledger signer
      • Replace a multisig signer
      • Airgap
    • Telegram wallet (DEPRECATED)
  • TOOLS
    • 🎨STARKNETKIT
    • ✨Invisible SDK
      • Implementation
      • Other useful endpoints
      • Types and interfaces
      • Gas abstraction
  • Example Dapps
    • StarknetKit + Session keys Demo dapp
  • AA Use Cases
    • Session Keys
      • Implement session keys
      • Session keys with outside execution
      • Demo App
      • FAQ
      • Types
    • Paymasters
    • Verifying signatures and cosigners
      • Identifying a smart account onchain
    • Multicalls
    • Outside Execution
    • Deploy accounts on behalf of users
  • Optimize your Dapp
    • Dappland
    • Known dapps
    • Transaction reviews
    • Brand your token
  • Other Products
    • Argent Card
    • Spoks
    • Perkz
    • Argent Vault on Ethereum L1
  • SUPPORT & RESSOURCES
    • Contracts and audits
    • Get in touch
Powered by GitBook
On this page

Was this helpful?

  1. TOOLS
  2. Invisible SDK

Types and interfaces

List of important types.

declare type InitParams = {
    appName: string;
    sessionParams: SessionParameters;
    paymasterParams?: PaymasterParameters;
    webwalletUrl?: string;
    environment?: keyof typeof ENVIRONMENTS;
    provider?: ProviderInterface;
};
type SessionParameters = {
  allowedMethods: Array<{
    contract: string;
    selector: string;
  }>;
  validityDays?: number;
};
type PaymasterParameters = {
    baseUrl?: string;
    apiKey?: string;
    tokenAddress?: Address;
};
type ConnectResponse = {
    account: SessionAccount;
    user?: User;
    callbackData?: string;
    approvalTransactionHash?: string;
    approvalRequestsCalls?: Call[];
    deploymentPayload?: AccountDeploymentPayload;  
};
interface SessionAccountInterface extends AccountInterface {
  isDeployed(): Promise<boolean>;
  getDeploymentPayload(): Promise<DeployAccountContractPayload>;
  getOutsideExecutionPayload({ calls }: { calls: Call[] }): Promise<Call>;
  getSessionStatus(): SessionStatus; // "VALID" | "EXPIRED" | "INVALID_SCOPE"
  signMessageFromOutside(typedData: TypedData, calls: Call[]): Promise<ArraySignatureType>;
}
declare interface ArgentWebWalletInterface {
    provider: ProviderInterface;
    sessionAccount?: SessionAccountInterface;
    isConnected(): Promise<boolean>;
    connect(): Promise<ConnectResponse | undefined>;
    requestConnection({ callbackData, approvalRequests, }: {
        callbackData?: string;
        approvalRequests?: ApprovalRequest[];
    }): Promise<ConnectResponse | undefined>;
    requestApprovals(approvalRequests: ApprovalRequest[]): Promise<string>;
    exportSignedSession(): Promise<SignedSession | undefined>;
    clearSession(): Promise<void>;
}

PreviousOther useful endpointsNextGas abstraction

Last updated 2 months ago

Was this helpful?

✨