Type Alias: DidString ​
DidString =
string&object
Defined in: packages/api/src/types.ts:43
A branded string representing a DID identifier (e.g. did:btcr2:k1q...). Use branded types to prevent accidentally passing a txid where a DID is expected, or vice versa, at compile time.
Type Declaration ​
__brand ​
readonly__brand:"DidString"
Example ​
ts
const did = api.generateDid().did as DidString;
api.resolveDid(did); // OK
api.btc.getTransaction(did); // Type error — DidString is not TxId