Skip to content

Provider Service

The Provider Service enables the creation and management of ecosystems and webhooks.

Named vs Anonymous ecosystems

There are two types of ecosystems: named and anonymous.

Named ecosystems are suitable for production, and will be prepared for you by Trinsic during onboarding.

Anonymous ecosystems have auto-generated names (such as eager-elephant-94jkn5h), and may be created by anyone at any time.

Using an anonymous ecosystem for purposes other than prototyping and testing is considered an unauthorized use of Trinsic's platform.


Create Ecosystem

Creates a new ecosystem, along with a root controlling account.

If name is left empty, an anonymous ecosystem will be created.

trinsic provider create-ecosystem --name <ECOSYSTEM_NAME> --email <OWNER_EMAIL>
let createResponse = await trinsic.provider().createEcosystem(
    CreateEcosystemRequest.fromPartial({
        description: "Test ecosystem from Node",
        uri: "https://example.com",
    })
);
var (ecosystem, authToken) = await trinsic.Provider.CreateEcosystemAsync(new() {
    Description = "My ecosystem",
    Domain = "https://example.com"
});
actual_create = await trinsic_service.provider.create_ecosystem(
    request=CreateEcosystemRequest(
        description="My ecosystem", uri="https://example.com"
    )
)
actualCreate, err := trinsic.Provider().CreateEcosystem(context.Background(), &provider.CreateEcosystemRequest{
    Description: "My ecosystem",
    Uri:         "https://example.com",
})
var response =
    trinsic
        .provider()
        .createEcosystem(
            CreateEcosystemRequest.newBuilder()
                .setDescription("My ecosystem")
                .setUri("https://example.com")
                .build())
        .get();

Request to create an ecosystem
name
optional string
Globally unique name for the Ecosystem. This name will be part of the ecosystem-specific URLs and namespaces. Allowed characters are lowercase letters, numbers, underscore and hyphen. If not passed, ecosystem name will be auto-generated.
description
optional string
Ecosystem description
uri
optional string
External URL associated with your organization or ecosystem entity
details
The account details of the owner of the ecosystem
Show child attributes
domain
string
New domain URL

Response to CreateEcosystemRequest
ecosystem
Details of the created ecosystem
Show child attributes
profile
Account profile for auth of the owner of the ecosystem
Show child attributes
confirmation_method
Indicates if confirmation of account is required.
Show enum values


Update Ecosystem

Updates the active ecosystem's description or uri.

trinsic provider update-ecosystem \
                 --description "New description" \
                 --uri "https://new-example.com"
let updateResponse = await trinsic.provider().updateEcosystem(
    UpdateEcosystemRequest.fromPartial({
        description: "New ecosystem description",
        uri: "https://new-example.com",
    })
);
var updateResult = await trinsic.Provider.UpdateEcosystemAsync(new() {
    Description = "New ecosystem description",
    Domain = "New ecosystem URI"
});
request = UpdateEcosystemRequest(
    description="My new description", uri="https://example.com"
)
response = await trinsic.provider.update_ecosystem(request=request)
updateRequest := &provider.UpdateEcosystemRequest{
    Description: "My new description",
    Uri:         "https://new-example.com",
}

updateResponse, err := trinsic.Provider().UpdateEcosystem(context.Background(), updateRequest)
var updateResponse =
    trinsic
        .provider()
        .updateEcosystem(
            UpdateEcosystemRequest.newBuilder().setDescription("My updated ecosystem").build())
        .get();

Request to update an ecosystem's metadata
description
string
New description of the ecosystem
uri
string
New external URL associated with the organization or ecosystem entity
domain
string
New domain URL
display
New name string name = 4; Display details
Show child attributes

Response to UpdateEcosystemRequest
Ecosystem
Current ecosystem metadata, post-update
Show child attributes


Get Ecosystem Info

Fetches information about the active ecosystem.

trinsic provider ecosystem-info
const infoResponse = await trinsic
    .provider()
    .ecosystemInfo(EcosystemInfoRequest.fromPartial({}));

const ecosystem = infoResponse.ecosystem;
var infoResult = await trinsic.Provider.EcosystemInfoAsync(new());
response = await trinsic.provider.ecosystem_info(request=EcosystemInfoRequest())
ecosystem = response.ecosystem
infoResponse, err := trinsic.Provider().EcosystemInfo(context.Background(), &provider.EcosystemInfoRequest{})
var infoResponse =
    trinsic.provider().ecosystemInfo(EcosystemInfoRequest.getDefaultInstance()).get();

Request to fetch information about an ecosystem
This message has no fields

Response to InfoRequest
ecosystem
Ecosystem corresponding to current ecosystem in the account token
Show child attributes


Add Webhook

Adds a webhook to an ecosystem.

trinsic provider add-webhook \
                --url "https://example.com/webhooks/trinsic" \
                --secret "my well-kept secret" \
                --events "*"
let addResponse = await trinsic.provider().addWebhook(
    AddWebhookRequest.fromPartial({
        destinationUrl: "https://example.com/webhooks/trinsic",
        secret: "my well-kept secret",
        events: ["*"],
    })
);
var addWebhookResponse = await trinsic.Provider.AddWebhookAsync(new() {
    DestinationUrl = "https://example.com/webhooks/trinsic",
    Secret = "my well-kept secret"
});
request = AddWebhookRequest(
    destination_url="https://example.com/webhooks/trinsic",
    secret="my well-kept secret",
)
request.events.append("*")  # Enable all events

response = await trinsic.provider.add_webhook(request=request)
request := &provider.AddWebhookRequest{
    DestinationUrl: "https://example.com/webhooks/trinsic",
    Secret:         "my well-kept secret",
    Events:         []string{"*"}, // All events
}

response, err := trinsic.Provider().AddWebhook(context.Background(), request)
var addWebhookResponse =
    trinsic
        .provider()
        .addWebhook(
            AddWebhookRequest.newBuilder()
                .setDestinationUrl("https://example.com/webhooks/trinsic")
                .setSecret("my well-kept secret")
                .addEvents("*") // All events
                .build())
        .get();

Request to add a webhook to an ecosystem
destination_url
string
Destination to post webhook calls to. Must be a reachable HTTPS URL.
secret
string
Secret string used for HMAC-SHA256 signing of webhook payloads to verify that a webhook comes from Trinsic
events
string[]
Events to subscribe to. Default is "*" (all events)

Response to AddWebhookRequest
ecosystem
Ecosystem data with new webhook
Show child attributes

Webhook Limits

At present, an ecosystem can have no more than 10 webhooks.

Wallet Webhook Events

In order to receive webhooks for events which occur on a wallet, an additional authorization step must be performed.

See AuthorizeWebhook for more info.


Delete Webhook

Deletes a webhook from an ecosystem.

trinsic provider delete-webhook --webhook-id <WEBHOOK_ID>
let deleteResponse = await trinsic.provider().deleteWebhook(
    DeleteWebhookRequest.fromPartial({
        webhookId: webhookId,
    })
);
var deleteWebhookResponse = await trinsic.Provider.DeleteWebhookAsync(new() {
    WebhookId = webhookId
});
response = await trinsic.provider.delete_webhook(
    request=DeleteWebhookRequest(webhook_id)
)
request := &provider.DeleteWebhookRequest{
    WebhookId: webhookId,
}

deleteResponse, err := trinsic.Provider().DeleteWebhook(context.Background(), request)
var deleteWebhookResponse =
    trinsic
        .provider()
        .deleteWebhook(DeleteWebhookRequest.newBuilder().setWebhookId(webhookId).build())
        .get();

Request to delete a webhook from an ecosystem
webhook_id
string
ID of webhook to delete

Response to DeleteWebhookRequest
ecosystem
Ecosystem data after removal of webhook
Show child attributes


Upgrade Wallet DID

Restricted API

This feature is not yet publicly available, and the list of supported DID Methods is not final.

Please contact Trinsic to enable this endpoint on your account.

Ledger Interactions

Depending on the DID Method chosen, you may be responsible for ledger write fees; additionally, there are some logistical concerns to be aware of.

Click here to learn more.

Upgrades a wallet's DID from the default did:key to another DID Method. This endpoint may only be called by an ecosystem provider.

Trinsic will register a DID Document for you, and update the wallet's public_did property to the newly-registered DID. Credentials previously issued by this wallet will not have their issuer field updated to the new DID, but they will still verify correctly.

Presently, once a wallet's DID has been upgraded, its DID Method cannot be changed again. However, it is possible to perform further upgrades within a method, to go from a testing to production network (for example, did:ion:test to did:ion).

trinsic provider upgrade-did --wallet-id {wallet_id} --method ion --method-options testnet
let upgradeResponse = await trinsic.provider().upgradeDID(
    UpgradeDidRequest.fromPartial({
        walletId: walletId,
        method: SupportedDidMethod.ION,
        ionOptions: IonOptions.fromPartial({
            network: IonOptions_IonNetwork.TestNet,
        }),
    })
);
var upgradeResponse = await trinsic.Provider.UpgradeDIDAsync(new() {
    WalletId = walletId,
    Method = SupportedDidMethod.Ion,
    IonOptions = new() {
        Network = IonOptions.Types.IonNetwork.TestNet
    }
});
upgrade_response = await trinsic.provider.upgrade_did(
    request=UpgradeDidRequest(
        wallet_id=wallet_id,
        method=SupportedDidMethod.ION,
        ion_options=IonOptions(network=IonOptionsIonNetwork.TestNet),
    )
)
upgradeResponse, err := trinsic.Provider().UpgradeDID(context.Background(), &provider.UpgradeDidRequest{
    Account: &provider.UpgradeDidRequest_WalletId{
        WalletId: walletId,
    },
    Method: common.SupportedDidMethod_ION,
    Options: &provider.UpgradeDidRequest_IonOptions{
        IonOptions: &provider.IonOptions{
            Network: provider.IonOptions_TestNet,
        },
    },
})
var upgradeRequest =
    UpgradeDidRequest.newBuilder()
        .setWalletId(walletId)
        .setMethod(SupportedDidMethod.ION)
        .setIonOptions(
            IonOptions.newBuilder().setNetwork(IonOptions.IonNetwork.TestNet).build())
        .build();

var upgradeResponse = trinsic.provider().upgradeDID(upgradeRequest).get();

Request to upgrade a wallet
email
string
Email address of account to upgrade. Mutually exclusive with walletId.
wallet_id
string
Wallet ID of account to upgrade. Mutually exclusive with email.
method
DID Method to which wallet should be upgraded
Show enum values
ion_options
Configuration for creation of DID on ION network
Show child attributes

Response to UpgradeDIDRequest
did
string
New DID of wallet