Oumla Docs
  • Quick start
  • Introduction
  • Security
  • Networks
  • Authentication
  • Use cases
  • SDK
    • Oumla client
    • Create a Profile
    • Getting Profiles
    • Generate a Wallet
    • Getting Wallets
    • Generate Addresses
    • Getting Addresses
    • Getting Transactions
    • Sending Transactions
    • SDK reference
  • API Reference
    • Organization routes
    • Profiles routes
    • Wallet routes
    • Addresses routes
    • Transactions routes
  • Types
  • FAQs
Powered by GitBook
On this page
  1. SDK

Sending Transactions

Send transactions from your users to other address

PreviousGetting TransactionsNextSDK reference

Last updated 8 months ago

Sending a transaction from an address or multiple addresses to another address. This function will create a transaction

Before you create any transaction, make sure that you create an and make sure you have amount in your wallet, if you don't have please check this

The createTransacion function has the following properties.

property
description
required

network

specify which blockchain

required

from

specify which addresses to withdraw from. This is an array of strings.

required

amount

the amount to send.

required

to

the desired address

required

property
description
required

network

specify which blockchain

required

from

specify which addresses to withdraw from. This is an array of strings.

required

amount

the amount to send.

required

to

the desired address

required

You only need to initialize the client once at the start of the application.

import { Oumla } from "@oumla/sdk";

const client = new Oumla({
   apiKey: process.env.API_KEY,
   // Additional options...
});

const result = await client.transactions.create({
    network: "BTC",
    amount: 0.001,
    from: [
        "tb1qmkg9mcvlt6atwp5gugvwmyc8kj3sffn728rnghcsa4jvtl2ea0ks03fwlw"
    ],
    to: "tb1qmkg9mcvlt6atwp5gugvwmyc8kj3sffn728rnghcsa4jvtl2ea0ks03fwlw"
});

console.log(result); 

The expected output

 { status: 'confirmed' }
address
How to Obtain Testnet Coins?