aries / net.globalid.aries.utils / RxCache / getCredentialDefinitionJson

getCredentialDefinitionJson

@JvmStatic @JvmOverloads fun getCredentialDefinitionJson(pool: Pool, wallet: Wallet, credentialDefinitionId: String, optionsJson: String = "{}"): Single<String>

Gets credential definition json data for specified credentialDefinitionId. If data is present inside of cache, cached data is returned. Otherwise data is fetched from the ledger and stored inside of cache for future use.

Parameters

pool - is the current pool

wallet - is the current wallet

credentialDefinitionId - is the credential definition id

optionsJson - is the fetching options { forceUpdate: (optional, false by default) Force update of record in cache from the ledger, }

Return
the credential definition Json String { id: string - identifier of credential definition schemaId: string - identifier of stored in ledger schema type: string - type of the credential definition. CL is the only supported type now. tag: string - allows to distinct between credential definitions for the same issuer and schema value: Dictionary with Credential Definition's data is depended on the signature type: { primary: primary credential public key, Optional: revocation credential public key }, - only this field differs from the original credential definition ver: Version of the CredDef json }