18 lines
509 B
TypeScript
18 lines
509 B
TypeScript
import { binToHex } from '@bitauth/libauth';
|
|
|
|
// TODO: Put unsorted stuff in here and then try to sort them somewhere more sensible later.
|
|
|
|
export function getOutpointId(outpoint: {
|
|
outpointTransactionHash: Uint8Array;
|
|
outpointIndex: number;
|
|
}): string {
|
|
const outpointHashHex = binToHex(outpoint.outpointTransactionHash);
|
|
|
|
return `${outpointHashHex}:${outpoint.outpointIndex}`;
|
|
}
|
|
|
|
// TODO: Jason uses form timestampMs_entityId
|
|
export function generateActivityId() {
|
|
return Date.now().toString();
|
|
}
|