Passport
  • 👩‍💻Welcome
  • How Passport Works
    • Overview
    • Background
      • Threshold Cryptography
      • Secure Multi-Party Computation
      • Distributed Architecture
      • Secure Enclaves
    • In Depth
      • Under the Hood
      • User Flows and Account Controls
      • The Halides Model
      • End-to-End Encryption
      • Security
      • Node Operation
  • guides and examples
    • Getting Started
    • Quickstarts and Examples
      • Passkey Account
      • Clerk Auth
      • Lambda Quickstart
  • Authentication
    • Overview
    • Configuring your scope
    • Passkeys
      • Registration
        • Register using SDK
        • Register using API
          • Initiate Registration
          • Complete Registration
      • Authentication
        • Authenticating with SDK
        • Authenticating with API
          • Initiate Authentication
          • Complete Authentication
    • Developer Owned Auth
      • Registration
        • Register using SDK
        • Register using API
          • Delegate Registration
  • Wallet Operations
    • Overview
    • Passkeys Signer
      • Sign Message
        • Sign Message SDK
        • Sign Message API
      • Sign Transaction
        • Sign Transaction SDK
        • Sign Transaction API
    • DOA Signer
      • Sign Message
        • Sign Message SDK
        • Sign Message API
      • Sign Transaction
        • Sign Transaction SDK
        • Sign Transaction API
    • Viem Support
  • Programmability
    • Overview
    • Passport Lambda
    • Lambda Functions
      • Create Lambda
        • Create Lambda SDK
        • Create Lambda API
      • Execute Lambda
        • Execute Lambda SDK
        • Execute Lambda API
      • List Lambda
        • List Lambda SDK
        • List Lambda API
  • Appendix
    • Moving to Mainnet
    • State Of The Network
    • Generating DOA Keys
    • API Request Setup
      • Unauthenticated Requests
      • Authenticated Requests
Powered by GitBook
On this page
  1. Programmability
  2. Lambda Functions
  3. List Lambda

List Lambda SDK

To view the list of their registered lambdas, a user / an account would need to have to have been created and have an associated session by going through the Authenticating with SDK flow. Once you have the required details you can call the sign method by instantiating a Passport instance from the SDK as shown below.

import { Passport } from "@0xpass/passport";
import { WebauthnSigner } from "@0xpass/webauthn-signer";

const signer = new WebauthnSigner({
      rpId: window.location.hostname,
      rpName: "rpName",
});

const passport = new Passport({
    scopeId: "insert_your_scope_id",
    signer: signer
});

const userInput {
   username: "insert_username_here"
   userDisplayName: "insert_user_display_name_here"
}

await passport.setupEncryption(); 
await passport.authenticate(userInput);


// Generate a threshold signature
const lambdas = await passport.listLambda();
console.log(lambdas);

listLambda Response

A successful response return list of lambda objects currently registered with user.

{
    "jsonrpc": "2.0",
    "result": [
        {
            "id": "153634-f572-40ee-ba2a-efee345a3691",
            "config": {
                "actions": {
                    "data": "0x000000",
                    "substitution": true,
                    "type": "personal_sign"
                },
                "authorization": {
                    "type": "none"
                },
                "triggers": [
                   { "type": "hook"},
                ],
                "conditions": [
                    {
                        "code": "return true",
                        "output_type": "integer",
                        "substitution": true,
                        "type": "code"
                    }
                ],
                "envs": [],
                "max_executions": 0,
                "postHook": [],
                "verifications": {
                    "count": 1
                }
            },
            "status": "ready",
            "proof": null,
            "created_at": "2024-03-29T19:28:43",
            "updated_at": "2024-03-29T19:46:48",
            "total_executions": 2,
            "ok_executions": 2
        }
    ]
}

PreviousList LambdaNextList Lambda API

Last updated 11 months ago