Skip to main content

ListTokenTaps

ListTokenTaps retrieves the list of available tokens for minting.

Method Options​

Authorisation specification of the ListTokenTaps method.

TypeMETHOD_TYPE_READ
Access LevelMETHOD_ACCESS_LEVEL_PUBLIC
Roles

    Parameters​

    Request and response parameter message overview:

    Input: ListTokenTapsRequest Message​

    No parameters required.

    Returns: ListTokenTapsResponse Message​

    FieldTypeDescription
    Tokens

    meshtrade.type.v1.Token[]

    Available tokens that can be minted.

    Code Examples​

    Select supported SDK in the language of your choice for a full example of how to invoke the this method:

    package main

    import (
    "context"
    "log"

    token_tapv1 "github.com/meshtrade/api/go/testing/ledger/token_tap/v1"
    )

    func main() {
    ctx := context.Background()

    // Default configuration is used and credentials come from MESH_API_CREDENTIALS
    // environment variable or default discovery methods. Zero config required
    // unless you want custom configuration.
    service, err := token_tapv1.NewTokenTapService()
    if err != nil {
    log.Fatalf("Failed to create service: %v", err)
    }
    defer service.Close()

    // List all available tokens that can be minted through the tap service
    // The ListTokenTapsRequest takes no parameters
    request := &token_tapv1.ListTokenTapsRequest{}

    // Call the ListTokenTaps method to retrieve available tokens
    response, err := service.ListTokenTaps(ctx, request)
    if err != nil {
    log.Fatalf("ListTokenTaps failed: %v", err)
    }

    // Process the list of available tokens
    log.Printf("Available tokens: %d", len(response.Tokens))
    for i, token := range response.Tokens {
    log.Printf("Token %d: %+v", i+1, token)
    }
    }

    Advanced Configuration​

    For advanced client configuration options (custom endpoints, TLS settings, timeouts), see the SDK Configuration Guide.

    Other Methods​