@oceanprotocol/lib 1.0.0-next.44 → 1.0.0-next.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -1
- package/CodeExamples.md +918 -0
- package/README.md +6 -54
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.js +1 -1
- package/dist/lib.module.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/src/@types/Erc20.d.ts +5 -0
- package/dist/src/pools/fixedRate/FixedRateExchange.d.ts +6 -2
- package/dist/src/tokens/Datatoken.d.ts +31 -1
- package/dist/src/utils/TokenUtils.d.ts +7 -0
- package/dist/test/{unit/NftFactory.test.d.ts → integration/CodeExamples.test.d.ts} +0 -0
- package/dist/test/unit/factories/NftFactory.test.d.ts +1 -0
- package/package.json +15 -11
- package/docs/beginners_guide.md +0 -338
- package/docs/get-test-OCEAN.md +0 -24
- package/docs/overview.md +0 -394
- package/docs/quickstart_marketplace.md +0 -423
- package/docs/quickstart_simple.md +0 -272
- package/docs/services.md +0 -94
- package/docs/wallets.md +0 -98
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ This is in alpha state. If you run into problems, please open up a [new issue](h
|
|
|
24
24
|
|
|
25
25
|
- [📚 Prerequisites](#-prerequisites)
|
|
26
26
|
- [🏗 Installation](#-installation)
|
|
27
|
-
- [
|
|
27
|
+
- [📖 Learn More](#-learn-more)
|
|
28
28
|
- [🦑 Development](#-development)
|
|
29
29
|
- [✨ Code Style](#-code-style)
|
|
30
30
|
- [👩🔬 Testing](#-testing)
|
|
@@ -42,66 +42,18 @@ This is in alpha state. If you run into problems, please open up a [new issue](h
|
|
|
42
42
|
- Docker ([Managed as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/))
|
|
43
43
|
- A Unix based operating system (Mac or Linux)
|
|
44
44
|
|
|
45
|
-
### Note
|
|
46
|
-
|
|
47
|
-
Any function that uses `getPastEvents()` will only work on Eth (see: <https://github.com/oceanprotocol/ocean.js/issues/741>). This includes:
|
|
48
|
-
|
|
49
|
-
- searchPoolforDT()
|
|
50
|
-
- getPoolsbyCreator()
|
|
51
|
-
- getPoolSharesByAddress()
|
|
52
|
-
- getAllPoolLogs()
|
|
53
|
-
- getPreviousValidOrders()
|
|
54
|
-
- searchforDT()
|
|
55
|
-
- getExchangesbyCreator()
|
|
56
|
-
- getExchangeSwaps()
|
|
57
|
-
- getAllExchangesSwaps()
|
|
58
|
-
|
|
59
45
|
## 🏗 Installation
|
|
60
46
|
|
|
61
47
|
```bash
|
|
62
48
|
npm install @oceanprotocol/lib
|
|
63
49
|
```
|
|
64
|
-
|
|
65
|
-
## 🏄 Quickstart
|
|
66
|
-
|
|
67
|
-
```ts
|
|
68
|
-
import { Ocean, Config, ConfigHelper, Logger } from '@oceanprotocol/lib'
|
|
69
|
-
|
|
70
|
-
const defaultConfig: Config = new ConfigHelper().getConfig(
|
|
71
|
-
'rinkeby',
|
|
72
|
-
'YOUR_INFURA_PROJECT_ID'
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
const config = {
|
|
76
|
-
...defaultConfig,
|
|
77
|
-
metadataCacheUri: 'https://your-metadata-cache.com',
|
|
78
|
-
providerUri: 'https://your-provider.com'
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async function init() {
|
|
82
|
-
const ocean = await Ocean.getInstance(config)
|
|
83
|
-
return ocean
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Here are flows to try out, from beginners to advanced.
|
|
88
|
-
|
|
89
|
-
- **[Beginners guide](docs/beginners_guide.md)** - for developers who are completely new to blockchain, no coding experience is required.
|
|
90
|
-
- **[Simple flow](docs/quickstart_simple.md)** - the essence of Ocean - creating a data NFT & datatoken.
|
|
91
|
-
- **[Marketplace flow](docs/quickstart_marketplace.md)** - a data asset is posted for sale in a datatoken pool, then purchased. Includes metadata and Compute-to-Data.
|
|
92
|
-
|
|
93
|
-
|
|
94
50
|
### 📖 Learn more
|
|
95
51
|
|
|
96
|
-
- [
|
|
97
|
-
- [
|
|
98
|
-
- [
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
If you have any difficulties with the quickstarts, or if you have further questions about how to use ocean.js please reach out to us on [Discord](https://discord.gg/TnXjkR5).
|
|
103
|
-
|
|
104
|
-
If you notice any bugs or issues with ocean.js please [open an issue on github](https://github.com/oceanprotocol/ocean.js/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
|
|
52
|
+
- Checkout our [code examples](CodeExamples.md) to see how you can use ocean.js.
|
|
53
|
+
- Refer to the [Ocean Protocol documentation](https://docs.oceanprotocol.com/) for more guides and tutorials.
|
|
54
|
+
- Visit the [Ocean Protocol website](https://docs.oceanprotocol.com/) for general information about Ocean Protocol.
|
|
55
|
+
- If you have any difficulties or if you have further questions about how to use ocean.js please reach out to us on [Discord](https://discord.gg/TnXjkR5).
|
|
56
|
+
- If you notice any bugs or issues with ocean.js please [open an issue on github](https://github.com/oceanprotocol/ocean.js/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
|
|
105
57
|
|
|
106
58
|
## 🦑 Development
|
|
107
59
|
|