diff --git a/MIGRATION.md b/MIGRATION.md index 5b579b1..ca70432 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -13,14 +13,19 @@ squid-js v2.0.0 only works against: - Events Handler v0.4.4+ - Keeper Contracts v0.13.2+ -### Service index removal from `ocean.assets.order` & `ocean.assets.consume` +### Service index parameter removal from `ocean.assets` methods + +Removes the need to get the respective service from the DDO, the `ocean.assets` methods will now do this on their own automatically. ```js // old +const service = ddo.findServiceByType('access') +const did = ddo.id const agreementId = await ocean.assets.order(did, service.index, account) const path = await ocean.assets.consume(agreementId, did, service.index, account, folder) // NEW +const did = ddo.id const agreementId = await ocean.assets.order(did, account) const path = await ocean.assets.consume(agreementId, did, account, folder) ``` diff --git a/library.json b/library.json index 9d0cb91..b74efd3 100644 --- a/library.json +++ b/library.json @@ -19,7 +19,7 @@ }, { "name": "events-handler", - "version": "~0.4.1" + "version": "~0.4.4" } ] }