squid_py.ocean.ocean_conditions module

class squid_py.ocean.ocean_conditions.OceanConditions(keeper)

Bases: object

Ocean conditions class.

grant_access(agreement_id, did, grantee_address, account)

Grant access condition.

Parameters
  • agreement_id – id of the agreement, hex str

  • did – DID, str

  • grantee_address – Address, hex str

  • account – Account

Returns

grant_compute(agreement_id, did, grantee_address, account)

Grant permission to run compute jobs

Parameters
  • agreement_id – id of the agreement, hex str

  • did – DID, str

  • grantee_address – Address, hex str

  • account – Account

Returns

lock_reward(agreement_id, amount, account)

Lock reward condition.

Parameters
  • agreement_id – id of the agreement, hex str

  • amount – Amount of tokens, int

  • account – Account

Returns

bool

refund_reward(agreement_id, amount, account)

Refund reaward condition.

Parameters
  • agreement_id – id of the agreement, hex str

  • amount – Amount of tokens, int

  • account – Account

Returns

release_reward(agreement_id, amount, account)

Release reward condition.

Parameters
  • agreement_id – id of the agreement, hex str

  • amount – Amount of tokens, int

  • account – Account

Returns