Friday, May 9, 2025
Alternative Way
  • Home
  • Latest
    • Latest
  • News
  • World Tech
  • World Gaming
  • Minecraft
  • Guides
  • Contact Us
  • About The Team
    • Privacy Policy
    • Terms of Use
No Result
View All Result
  • Home
  • Latest
    • Latest
  • News
  • World Tech
  • World Gaming
  • Minecraft
  • Guides
  • Contact Us
  • About The Team
    • Privacy Policy
    • Terms of Use
No Result
View All Result
Alternative Way
No Result
View All Result

Create and share Algorand Payment Prompt URIs and stylized QR codes

Gordon James by Gordon James
October 3, 2021
in World Tech Code
0 0
0
Home World Tech Code

The Algorand platform has an application programming interface (API) to enable users to create and share payment prompts via a URI or QR code. By default, the API sends two types of information to the URI: an algorand address and a payment amount. You can also return any other information you want, such as a payment amount, service, or exchange rate.

Algorand is a revolutionary new way of paying for things, using a mathematical algorithm to automatically create deterministic and non-counterfeitable tokens. Algorand payment URIs can be generated with a single line of code: https://algo.run/// . “” is the algorithm that is used to generate your Algorand payment URI, and “” is the amount of Algorand that you want to spend. Credit: http://www.alternativeway.us/

We have learned how to create and share stylized QR codes, but how can you create and share a payment prompt URI? That’s what this post will help you learn. We’ll walk you through how to create a payment prompt URI using Algorand’s example URI and show you how to use that URI to generate a stylized URI.

Table of Contents

Toggle
  • AlgorandKit
  • Requirements
  • Setting
  • AlgorandURI
    • Application examples
  • AlgorandQRCode
    • Application examples
    • Example screenshots
  • UIActivityViewController / AirDrop
    • Application examples
    • Example screenshots
  • AlgoSampleApp
  • GitHub
      • Related Tags:

AlgorandKit

Swift library for easy interaction with the Algorand blockchain. Integrate this library to easily create and share payment request URIs and stylized QR codes from Algorand. Create and share Algorand Payment Prompt URIs and stylized QR codes

Requirements

  • Xcode 12.0 or higher.
  • iOS 13.0 or later.

Setting

The Swift package manager is a tool to manage the distribution of Swift code. It integrates with the Swift build system to automate the process of loading, compiling and linking dependencies. To integrate AlgorandKit into an Xcode project running Xcode 12, specify it under File > Swift packages > Add package dependencies….. specify : https://github.com/computerbluemonday/AlgorandKit Or manually add a dependency in Package.swift : .package(url : https://github.com/computerbluemonday/AlgorandKit, from : 1.1.0)

AlgorandURI

Utility to create the URI of the Algorand payment prompt according to the : https://developer.algorand.org/docs/reference/payment_prompts/ According to the specification, this URI is a standardized way for apps and websites to send requests and information via deeplinks, QR codes, etc. On iOS, these URIs can be managed by the official Algorand Wallet app to delegate transaction processing to Algorand : https://developer.algorand.org/articles/payment-prompts-with-algorand-mobile-wallet/ AlgorandURI is an immutable Swift structure that applies business logic rules by defining a interface during initialization. All URIs constructed with AlgorandURI must be semantically valid . (AlgorandURI does not check addresses or the validity of transactions). The object definition is suitable for quick visual inspection in the debugger, for example. B : ▿ AlgorandURI – uriScheme: algorand ▿ receiver: Receiver – Address : 4AOJ5QITUBWZGO4K5AF77H5GED5A4QDBB6DOQGI63QE2GU6KD2XNETBBJE ▿ Label: Supplemental – Some : Bob ▿ assetAmount: AssetAmount ▿ algo: 1 item – microAlgo’s: 50 ▿ note: Optional ▿ some: note ▿ read-only: 1 Item – xnote : Transmission A set of test cases is included to verify the regression.

Application examples

let algoURI = AlgorandURI( receiver : AlgorandURI.Receiver(address : 4AOJ5QITUBWZGO4K5AF77H5GED5A4QDBB6DOQGI63QE2GU6KD2XNETBBJE, label : Barclay), assetAmount : .algo(microAlgos : 100), note : .readonly(xnote : Transporter Insurance)) let asaURI = AlgorandURI( receiver : AlgorandURI.Receiver(address : 4AOJ5QITUBWZGO4K5AF77H5GED5A4QDDBB6DOQGI63QE2GU6KD2XNETBBJE, label : Lanel), assetAmount : .ASA(assetID : 1000000, amount : 150), note : .readonly(xnote : Spaceship) if let url = algoURI.url() { if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url, options : [ :], completionHandler : nil) } }

AlgorandQRCode

Utilities to generate raw and stylized QR codes from AlgorandURI instances:

  • AlgorandURI (extension) — Generates a raw UII QR code image from AlgorandURI
  • AlgorandQRCodeBadge — Creates a scalable Algorand QR code icon, (optionally) styled and tagged in SwiftUI.

Although not part of this library, see AlgorandQRCodeTests for examples of Algorand QR code recognition using the Apple vision framework.

Application examples

// Create AlgorandURI for the Barclay receiver for 100 microalgo, with note readonly Transporter Insurance let algoURI = AlgorandURI( receiver : AlgorandURI.Receiver(address : 4AOJ5QITUBWZGO4K5AF77H5GED5A4QDBB6DOQGI63QE2GU6KD2XNETBBJE, label : Barclay), assetAmount : .algo(microAlgos : 100), note : .readonly(xnote : Insurance carrier)) // Generate a raw UII QR code image for this URI transaction let qrCodeImage = algoURI.generateQRCode() // Instantiate a stylized QR code icon SwiftUI AlgorandQRCodeBadge( uri:AlgorandURI(receiver : AlgorandURI.Receiver(address : 4AOJ5QITUBWZGO4K5AF77H5GED5A4QDBB6DOQGI63QE2GU6KD2XNETBBJE, label : null), assetAmount : null, note : null), qrCodeColor : UIColor.systemTeal, frameConfiguration : .framed(color : UIColor.darkGray), includeLogo : true)

Example screenshots

word-image-3344 word-image-3345 word-image-3346

UIActivityViewController / AirDrop

Support for sharing the AlgorandURI with other devices or services via UIActivityViewController. A range of exchange directions including AirDrop, SMS, Mail, Copy/Paste is defined by default; configurable by the caller for other exchange directions.

Application examples

// we create AlgorandURI for the data receiver for 400 microalgo. let algoURI = AlgorandURI( receiver : AlgorandURI.Receiver(address : 4AOJ5QITUBWZGO4K5AF77H5GED5A4QDBB6DOQGI63QE2GU6KD2XNETBBJE, label : Data), assetAmount : .algo(microAlgos : 400), note : .readonly(xnote : Catfood.) // Introduce UIActivityViewController to share algorandURI via AirDrop, SMS, etc. (SwiftUI) if let av = algoURI.activityViewController(excludedActivityTypes : nil) { UIApplication.shared.windows.first ?.rootViewController ?.present(av, animated : true, completion : nil) }

Example screenshots

word-image-3347 word-image-3348

AlgoSampleApp

AlgoSampleApp is a standalone iOS application project that demonstrates AlgorandKit import and specifically AlgorandURI support in UIActivityViewController / AirDrop. It can also be used as a test suite to explore other features of AlgorandKit. To build, open the AlgoSampleApp.xcodeproj file in the AlgoSampleApp folder.

GitHub

https://github.com/computerbluemonday/AlgorandKitAlgorand is an alternative to Bitcoin (BTC) that uses a Delegated Proof-of-Stake (DPoS) consensus algorithm. This will be the first in a series of posts discussing the advantages to using Algorand as the future of cryptocurrency.. Read more about algorand programming language and let us know what you think.

Related Tags:

algorand developeralgorand developer forumalgorand create tokenalgorand goalalgorand appsalgorand-sdk,People also search for,Privacy settings,How Search works,algorand developer,algorand developer forum,algorand create token,algorand developer rewards,algorand programming language,algorand goal,algorand grants,algorand award

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0
ShareTweet
Gordon James

Gordon James

Next Post
How to integrate classic App Shortcuts with Google Assistant through the new Capabilities API

How to integrate classic App Shortcuts with Google Assistant through the new Capabilities API

  • Trending
  • Comments
  • Latest
How To Get Free Internet On Android Without Service

How To Get Free Internet On Android Without Service

March 10, 2022
🥇 +4 Neo Geo Emulators for Android  List ▷ 2021

🥇 +4 Neo Geo Emulators for Android  List ▷ 2021

October 3, 2021

Fix: Notifications not working on Nova Launcher

October 3, 2021
How to Fix OpenVPN Connected but Not Changing IP Address

How to Fix OpenVPN Connected but Not Changing IP Address

October 3, 2021

Setting Up Directory Sync Between On-Premises Active Directory with Microsoft 365 Azure AD

0
🥇 DELETE ACCOUNT from PS4  ▷ Step by Step Guide ▷ 2020

🥇 DELETE ACCOUNT from PS4  ▷ Step by Step Guide ▷ 2020

0
🥇 PPTX File Extension  What is .Pptx and how to open them? ▷ 2020

🥇 PPTX File Extension  What is .Pptx and how to open them? ▷ 2020

0
🥇 Make a Crossword in Microsoft Word  Step by Step Guide ▷ 2020

🥇 Make a Crossword in Microsoft Word  Step by Step Guide ▷ 2020

0
What to Know About Car Shipping Services

What to Know About Car Shipping Services

May 7, 2025
CS2 Skins-Why Trade Them?

CS2 Skins-Why Trade Them?

May 7, 2025
Alternative Routes: Successfully Exiting Your Wyndham Timeshare Without The Stress

Alternative Routes: Successfully Exiting Your Wyndham Timeshare Without The Stress

May 6, 2025
The Ultimate Seiko Watch Gift Guide

The Ultimate Seiko Watch Gift Guide

May 1, 2025

There's always an alternative Way!
Find us at 4145 Zolynthian Street, Vylorthos, QP 78425
No Result
View All Result
  • Home
  • Latest
    • Latest
  • News
  • World Tech
  • World Gaming
  • Minecraft
  • Guides
  • Contact Us
  • About The Team
    • Privacy Policy
    • Terms of Use

© 2022 - Alternative Way

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT
No Result
View All Result
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
  • Travel News

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.