1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

Updating script

This commit is contained in:
Jamie Hewitt 2022-04-25 13:51:17 +02:00
parent f935f9f8a5
commit 331da90db5
3 changed files with 25 additions and 3 deletions

View File

@ -20,7 +20,11 @@ import {
downloadFile
} from '../../src'
import { ProviderFees, Erc20CreateParams } from '../../src/@types'
```
We will need a file to publish, so here we define the file that we intend to publish.
```Typescript
const assetUrl = [
{
type: 'url',
@ -28,6 +32,10 @@ const assetUrl = [
method: 'GET'
}
]
```
Next, we define the metadata that will describe our data asset. This is what we call the DDO
```Typescript
const ddo = {
'@context': ['https://w3id.org/did/v1'],
id: 'did:op:efba17455c127a885ec7830d687a8f6e64f5ba559f8506f8723c1f10f05c049c',
@ -58,8 +66,10 @@ const ddo = {
}
]
}
```
```Typescript
## Simple Publish & consume test
let config: Config
let addresses: any
let aquarius: Aquarius
@ -175,3 +185,4 @@ const ddo = {
}
})
})
```

View File

@ -12,7 +12,7 @@ sed -i 's/\/\/\/ //' CodeExamples.md
# Generate titles
sed -i "s/describe('/\#\# /" CodeExamples.md
sed -i "s/describe('Simple Publish & Consume Flow', async () => {//" CodeExamples.md
sed -i "s/it('/\#\#\# /" CodeExamples.md
sed -i "s/', async () => {//" CodeExamples.md
sed -i "s/before(async () => {//" CodeExamples.md

View File

@ -20,7 +20,11 @@ import {
downloadFile
} from '../../src'
import { ProviderFees, Erc20CreateParams } from '../../src/@types'
/// ```
/// We will need a file to publish, so here we define the file that we intend to publish.
/// ```Typescript
const assetUrl = [
{
type: 'url',
@ -28,6 +32,10 @@ const assetUrl = [
method: 'GET'
}
]
/// ```
/// Next, we define the metadata that will describe our data asset. This is what we call the DDO
/// ```Typescript
const ddo = {
'@context': ['https://w3id.org/did/v1'],
id: 'did:op:efba17455c127a885ec7830d687a8f6e64f5ba559f8506f8723c1f10f05c049c',
@ -58,8 +66,10 @@ const ddo = {
}
]
}
/// ```
describe('Simple Publish & consume test', async () => {
/// ```Typescript
describe('Simple Publish & Consume Flow', async () => {
let config: Config
let addresses: any
let aquarius: Aquarius
@ -175,3 +185,4 @@ describe('Simple Publish & consume test', async () => {
}
})
})
/// ```