Reference
@stdlib/content

@stdlib/content

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

To use this library, import @stdlib/content:

import "@stdlib/content";

Functions

createOffchainContent

fun createOffchainContent(link: String): Cell;

Encodes an off-chain link from a String to a Cell.

Source code:

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

Sources