import { decodeToken } from 'jsontokens' ; import type { TransactionPayload } from '@stacks/connect' ; export function getPayloadFromToken ( requestToken ) { const token = decodeToken ( requestToken ) ; return token . payload as unknown as TransactionPayload ; }