Financial Transactions API
Description of endpoints used to construct Financial Transactions on the DeSo blockchain
Send DeSo
POST /api/v0/send-deso
Create a Basic transfer transaction. Basic transfer transactions send DeSo from one used to another. Transaction needs to be signed and submitted through api/v0/submit-transaction before changes come into effect.
A Basic Transfer transaction sends DeSo from the sender to the receiver.
Endpoint implementation in backend.
Example usage in frontend: - Make request to Send DeSo to get a preview of the transaction. - Make request to Send DeSo and sign+submit the transaction. - Use SendDeSo to transfer DeSo to another user.
Request Body
SenderPublicKeyBase58Check*
String
Public key of the sender
RecipientPublicKeyOrUsername*
String
Public key or Username of the recipient
AmountNanos*
int64
transaction amount in nanos - If less than 0, this will create a max spend transaction that will send all funds from Sender to Receiver
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee]
Array of
objects that define additional outputs that need to be added to this transaction
{
"TotalInputNanos": 1999946613,
"SpendAmountNanos": 1000000000,
"ChangeAmountNanos": 999946354,
"FeeNanos": 259,
"TransactionIDBase58Check": "CbUyAcAiR5C626pSXQ1KCHWxo55FiSsBS66GELxVPPJMT2Q4yjFTA",
"Transaction": {
"TxInputs": [
{
"TxID": [...],
"Index": 0
}
],
"TxOutputs": [
{
"PublicKey": "Ajl7GoDroKYGRGUK8Twqb/37vziDDK/DSTenXd1EuM5S",
"AmountNanos": 1000000000
},
{
"PublicKey": "Aqo9yNKZ6h5JFN5mSU7T4W7amg1lcZ1SPBqaA8v59gxF",
"AmountNanos": 999946354
}
],
"TxnMeta": {},
"PublicKey": "Aqo9yNKZ6h5JFN5mSU7T4W7amg1lcZ1SPBqaA8v59gxF",
"ExtraData": null,
"Signature": null,
"TxnTypeJSON": 2
},
"TransactionHex": "025051b0eeda78885641a2340f57b908f475d84ce3b8ce2507815c89e857ef1cce0006caf6e4d44a8575fe235d7d3ffdb1020485526118d3379f5a993a31f5a2823f000202397b1a80eba0a60644650af13c2a6ffdfbbf38830cafc34937a75ddd44b8ce528094ebdc0302aa3dc8d299ea1e4914de66494ed3e16eda9a0d65719d523c1a9a03cbf9f60c45f2f0e7dc0302002102aa3dc8d299ea1e4914de66494ed3e16eda9a0d65719d523c1a9a03cbf9f60c450000",
"TxnHashHex": "df850aef107687e36034e3d298da341fc747d4a663e0a5e98fe3ce05cc10b4be"
}...coming soon! See comments in sample response for descriptions for now.
Buy Or Sell Creator Coin
POST /api/v0/buy-or-sell-creator-coin
Create a buy/sell creator coin transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction before changes come into effect.
A buy creator coin transaction locks DeSo in the creator coin of a creator and in return gives the purchaser creator coins.
A sell creator coin transaction unlocks an amount of DeSo commensurate with the amount of creator coins sold.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Buy Or Sell Creator Coin - Use BuyOrSellCreatorCoin to get a preview of purchase/sale of creator coins - Use BuyOrSellCreatorCoin to buy or sell creator coins
Request Body
MinCreatorCoinExpectedNanos
uint64
Minimum amount of Creator Coins expected when buying creator coins only required for buy transactions
MinFeeRateNanosPerKB*
uint64
Rate per KB
CreatorCoinToSellNanos*
uint64
Amount of Creator Coin to sell only required for sell transactions
TransactionFees
TrasactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
CreatorPublicKeyBase58Check*
String
Public key of creator whose coin is being purchased
DeSoToAddNanos*
uint64
deprecated
OperationType*
String
"buy" or "sell"
MinDeSoExpectedNanos
uint64
Minimum DeSo expected to be received when selling creator coins only required for sell transactions
DeSoToSellNanos*
uint64
Amount of DeSo to spend purchasing creator coins only required for buy transactions
UpdaterPublicKeyBase58Check*
String
Public key of user purchasing/selling creator coins
InTutorial
Boolean
When true, perform additional checks to ensure user is at the correct point in the tutorial to execute this buy/sell creator coin transaction
...coming soon! See comments in sample response for descriptions for now.
...coming soon! See comments in sample response for descriptions for now.
Transfer Creator Coin
POST /api/v0/transfer-creator-coin
Create a transfer creator coin transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction before changes come into effect.
Transfer creator coin transactions sends creator coins owned by the sender to the receiver.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Transfer Creator Coin - Use TransferCreatorCoin to get a preview of a creator coin transfer transaction. - Use TransferCreatorCoin to construct, sign, and submit a creator coin transfer transaction.
Request Body
SenderPublicKeyBase58Check*
String
Public key of user sending creator coins
CreatorPublicKeyBase58Check*
String
Public key of creator whose coins will be sent
ReceiverUsernameOrPublicKeyBase58Check*
String
username or public key of user who will receive creator coins
CreatorCoinToTransferNanos*
uint64
Amount of Creator Coin to transfer
MinFeeRateNanosPerKB*
uint64
Rate per KB
TrasactionFees
TrasactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
...coming soon! See comments in sample response for descriptions for now.
Last updated
Was this helpful?
