Transactions

Make a transaction, of any kind or type.

Transactions are a significant aspect of every wallet interaction. By default, we try to transact every transaction bundle in a p2p fashion to reduce computational load and reduce latency. Classical address transactions will be long term supported for legacy reasons.

Send Transaction

You can also send transactions without the URI function, by simply composing an array of receiver, amount and type. The note is optional and is send with the p2p bundle as message.

Since the input is an Array, you can indicate many receivers at the same time.

The receiver indicated can be a paymail alias or classical address

Non Bundle Transactions

For BSV transactions there is also the option to create separate transactions for each element in the dataArray. By adding in the bundle field and setting it to false it will then create a transaction for each entry in the data array. Note this is only valid for BSV type transactions. See Mulit Output Non Bundle tab for an example.

var parameters = {
    serviceId: 'optional',
    walletID: 'optional',
    data: {
      dataArray: [
        {
          to: "17n2JVhrCf1oYSMkZtZNjcf1deteUEKQsH",
          amount: 0.0001,
          notes: "pizza payment"
        }
      ]
    },
}
const response = await relysia.transaction.v1.send(parameters);

Transfer coins to an address.

POST https://api.relysia.com/v1/send

Use the /send endpoint to create transactions to peers. The /send endpoint is agnostic to sending either Tokens or BSV.

Headers

NameTypeDescription

walletID

string

Request Body

NameTypeDescription

dataArray

array

As per above

bundle

boolean

Default True (Optional)

{
  "statusCode": 200,
  "data": {
    "status": "success",
    "msg": "Operation completed successfully",
    "txIds": ["string"]
  }
}

Other than just BSV, you can send an arbitrary token (such as a NFT or festival ticket token). The fee manager is handling all transaction fees for the user (up to infrastructure provider determined limits) to improve the general onboarding and user experience.

Data Append (STAS-789)

With the STAS-789 tokens, it is possible to include extra data in the token script during a transaction. To facilitate this feature, we have introduced a new field in the "/send" endpoint named "data", which is an array format. Each element of this array must be a string, and each string will be added as individual hexadecimal chunks of data that can be segmented while in ASM script format. The STAS-789 tokens are formatted as NFTs and will each have a unique serial number value, denoted as "sn" in the corresponding field.

var parameters = {
    serviceId: 'optional',
    walletID: 'optional',
    data: {
      dataArray: [
        {
          to: "17n2JVhrCf1oYSMkZtZNjcf1deteUEKQsH",
          tokenId: "1SJDKAS34DKSDKD1OD-SBD",
          amount: 1,
          sn : 1,
          data : ["some data1", "some data2"]
        }
      ]
    },
}
const response = await relysia.transaction.v1.send(parameters);ja

Paymail with optional Identification Tag

To enable providers with the ability to receive paymail funds from various entities without requiring new paymails, we created an optional extended paymail format. The new extended Paymail format is designed as follows:

{message}.name@domain.com

Example

For example, sending funds to:

342d212.robin@myMail.com

This will direct the funds to:

robin@myMail.com

With the note "342d212" included in the transaction history.

Benefits

  • Clear Association of Funds: The message segment ensures that funds can be clearly associated with specific senders or transactions.

  • Deterministic Linking: The message part can be replaced with a UID, providing a deterministic link to the user.

  • Enhanced Tracking: Useful for exchanges and services requiring precise transaction tracking.

Last updated