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:
parent
c140ce75e9
commit
13e43d7b40
@ -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)])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user