<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technotip.com</title>
	<atom:link href="https://technotip.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://technotip.com</link>
	<description>Programming Video Tutorials</description>
	<lastBuildDate>Thu, 28 Aug 2025 10:39:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://i0.wp.com/technotip.com/wp-content/uploads/2020/02/cropped-android-chrome-512x512-1.png?fit=32%2C32&#038;ssl=1</url>
	<title>Technotip.com</title>
	<link>https://technotip.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">14585808</site>	<item>
		<title>C Program to Print Integer Numbers Till N</title>
		<link>https://technotip.com/9471/c-program-to-print-integer-numbers-till-n/</link>
					<comments>https://technotip.com/9471/c-program-to-print-integer-numbers-till-n/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Fri, 27 Nov 2020 17:53:29 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C programming]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[Integer numbers]]></category>
		<category><![CDATA[negative number]]></category>
		<category><![CDATA[positive number]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[zero]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9471</guid>

					<description><![CDATA[<p>Write a C program to print integer numbers till user entered limit(num). Natural numbers are all the numbers from 1, 2, 3, 4, 5, … They are the numbers you usually count and they will continue till infinity. Whole numbers are all natural numbers including 0. e.g. 0, 1, 2, 3, 4, 5, … Integer &#8230; <a href="https://technotip.com/9471/c-program-to-print-integer-numbers-till-n/" class="more-link">Continue reading<span class="screen-reader-text"> "C Program to Print Integer Numbers Till N"</span></a></p>
The post <a href="https://technotip.com/9471/c-program-to-print-integer-numbers-till-n/">C Program to Print Integer Numbers Till N</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://technotip.com/9161/c-program-to-count-positive-negative-even-and-odd-numbers-in-an-array/" rel="bookmark" title="C Program To Count Positive, Negative, Even And Odd Numbers In An Array">C Program To Count Positive, Negative, Even And Odd Numbers In An Array</a></li>
<li><a href="https://technotip.com/6500/positive-or-negative-or-zero-using-ternary-operator-c-program/" rel="bookmark" title="Positive or Negative or Zero Using Ternary Operator: C Program">Positive or Negative or Zero Using Ternary Operator: C Program</a></li>
<li><a href="https://technotip.com/6827/c-program-to-print-natural-numbers-between-two-numbers-using-while-loop/" rel="bookmark" title="C Program to Print Natural Numbers Between Two Numbers using While loop">C Program to Print Natural Numbers Between Two Numbers using While loop</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Write a C program to print integer numbers till user entered limit(num).</p>
<p><strong>Natural numbers</strong> are all the numbers from 1, 2, 3, 4, 5, … They are the numbers you usually count and they will continue till infinity.</p>
<p><strong>Whole numbers</strong> are all natural numbers including 0.<br />
e.g. 0, 1, 2, 3, 4, 5, …</p>
<p><strong>Integer numbers </strong> include all whole numbers and their negative counterpart<br />
e.g. …, -4, -3, -2, -1, 0,1, 2, 3, 4, 5, …</p>
<p><strong>Related Read:</strong><br />
<a href="https://technotip.com/6819/c-program-to-print-natural-numbers-from-1-to-n-using-while-loop/">C Program to Print Natural Numbers from 1 to N using While loop</a><br />
<a href="https://technotip.com/7401/c-program-to-print-natural-numbers-from-1-to-n-using-for-loop/">C Program to Print Natural Numbers from 1 to N using for loop</a></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/C/scale/rational_number_line.png?w=840&#038;ssl=1" alt="scale"/></p>
<h3>Expected Input/Output</h3>
<p><strong>User Input:</strong><br />
Enter an integer number<br />
-5<br />
<strong>Output:</strong><br />
Integer numbers from -1 to -5 are &#8230;<br />
-1<br />
-2<br />
-3<br />
-4<br />
-5</p>
<h3>Video Tutorial: C Program to Print Integer Numbers Till N</h3>
<p><center><br />
<iframe width="560" height="315" src="https://www.youtube.com/embed/K67VDa5iLLI?si=1tsCCNZ43dAnO7y4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=K67VDa5iLLI&amp;fmt=22">https://www.youtube.com/watch?v=K67VDa5iLLI</a> [Watch the Video In Full Screen.]</div>
<h3>Source Code: C Program to Print Integer Numbers Till N: using For loop</h3>
<pre name="code" class="c">#include&lt;stdio.h&gt;

int main()
{
    int num, i;

    printf("Enter an integer number\n");
    scanf("%d", &amp;num);

    if(num &lt; 0)
    {
        printf("Integer numbers from -1 to %d are ...\n", num);
        for(i = -1; i &gt;= num; i--)
            printf("%d\n", i);
    }
    else if(num &gt; 0)
    {
        printf("Integer numbers from 1 to %d are ...\n", num);
        for(i = 1; i &lt;= num; i++)
            printf("%d\n", i);
    }
    else
    {
        printf("You entered zero!\n");
    }

    printf("\n");

    return 0;
}
</pre>
<p><strong>Output 1:</strong><br />
Enter an integer number<br />
0<br />
You entered zero!</p>
<p><strong>Output 2:</strong><br />
Enter an integer number<br />
5<br />
Integer numbers from 1 to 5 are &#8230;<br />
1<br />
2<br />
3<br />
4<br />
5<br />
<strong>Output 3:</strong><br />
Enter an integer number<br />
-5<br />
Integer numbers from -1 to -5 are &#8230;<br />
-1<br />
-2<br />
-3<br />
-4<br />
-5</p>
<h3>Logic To Print Integer Numbers Till N: using For loop</h3>
<p>For a integer number input there are 3 possible cases: Either user can input positive number, negative number or a zero. So we cover all these 3 possibilities in our program.</p>
<p>If user enters a number less than 0, then its a negative number. So we initialize i value to -1(which is the biggest negative number), and iterate the for loop until i is greater than or equal to the user entered number. For each iteration we reduce the value of i by 1. Inside for loop, we print the value of i.</p>
<p>If user entered number is greater than 0, then its a positive number. So we initialize i value to 1(smallest positive number), and iterate the for loop until i is less than or equal to user entered number, and for each iteration we increment the value of i by 1. Inside for loop we print the value of i.</p>
<p>If user enter number is nether greater than 0 and nor less than zero, then the user input number must be 0. In that case, we simply output the message that &#8211; user entered zero!</p>
<p><strong>Note:</strong><br />
1. When user inputs a negative number, it&#8217;ll always be smaller than or equal to -1.<br />
2. When user inputs a positive number, it&#8217;ll always be greater than or equal to 1.</p>
<h3>Source Code: C Program to Print Integer Numbers Till N: using while loop</h3>
<pre name="code" class="c">#include&lt;stdio.h&gt;

int main()
{
    int num, count;

    printf("Enter a integer number\n");
    scanf("%d", &amp;num);

    if(num &lt; 0)
    {
        count = -1;
        printf("Integer numbers from -1 to %d are ...\n", num);
        while(count &gt;= num)
        {
            printf("%d\t", count);
            count--;
        }
    }
    else if(num &gt; 0)
    {
        count = 1;
        printf("Integer numbers from 1 to %d are ...\n", num);
        while(count &lt;= num)
        {
            printf("%d\t", count);
            count++;
        }
    }
    else
    {
        printf("You entered zero!\n");
    }

    printf("\n");

    return 0;
}
</pre>
<h3>Logic To Print Integer Numbers Till N: using While loop</h3>
<p><strong>1. For negative value input:</strong> We initialize count value to -1, as its the biggest negative number. In while loop condition we check if user input number is less than or equal to value of count(-1), if true, we print the value of count. And for each iteration we decrement the value of count by 1.</p>
<p><strong>2. For positive value input:</strong> We initialize count value to 1, as its the smallest positive number. In while loop condition we check if user input number is greater than or equal to value of count(1), if true, we print the value of count. And for each iteration we increment the value of count by 1.</p>
<p><strong>Note:</strong><br />
1. For negative value input, we initialize count value to -1, because we want to print from -1 till user input number.<br />
2. For positive value input, we initialize count value to 1, because we want to print from 1 till user input number.</p>
<p>For list of all c programming interviews / viva question and answers visit: <a href="https://technotip.com/6378/c-programming-interview-viva-qa-list/">C Programming Interview / Viva Q&amp;A List</a></p>
<p>For full C programming language free video tutorial list visit:<a href="https://technotip.com/6086/c-programming-beginner-to-advance-to-expert/">C Programming: Beginner To Advance To Expert</a></p>The post <a href="https://technotip.com/9471/c-program-to-print-integer-numbers-till-n/">C Program to Print Integer Numbers Till N</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:<ol>
<li><a href="https://technotip.com/9161/c-program-to-count-positive-negative-even-and-odd-numbers-in-an-array/" rel="bookmark" title="C Program To Count Positive, Negative, Even And Odd Numbers In An Array">C Program To Count Positive, Negative, Even And Odd Numbers In An Array</a></li>
<li><a href="https://technotip.com/6500/positive-or-negative-or-zero-using-ternary-operator-c-program/" rel="bookmark" title="Positive or Negative or Zero Using Ternary Operator: C Program">Positive or Negative or Zero Using Ternary Operator: C Program</a></li>
<li><a href="https://technotip.com/6827/c-program-to-print-natural-numbers-between-two-numbers-using-while-loop/" rel="bookmark" title="C Program to Print Natural Numbers Between Two Numbers using While loop">C Program to Print Natural Numbers Between Two Numbers using While loop</a></li>
</ol></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9471/c-program-to-print-integer-numbers-till-n/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9471</post-id>	</item>
		<item>
		<title>Prime Numbers using Sieve of Eratosthenes: C Program</title>
		<link>https://technotip.com/9436/prime-numbers-using-sieve-of-eratosthenes-c-program/</link>
					<comments>https://technotip.com/9436/prime-numbers-using-sieve-of-eratosthenes-c-program/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Mon, 09 Nov 2020 21:42:24 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C programming]]></category>
		<category><![CDATA[composite number]]></category>
		<category><![CDATA[math.h library file]]></category>
		<category><![CDATA[non-zero element]]></category>
		<category><![CDATA[Prime Number]]></category>
		<category><![CDATA[sieve of eratosthenes]]></category>
		<category><![CDATA[text book]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9436</guid>

					<description><![CDATA[<p>Implement in a c program the following procedure to generate prime numbers from 1 to 100. This procedure is called Sieve of Eratosthenes. Step 1: Fill an array num[100] with numbers from 1 to 100. Step 2: Starting with the second entry in the array, set all its multiples to zero. Step 3: Proceed to &#8230; <a href="https://technotip.com/9436/prime-numbers-using-sieve-of-eratosthenes-c-program/" class="more-link">Continue reading<span class="screen-reader-text"> "Prime Numbers using Sieve of Eratosthenes: C Program"</span></a></p>
The post <a href="https://technotip.com/9436/prime-numbers-using-sieve-of-eratosthenes-c-program/">Prime Numbers using Sieve of Eratosthenes: C Program</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://technotip.com/6934/c-program-to-find-prime-number-or-not-using-while-loop/" rel="bookmark" title="C Program To Find Prime Number or Not using While Loop">C Program To Find Prime Number or Not using While Loop</a></li>
<li><a href="https://technotip.com/6939/c-program-to-find-prime-numbers-from-2-to-n-using-while-loop/" rel="bookmark" title="C Program To Find Prime Numbers From 2 To N, using While Loop">C Program To Find Prime Numbers From 2 To N, using While Loop</a></li>
<li><a href="https://technotip.com/6947/c-program-to-find-prime-numbers-between-two-intervals-using-while-loop/" rel="bookmark" title="C Program To Find Prime Numbers Between Two Intervals, using While Loop">C Program To Find Prime Numbers Between Two Intervals, using While Loop</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Implement in a c program the following procedure to generate prime numbers from 1 to 100. This procedure is called <strong>Sieve of Eratosthenes</strong>.</p>
<p><strong>Step 1:</strong> Fill an array <strong>num[100]</strong> with numbers from 1 to 100.</p>
<p><strong>Step 2:</strong> Starting with the second entry in the array, set all its multiples to zero.</p>
<p><strong>Step 3:</strong> Proceed to the next non-zero element and set all its multiples to zero.</p>
<p><strong>Step 4:</strong> Repeat <strong>Step 3</strong> till you have set up the multiples of all the non-zero elements to zero.</p>
<p><strong>Step 5:</strong> At the conclusion of <strong>Step 4</strong>, all the non-zero entries left in the array would be prime numbers, so print out these numbers.</p>
<h3>Simpler Version of Sieve of Eratosthenes</h3>
<p>You can watch our previous video tutorial for simpler version of Sieve of Eratosthenes method to find prime numbers from 2 to N: <a href="https://technotip.com/9414/find-prime-numbers-from-2-to-n-using-sieve-of-eratosthenes-c-program/">Find Prime Numbers from 2 To N using Sieve of Eratosthenes: C Program</a>.</p>
<h3>Visual Representation</h3>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/C/arrays/prime-numbers-2-to-100-sieve-of-erathosthenes.png?w=840&#038;ssl=1" alt="prime numbers from 2 to 100 sieve of erathosthenes" title="prime numbers from 2 to 100 sieve of erathosthenes"/></p>
<h3>Video Tutorial: Prime Numbers using Sieve of Eratosthenes: C Program</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/oL9jzKm6uZQ?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=oL9jzKm6uZQ&amp;fmt=22">https://www.youtube.com/watch?v=oL9jzKm6uZQ</a> [Watch the Video In Full Screen.]</div>
<h3>Input num[N] with numbers 1 to 100</h3>
<p><i>Step 1:</i></p>
<pre name="code" class="c">#include&lt;stdio.h&gt;

#define N 100

int main()
{
    int num[N], i;

    for(i = 0; i &lt; N; i++)
        num[i] = i + 1;

    for(i = 0; i &lt; N; i++)
            printf("%d\t", num[i]);

    return 0;
}
</pre>
<p><strong>Output:</strong><br />
This code outputs natural numbers from 1 to 100.</p>
<p><strong>Note:</strong><br />
Array index starts from 0. So elements from index 0 to 99 will have 100 elements.</p>
<p>At index 0 we&#8217;ll store number 1, and at index 1 we&#8217;ll store number 2 and so on until index 99 where we store number 100. i.e., the index number is 1 less than the element/number present at that index.</p>
<h3>Starting with the second entry in the array, set all its multiples to zero.</h3>
<p><i>Step 2:</i></p>
<pre name="code" class="c">    int limit = sqrt(N);

    for(i = 1; i &lt;= limit; i++)
    {
        if(num[i] != 0)
        {
            for(j = pow(num[i], 2); j &lt;= N; j = j + num[i])
            {
                num[j - 1] = 0;
            }
        }

    }
</pre>
<p>Here we initialize i to second entry in the array, which has element 2(first prime number). Iterate the for loop until i is less than or equal to square root of N or you can even write (num[i] * num[i]) &lt;= N as the condition for outer for loop. We&#8217;ve shown the reason for writing that condition in our other video tutorial present here: <a href="https://technotip.com/9414/find-prime-numbers-from-2-to-n-using-sieve-of-eratosthenes-c-program/">Find Prime Numbers from 2 To N using Sieve of Eratosthenes: C Program</a>.</p>
<p><strong>Step 3:</strong> Proceed to the next non-zero element and set all its multiples to zero.</p>
<p>Inside inner for loop: for any non-zero element we check for their multiples and if we find any, we store 0 &#8211; indicating that it was a composite number.</p>
<p>We repeat <strong>Step 3</strong> till we have set up the multiples of all the non-zero elements to zero.</p>
<h3>Initialized j to pow(num[i], 2) ?</h3>
<p>Because the first number to be struck off by num[i] will be pow(num[i], 2) or (num[i] x num[i]). In other words, the first number or the first multiple of num[i] where our program will insert 0 is pow(num[i], 2) or (num[i] x num[i]).</p>
<p><strong>j = j + num[i]</strong><br />
It can also be written as <i>j += num[i]</i>. For each iteration of inner for loop, j value should increment by num[i] times, so that the position (j &#8211; 1) will have the multiple of number present at num[i]. In that case num[j &#8211; 1] will be multiple of num[i], and hence composite number &#8211; so we store 0 at num[j &#8211; 1].</p>
<p><strong>Step 5: Print Prime Numbers</strong><br />
Finally all the non-zero numbers/elements are prime numbers.</p>
<h3>Source Code: Prime Numbers using Sieve of Eratosthenes: C Program</h3>
<p><i>using math.h library file</i></p>
<pre name="code" class="c">#include&lt;stdio.h&gt;
#include&lt;math.h&gt;

#define N 100

int main()
{
    int num[N], i, j;
    int limit = sqrt(N);

    for(i = 0; i &lt; N; i++)
        num[i] = i + 1;

    for(i = 1; i &lt;= limit; i++)
    {
        if(num[i] != 0)
        {
            for(j = pow(num[i], 2); j &lt;= N; j = j + num[i])
            {
                num[j - 1] = 0;
            }
        }

    }

    printf("Sieve of Eratosthenes Method\n");
    printf("To find Prime numbers from 2 to %d\n\n", N);
    for(i = 1; i &lt; N; i++)
    {
        if(num[i] != 0)
            printf("%d\t", num[i]);
    }

    printf("\n");

    return 0;
}
</pre>
<p><strong>Output</strong><br />
This outputs all the prime numbers from 2 to 100.</p>
<h3>Source Code: Without using math.h library file</h3>
<pre name="code" class="c">#include&lt;stdio.h&gt;

#define N 100

int main()
{
    int num[N], i, j;

    for(i = 0; i &lt; N; i++)
        num[i] = i + 1;

    for(i = 1; (num[i] * num[i]) &lt;= N; i++)
    {
        if(num[i] != 0)
        {
            for(j = num[i] * num[i]; j &lt;= N; j += num[i])
            {
                num[j - 1] = 0;
            }
        }

    }

    printf("Sieve of Eratosthenes Method\n");
    printf("To find Prime numbers from 2 to %d\n\n", N);
    for(i = 1; i &lt; N; i++)
    {
        if(num[i] != 0)
            printf("%d\t", num[i]);
    }

    printf("\n");

    return 0;
}
</pre>
<p><strong>Output</strong><br />
This outputs all the prime numbers from 2 to 100.</p>
<p>For list of all c programming interviews / viva question and answers visit: <a href="https://technotip.com/6378/c-programming-interview-viva-qa-list/">C Programming Interview / Viva Q&amp;A List</a></p>
<p>For full C programming language free video tutorial list visit:<a href="https://technotip.com/6086/c-programming-beginner-to-advance-to-expert/">C Programming: Beginner To Advance To Expert</a></p>The post <a href="https://technotip.com/9436/prime-numbers-using-sieve-of-eratosthenes-c-program/">Prime Numbers using Sieve of Eratosthenes: C Program</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:<ol>
<li><a href="https://technotip.com/6934/c-program-to-find-prime-number-or-not-using-while-loop/" rel="bookmark" title="C Program To Find Prime Number or Not using While Loop">C Program To Find Prime Number or Not using While Loop</a></li>
<li><a href="https://technotip.com/6939/c-program-to-find-prime-numbers-from-2-to-n-using-while-loop/" rel="bookmark" title="C Program To Find Prime Numbers From 2 To N, using While Loop">C Program To Find Prime Numbers From 2 To N, using While Loop</a></li>
<li><a href="https://technotip.com/6947/c-program-to-find-prime-numbers-between-two-intervals-using-while-loop/" rel="bookmark" title="C Program To Find Prime Numbers Between Two Intervals, using While Loop">C Program To Find Prime Numbers Between Two Intervals, using While Loop</a></li>
</ol></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9436/prime-numbers-using-sieve-of-eratosthenes-c-program/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9436</post-id>	</item>
		<item>
		<title>Find Prime Numbers from 2 To N using Sieve of Eratosthenes: C Program</title>
		<link>https://technotip.com/9414/find-prime-numbers-from-2-to-n-using-sieve-of-eratosthenes-c-program/</link>
					<comments>https://technotip.com/9414/find-prime-numbers-from-2-to-n-using-sieve-of-eratosthenes-c-program/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 22:27:33 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[composite number]]></category>
		<category><![CDATA[designated initializers]]></category>
		<category><![CDATA[Eratosthenes]]></category>
		<category><![CDATA[index position]]></category>
		<category><![CDATA[prime numbers]]></category>
		<category><![CDATA[Sieve]]></category>
		<category><![CDATA[sieve of eratosthenes]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9414</guid>

					<description><![CDATA[<p>Lets write a C program to find prime numbers from 2 to N, using Sieve of Eratosthenes method. Important Note We are working on index numbers here. Array elements will have only 2 values: 1 or 0. Wherever the value of array element is 1, that means it&#8217;s position/index number is prime orelse its composite &#8230; <a href="https://technotip.com/9414/find-prime-numbers-from-2-to-n-using-sieve-of-eratosthenes-c-program/" class="more-link">Continue reading<span class="screen-reader-text"> "Find Prime Numbers from 2 To N using Sieve of Eratosthenes: C Program"</span></a></p>
The post <a href="https://technotip.com/9414/find-prime-numbers-from-2-to-n-using-sieve-of-eratosthenes-c-program/">Find Prime Numbers from 2 To N using Sieve of Eratosthenes: C Program</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-related-none yarpp-template-list'>

No related posts.
</div>
]]></description>
										<content:encoded><![CDATA[<p>Lets write a C program to find prime numbers from 2 to N, using Sieve of Eratosthenes method.</p>
<h3>Important Note</h3>
<p>We are working on index numbers here. Array elements will have only 2 values: 1 or 0. Wherever the value of array element is 1, that means it&#8217;s position/index number is prime orelse its composite number.</p>
<h3>Working on array elements</h3>
<p>This video tutorial solves text book problem statement to find prime numbers using Sieve of Eratosthenes Method: <a href="https://technotip.com/9436/prime-numbers-using-sieve-of-eratosthenes-c-program/">Prime Numbers using Sieve of Eratosthenes: C Program</a>.</p>
<h3>Visual Representation</h3>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/C/arrays/prime-numbers-2-to-100-sieve-of-erathosthenes.png?w=840&#038;ssl=1" alt="prime numbers from 2 to 100 sieve of erathosthenes" title="prime numbers from 2 to 100 sieve of erathosthenes"/></p>
<h3>Video Tutorial: Sieve of Eratosthenes Method To Find Prime Numbers: C Program</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/rb5bClbN3o8?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=rb5bClbN3o8&amp;fmt=22">https://www.youtube.com/watch?v=rb5bClbN3o8</a> [Watch the Video In Full Screen.]</div>
<h3>Source Code: Find Prime Numbers from 2 To N using Sieve of Eratosthenes: C Program</h3>
<pre name="code" class="c">#include&lt;stdio.h&gt;
#include&lt;math.h&gt;

#define N 101

int main()
{
    int a[N] = {[0 ... N - 1] = 1}, i, j;
    int num  = sqrt(N - 1);

    for(i = 2; i &lt;= num; i++)
    {
        if(a[i] == 1)
        {
            for(j = i * i; j &lt; N; j += i)
                a[j] = 0;
        }
    }

    printf("Sieve of Eratosthenes\n");
    printf("Prime numbers from 2 to %d are ...\n", N - 1);
    for(i = 2; i &lt; N; i++)
    {
        if(a[i])
            printf("%d\t", i);
    }

    return 0;
}
</pre>
<p><strong>Output</strong><br />
Above code outputs all the prime numbers between 2 to N &#8211; 1.</p>
<h3>Logic To Find Prime Numbers from 2 To N using Sieve of Eratosthenes</h3>
<p><strong>1.</strong> We&#8217;re using <a href="https://technotip.com/8767/designated-initializers-in-array-c-program/">Designated Initializers</a> to initialize all the elements of array to 1. Here we are initializing all the elements from index 0 to N &#8211; 1. If you write 0 to N, it&#8217;ll start throwing <i>out of bounds</i> error. As 0 to 101(if N value is 101) will be 102 elements, which exceeds the size of array.</p>
<p><strong>2.</strong> Next we find square root of N &#8211; 1. Its enough to check till square root of N &#8211; 1, to get all the prime numbers &#8211; I&#8217;ve shown you the proof in the video posted above in this article.</p>
<p><strong>3.</strong> Since 2 is the first prime number, we initialize i to 2 and we iterate the for loop till square root of N &#8211; 1. For each iteration increment the value of i by 1.</p>
<p><strong>4.</strong> Initially we assume that all the numbers are prime, by storing 1 in all the array elements.</p>
<p><strong>5.</strong> After careful observation, we come to know that the first index position we store zero for any index i is i * i. So we initialize j value to i * i. For each iteration of the inner for loop we increment the value of j by i times. Inside inner for loop we store 0 at a[j].</p>
<p>If we keep adding value of i to the previous value of j, then j will always have a number which is multiple of i. So we store 0 at a[j].</p>
<p><strong>6.</strong> We keep repeating Step 5 until i is less than or equal to square root of N &#8211; 1.</p>
<p><strong>7.</strong> Once i is equal to square root of N &#8211; 1, we print all the index numbers or position of element which has 1 in it. So these index numbers are prime numbers from 2 to N &#8211; 1.</p>
<p>For list of all c programming interviews / viva question and answers visit: <a href="https://technotip.com/6378/c-programming-interview-viva-qa-list/">C Programming Interview / Viva Q&amp;A List</a></p>
<p>For full C programming language free video tutorial list visit:<a href="https://technotip.com/6086/c-programming-beginner-to-advance-to-expert/">C Programming: Beginner To Advance To Expert</a></p>The post <a href="https://technotip.com/9414/find-prime-numbers-from-2-to-n-using-sieve-of-eratosthenes-c-program/">Find Prime Numbers from 2 To N using Sieve of Eratosthenes: C Program</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-related-none yarpp-template-list'>
<p>No related posts.</p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9414/find-prime-numbers-from-2-to-n-using-sieve-of-eratosthenes-c-program/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9414</post-id>	</item>
		<item>
		<title>Verify The Transaction on Mainnet: XUMM SDK</title>
		<link>https://technotip.com/9377/verify-the-transaction-on-mainnet-xumm-sdk/</link>
					<comments>https://technotip.com/9377/verify-the-transaction-on-mainnet-xumm-sdk/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 14:08:14 +0000</pubDate>
				<category><![CDATA[XRPL]]></category>
		<category><![CDATA[exchange rate slippage]]></category>
		<category><![CDATA[Mainnet]]></category>
		<category><![CDATA[npm package]]></category>
		<category><![CDATA[Partial Payment]]></category>
		<category><![CDATA[Payload]]></category>
		<category><![CDATA[testnet]]></category>
		<category><![CDATA[Verification]]></category>
		<category><![CDATA[XRP ledger network]]></category>
		<category><![CDATA[xrpl-txdata]]></category>
		<category><![CDATA[XUMM API]]></category>
		<category><![CDATA[XUMM APP]]></category>
		<category><![CDATA[XUMM Platform]]></category>
		<category><![CDATA[XUMM SDK]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9377</guid>

					<description><![CDATA[<p>Once payload is signed and a valid transaction is made, it is crucial to check for the transaction on main/live XRP ledger network. For this we will be making use of a npm package: xrpl-txdata Installing xrpl-txdata npm install xrpl-txdata Once this package is installed on your system, you can verify the transaction on live &#8230; <a href="https://technotip.com/9377/verify-the-transaction-on-mainnet-xumm-sdk/" class="more-link">Continue reading<span class="screen-reader-text"> "Verify The Transaction on Mainnet: XUMM SDK"</span></a></p>
The post <a href="https://technotip.com/9377/verify-the-transaction-on-mainnet-xumm-sdk/">Verify The Transaction on Mainnet: XUMM SDK</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9358/your-first-payload-xumm-sdk/" rel="bookmark" title="Your First Payload: XUMM SDK">Your First Payload: XUMM SDK</a></li>
<li><a href="https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/" rel="bookmark" title="Send Sign Request As Push Notification: XUMM SDK">Send Sign Request As Push Notification: XUMM SDK</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Once payload is signed and a valid transaction is made, it is crucial to check for the transaction on main/live XRP ledger network.</p>
<p>For this we will be making use of a npm package: <i>xrpl-txdata</i></p>
<h3>Installing xrpl-txdata</h3>
<pre name="code" class="js">npm install xrpl-txdata</pre>
<p>Once this package is installed on your system, you can verify the transaction on live XRP ledger locally. &#8220;Locally&#8221; because the <a href="https://www.npmjs.com/package/xrpl-txdata">xrpl-txdata package</a> will be installed locally on your machine.</p>
<h3>Video Tutorial: Verify The Transaction on Mainnet: XUMM SDK</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe loading="lazy" class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/kkGFMiX8bCY?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=kkGFMiX8bCY&amp;fmt=22">https://www.youtube.com/watch?v=kkGFMiX8bCY</a> [Watch the Video In Full Screen.]</div>
<h3>Why do we need to verify transaction on main XRP Ledger?</h3>
<p><strong>1.</strong> The end user signed the request successfully in XUMM, but with a key that is no longer valid for a certain account (because multisign has been configured, an account has been rekeyed, etc.)</p>
<p><strong>2.</strong> The user sent a Partial Payment (e.g., sending EUR to deliver XRP, while the owned amount of EUR was insufficient due to exchange rate slippage).</p>
<p><strong>3.</strong> The user tried to trick you into accepting a testnet payment, by signing with a funded Testnet account.</p>
<h3>Source Code: Verify The Transaction on Mainnet: XUMM SDK</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')
const {TxData}  = require('xrpl-txdata')

const Sdk       = new XummSdk('xumm-app-id', 'xumm-app-secret')
const Verify    = new TxData()

const main      = async() =&gt; {
    
      const request = {
        "txjson": {
            "TransactionType": "Payment",
            "Destination": "rwietsevLFg8XSmG3bEZzFein1g8RBqWDZ",
            "Amount": "1000000"
        },
        "user_token": "343a2f1e-8160-4984-a0f0-208086509617"
      }

      const subscription = await Sdk.payload.createAndSubscribe(request, event =&gt; {
          //console.log('New payload event',event.data)

          if(Object.keys(event.data).indexOf('signed') &gt; -1)
          {
              return event.data
          }
      }) 
      console.log('sign request URL',subscription.created.next.always)
      console.log('Pushed ',subscription.created.pushed ? 'Yes' : 'No')

      const resolveData = await subscription.resolved
      if(resolveData.signed == false)
      {
          console.log('The sign request was rejected!')
      }
      else
      {
        console.log('The sign request was Signed!!')
        const result = await Sdk.payload.get(resolveData.payload_uuidv4)
        const VerifiedResult = await Verify.getOne(result.response.txid)
        console.log('On ledger Balance ',VerifiedResult.balanceChanges)
      }
}
main()
</pre>
<p><strong>Output of above code</strong></p>
<pre name="code" class="js">sign request URL https://xumm.app/sign/b51bda5e-ebfe-48fe-b7ba-75797147c837
Pushed  Yes

On ledger Balance {
 rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT : [{counterparty: '', currency: 'XRP', value: '-1.000012'}],
 rwietsevLFg8XSmG3bEZzFein1g8RBqWDZ : [{counterparty: '', currency: 'XRP', value: '1'}]
}
</pre>
<p>We are interested in On ledger Balance output. Here the first address is that of sender and the second address is that of receiver. So in this transaction 1.000012 XRP was sent by the end user and 0.000012 XRP was the network fee. Also note that the transaction fee will not be distributed to miners in XRPL, but instead it gets burnt permanently, reducing the over all supply of XRP.</p>
<h3>Transaction verification Code Explained</h3>
<p>We import <i>xrpl-txdata</i> package into our nodejs application, using require keyword. Next we create an instance of it called <i>Verify</i>.<br />
Once the sign request is signed we get the transaction ID. i.e., we get the transaction ID only when the transaction is done.</p>
<p>So once we programmatically know that the transaction is made(by looking into <i>signed: true</i> key value in the output), we check the transaction on main/live XRP ledger, using following code:</p>
<pre name="code" class="js">        console.log('The sign request was Signed!!')
        const result = await Sdk.payload.get(resolveData.payload_uuidv4)
        const VerifiedResult = await Verify.getOne(result.response.txid)
        console.log('On ledger Balance ',VerifiedResult.balanceChanges)
</pre>
<p>The instance <i>Verify</i> has a method called <i>getOne()</i> which checks the transaction on live XRP ledger, if we provide it with the transaction ID.</p>
<h3>Switching from Testnet to Mainnet inside XUMM App</h3>
<p>Open XUMM app present in your mobile phone. Navigate to <i>Settings</i> tab. Go to <i>Advanced</i> section. Then click on <i>Node</i> under the label <strong>XRP Ledger node and Explorer</strong>. Here you can switch between Main net and Test net. These are Main XRP ledger network and Test XRP ledger networks.</p>
<h3>xrpl-txdata checks only against live XRP Ledger</h3>
<p>Since <i>xrpl-txdata</i> checks only against live/main XRP ledger network, if you&#8217;re using testnet to send payments, it&#8217;ll throw error message that the transaction is not found on the main XRPL network &#8211; as your transactions will be present on test XRPL network and not on main/live XRPL network.</p>
<h3>That&#8217;s it! You made it</h3>
<p>If you&#8217;re this far into learning about XUMM SDK and working with XRP Ledger, then you might consider building some app, even if it&#8217;s just a hobby project.</p>
<p>For full &#8220;XUMM SDK/API&#8221; free video tutorial list visit: <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/">Working With XUMM SDK/API: XRPL</a></p>The post <a href="https://technotip.com/9377/verify-the-transaction-on-mainnet-xumm-sdk/">Verify The Transaction on Mainnet: XUMM SDK</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9358/your-first-payload-xumm-sdk/" rel="bookmark" title="Your First Payload: XUMM SDK">Your First Payload: XUMM SDK</a></li>
<li><a href="https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/" rel="bookmark" title="Send Sign Request As Push Notification: XUMM SDK">Send Sign Request As Push Notification: XUMM SDK</a></li>
</ol></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9377/verify-the-transaction-on-mainnet-xumm-sdk/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9377</post-id>	</item>
		<item>
		<title>Send Sign Request As Push Notification: XUMM SDK</title>
		<link>https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/</link>
					<comments>https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 14:04:37 +0000</pubDate>
				<category><![CDATA[XRPL]]></category>
		<category><![CDATA[createAndSubscribe]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[payments]]></category>
		<category><![CDATA[push notification]]></category>
		<category><![CDATA[QR Code]]></category>
		<category><![CDATA[sign request]]></category>
		<category><![CDATA[user_token]]></category>
		<category><![CDATA[XRPL specific]]></category>
		<category><![CDATA[XUMM API]]></category>
		<category><![CDATA[XUMM APP]]></category>
		<category><![CDATA[XUMM Platform]]></category>
		<category><![CDATA[XUMM SDK]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9370</guid>

					<description><![CDATA[<p>You have sent your first Payload request and also signed and/or rejected the sign request, by scanning the QR code. Now lets see how we can get user specific user token and start sending sign request as push notification to the end user. Payload using create() method const {XummSdk} = require('xumm-sdk') const Sdk = new &#8230; <a href="https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/" class="more-link">Continue reading<span class="screen-reader-text"> "Send Sign Request As Push Notification: XUMM SDK"</span></a></p>
The post <a href="https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/">Send Sign Request As Push Notification: XUMM SDK</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9358/your-first-payload-xumm-sdk/" rel="bookmark" title="Your First Payload: XUMM SDK">Your First Payload: XUMM SDK</a></li>
<li><a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/" rel="bookmark" title="Prepare Your Project &#038; Start Coding: XUMM SDK">Prepare Your Project &#038; Start Coding: XUMM SDK</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>You have sent your <a href="https://technotip.com/9358/your-first-payload-xumm-sdk/">first Payload request</a> and also signed and/or rejected the sign request, by scanning the QR code. Now lets see how we can get user specific <i>user token</i> and start sending <i>sign request</i> as <i>push notification</i> to the end user.</p>
<h3>Payload using create() method</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')
const Sdk = new XummSdk('xumm-app-id', 'xumm-app-secret')

const main = async () =&gt; {
  const request = {
    "TransactionType": "Payment",
    "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT",
    "Amount": "1000000"
  }

  const payload = await Sdk.payload.create(request, true)
  console.log(payload)
}
main()
</pre>
<p>Above code is from our previous video tutorial where we sent our <a href="https://technotip.com/9358/your-first-payload-xumm-sdk/">first payload using create method</a>.</p>
<h3>Video Tutorial: Send Sign Request As Push Notification: XUMM SDK</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe loading="lazy" class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/4Wxcz0jvA9A?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=4Wxcz0jvA9A&amp;fmt=22">https://www.youtube.com/watch?v=4Wxcz0jvA9A</a> [Watch the Video In Full Screen.]</div>
<h3>Payload using createAndSubscribe() method</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')
const Sdk = new XummSdk('xumm-app-id', 'xumm-app-secret')

const main = async () =&gt; {
  const request = {
    "TransactionType": "Payment",
    "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT",
    "Amount": "1000000"
  }

  const subscription = await Sdk.payload.createAndSubscribe(request, event =&gt; {
      console.log('New payload event',event.data)
  })
  console.log('sign request URL',subscription.created.next.always)
  console.log('Pushed ',subscription.created.pushed)
}

main()
</pre>
<p>Here we use createAndSubscribe() method instead of create() method. createAndSubscribe() also takes 2 arguments. The first argument is the payload information and the second argument is method/function that gets invoked every time the XUMM platform asynchronously sends an update about the created payload.</p>
<h3>Running The Application</h3>
<p>We issue the command <i>node index.js</i> to run our application and we get the following output:</p>
<pre name="code" class="js">sign request URL https://xumm.app/sign/e917182a-b64f-474d-ab24-8792d6b0ca6c
Pushed  false
New payload event { message: 'Welcome e917182a-b64f-474d-ab24-8792d6b0ca6c' }
New payload event { expires_in_seconds: 86399 }
New payload event { expires_in_seconds: 86384 }
</pre>
<p>Since main() is a asynchronous method and a child thread keeps waiting for Sdk.payload.createAndSubscribe() method to be resolved(it gets resolved once end user either signs or rejects the sign request, or when the payload expires). If we want to exit the waiting and kill the child process &#8211; get on the output terminal and press CTRL + C buttons(on windows PC).</p>
<p>The constant subscription(from above code) has information regarding the payload, payload status, signing URL, QR code information etc. Sdk.payload.createAndSubscribe() second argument keeps updating the payload status like expiration time until the user performs some action on the sign request. If user doesn&#8217;t perform any action until the payload gets expired, then the payload information gets expired and will be removed from the XUMM platform.</p>
<h3>Once Payload is Resolved</h3>
<p>Once user opens the QR code present on sign request URL(check above code output), scans it and signs or rejects the sign request, the method in seconds argument of Sdk.payload.createAndSubscribe() gets triggered and sends the updated status of the sign request.</p>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')
const Sdk = new XummSdk('xumm-app-id', 'xumm-app-secret')

const main = async () =&gt; {
  const request = {
    "TransactionType": "Payment",
    "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT",
    "Amount": "1000000"
  }

  const subscription = await Sdk.payload.createAndSubscribe(request, event =&gt; {
          console.log('New payload event',event.data)
          if(Object.keys(event.data).indexOf('signed') &gt; -1)
          {
              return event.data
          }
  })
  console.log('sign request URL',subscription.created.next.always)
  console.log('Pushed ',subscription.created.pushed)
}

main()
</pre>
<p>The <i>Object.keys</i> you see in above code is standard Javascript code. When we pass an object to it, and chain indexOf() method and pass the key name to indexOf() method, it returns the index position of that key in the object. Index starts from 0. So it returns the <i>event.data</i> if and when the user interacts with the payload QR code and either signs or rejects the payload. Until user performs some action with the generated payload, <i>event.data</i> will not have the key <i>signed</i> in its output.</p>
<p><strong>Lets execute above code</strong><br />
We issue the command <i>node index.js</i> to run our application and we get the following output:</p>
<pre name="code" class="js">sign request URL https://xumm.app/sign/e917182a-b64f-474d-ab24-8792d6b0ca6c
Pushed  false
New payload event { message: 'Welcome e917182a-b64f-474d-ab24-8792d6b0ca6c' }
New payload event { expires_in_seconds: 86399 }
New payload event { expires_in_seconds: 86384 }
</pre>
<p>Copy the sign request URL from above output and past it in a browser and open your XUMM app in your phone, scan the QR code and sign or reject the sign request and look out for the status change.</p>
<p><strong>Output when the sign request gets rejected</strong></p>
<pre name="code" class="js">sign request URL https://xumm.app/sign/972d25fe-413a-48a3-8935-dd95c6cdf8ef
Pushed  false
New payload event { message: 'Welcome 972d25fe-413a-48a3-8935-dd95c6cdf8ef' }
New payload event { expires_in_seconds: 86399 }
New payload event { expires_in_seconds: 86384 }
New payload event { opened: true }
New payload event {
  payload_uuidv4: '972d25fe-413a-48a3-8935-dd95c6cdf8ef',
  reference_call_uuidv4: 'd81ae124-527d-40b6-ad38-c272f9b71134',  
  signed: false,
  user_token: true,
  return_url: { app: null, web: null },
  opened_by_deeplink: false,
  custom_meta: { identifier: null, blob: null, instruction: null }
}
</pre>
<p>As you can see in the output above, the payload event status shows when the user opened his/her XUMM app and scanned the QR code { opened: true }. In above case the end user has rejected the sign request, so the <i>signed</i> key has a value of <i>false</i>. The key <i>opened_by_deeplink</i> is new and is implemented in XUMM SDK 0.2.2 to further improve user flows &#8211; its value is <i>null</i> if unopened, <i>true</i> if opened using a mobile deeplink/push, <i>false</i> if QR scan opened. Technically it is present to let the developer know whether the sign request was opened from a deeplink URL or not.</p>
<p><strong>Output when the sign request is signed</strong></p>
<pre name="code" class="js">sign request URL https://xumm.app/sign/848ff099-4161-4911-a024-d27c15e87f62
Pushed  false
New payload event { message: 'Welcome 848ff099-4161-4911-a024-d27c15e87f62' }
New payload event { expires_in_seconds: 86399 }
New payload event { opened: true }
New payload event { expires_in_seconds: 86384 }
New payload event {
  payload_uuidv4: '848ff099-4161-4911-a024-d27c15e87f62',
  reference_call_uuidv4: 'bc98f5b6-d960-41a3-884a-3c9dced5b0e2',  
  signed: true,
  user_token: true,
  return_url: { app: null, web: null },
  opened_by_deeplink: false,
  custom_meta: { identifier: null, blob: null, instruction: null }
}
</pre>
<p>As you can see from above output, the value of <i>signed</i> is <i>true</i>. That means end user has successfully signed the sign request. Now we take the <i>payload_uuidv4</i> value and fetch the <i>user token</i> from it.</p>
<h3>Fetching user_token from payload_uuidv4</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')
const Sdk = new XummSdk('xumm-app-id', 'xumm-app-secret')

const main = async () =&gt; {
  const request = {
    "TransactionType": "Payment",
    "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT",
    "Amount": "1000000"
  }

  const subscription = await Sdk.payload.createAndSubscribe(request, event =&gt; {
          // console.log('New payload event',event.data)
          if(Object.keys(event.data).indexOf('signed') &gt; -1)
          {
              return event.data
          }
  })
      console.log('sign request URL',subscription.created.next.always)
      console.log('Pushed ',subscription.created.pushed ? 'Yes' : 'No')

      const resolveData = await subscription.resolved
      if(resolveData.signed == false)
      {
          console.log('The sign request was rejected!')
      }
      else
      {
        console.log('The sign request was Signed!!')
        const result = await Sdk.payload.get(resolveData.payload_uuidv4)
        console.log('User_token: ',result.application)
      }
}

main()
</pre>
<p>We take another constant and await for <i>subscription</i> to be resolved. Once the end user signs the sign request we pass the <i>resolveData.payload_uuidv4</i> information to Sdk.payload.get() which outputs a lot of json results. In that we pick up the <i>user_token</i> present under <i>result.application</i> as value for key <i>issued_user_token</i>.</p>
<p><strong>Output of above code:</strong></p>
<pre name="code" class="js">sign request URL https://xumm.app/sign/da54ac54-549f-42d2-a239-8ae6086eafbd
Pushed  No
New payload event { message: 'Welcome da54ac54-549f-42d2-a239-8ae6086eafbd' }
New payload event { expires_in_seconds: 86397 }
New payload event { opened: true }
New payload event { expires_in_seconds: 86382 }
The sign request was Signed!!
User_token: {
    name: 'My Super Duper App!',
    description: 'Demo App To Show New SDK Features',
    disabled: 0,
    uuidv4: '401015ee-7edc-4469-bdfd-3af11f229885',
    icon_url: 'https://xumm-cdn.imgix.net/app-logo/2a14d2f7-d0a8-432a-a40f-b45eddb70fc4.png',
    issued_user_token: '343a2f1e-8160-4984-a0f0-208086509617'
  }
</pre>
<p>In this we are interested in <i>issued_user_token</i>, which will be used to send push notifications to end user. To pick it up we write <i>result.application.issued_user_token</i> and store it inside the database.</p>
<h3>Sending sign request as Push Notification</h3>
<p>The <i>user_token</i> is a unique token for <a href="https://technotip.com/9335/get-your-xumm-api-credentials/">your XUMM app</a> in combination with the specific XUMM user. To use the token to deliver a sign requst per Push notification, let&#8217;s adjust our first (minimal) sample payload or the &#8216;transaction template&#8217; to include the user token:<br />
<strong>This payload is XRPL specific</strong></p>
<pre name="code" class="js">const request = {
    "TransactionType": "Payment",
    "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT",
    "Amount": "10000",
  }
</pre>
<p>Now lets add <i>user_token</i> information to it.</p>
<pre name="code" class="js">{
  "txjson": {
    "TransactionType": "Payment",
    "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT",
    "Amount": "10000"
  },
  "user_token": "343a2f1e-8160-4984-a0f0-208086509617"
}
</pre>
<p>As you can see from above code, all the XRP Ledger specific payload information has been moved into a separate block under key <i>txjson</i>. All the other information outside of object <i>txjson</i> is specific to XUMM platform. Other <a href="https://xumm.readme.io/reference/post-payload">XUMM platform specific</a> information are: options, custom_meta and the user_token etc.</p>
<h3>Stage is set to send sign request as Push Notification</h3>
<p>Now lets use the <i>user_token</i> we received from our previously signed payload and use that in our final source code. Once you execute this final source code, the end user(user identified by user_token) will receive the sign request as push notification. Exciting!!</p>
<h3>Source Code: To Send Sign Request As Push Notification: XUMM SDK</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')
const {Txdata, TxData}  = require('xrpl-txdata')

const Sdk       = new XummSdk('401015ee-7edc-4469-bdfd-3af11f229885', '267b909b-0374-450b-a05b-5df60bc1f57a')
const Verify    = new TxData()

const main      = async() =&gt; {
    
      const request = {
        "txjson": {
            "TransactionType": "Payment",
            "Destination": "rwietsevLFg8XSmG3bEZzFein1g8RBqWDZ",
            "Amount": "1000000"
        },
        "user_token": "343a2f1e-8160-4984-a0f0-208086509617"
      }

      const subscription = await Sdk.payload.createAndSubscribe(request, event =&gt; {
          if(Object.keys(event.data).indexOf('signed') &gt; -1)
          {
              return event.data
          }
      }) 
      console.log('sign request URL',subscription.created.next.always)
      console.log('Pushed ',subscription.created.pushed ? 'Yes' : 'No')

      const resolveData = await subscription.resolved
      if(resolveData.signed == false)
      {
          console.log('The sign request was rejected!')
      }
      else
      {
        console.log('The sign request was Signed!!')
        const result = await Sdk.payload.get(resolveData.payload_uuidv4)
        console.log('User_token: ',result.application.issued_user_token)
      }
}
main()
</pre>
<p><strong>Here is the push notification on my phone</strong><br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/xrpl/xumm-sign-request-as-push-notification.jpg?w=840&#038;ssl=1" alt="xumm sign request as push notification" title="xumm sign request as push notification"/></p>
<p>We can click on the push notification bubble or open the XUMM App directly on our phone and navigate to &#8220;Events&#8221; tab and open the new sign request there and choose to sign or reject the request.</p>
<p><strong>Output</strong><br />
The output of above source code will be same as we&#8217;ve posted previously for signing and rejecting the sign request. Now the only difference is, value of key <i>pushed</i> will be <i>true</i> as sign request was sent as push notification directly to the end users phone.</p>
<h3>Important Note</h3>
<p>Its best practice to check the value of key <i>pushed</i> in the output. If its <i>false</i>(maybe user revoked the permission), then its always good to show the user with the QR code to manually scan and make the payment. If value of <i>pushed</i> is false, that means the end user has not received the push notification.</p>
<p>For full &#8220;XUMM SDK/API&#8221; free video tutorial list visit: <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/">Working With XUMM SDK/API: XRPL</a></p>The post <a href="https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/">Send Sign Request As Push Notification: XUMM SDK</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9358/your-first-payload-xumm-sdk/" rel="bookmark" title="Your First Payload: XUMM SDK">Your First Payload: XUMM SDK</a></li>
<li><a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/" rel="bookmark" title="Prepare Your Project &#038; Start Coding: XUMM SDK">Prepare Your Project &#038; Start Coding: XUMM SDK</a></li>
</ol></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9370</post-id>	</item>
		<item>
		<title>Your First Payload: XUMM SDK</title>
		<link>https://technotip.com/9358/your-first-payload-xumm-sdk/</link>
					<comments>https://technotip.com/9358/your-first-payload-xumm-sdk/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 13:59:41 +0000</pubDate>
				<category><![CDATA[XRPL]]></category>
		<category><![CDATA[DEX]]></category>
		<category><![CDATA[Generating Memo]]></category>
		<category><![CDATA[Invoice]]></category>
		<category><![CDATA[Payload]]></category>
		<category><![CDATA[QR Code]]></category>
		<category><![CDATA[Transaction Template]]></category>
		<category><![CDATA[XRPL transaction specifications]]></category>
		<category><![CDATA[XUMM API]]></category>
		<category><![CDATA[XUMM APP]]></category>
		<category><![CDATA[XUMM SDK]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9358</guid>

					<description><![CDATA[<p>Once we establish connection to the XUMM platform using XUMM SDK, its time to actually learn about sending payload. Payload is nothing buy &#8220;transaction template&#8221;. What is a Payload or &#8220;Transaction Template&#8221;? Think of Payload or &#8220;Transaction Template&#8221; as invoice. The minimum things which an invoice should include are: 1. What kind of an invoice &#8230; <a href="https://technotip.com/9358/your-first-payload-xumm-sdk/" class="more-link">Continue reading<span class="screen-reader-text"> "Your First Payload: XUMM SDK"</span></a></p>
The post <a href="https://technotip.com/9358/your-first-payload-xumm-sdk/">Your First Payload: XUMM SDK</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9335/get-your-xumm-api-credentials/" rel="bookmark" title="Get your XUMM API Credentials">Get your XUMM API Credentials</a></li>
<li><a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/" rel="bookmark" title="Prepare Your Project &#038; Start Coding: XUMM SDK">Prepare Your Project &#038; Start Coding: XUMM SDK</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Once we establish connection to the XUMM platform using XUMM SDK, its time to actually learn about sending payload. Payload is nothing buy &#8220;transaction template&#8221;.</p>
<h3>What is a Payload or &#8220;Transaction Template&#8221;?</h3>
<p>Think of Payload or &#8220;Transaction Template&#8221; as invoice. The minimum things which an invoice should include are:<br />
<strong>1.</strong> What kind of an invoice it is.<br />
<strong>2.</strong> The destination address for payment.</p>
<p>We could even leave the amounts section empty assuming that the client will fill it.</p>
<h3>Simple Transaction Template</h3>
<pre name="code" class="js">{
  "TransactionType": "Payment",
  "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT"
}
</pre>
<p>This is the bare minimal Payload or Transaction template we can write. It has transaction type and destination address(XRP address). The keywords &#8220;TransactionType&#8221;: &#8220;Payment&#8221; and &#8220;Destination&#8221; should be formatted as per <a href="https://xrpl.org/transaction-types.html">XRP ledger transaction specifications</a>.</p>
<p>If we don&#8217;t mention amount in our payload, end user can edit and enter the amount himself or herself after opening the payload request using their XUMM App. If we mention the amount in payload or transaction template, then he or she will not be able to edit it while signing.</p>
<p>Signing simply means authorizing the payment request. Or authorizing the sign request.</p>
<h3>Sample Transaction Template With More Information</h3>
<pre name="code" class="js">{
  "TransactionType": "Payment",
  "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT",
  "Amount": "1000000",
  "Memos": [
    {
      "Memo": {
        "MemoData": "F09F94A520546563686E6F7469702E636F6D"
      }
    }
  ]
}
</pre>
<p>Here we&#8217;ve explicitly mentioned the &#8220;Amount&#8221; which is 1 Million, which means 1 XRP. i.e., one XRP is one million Drops. And a Memo (HEX encoded string). TransactionType and Destination are mandatory fields, all other fields are optional.</p>
<h3>Generating Memo(HEX encoded string)</h3>
<pre name="code" class="js">const hex = Buffer.from('🔥 Technotip.com').toString('hex').toUpperCase()
console.log(hex)
</pre>
<p>Buffer is a nodejs packages built-in property, so you need not install any other packages once again.</p>
<h3>Video Tutorial: Your First Payload: XUMM SDK</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe loading="lazy" class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/RYAHzvUqM64?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=RYAHzvUqM64&amp;fmt=22">https://www.youtube.com/watch?v=RYAHzvUqM64</a> [Watch the Video In Full Screen.]</div>
<h3>Things To Keep In Mind While Sending Payload</h3>
<p><strong>1.</strong> A payload (sign request) sent to the XUMM platform should be formatted as per <a href="https://xrpl.org/transaction-types.html">XRP ledger transaction specifications</a>, but some fields may be omitted as XUMM will automatically fill them in if able to do so.</p>
<p><strong>2.</strong> Usually, a payload sent to the XUMM platform will be signed by the end user (e.g., for a sign in, subscription, payment, escrow creation etc). For this tutorial, you will be the initiator and the end user, either signing or rejecting your own payload.</p>
<p><strong>3.</strong> The first sign request from <a href="https://technotip.com/9335/get-your-xumm-api-credentials/">a specific XUMM app</a> will always have to be scanned using a QR code on the desktop. Once an end user trusts your application, by signing your sign request, your application can obtain a user specific <i>user token</i> to deliver future sign requests using push notification.</p>
<h3>Source Code: Complete Code To Send Payload</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')
const Sdk = new XummSdk('xumm-app-id', 'xumm-app-secret')

const main = async () =&gt; {
  const request = {
    "TransactionType": "Payment",
    "Destination": "rHdkzpxr3VfabJh9tUEDv7N4DJEsA4UioT",
    "Amount": "1000000",
    "Memos": [
      {
        "Memo": {
          "MemoData": "F09F94A520546563686E6F7469702E636F6D"
        }
      }
    ]
  }

  const payload = await Sdk.payload.create(request, true)
  console.log(payload)
}
main()
</pre>
<p>Here we are making use of Sdk.payload.create() method to generate sign request URL and QR code and other outputs. We pass 2 arguments to Sdk.payload.create(). First argument is the payload or the transaction template(in above code the constant by name request), and the second argument will be a flag (boolean, true) telling the code to return an error, if one occurs.</p>
<h3>Running The Application</h3>
<p>We issue the command <i>node index.js</i> to run our application and we get the following output:<br />
<i>payload</i></p>
<pre name="code" class="js">{
  uuid: '127287c3-bf55-40ee-b0ab-345f9edc8840',
  next: {
    always: 
'https://xumm.app/sign/127287c3-bf55-40ee-b0ab-345f9edc8840'
  },
  refs: {
    qr_png: 
'https://xumm.app/sign/127287c3-bf55-40ee-b0ab-345f9edc8840_q.png',    
    qr_matrix: 
'https://xumm.app/sign/127287c3-bf55-40ee-b0ab-345f9edc8840_q.json',
    qr_uri_quality_opts: [ 'm', 'q', 'h' ],
    websocket_status: 
'wss://xumm.app/sign/127287c3-bf55-40ee-b0ab-345f9edc8840'   
  },
  pushed: false
}
</pre>
<p>Your output will be different, and most part of this output will be unique. The output at payload.next.always is the sign request URL. payload.refs.qr_png is the QR code which has sign request information encoded. payload.pushed is false as this is the first time we are sending payload to the end user and we do not yet have the <i>user token</i>. We get the <i>user token</i> if the user successfully signs the sign request. We store this <i>user token</i>, which is specific to XUMM platform and from next time we can send sign request as push notification to the end users mobile device.</p>
<h3>Action Steps</h3>
<p>Now you can open YOUR payload output and navigate to payload.next.always or payload.refs.qr_png, open the XUMM app present on your mobile phone, scan the QR code and sign or reject the sign request and check for the status changes at payload.next.always URL.</p>
<h3>Benefits of using XUMM Platform for our Application</h3>
<p><strong>1.</strong> DEX or any site can make use of XUMM &#8220;sign&#8221; transaction type for authorization &#8211; for example, for signing up for a DEX account or for creating an account on an app etc.</p>
<p><strong>2.</strong> We can use XUMM platform to create and accept payments and/or subscription services.</p>
<p><strong>3.</strong> Once the user signs/authorizes our first sign request, we can start <a href="https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/">sending payments/sign requests as push notification</a> directly to their XUMM app in their mobile devices. That&#8217;s so convenient and seamless payments experience.</p>
<p>For full &#8220;XUMM SDK/API&#8221; free video tutorial list visit: <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/">Working With XUMM SDK/API: XRPL</a></p>The post <a href="https://technotip.com/9358/your-first-payload-xumm-sdk/">Your First Payload: XUMM SDK</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9335/get-your-xumm-api-credentials/" rel="bookmark" title="Get your XUMM API Credentials">Get your XUMM API Credentials</a></li>
<li><a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/" rel="bookmark" title="Prepare Your Project &#038; Start Coding: XUMM SDK">Prepare Your Project &#038; Start Coding: XUMM SDK</a></li>
</ol></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9358/your-first-payload-xumm-sdk/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9358</post-id>	</item>
		<item>
		<title>Send Ping Request To XUMM Platform and Get Application Details</title>
		<link>https://technotip.com/9353/send-ping-request-to-xumm-platform-and-get-application-details/</link>
					<comments>https://technotip.com/9353/send-ping-request-to-xumm-platform-and-get-application-details/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 13:50:14 +0000</pubDate>
				<category><![CDATA[XRPL]]></category>
		<category><![CDATA[application details]]></category>
		<category><![CDATA[BTC]]></category>
		<category><![CDATA[Curated Assets]]></category>
		<category><![CDATA[currencies]]></category>
		<category><![CDATA[ETH]]></category>
		<category><![CDATA[IOU]]></category>
		<category><![CDATA[Issuer]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[XRP]]></category>
		<category><![CDATA[XRP Ledger]]></category>
		<category><![CDATA[XUMM API]]></category>
		<category><![CDATA[XUMM Platform]]></category>
		<category><![CDATA[XUMM SDK]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9353</guid>

					<description><![CDATA[<p>Lets write a nodejs program to fetch application details from XUMM platform. We&#8217;ll also see how to retrieve all the IOU details using single line of code. Video Tutorial: Send Ping Request To XUMM Platform and Get Application Details YouTube Link: https://www.youtube.com/watch?v=3jvkJUJMUpQ [Watch the Video In Full Screen.] Source Code: Send Ping Request To XUMM &#8230; <a href="https://technotip.com/9353/send-ping-request-to-xumm-platform-and-get-application-details/" class="more-link">Continue reading<span class="screen-reader-text"> "Send Ping Request To XUMM Platform and Get Application Details"</span></a></p>
The post <a href="https://technotip.com/9353/send-ping-request-to-xumm-platform-and-get-application-details/">Send Ping Request To XUMM Platform and Get Application Details</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/" rel="bookmark" title="Prepare Your Project &#038; Start Coding: XUMM SDK">Prepare Your Project &#038; Start Coding: XUMM SDK</a></li>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9335/get-your-xumm-api-credentials/" rel="bookmark" title="Get your XUMM API Credentials">Get your XUMM API Credentials</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Lets write a <a href="https://technotip.com/3674/node-js-video-tutorial-list/">nodejs program</a> to fetch application details from XUMM platform. We&#8217;ll also see how to retrieve all the IOU details using single line of code.</p>
<h3>Video Tutorial: Send Ping Request To XUMM Platform and Get Application Details</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe loading="lazy" class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/3jvkJUJMUpQ?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=3jvkJUJMUpQ&amp;fmt=22">https://www.youtube.com/watch?v=3jvkJUJMUpQ</a> [Watch the Video In Full Screen.]</div>
<h3>Source Code: Send Ping Request To XUMM Platform and Get Application Details</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')  
const Sdk = new XummSdk('Your-API-Id', 'Your-API-Secret')  
  
const main = async () =&gt; {  
  const appInfo = await Sdk.ping() 
}  
  
main() 
</pre>
<p><strong>Output</strong></p>
<pre name="code" class="js">$ node index.js
{
  quota: {},
  application: {
    uuidv4: '401015ee-7edc-4469-bdfd-3af11f229885',       
    name: 'My Super Duper App!',
    webhookurl: 'https://technotip.com',
    disabled: 0
  },
  call: { uuidv4: 'a47219a5-8802-44d2-84bf-0c692ff05e48' }
}
</pre>
<p>Most part of above code in taken from our previous video tutorial, so please visit <a href="https://technotip.com/9343/prepare-your-project--start-coding-xumm-sdk/">Prepare Your Project &amp; Start Coding: XUMM SDK</a> before going further.</p>
<h3>Explanation of Above Source Code</h3>
<p>We are writing a asynchronous function and the child process waits for the result from Sdk.ping() method. Once the result is retrieved, the result is printed on to the console window.</p>
<p>Since we are writing asynchronous method, we need to use <strong>await</strong> keyword to wait for the result or the promise to be resolved.</p>
<p>If we do not write the <strong>await</strong> keyword, you&#8217;ll get the following result:</p>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')  
const Sdk = new XummSdk('Your-API-Id', 'Your-API-Secret')  
  
const main = async () =&gt; {  
  const appInfo = Sdk.ping() 
}  
  
main() 
</pre>
<p><strong>Output</strong></p>
<pre name="code" class="js">$ node index.js 
Promise { <pending> }
</pending></pre>
<p>That&#8217;s because the child process didn&#8217;t wait for the result to be returned or the promise to be resolved.</p>
<h3>Display XUMM Application Name</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')  
const Sdk = new XummSdk('Your-API-Id', 'Your-API-Secret')  
  
const main = async () =&gt; {  
  const appInfo = await Sdk.ping() 
  console.log(appInfo.application.name)
}  
  
main() 
</pre>
<p><strong>Output</strong></p>
<pre name="code" class="js">$ node index.js 
My Super Duper App!
</pre>
<p>Here we fetch the name of the XUMM application by traversing the json output, using DOT(.) notation. <i>name</i> key is present inside key <i>application</i>.</p>
<h3>Display XUMM Curated Assets: IOU Details</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')  
const Sdk = new XummSdk('Your-API-Id', 'Your-API-Secret')  
  
const main = async () =&gt; {  
      const IOU = await Sdk.getCuratedAssets()
      console.log(IOU)
}  
  
main() 
</pre>
<p><strong>Output</strong></p>
<pre name="code" class="js">$ node index.js 
{
  issuers: [ 'Bitstamp', 'GateHub', 'Towo Labs', 'Sologenic', 'Wietse' ],
  currencies: [
    'USD',
    'BTC',
    'EUR',
    'ETH',
    'BCH',
    'ETC',
    'XAU',
    'DSH',
    'REP',
    'XTK',
    '534F4C4F00000000000000000000000000000000',
    'WIE'
  ],
  details: {
    Bitstamp: {
      id: 185,
      name: 'Bitstamp',
      domain: 'bitstamp.net',
      avatar: 
'https://xumm.app/assets/icons/currencies/ex-bitstamp.png',
      shortlist: 1,
        currencies: {
            USD: {
            id: 178,
            issuer_id: 185,
            issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
            currency: 'USD',
            name: 'US Dollar',
            avatar: 
'https://xumm.app/assets/icons/currencies/fiat-dollar.png',
            shortlist: 1
            },
            BTC: {
            id: 492,
            issuer_id: 185,
            issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
            currency: 'BTC',
            name: 'Bitcoin',
            avatar: 
'https://xumm.app/assets/icons/currencies/crypto-btc.png',
            shortlist: 1
            }
        }
    },
    GateHub: {
      id: 182,
      name: 'GateHub',
      domain: 'gatehub.net',
      avatar: 
'https://xumm.app/assets/icons/currencies/ex-gatehub.png',
      shortlist: 1,
        currencies: {
            EUR: {
                id: 169,
                issuer_id: 182,
                issuer: 'rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq',
                currency: 'EUR',
                name: 'Euro',
                avatar: 
'https://xumm.app/assets/icons/currencies/fiat-euro.png',  
                shortlist: 1
            },
            USD: {
                id: 170,
                issuer_id: 182,
                issuer: 'rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq',
                currency: 'USD',
                name: 'US Dollar',
                avatar: 
'https://xumm.app/assets/icons/currencies/fiat-dollar.png',
                shortlist: 1
            },
            BTC: {
                id: 172,
                issuer_id: 182,
                issuer: 'rchGBxcD1A1C2tdxF6papQYZ8kjRKMYcL',
                currency: 'BTC',
                name: 'Bitcoin',
                avatar: 
'https://xumm.app/assets/icons/currencies/crypto-btc.png',
                shortlist: 1
            },
            ETH: {
                id: 174,
                issuer_id: 182,
                issuer: 'rcA8X3TVMST1n3CJeAdGk1RdRCHii7N2h',
                currency: 'ETH',
                name: 'Ethereum',
                avatar: 
'https://xumm.app/assets/icons/currencies/crypto-eth.png',
                shortlist: 1
            },
            BCH: {
                id: 173,
                issuer_id: 182,
                issuer: 'rcyS4CeCZVYvTiKcxj6Sx32ibKwcDHLds',
                currency: 'BCH',
                name: 'Bitcoin Cash',
                avatar: 
'https://xumm.app/assets/icons/currencies/crypto-bch.png',
                shortlist: 1
            },
            ETC: {
                id: 175,
                issuer_id: 182,
                issuer: 'rDAN8tzydyNfnNf2bfUQY6iR96UbpvNsze',
                currency: 'ETC',
                name: 'Ethereum Classic',
                avatar: 
'https://xumm.app/assets/icons/currencies/crypto-etc.png',
                shortlist: 1
            },
            XAU: {
                id: 171,
                issuer_id: 182,
                issuer: 'rcoef87SYMJ58NAFx7fNM5frVknmvHsvJ',
                currency: 'XAU',
                name: 'Gold Gram',
                avatar: 
'https://xumm.app/assets/icons/currencies/crypto-gold.png',
                shortlist: 1
            },
            DSH: {
                id: 177,
                issuer_id: 182,
                issuer: 'rcXY84C4g14iFp6taFXjjQGVeHqSCh9RX',
                currency: 'DSH',
                name: 'Dash',
                avatar: 
'https://xumm.app/assets/icons/currencies/crypto-dash.png',
                shortlist: 1
            },
            REP: {
                id: 176,
                issuer_id: 182,
                issuer: 'rckzVpTnKpP4TJ1puQe827bV3X4oYtdTP',
                currency: 'REP',
                name: 'REP',
                avatar: 
'https://xumm.app/assets/icons/currencies/crypto-rep.png',
                shortlist: 1
            }
        }
    },
    'Towo Labs': {
      id: 2601,
      name: 'Towo Labs',
      domain: 'xrptoolkit.com',
      avatar: 
'https://xumm.app/assets/icons/currencies/xtk-symbol.png?2',
      shortlist: 1,
        currencies:{
            XTK: {
                id: 9622,
                issuer_id: 2601,
                issuer: 'rXTKdHWuppSjkbiKoEv53bfxHAn1MxmTb',
                currency: 'XTK',
                name: 'XTK',
                avatar: 
'https://xumm.app/assets/icons/currencies/xtk-symbol.png?2',
                shortlist: 1
            }
        }
    },
    Sologenic: {
      id: 4380,
      name: 'Sologenic',
      domain: 'sologenic.com',
      avatar: 
'https://xumm.app/assets/icons/currencies/icon-sologenic.png',
      shortlist: 0,
        currencies:{
            '534F4C4F00000000000000000000000000000000': {
                id: 861,
                issuer_id: 4380,
                issuer: 'rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz',
                currency: '534F4C4F00000000000000000000000000000000',
                name: 'SOLO',
                avatar: 
'https://xumm.app/assets/icons/currencies/icon-sologenic.png',
                shortlist: 0
            }
        }
    },
    Wietse: {
      id: 17553,
      name: 'Wietse',
      domain: 'wietse.com',
      avatar: 
'https://xumm.app/assets/icons/currencies/wietse.jpg',
      shortlist: 0,
        currencies:{
            WIE: {
                id: 17552,
                issuer_id: 17553,
                issuer: 'rwietsevLFg8XSmG3bEZzFein1g8RBqWDZ',
                currency: 'WIE',
                name: 'Wietse',
                avatar: 
'https://xumm.app/assets/icons/currencies/transparent.png',
                shortlist: 0
            }
        }
    }
  }
}
</pre>
<p>IOU means &#8220;I owe you&#8221;. An &#8220;issuer&#8221; is the one who owe you, if you get funds as IOU transaction on XRP Ledger.</p>
<blockquote><p>
The acronym IOU stands for “I owe you” and refers to an informal document that acknowledges a debt one party owes to another.</p></blockquote>
<p>When you run above code you can, programmatically, get to see all the supported IOU&#8217;s on XUMM platform. You can even get the issuer details, currency symbol and the name of the currency &#8211; just by running a single line of code.</p>
<h3>IOU Details From Above Output</h3>
<p><strong>Bitstamp supports following currencies:</strong><br />
<strong>1.</strong> USD(US Dollar)<br />
<strong>2.</strong> BTC(Bitcoin).</p>
<p><strong>GateHub supports following currencies:</strong><br />
<strong>1.</strong> EUR(Euro)<br />
<strong>2.</strong> USD(US Dollar)<br />
<strong>3.</strong> BTC(Bitcoin)<br />
<strong>4.</strong> ETH(Ethereum)<br />
<strong>5.</strong> BCH(Bitcoin Cash)<br />
<strong>6.</strong> ETC(Ethereum Classic)<br />
<strong>7.</strong> XAU(Gold Gram)<br />
<strong>8.</strong> DSH(Dash)<br />
<strong>9.</strong> REP(REP)</p>
<p><strong>Towo Labs supports following currency:</strong><br />
<strong>1.</strong> XTK(XTK)</p>
<p><strong>Sologenic supports following currency:</strong><br />
<strong>1.</strong> SOLO(SOLO)</p>
<p><strong>Wietse supports following currency:</strong><br />
<strong>1.</strong> WIE(Wietse)</p>
<p>Here &#8216;Bitstamp&#8217;, &#8216;GateHub&#8217;, &#8216;Towo Labs&#8217;, &#8216;Sologenic&#8217;, &#8216;Wietse&#8217; are the issuers of the respective currencies. So you can transact above currencies on XRP Ledger via XUMM application.</p>
<p>As you can see from above examples, we&#8217;re successfully able to connect and communicate with XUMM platform. So in our next video tutorial lets send a <a href="https://technotip.com/9358/your-first-payload-xumm-sdk/">simple PAYLOAD</a>. More on that in next video tutorial, stay subscribed to our blog and YouTube channel.</p>
<p>For full &#8220;XUMM SDK/API&#8221; free video tutorial list visit: <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/">Working With XUMM SDK/API: XRPL</a></p>The post <a href="https://technotip.com/9353/send-ping-request-to-xumm-platform-and-get-application-details/">Send Ping Request To XUMM Platform and Get Application Details</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:<ol>
<li><a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/" rel="bookmark" title="Prepare Your Project &#038; Start Coding: XUMM SDK">Prepare Your Project &#038; Start Coding: XUMM SDK</a></li>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9335/get-your-xumm-api-credentials/" rel="bookmark" title="Get your XUMM API Credentials">Get your XUMM API Credentials</a></li>
</ol></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9353/send-ping-request-to-xumm-platform-and-get-application-details/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9353</post-id>	</item>
		<item>
		<title>Prepare Your Project &#038; Start Coding: XUMM SDK</title>
		<link>https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/</link>
					<comments>https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 13:43:15 +0000</pubDate>
				<category><![CDATA[XRPL]]></category>
		<category><![CDATA[asynchronous function]]></category>
		<category><![CDATA[import package]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[Visual Studio Code]]></category>
		<category><![CDATA[XRP Ledger]]></category>
		<category><![CDATA[XUMM API]]></category>
		<category><![CDATA[XUMM Platform]]></category>
		<category><![CDATA[XUMM SDK]]></category>
		<category><![CDATA[xumm-sdk]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9343</guid>

					<description><![CDATA[<p>Lets install the software and packages needed to run a nodejs application and try to connect with the XUMM platform. Software Required 1. Visual Studio Code Editor 2. Nodejs Package To Be Installed xumm-sdk (install via node package manager). Video Tutorial: Prepare Your Project &#38; Start Coding: XUMM SDK YouTube Link: https://www.youtube.com/watch?v=pgSckFopZ6Q [Watch the Video &#8230; <a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/" class="more-link">Continue reading<span class="screen-reader-text"> "Prepare Your Project &#038; Start Coding: XUMM SDK"</span></a></p>
The post <a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/">Prepare Your Project & Start Coding: XUMM SDK</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9335/get-your-xumm-api-credentials/" rel="bookmark" title="Get your XUMM API Credentials">Get your XUMM API Credentials</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Lets install the software and packages needed to run a nodejs application and try to connect with the XUMM platform.</p>
<h3>Software Required</h3>
<p><strong>1.</strong> <a href="https://code.visualstudio.com/">Visual Studio Code Editor</a><br />
<strong>2.</strong> <a href="https://technotip.com/3674/node-js-video-tutorial-list/">Nodejs</a></p>
<h3>Package To Be Installed</h3>
<p><a href="https://www.npmjs.com/package/xumm-sdk">xumm-sdk</a> (install via node package manager).</p>
<h3>Video Tutorial: Prepare Your Project &amp; Start Coding: XUMM SDK</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe loading="lazy" class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/pgSckFopZ6Q?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=pgSckFopZ6Q&amp;fmt=22">https://www.youtube.com/watch?v=pgSckFopZ6Q</a> [Watch the Video In Full Screen.]</div>
<h3>Lets test our installation</h3>
<p>After installing Visual Studio Code Editor and Nodejs, lets create a new project. Create a file called index.js inside the project folder.<br />
<i>index.js</i></p>
<pre name="code" class="js">console.log("WELCOME TO XUMM SDK/API VIDEO TUTORIALS!")</pre>
<p><strong>Running Node Application</strong><br />
<i>Command</i></p>
<pre name="code" class="js"> &gt;node index.js</pre>
<p><strong>Output</strong><br />
WELCOME TO XUMM SDK/API VIDEO TUTORIALS!</p>
<p>If you get above output then your installation is working correctly. Lets move forward.</p>
<h3>Installing xumm-sdk Package</h3>
<p>Lets install xumm-sdk node package and try to connect with XUMM platform.</p>
<pre name="code" class="js">npm install xumm-sdk
</pre>
<p>It might take couple of seconds to couple of minutes depending on your internet connection speed. So you may have to wait patiently.</p>
<h3>Error Message: Your npm doesn’t work with the version of Node</h3>
<p>If you start getting error messages like: &#8220;npm WARN npm npm does not support Node.js&#8221; Just download lower version of Nodejs and try to run the program once again. In most of the cases the issue will be resolved.</p>
<h3>Source Code: Importing xumm-sdk package into our project</h3>
<pre name="code" class="js">const {XummSdk} = require('xumm-sdk')
const Sdk = new XummSdk('Your-API-Id', 'Your-API-Secret')

const main = async () =&gt; {
  console.log('XUMM SDK VIDEO TUTORIALS!')
}

main()
</pre>
<p><strong>Run The Application</strong><br />
<i>Command</i></p>
<pre name="code" class="js"> &gt;node index.js</pre>
<p><strong>Output</strong><br />
XUMM SDK VIDEO TUTORIALS!</p>
<p>In the first line, we are importing xumm-sdk package. Next we create an instance of XummSdk, by passing <a href="https://technotip.com/9335/get-your-xumm-api-credentials/">XUMM application credentials</a>.</p>
<p>Next we write a asynchronous function, which creates a child progress or a thread and waits for the response. Meanwhile the main thread or the main process continues to execute the code after it.</p>
<p>In above code, we simply output a message to the console window.</p>
<p><strong>Note:</strong> By connecting to XUMM platform we can indirectly interact with XRP Ledger(XRPL).</p>
<p>For full &#8220;XUMM SDK/API&#8221; free video tutorial list visit: <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/">Working With XUMM SDK/API: XRPL</a></p>The post <a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/">Prepare Your Project & Start Coding: XUMM SDK</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
<li><a href="https://technotip.com/9335/get-your-xumm-api-credentials/" rel="bookmark" title="Get your XUMM API Credentials">Get your XUMM API Credentials</a></li>
</ol></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9343</post-id>	</item>
		<item>
		<title>Get your XUMM API Credentials</title>
		<link>https://technotip.com/9335/get-your-xumm-api-credentials/</link>
					<comments>https://technotip.com/9335/get-your-xumm-api-credentials/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 13:36:47 +0000</pubDate>
				<category><![CDATA[XRPL]]></category>
		<category><![CDATA[App ID]]></category>
		<category><![CDATA[App Secret]]></category>
		<category><![CDATA[Application Credentials]]></category>
		<category><![CDATA[create application]]></category>
		<category><![CDATA[delete application]]></category>
		<category><![CDATA[Developer Dashboard]]></category>
		<category><![CDATA[XRP Ledger]]></category>
		<category><![CDATA[XUMM]]></category>
		<category><![CDATA[XUMM API]]></category>
		<category><![CDATA[XUMM SDK]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9335</guid>

					<description><![CDATA[<p>To start working with XUMM SDK and API, the first thing you&#8217;ll need is application credentials. Application credentials are: App ID and App Secret, which you&#8217;ll get once you signup and register your application at apps.xumm.dev Application Creation: XUMM Platform All the application details can be modified later after creating the application, so need not &#8230; <a href="https://technotip.com/9335/get-your-xumm-api-credentials/" class="more-link">Continue reading<span class="screen-reader-text"> "Get your XUMM API Credentials"</span></a></p>
The post <a href="https://technotip.com/9335/get-your-xumm-api-credentials/">Get your XUMM API Credentials</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>To start working with XUMM SDK and API, the first thing you&#8217;ll need is application credentials.  Application credentials are: App ID and App Secret, which you&#8217;ll get once you signup and register your application at <a href="https://apps.xumm.dev/">apps.xumm.dev</a></p>
<h3>Application Creation: XUMM Platform</h3>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/xrpl/xumm-register-application.png?w=840&#038;ssl=1" alt="xumm register application" title="xumm register application"/></p>
<p>All the application details can be modified later after creating the application, so need not stress too much to get it perfect the first time. You can even re-upload the application icon later on.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/xrpl/xumm-create-application.png?w=840&#038;ssl=1" alt="xumm create application" title="xumm create application"/></p>
<p>You can register multiple applications inside single xumm developer account. And you can also delete the registered application, by visiting the applications details page.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/xrpl/xumm-delete-application.png?w=840&#038;ssl=1" alt="xumm delete application" title="xumm delete application"/></p>
<h3>Video Tutorial: Get your XUMM API Credentials</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe loading="lazy" class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/tdoLbHiMTGo?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=tdoLbHiMTGo&amp;fmt=22">https://www.youtube.com/watch?v=tdoLbHiMTGo</a> [Watch the Video In Full Screen.]</div>
<h3>Important Note</h3>
<p><strong>1.</strong> You can get App ID any time you log into your XUMM developer dashboard, but App Secret will be shown to you only once. i.e., when you create your application you&#8217;ll be shown the App Secret, after that it&#8217;ll be permanently hidden. You need to copy and paste it in safe place.</p>
<p><strong>2.</strong> Please do not place your application credentials in client side code. These credentials are meant to be in server side code. If you place it in client side code, someone can get hold of it and use it for wrong things.</p>
<p><strong>3.</strong> If you think your application credentials are compromised, then you can log into your xumm developer dashboard and generate a new one. Once you generate new App Secret, do not forget to replace the old one in your application.</p>
<p><strong>4.</strong> Make sure to keep checking the LOGS and PAYLOADS section inside your XUMM developer dashboard.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/xrpl/xumm-logs-payloads-dashboard.png?w=840&#038;ssl=1" alt="xumm logs payloads dashboard" title="xumm logs payloads dashboard"/></p>
<p>That&#8217;s where you&#8217;ll get valuable information about your program execution. Whenever you encounter a bug in your code, check the terminal output and then immediately check the LOGS and PAYLOADS section inside your XUMM developer account. It&#8217;ll have valuable information which can help you fix the issue sooner.</p>
<p><strong>Note:</strong> Using your Application credentials you can connect to XUMM platform and then interact with XRP Ledger(XRPL) via XUMM SDK/API.</p>
<p>For full &#8220;XUMM SDK/API&#8221; free video tutorial list visit: <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/">Working With XUMM SDK/API: XRPL</a></p>The post <a href="https://technotip.com/9335/get-your-xumm-api-credentials/">Get your XUMM API Credentials</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:<ol>
<li><a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" rel="bookmark" title="Working With XUMM SDK/API: XRPL">Working With XUMM SDK/API: XRPL</a></li>
</ol></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9335/get-your-xumm-api-credentials/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9335</post-id>	</item>
		<item>
		<title>Working With XUMM SDK/API: XRPL</title>
		<link>https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/</link>
					<comments>https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/#respond</comments>
		
		<dc:creator><![CDATA[Satish]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 13:36:23 +0000</pubDate>
				<category><![CDATA[XRPL]]></category>
		<category><![CDATA[amendments]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[Ripple]]></category>
		<category><![CDATA[RippleX]]></category>
		<category><![CDATA[XRPL LABS]]></category>
		<category><![CDATA[XRPL LABS Team]]></category>
		<category><![CDATA[XUMM API]]></category>
		<category><![CDATA[XUMM APP]]></category>
		<category><![CDATA[XUMM Platform]]></category>
		<category><![CDATA[XUMM SDK]]></category>
		<guid isPermaLink="false">https://technotip.com/?p=9332</guid>

					<description><![CDATA[<p>XRP Ledger(XRPL) was developed by Ripple founders and is now open sourced. Ripple is a real-time gross settlement system, currency exchange and remittance network created by Ripple Labs Inc., a US-based technology company. XRP is the underlying crypto-asset. Not everyone will be comfortable digging deep into how XRPL works and how to change/modify the code &#8230; <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/" class="more-link">Continue reading<span class="screen-reader-text"> "Working With XUMM SDK/API: XRPL"</span></a></p>
The post <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/">Working With XUMM SDK/API: XRPL</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-related-none yarpp-template-list'>

No related posts.
</div>
]]></description>
										<content:encoded><![CDATA[<p>XRP Ledger(XRPL) was developed by Ripple founders and is now open sourced.</p>
<blockquote><p>
Ripple is a real-time gross settlement system, currency exchange and remittance network created by Ripple Labs Inc., a US-based technology company. XRP is the underlying crypto-asset.</p></blockquote>
<p>Not everyone will be comfortable digging deep into how XRPL works and how to change/modify the code once the XRPL gets updated(through proposals, voting &amp; amendments). And not everyone of us can host a XRPL node. But still if you are willing to create applications for payments, subscription, signing in, escrow account creation etc, then you can simply make use of XUMM platform.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/technotip.com/wp-content/uploads/xrpl/xumm-logo.png?w=840&#038;ssl=1" alt="xumm logo" title="xumm logo"/></p>
<p>Developers can use <a href="https://xumm.dev/">XUMM platform</a> to interact with XRPL and also make use of XUMM specific features like sending payments/subscription related messages as push notification. The best thing about <a href="https://xumm.app/">XUMM app</a> is there is very less changes of miss transactions, as there are only 2 types of transactions your users will be involved &#8211; either they initiate a transaction or they scan a QR code and make a payment. In both the cases it involves very less to no possibilities of making a miss transaction using this app.</p>
<p>Also note that XUMM is developed by &#8220;<a href="https://xrpl-labs.com/">XRPL LABS</a>&#8221; team and the project is supported by <a href="https://ripple.com/">Ripple</a> / <a href="https://ripplex.io/">RippleX</a>.</p>
<p>In this video tutorial series we shall learn how to work with XUMM SDK and XUMM API to interact with XRP Ledger, and also see how to make use of XUMM platform specific features to enhance the end user experience.</p>
<p>While following these video tutorials, occasionally you may have to create new XRPL accounts and make transactions and check the results: you can use OsmWallet for that. <a href="https://osmwallet.io/">OsmWallet</a> is a non-custodial wallet and it is a browser extension like MetaMask, but for XRP Ledger.</p>
<p>Also checkout my favorite project on XRPL and Xahau: <a href="https://xpert.page">xpert.page</a></p>
<h3>Sample App Built using XUMM API</h3>
<p><a href="https://technotip.com/gifts/automate-digital-sales-using-xumm-payment/">Automate Digital Sales using XUMM Payment</a></p>
<h3>XUMM SDK/API Video Tutorial Playlist</h3>
<p><center><br />
<div class="jetpack-video-wrapper"><iframe loading="lazy" class="youtube-player" width="840" height="473" src="https://www.youtube.com/embed/tdoLbHiMTGo?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent&#038;listType=playlist&#038;list=PLM4pPs1mzl_NjoQPoMlJEx2XAEpDQ-Vhq" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></div><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="https://www.youtube.com/watch?v=tdoLbHiMTGo&amp;list=PLM4pPs1mzl_NjoQPoMlJEx2XAEpDQ-Vhq&amp;fmt=22">XUMM SDK/API playlist</a> [Watch the Video In Full Screen.]</div>
<h3>XUMM SDK/API, Free Video Tutorials List</h3>
<p><i>Please follow the tutorials in the same order as listed below</i></p>
<div id="programs-list">
<ol>
<li><a href="https://technotip.com/9335/get-your-xumm-api-credentials/">Get your XUMM API Credentials</a></li>
<li><a href="https://technotip.com/9343/prepare-your-project-start-coding-xumm-sdk/">Prepare Your Project &amp; Start Coding: XUMM SDK</a></li>
<li><a href="https://technotip.com/9353/send-ping-request-to-xumm-platform-and-get-application-details/">Send Ping Request To XUMM Platform and Get Application Details</a></li>
<li><a href="https://technotip.com/9358/your-first-payload-xumm-sdk/">Your First Payload: XUMM SDK</a></li>
<li><a href="https://technotip.com/9370/send-sign-request-as-push-notification-xumm-sdk/">Send Sign Request As Push Notification: XUMM SDK</a></li>
<li><a href="https://technotip.com/9377/verify-the-transaction-on-mainnet-xumm-sdk/">Verify The Transaction on Mainnet: XUMM SDK</a></li>
</ol>
</div>
<p><strong>Important:</strong> If you like my tutorials and if you are interested in XRP and XRP Ledger community, then please consider to sign up at <a href="https://xpert.page">xpert.page</a></p>The post <a href="https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/">Working With XUMM SDK/API: XRPL</a> first appeared on <a href="https://technotip.com">Technotip.com</a>.<div class='yarpp yarpp-related yarpp-related-rss yarpp-related-none yarpp-template-list'>
<p>No related posts.</p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://technotip.com/9332/working-with-xumm-sdk-api-xrpl/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9332</post-id>	</item>
	</channel>
</rss>
