Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the iban in Ethernet Square?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "what is iban in Ethernet Square". In daily operation, I believe many people have doubts about what iban is in Ethernet Square. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts about "what is iban in Ethernet Square?" Next, please follow the editor to study!

To put it simply, the iban account in Ethernet Square is a concept introduced by Ethernet Square in order to connect with the traditional banking system. Web3.js provides a method of translation between Ethernet address and iban address.

Iban: international bank account

The concept of iban originates from the traditional banking system, and its full name in English is International Bank Account Number, that is, international bank account. The role of iban is to generate a globally unique account for any account in any bank in the world for interbank transactions. An iban account looks like this:

XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS

Iban addresses can contain up to 34 letters and numbers, where letters are case-insensitive. Include the following information in the iban:

Country code, used to identify the country, following the ISO3166-1 alpha-2 standard

Error identification code, used to verify the address, using the mod-97-10 checksum protocol, that is, the ISO/IEC 7064 2003 standard

The basic bank account, namely BBAN (Basic Bank Account Number), is used to identify banking institutions, outlets and customers' accounts within the institution. The coding scheme of these three parts of information depends on the country code mentioned above.

If you would like to start learning DApp development at Etay Fong right away, you can visit our online interactive tutorial:

Introduction to Intelligent contract and Application Development in Ethernet Square

Practical development of decentralized e-commerce DApp in Yitaifang

Ethernet Square iban: new country Code and BBAN coding Scheme

Etay Fong introduced a new IBAN country code: XE, where E stands for Ethereum,X for illegal currency (non-jurisdictional currencies). At the same time, Etaifang puts forward three coding formats of BBAN: direct, basic and indirect.

The BBAN in the direct coding scheme is 30 letters / numbers, with only one field: account number. For example, if the 00c5496aee77c1ba1f0854206a26dda82a81d6d8 address of Etay Square is converted to the BBAN account of the direct scheme, you will get XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS.

You can use the web3.eth.Iban.fromEthereumAddress () method in web3.js to perform this transformation:

Let myiban = web3.eth.Iban.fromEthereumAddress ('0x00c5496aee77c1ba1f0854206a26dda82a81d6d8') console.log (myiban) / / XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS

The only difference between the basic coding scheme and the direct scheme is that its BBAN length is 31 letters / numbers, so the scheme is not compatible with IBAN.

The BBAN in the indrect encoding scheme is 16 letters / numbers in length and contains three fields:

Asset number, consisting of 3 letters / numbers

Organization number, consisting of 4 letters / numbers

Customer number in the organization, consisting of 9 letters / numbers

For example, an ethernet square iban account with an indrect coding scheme looks like this:

XE81ETHXREGGAVOFYORK

The front XE represents the country code, 81 is the checksum, and the next 16 characters are indrect-encoded BBAN, where:

ETH: in this case, the asset number in the customer's account. Currently, ETH is the only valid asset number

XREG: organization number. XREG represents the basic registered contract of Etay Fong.

GAVOFYORK: the customer number of the organization

Conversion between iban account and Ethernet Square address

As mentioned earlier, using the web3.eth.Iban.fromEthereumAddress () method, you can convert an ethernet address to an iban account of the direct coding scheme. Correspondingly, you can use the web3.eth.Iban.toAddress method to convert an iban account with direct coding scheme back to the address of Etay Fong. For example:

Let myaddr = web3.eth.Iban.toAddress ("XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS") console.log (myaddr) / / 0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8 check the validity of the iban account

The checksum in the iban account is used to help verify whether a given string is a valid iban account. You can use web3.eth.Iban.isValid () in web3.js to perform the verification. For example:

Let isValid = web3.eth.Iban.isValid ("XE81ETHXREGGAVOFYORK") console.log (isValid) / / trueisValid = web3.eth.Iban.isValid ("XE82ETHXREGGAVOFYORK") console.log (isValid) / / false, because the checksum is invalid so far, the study of "what is iban in Ethernet Square" is over, hoping to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report