11.4.4.2 Save Resource


Function name saveResource(SaveResource saveResource)
Description Store the credentials to the Hub. If the user stores it himself, the uid and the ownerUid should be the same. At this time, there is no need to create permissions to call directly; if the issuer stores it for the user after issuing the credentials, the uid should be the HubId of the issuer, and the ownerUid should be the HubId of the user. At this time, the user must have created permissions for it, otherwise the storage will fail.
Method call parameters
No. Parameter Type Required Description
1 SaveResource Y
SaveResource
1 did String Y DID
2 content String Y Resource content
3 url String Y Resource Url
4 ownerDid String Y Owner’s DID
5 grant Operation Y Operation permissions:WRITE/UPDATE/READ
6 privateKey String Y Private key
Method return parameters
No. Parameter Type Required Description
1 SaveResourceResult Y Save result
SaveResourceResult
No. Parameter Type Required Description
1 url String Y Resource Url
2 encryptKey String Y Encryption key
© 2019-2021 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2021-10-31 22:18:19

results matching ""

    No results matching ""

    results matching ""

      No results matching ""