This guide covers the GoDiddy integration for TrustWeave. The GoDiddy plugin provides HTTP integration with GoDiddy services, including Universal Resolver, Registrar, Issuer, and Verifier, supporting 20+ DID methods.
Overview
The did/plugins/godiddy module provides HTTP integration with GoDiddy services for DID operations. This integration enables you to:
Resolve DIDs using GoDiddy Universal Resolver
Register DIDs via GoDiddy Registrar
Issue credentials using GoDiddy Issuer
Verify credentials using GoDiddy Verifier
Support 20+ DID methods through GoDiddy’s universal interfaces
importcom.trustweave.godiddy.*importcom.trustweave.did.*// Create configurationvalconfig=GodiddyConfig(baseUrl="https://api.godiddy.com",// Default public APItimeout=30000,apiKey=null// Optional API key if required)// Create GoDiddy clientvalclient=GodiddyClient(config)// Create DID methodvalmethod=GodiddyDidMethod(client,config)
Custom Configuration
1
2
3
4
5
6
7
8
9
// Use self-hosted GoDiddy instancevalconfig=GodiddyConfig(baseUrl="https://godiddy.example.com",timeout=60000,apiKey="your-api-key")valclient=GodiddyClient(config)valmethod=GodiddyDidMethod(client,config)
SPI Auto-Discovery
When the did/plugins/godiddy module is on the classpath, GoDiddy is automatically available:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
importcom.trustweave.did.*importjava.util.ServiceLoader// Discover GoDiddy providervalproviders=ServiceLoader.load(DidMethodProvider::class.java)valgodiddyProvider=providers.find{it.supportedMethods.contains("godiddy")}// Create method with configurationvaloptions=didCreationOptions{property("baseUrl","https://api.godiddy.com")property("timeout",30000L)}valmethod=godiddyProvider?.create("godiddy",options)
Usage Examples
DID Resolution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
importcom.trustweave.godiddy.*valclient=GodiddyClient(GodiddyConfig.default())valresolver=GodiddyResolver(client)// Resolve any DID via Universal Resolvervaldid="did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"valresolutionResult=resolver.resolveDid(did)resolutionResult.fold(onSuccess={result->println("Resolved DID: ${result.didDocument?.id}")println("Document: ${result.didDocument}")},onFailure={error->println("Resolution failed: ${error.message}")})
importcom.trustweave.godiddy.*valclient=GodiddyClient(GodiddyConfig.default())valregistrar=GodiddyRegistrar(client)// Register DID via Registrarvaloptions=didCreationOptions{property("method","key")property("algorithm","Ed25519")}valregistrationResult=registrar.registerDid(options)registrationResult.fold(onSuccess={didDoc->println("Registered DID: ${didDoc.id}")},onFailure={error->println("Registration failed: ${error.message}")})
importcom.trustweave.godiddy.*valclient=GodiddyClient(GodiddyConfig.default())valverifier=GodiddyVerifier(client)// Verify credential via GoDiddy VerifiervalverificationResult=verifier.verifyCredential(credential)verificationResult.fold(onSuccess={result->if(result.valid){println("Credential is valid")}else{println("Credential is invalid: ${result.reason}")}},onFailure={error->println("Verification failed: ${error.message}")})
Supported DID Methods
GoDiddy supports 20+ DID methods through Universal Resolver, including:
# Run all GoDiddy tests
./gradlew :did/plugins/godiddy:test
# Run specific test class
./gradlew :did/plugins/godiddy:test --tests"GodiddyDidMethodTest"