mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
30 lines
836 B
JavaScript
30 lines
836 B
JavaScript
import ContractLoader from './contractLoader'
|
|
import KeeperBase from './keeper-base'
|
|
|
|
export default class OceanAuth extends KeeperBase {
|
|
constructor(web3, network) {
|
|
super(web3, network)
|
|
|
|
const instance = this
|
|
|
|
return {
|
|
async getInstance() {
|
|
instance.contract = ContractLoader.load('OceanAuth', instance._network, instance._web3)
|
|
return instance
|
|
}
|
|
}
|
|
}
|
|
|
|
cancelAccessRequest(orderId, senderAddress) {
|
|
return this.contract.cancelAccessRequest(orderId, { from: senderAddress })
|
|
}
|
|
|
|
getOrderStatus(orderId) {
|
|
return this.contract.statusOfAccessRequest(orderId)
|
|
}
|
|
|
|
getEncryptedAccessToken(orderId, senderAddress) {
|
|
return this.contract.getEncryptedAccessToken(orderId, { from: senderAddress })
|
|
}
|
|
}
|