🏦
L1X Wallet SDK
  • L1X Typescript SDK
  • Wallet Methods
    • How to import wallet using mnemonic?
    • How to import wallet using private key?
  • Core Methods
    • How to get Account State?
    • How to get block information by block number?
    • How to get chain state?
    • How to get events? (WIP)
    • How to get current nonce?
    • How to get account transactions?
    • How to get the transaction recipt?
    • How to get account stakes? (WIP)
    • How to broadcast transactions?
  • Native Token Methods
    • How to transfer native token?
    • How to get native token balance?
    • How to get signed payload for transfer?
  • VM Methods
    • How to deploy VM Contract
    • How to initialise a VM contracts?
    • How to make an VM contract state changing call?
    • How to make an VM readonly calls?
  • EVM Methods
    • How to initialise a smart contract?
    • How to make an EVM contract state changing call?
    • How to make an EVM read only calls?
  • Fungible Token Methods
    • How to create fungible tokens?
    • How to get fungible token attributes?
    • How to mint fungible token?
    • How to transfer fungible tokens?
    • How to get a fungible token balance?
    • How to give approval to fungible token?
    • How to get an allowence of fungible tokens?
    • How to use transfer from of fungible token?
  • Non-fungible Token Methods
    • How to Create a Non-Fungible Token?
    • How to get the attribute of a Non-Fungible token?
    • How to mint a Non-Fungible Token?
    • How to get the balance of a Non-Fungible token?
    • How to get the owner of a Non-Fungible token by its ID?
    • How to get owned NFT token
    • How to get token uri?
    • How to approve a spender to manage a specific Non-Fungible token?
    • How to set or revoke approval for a specific operator to manage all tokens of the sender?
    • How to Transfer a Non-Fungible token from one address to another?
    • How to burn an existing Non-Fungible Token?
Powered by GitBook
On this page
Edit on GitHub
  1. Core Methods

How to get the transaction recipt?

  • getTransactionReceipt

This function is used to retrieve the transaction receipt for a given transaction hash.

import { L1XProvider, GetTransactionReceiptArg } from "@l1x/l1x-wallet-sdk";

let l1xProvider = new L1XProvider({
  clusterType: "mainnet",
  endpoint: "https://v2-mainnet-rpc.l1x.foundation",
});

let params: GetTransactionReceiptArg = {
  hash: "fe014c6a9ebc6d14c823fd12ddaa83f0bf6c747d228ccbcea24a1cd120f5dd85",
};

l1xProvider.core
  .getTransactionReceipt(params)
  .then((response) => console.log(response)) // log response
  .catch((err) => console.error(err)); // log error

Parameters:

The transaction hash of the transaction for which the transaction receipt needs to be retrieved

{
    "hash": "fe014c6a9ebc6d14c823fd12ddaa83f0bf6c747d228ccbcea24a1cd120f5dd85"
}

Returns:

A promise that resolves with the transaction receipt.

{
    transaction: { 
        tx_type: Number,
        nonce: String,
        fee_limit: String,
        signature: [Array],
        verifying_key: [Array],
        transaction: { NativeTokenTransfer: [Object] }
    },
    block_hash: 'd122e87c7939a93c3743dd7433d92515c65f13a9bddd350c866b7ce129bed0d4',
    block_number: 5178109,
    fee_used: '1',
    timestamp: 1706513499429,
    from: '51ab9c4805ff60048e05b7535be0081b271068fd',
    transaction_hash: 'fe014c6a9ebc6d14c823fd12ddaa83f0bf6c747d228ccbcea24a1cd120f5dd85'
}
PreviousHow to get account transactions?NextHow to get account stakes? (WIP)

Last updated 1 year ago