getDocument(contract, did)

Feature

Get information for a specific template with given template ID.

Parameters

string contract Address, string did

data of SuccessResponse

object document information

example

const contract = "0x99e749E6e00fc6BA3E965881589D185cc5B447d4fca";
const did = "did:mitum:0xF032496440AC975D383C459D6C830186D2C0EaE9fca";

// Note: an asynchronous request.
const  getDidDocument= async () => {
  const info = await mitum.authdid.getDocument(contract, did)
  console.log(info.data);
};
getDidDocument();

//output
{
  "_hint": "mitum-did-document-v0.0.1",
  "@context": [
					"[https://www.w3.org/ns/did/v1](https://www.w3.org/ns/did/v1)",
					"[https://imfact.im/did/contexts/v1.jsonld](https://imfact.im/did/contexts/v1.jsonld)"
	],
  "id": "did:mitum:0xF032496440AC975D383C459D6C830186D2C0EaE9fca",
	"authentication": [
      {
          "_hint": "mitum-did-verification-method-v0.0.1",
          "id": "did:mitum:0xF032496440AC975D383C459D6C830186D2C0EaE9fca#auth1",
          "controller": "did:mitum:0xF032496440AC975D383C459D6C830186D2C0EaE9fca",
          "type": "EcdsaSecp256k1VerificationKey2019",
          "publicKeyMultibase": "zQ3shZQ77tSZPzFjXScqWzTaSsKMWTLZABF1TL1y3E5VRefxw",
          "publicKeyImFact": "02b21f6cdf03b8e2c98d0a8ee423aa43d701e1533cc0a9de761562249f66588a4cfpu"
      },
      {
          "_hint": "mitum-did-verification-method-v0.0.1",
          "id": "did:mitum:0xF032496440AC975D383C459D6C830186D2C0EaE9fca#social_login",
          "controller": "did:mitum:0xF032496440AC975D383C459D6C830186D2C0EaE9fca",
          "type": "LinkedVerificationMethod",
          "targetId": "did:mitum:0xA8b72495AcF9712C082973725dB013d848c403Bafca#auth1",
          "allowed": [
              {
                  "operation": "mitum-extension-create-contract-account-operation-v0.0.1"
			        },
              {
                  "contract": "0x0e631bD66360d10201A7E197aBD6Fd9e9839DEa2fca",
                  "operation": "mitum-did-create-did-operation-v0.0.1"
              },
          ]
      }
  ],
  "verificationMethod": [],
  "service": {
      "id": "did:mitum:0xF032496440AC975D383C459D6C830186D2C0EaE9fca#auth1",
      "type": "mitumDappType",
      "service_end_point": "http://localhost:3000"
  }
}

Last updated