UNPKG

@lifi/sdk

Version:

LI.FI Any-to-Any Cross-Chain-Swap SDK

14 lines (13 loc) 292 B
export const decodeTaskId = (taskId: string) => { const decoded = new TextDecoder() .decode( new Uint8Array( taskId .slice(2) .match(/.{1,2}/g) ?.map((byte) => Number.parseInt(byte, 16)) ?? [] ) ) .split('|') return decoded }