1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

Inlcude new methods on DIDRegistry.

This commit is contained in:
Pedro Gutiérrez 2019-09-05 13:34:36 +02:00 committed by Matthias Kretschmann
parent c140ce75e9
commit 13e43d7b40
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -65,4 +65,30 @@ export default class DIDRegistry extends ContractBase {
})
)[0]
}
public async grantPermission(
did: string,
grantee: string,
ownerAddress: string
) {
return this.send('grantPermission', ownerAddress, [
zeroX(did),
zeroX(grantee)
])
}
public async revokePermission(
did: string,
grantee: string,
ownerAddress: string
) {
return this.send('revokePermission', ownerAddress, [
zeroX(did),
zeroX(grantee)
])
}
public async getPermission(did: string, grantee: string): Promise<boolean> {
return this.call('getPermission', [didZeroX(did), zeroX(grantee)])
}
}