create
Creates a new nautilus instance.
Usage
import { , } from 'ethers'
import { } from '@deltadao/nautilus'
const = new ('https://rpc.dev.pontus-x.eu')
const = new ('0x...', )
const = await .(, {
: { : 'https://node.example.org' }
}) The chain is read from the signer's provider, so there is no chain parameter. nautilus then
merges ConfigHelper's defaults for that chain with whatever you pass in config.
Returns
- Type:
Promise<Nautilus>
Parameters
signer
- Type:
Signer(ethers v6)
nautilus v2 requires ethers v6. A v5 Signer is not structurally compatible.
options (optional)
- Type:
NautilusOptions
Properties
config
- Type:
Partial<Config>
Overrides merged over ConfigHelper's defaults.
One oceanNodeUri now replaces v1's metadataCacheUri and providerUri — a single
ocean-node serves metadata, provider services and the indexer. There is no subgraphUri:
pricing comes from chain reads.
const = await .(, {
: {
: 'https://node.example.org',
: '0x...',
: '0x...',
: '0x...'
}
})remoteStore
- Type:
RemoteStore
Where the signed DDO is stored. Required to publish or edit, because nautilus writes a
{ remote } pointer on chain rather than the document itself.
Two implementations ship with nautilus. NodePersistentRemoteStore uses ocean-node's own
storage, so no external service is involved:
// The store needs a node client, so build the instance in two steps.
const = await .(, { })
const = await .(, {
,
: new (.())
})IpfsRemoteStore posts to any IPFS upload endpoint — a Kubo node, or a pinning service:
const = new ({
: 'http://127.0.0.1:5001/api/v0/add'
})ocean-node resolves the pointer through the same storage layer it uses for asset files, so
url, ipfs, arweave, s3, ftp and nodePersistentStorage all work. Implement
RemoteStore for anything else.
ddoSigner
- Type:
DdoSigner
Signs the DDO as a verifiable credential. Defaults to Eip191VcSigner, which signs with
the Ethereum key and sets the issuer to the signer's address.
Pass a WaltIdVcSigner to issue from a real DID instead — see the
identity guide.
credentials
- Type:
CredentialProvider
Satisfies credential-gated access. Omit it and nautilus skips SSI entirely.
const = await .(, {
,
: new (.(), {
: 'https://wallet.example.org'
})
})