Skip to content

Commit

Permalink
Merge pull request #129 from deltaDAO/Abrom8-patch-1
Browse files Browse the repository at this point in the history
Align development with main
  • Loading branch information
moritzkirstein authored Apr 1, 2024
2 parents 2c64f4c + b14edf9 commit 06a22ab
Show file tree
Hide file tree
Showing 12 changed files with 157 additions and 180 deletions.
7 changes: 0 additions & 7 deletions .changeset/eleven-pans-look.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/famous-pots-deny.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lucky-drinks-occur.md

This file was deleted.

15 changes: 0 additions & 15 deletions .changeset/pre.json

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/small-tigers-repeat.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/weak-laws-study.md

This file was deleted.

127 changes: 0 additions & 127 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
8 changes: 2 additions & 6 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ import { HomePage } from 'vocs/components'
<a href="https://npmjs.com/package/@deltadao/nautilus" className="cursor-pointer h-[36px] flex-1 relative rounded-lg overflow-hidden border border-green-400/50" style={{ color: 'inherit' }} rel="noreferrer noopener" target="_blank">
<div className="absolute flex z-[1] p-[6px] h-full w-full">
<div className="flex-1 bg-white/60 dark:bg-black/40 flex items-center w-full h-full rounded-md">
<span className="font-medium text-[15px] leading-none opacity-80 w-full text-center">beta</span>
<span className="font-medium text-[15px] leading-none opacity-80 w-full text-center">version</span>
</div>
<div className="flex items-center h-full px-2">
<span className="font-medium text-[15px] leading-none text-center w-full text-lime-400">Version 1.0.0</span>
<span className="font-medium text-[15px] leading-none text-center w-full text-lime-400">1.0.1</span>
</div>
</div>
<div className="absolute left-0 right-0 top-0 bottom-0 bg-lime-400 opacity-10 z-[0]" />
Expand Down Expand Up @@ -157,10 +157,6 @@ We are committed to nautilus as an open-source project. Reach out if you are abl

- [deltaDAO contact](mailto:contact@delta-dao.com)

# Sponsors

::sponsors

</article>

<center>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @deltadao/nautilus

## 1.0.1

### Patch Changes

- [`c8b4d4d`](https://github.com/deltaDAO/nautilus/commit/c8b4d4d5978a4a48c7a5ab198f82042440d4b9c5) Thanks [@moritzkirstein](https://github.com/moritzkirstein)! - Version Bump

## 1.0.0

### Patch Changes

- [#108](https://github.com/deltaDAO/nautilus/pull/108) [`3e8b148`](https://github.com/deltaDAO/nautilus/commit/3e8b1484fa5656a0a46fc818ca118dfda32786fc) Thanks [@moritzkirstein](https://github.com/moritzkirstein)! - Fix error in next build

- Fixes an error with starting compute jobs
- Fixes `tslib` dependency issues

- [#103](https://github.com/deltaDAO/nautilus/pull/103) [`8f71689`](https://github.com/deltaDAO/nautilus/commit/8f71689b3cd4fa02502e01adddfe309afecdf5d2) Thanks [@moritzkirstein](https://github.com/moritzkirstein)! - next release

- [#106](https://github.com/deltaDAO/nautilus/pull/106) [`399cd55`](https://github.com/deltaDAO/nautilus/commit/399cd55ead131534f0165ef01f698553cb26290d) Thanks [@moritzkirstein](https://github.com/moritzkirstein)! - bump ocean.js

- [#83](https://github.com/deltaDAO/nautilus/pull/83) [`59b5d93`](https://github.com/deltaDAO/nautilus/commit/59b5d9348ca75300523c9857eba1f99abe441c01) Thanks [@moritzkirstein](https://github.com/moritzkirstein)! - - add stopCompute functionality
- fix an issue with setting trusted algorithms

## 1.0.0-next.5

### Patch Changes
Expand Down
124 changes: 124 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<br />

<p align="center">
<a href="https://nautilus.delta-dao.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/deltaDAO/nautilus/raw/main/docs/public/logo-dark.svg">
<img alt="nautilus logo" src="https://github.com/deltaDAO/nautilus/raw/main/docs/public/logo-light.svg" width="auto" height="60">
</picture>
</a>
</p>

<p align="center">
The Data Economy TypeScript Toolkit
<p>

<p align="center">
<a href="https://www.npmjs.com/package/deltadao/nautilus">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/v/@deltadao/nautilus?colorA=21262d&colorB=21262d&style=for-the-badge">
<img src="https://img.shields.io/npm/v/@deltadao/nautilus?colorA=f6f8fa&colorB=f6f8fa&style=for-the-badge" alt="Version">
</picture>
</a>
<a href="https://github.com/deltaDAO/nautilus/blob/main/LICENSE">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/l/@deltadao/nautilus?colorA=21262d&colorB=21262d&style=for-the-badge">
<img src="https://img.shields.io/npm/l/@deltadao/nautilus?colorA=f6f8fa&colorB=f6f8fa&style=for-the-badge" alt="Apache-2.0 License">
</picture>
</a>
<a href="https://www.npmjs.com/package/deltadao/nautilus">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/deltaDAO/nautilus/changeset.yml?colorA=21262d&colorB=21262d&style=for-the-badge">
<img src="https://img.shields.io/github/actions/workflow/status/deltaDAO/nautilus/changeset.yml?colorA=f6f8fa&colorB=f6f8fa&style=for-the-badge" alt="GitHub Actions Workflow Status">
</picture>
</a>
</p>


A TypeScript library enabling you to explore the Data Economy. It is built on top of [ocean.js](https://github.com/oceanprotocol/ocean.js) and offers feature complete, automated interactions with any [Ocean Protocol](https://oceanprotocol.com) ecosystem.

## Overview
nautilus addresses many common pain points faced by developers interacting with the data economy by offering a range of features enhancing productivity and efficiency.
You will find a quick introduction on this page to get you setup with the **Data Economy TypeScript Toolkit**.

Looking for dedicated feature documentations? Follow the links below:
- [Download](https://nautilus.delta-dao.com/docs/guides/download)
- [Compute to Data](https://nautilus.delta-dao.com/docs/guides/compute)
- [Publishing](https://nautilus.delta-dao.com/docs/guides/publish)
- [Editing](https://nautilus.delta-dao.com/docs/guides/edit)


## Quick Start
### 1. Setup your Signer
Firstly, create the signer you want to use with your nautilus instance. nautilus uses the ethers.js `Signer`. You can read more about possible configurations in the [official documentation](https://docs.ethers.org/v5/api/signer/).

```ts twoslash
import { Wallet, providers } from 'ethers'
import { Nautilus } from '@deltadao/nautilus'

const provider = new providers.JsonRpcProvider('https://rpc.dev.pontus-x.eu')
const signer = new Wallet('0x...', provider)
```

In this example we create an ethers `Wallet` from a given private key and connect to a RPC provider of our choice.

### 2. Setup the nautilus instance
Now that you have a Signer set up, you can use it to bootstrap your nautilus client instance.

``` ts twoslash
import { Wallet, providers } from 'ethers'
import { Nautilus } from '@deltadao/nautilus'

const provider = new providers.JsonRpcProvider('https://rpc.dev.pontus-x.eu')
const signer = new Wallet('0x...', provider)

const nautilus = await Nautilus.create(signer)
```

Note, that we use the previously created Wallet and pass it to Nautilus to create the instance with this signer.

### 3. Interact with the data economy
With the client instance bootstrapped you can now trigger any transactions or access calls supported by OceanProtocol.

``` ts twoslash
import { Wallet, providers } from 'ethers'
import { Nautilus } from '@deltadao/nautilus'

const provider = new providers.JsonRpcProvider('https://rpc.dev.pontus-x.eu')
const signer = new Wallet('0x...', provider)

const nautilus = await Nautilus.create(signer)

const accessUrl = await nautilus.access({ assetDid: 'did:op:12345'})
const data = await fetch(accessUrl)
```

In this example we construct a one-time `accessUrl` and can then use it to fetch the data associated with the respective data service.

## Next Steps

Find dedicated feature documentation by following one of the links below:
- [Download](https://nautilus.delta-dao.com/docs/guides/download)
- [Compute to Data](https://nautilus.delta-dao.com/docs/guides/compute)
- [Publishing](https://nautilus.delta-dao.com/docs/guides/publish)
- [Editing](https://nautilus.delta-dao.com/docs/guides/edit)

If you want to jump straight into code, feel free to take a look at some of our code examples in the [nautilus-examples repository](https://github.com/deltaDAO/nautilus-examples).

## License

```
Copyright ((C)) 2023 deltaDAO AG
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
10 changes: 7 additions & 3 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@deltadao/nautilus",
"description": "A typescript library enabling automated publish & consume in Ocean Protocol ecosystems",
"version": "1.0.0-next.5",
"version": "1.0.1",
"type": "module",
"main": "./_cjs/index.js",
"module": "./_esm/index.js",
Expand Down Expand Up @@ -33,15 +33,19 @@
"documents": "./src/**/*.gql.ts",
"generates": {
"./src/@types/subgraph/api.ts": {
"plugins": ["typescript"]
"plugins": [
"typescript"
]
},
"./src/": {
"preset": "near-operation-file",
"presetConfig": {
"baseTypesPath": "@types/subgraph/api.ts",
"extension": ".generated.ts"
},
"plugins": ["typescript-operations"],
"plugins": [
"typescript-operations"
],
"config": {
"omitOperationSuffix": true,
"typesPrefix": "I"
Expand Down

0 comments on commit 06a22ab

Please sign in to comment.