diff --git a/TUTORIAL.md b/TUTORIAL.md index 43acf06..8f6d79e 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -307,7 +307,7 @@ The list displays every DID instance along it's local alias for simpler usage. ```txt Name DID -sample-account did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007 +sample-account did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007 ``` ### 4.3 Inspect your local DID document @@ -336,17 +336,17 @@ document. "https://w3id.org/security/suites/ed25519-2020/v1", "https://w3id.org/security/suites/x25519-2020/v1" ], - "id": "did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007", + "id": "did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007", "verificationMethod": [ { - "id": "did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007#master", + "id": "did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007#master", "type": "Ed25519VerificationKey2020", - "controller": "did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007", + "controller": "did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007", "publicKeyMultibase": "z9Ry8aFPMLKapvtYkNNSFsoNhkc4192j4ai17EzMquAZc" } ], "authentication": [ - "did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007#master" + "did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007#master" ] } } @@ -422,7 +422,7 @@ the following. ```shell 2024-04-30T17:42:54-04:00 INF submitting request to the network 2024-04-30T17:42:54-04:00 INF publishing: sample-account -2024-04-30T17:42:54-04:00 INF publishing DID document did=did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007 +2024-04-30T17:42:54-04:00 INF publishing DID document did=did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007 2024-04-30T17:43:10-04:00 INF DID instance published ``` @@ -448,10 +448,10 @@ algoid retrieve [existing DID] For example, to resolve the DID created as part of this tutorial. ```shell -algoid resolve did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007 +algoid resolve did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007 2024-04-30T17:43:41-04:00 INF retrieving record -2024-04-30T17:43:41-04:00 INF retrieving DID document did=did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007 +2024-04-30T17:43:41-04:00 INF retrieving DID document did=did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007 2024-04-30T17:43:43-04:00 WRN skipping validation { "@context": [ @@ -459,17 +459,17 @@ algoid resolve did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b81 "https://w3id.org/security/suites/ed25519-2020/v1", "https://w3id.org/security/suites/x25519-2020/v1" ], - "id": "did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007", + "id": "did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007", "verificationMethod": [ { - "id": "did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007#master", + "id": "did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007#master", "type": "Ed25519VerificationKey2020", - "controller": "did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007", + "controller": "did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007", "publicKeyMultibase": "z9Ry8aFPMLKapvtYkNNSFsoNhkc4192j4ai17EzMquAZc" } ], "authentication": [ - "did:algo:testnet:box:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007#master" + "did:algo:testnet:app:654583141:7d42e6e0f3c71d777de36849cf96e28b812453198cee2d2cc2b7b19438060007#master" ] } ``` diff --git a/client/cli/cmd/register.go b/client/cli/cmd/register.go index 4140f04..aea545b 100644 --- a/client/cli/cmd/register.go +++ b/client/cli/cmd/register.go @@ -76,7 +76,7 @@ func runRegisterCmd(_ *cobra.Command, args []string) error { } // Generate base identifier instance - subject := fmt.Sprintf("%s:box:%d:%x", network, appID, account.PublicKey) + subject := fmt.Sprintf("%s:app:%d:%x", network, appID, account.PublicKey) method := "algo" log.WithFields(xlog.Fields{ "subject": subject, diff --git a/client/internal/main.go b/client/internal/main.go index 627554c..1a4b3f7 100644 --- a/client/internal/main.go +++ b/client/internal/main.go @@ -245,7 +245,7 @@ func parseSubjectString(subject string) (pub []byte, network string, appID uint6 } namespace := idSegments[1] - if namespace != "box" { + if namespace != "app" { err = fmt.Errorf("invalid namespace in subject identifier: %s", namespace) return pub, network, appID, err } diff --git a/client/ui/api_test.go b/client/ui/api_test.go index 6be6218..c4394c1 100644 --- a/client/ui/api_test.go +++ b/client/ui/api_test.go @@ -202,7 +202,7 @@ func TestListAfterRegister(t *testing.T) { body, err := io.ReadAll(res.Body) require.NoError(t, err) - require.Regexp(t, `{"name":"TestListAfterRegister","did":"did:algo:custom:box:`, string(body)) + require.Regexp(t, `{"name":"TestListAfterRegister","did":"did:algo:custom:app:`, string(body)) } func TestUpdate(t *testing.T) { diff --git a/client/ui/provider.go b/client/ui/provider.go index 8f34061..79eef3f 100644 --- a/client/ui/provider.go +++ b/client/ui/provider.go @@ -91,7 +91,7 @@ func (p *Provider) Register(network string, name string, passphrase string) erro } // Generate base identifier instance - subject := fmt.Sprintf("%s:box:%d:%x", network, p.client.Networks[network].StorageAppID(), account.PublicKey) + subject := fmt.Sprintf("%s:app:%d:%x", network, p.client.Networks[network].StorageAppID(), account.PublicKey) method := "algo" p.log.WithFields(xlog.Fields{ "subject": subject,