mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
21 lines
710 B
TypeScript
21 lines
710 B
TypeScript
import {Receipt} from "web3-utils"
|
|
import ContractBase from "../ContractBase"
|
|
|
|
export default class AccessConditions extends ContractBase {
|
|
|
|
public static async getInstance(): Promise<AccessConditions> {
|
|
const accessConditions: AccessConditions = new AccessConditions("AccessConditions")
|
|
await accessConditions.init()
|
|
return accessConditions
|
|
}
|
|
|
|
// todo add check permissions proxy
|
|
|
|
public async grantAccess(serviceAgreementId: any, assetId: any, documentKeyId: any, publisherAddress: string)
|
|
: Promise<Receipt> {
|
|
return this.send("grantAccess", publisherAddress, [
|
|
serviceAgreementId, "0x" + assetId, "0x" + documentKeyId,
|
|
])
|
|
}
|
|
}
|