Skip to content

adamant-api / helpers/transactions / createSendTransaction

Function: createSendTransaction() ​

ts
function createSendTransaction(data): {
  amount: number;
  asset: {
  };
  recipientId: string;
  senderId: `U${string}`;
  senderPublicKey: string;
  signature: string;
  timestamp: number;
  timestampMs?: number;
  type: SEND;
};

Defined in: src/helpers/transactions/index.ts:100

Creates and signs an ADM token transfer transaction.

Parameters ​

ParameterType
dataSendTransactionData

Returns ​

ts
{
  amount: number;
  asset: {
  };
  recipientId: string;
  senderId: `U${string}`;
  senderPublicKey: string;
  signature: string;
  timestamp: number;
  timestampMs?: number;
  type: SEND;
}

amount ​

ts
amount: number = details.amount;

asset ​

ts
asset: {
} = {};

recipientId ​

ts
recipientId: string = details.recipientId;

senderId ​

ts
senderId: `U${string}`;

senderPublicKey ​

ts
senderPublicKey: string;

signature ​

ts
signature: string;

timestamp ​

ts
timestamp: number;

timestampMs? ​

ts
optional timestampMs?: number;

type ​

ts
type: SEND;

Released under the GPL-3.0 License.