ipns
    Preparing search index...

    Function createIPNSRecord

    • Creates a new IPNS record and signs it with the given private key. The IPNS Record validity should follow the [RFC3339]https://www.ietf.org/rfc/rfc3339.txt with nanoseconds precision. Note: This function does not embed the public key. If you want to do that, use EmbedPublicKey.

      The passed value can be a CID, a PublicKey or an arbitrary string path e.g. /ipfs/... or /ipns/....

      CIDs will be converted to v1 and stored in the record as a string similar to: /ipfs/${cid} PublicKeys will create recursive records, eg. the record value will be /ipns/${cidV1Libp2pKey} String paths will be stored in the record as-is, but they must start with "/"

      Parameters

      • privateKey: PrivateKey

        the private key for signing the record.

      • value:
            | string
            | PublicKey
            | MultihashDigest<0 | 18>
            | CID<unknown, number, number, Version>

        content to be stored in the record.

      • seq: number | bigint

        number representing the current version of the record.

      • lifetime: number

        lifetime of the record (in milliseconds).

      • Optionaloptions: CreateV2OrV1Options

        additional create options.

      Returns Promise<IPNSRecordV1V2>

    • Creates a new IPNS record and signs it with the given private key. The IPNS Record validity should follow the [RFC3339]https://www.ietf.org/rfc/rfc3339.txt with nanoseconds precision. Note: This function does not embed the public key. If you want to do that, use EmbedPublicKey.

      The passed value can be a CID, a PublicKey or an arbitrary string path e.g. /ipfs/... or /ipns/....

      CIDs will be converted to v1 and stored in the record as a string similar to: /ipfs/${cid} PublicKeys will create recursive records, eg. the record value will be /ipns/${cidV1Libp2pKey} String paths will be stored in the record as-is, but they must start with "/"

      Parameters

      • privateKey: PrivateKey

        the private key for signing the record.

      • value:
            | string
            | PublicKey
            | MultihashDigest<0 | 18>
            | CID<unknown, number, number, Version>

        content to be stored in the record.

      • seq: number | bigint

        number representing the current version of the record.

      • lifetime: number

        lifetime of the record (in milliseconds).

      • options: CreateV2Options

        additional create options.

      Returns Promise<IPNSRecordV2>

    • Creates a new IPNS record and signs it with the given private key. The IPNS Record validity should follow the [RFC3339]https://www.ietf.org/rfc/rfc3339.txt with nanoseconds precision. Note: This function does not embed the public key. If you want to do that, use EmbedPublicKey.

      The passed value can be a CID, a PublicKey or an arbitrary string path e.g. /ipfs/... or /ipns/....

      CIDs will be converted to v1 and stored in the record as a string similar to: /ipfs/${cid} PublicKeys will create recursive records, eg. the record value will be /ipns/${cidV1Libp2pKey} String paths will be stored in the record as-is, but they must start with "/"

      Parameters

      • privateKey: PrivateKey

        the private key for signing the record.

      • value:
            | string
            | PublicKey
            | MultihashDigest<0 | 18>
            | CID<unknown, number, number, Version>

        content to be stored in the record.

      • seq: number | bigint

        number representing the current version of the record.

      • lifetime: number

        lifetime of the record (in milliseconds).

      • options: CreateOptions

        additional create options.

      Returns Promise<IPNSRecordV1V2>