@ethersphere/bee-js
Version:
Javascript client for Bee
6 lines • 346 B
JavaScript
import { Binary } from 'cafe-utility';
import { FeedIndex, Identifier } from "../utils/typed-bytes.js";
export function makeFeedIdentifier(topic, index) {
index = typeof index === 'number' ? FeedIndex.fromBigInt(BigInt(index)) : index;
return new Identifier(Binary.keccak256(Binary.concatBytes(topic.toUint8Array(), index.toUint8Array())));
}