Language
Libraries
@stdlib/content

@stdlib/content

Provides a function for encoding an off-chain link string to a Cell.

To use this library, import @stdlib/content:

import "@stdlib/content";

Functions

createOffchainContent

Encodes an off-chain link string to a Cell.

Signature:

fun createOffchainContent(link: String): Cell;

Source code:

fun createOffchainContent(link: String): Cell {
    let builder: StringBuilder = beginStringFromBuilder(beginCell().storeUint(0x01, 8));
    builder.append(link);
    return builder.toCell();
}

Sources