Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 2x 2x 2x 2x | import { StxTransferTxOptions, StxTransferTxPayload, TransactionTypes } from './types'; import { signTransactionPayload } from './sign'; import { safeGetPublicKey } from '../common/utils'; export async function makeStxTransferToken({ privateKey, ...options }: StxTransferTxOptions) { const payload: StxTransferTxPayload = { ...options, amount: typeof options.amount === 'bigint' ? Number(options.amount).toString(10) : options.amount, publicKey: safeGetPublicKey(privateKey), txType: TransactionTypes.STXTransfer, }; return signTransactionPayload(payload, privateKey); } |