UNPKG

@ethersphere/bee-js

Version:
6 lines 346 B
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()))); }