CN114020253A - Method for detecting validity of EOS block chain address - Google Patents

Method for detecting validity of EOS block chain address Download PDF

Info

Publication number
CN114020253A
CN114020253A CN202111265879.9A CN202111265879A CN114020253A CN 114020253 A CN114020253 A CN 114020253A CN 202111265879 A CN202111265879 A CN 202111265879A CN 114020253 A CN114020253 A CN 114020253A
Authority
CN
China
Prior art keywords
account
eos
address
information
entering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111265879.9A
Other languages
Chinese (zh)
Inventor
刘潇骁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Qiruike Technology Co Ltd
Original Assignee
Sichuan Qiruike Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Qiruike Technology Co Ltd filed Critical Sichuan Qiruike Technology Co Ltd
Priority to CN202111265879.9A priority Critical patent/CN114020253A/en
Publication of CN114020253A publication Critical patent/CN114020253A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a method for detecting the validity of an EOS block chain address, which comprises the following steps: constructing an input callback function of an address text, and receiving and storing a character string of a target transaction address; removing spaces before and after the character string; judging whether the account is legal or not by using an EOS account rule, if not, returning that the account does not exist, otherwise, entering the next step; using an EOS node API get _ account to inquire the information of using the account; analyzing interface API return information, judging whether an account _ name field exists, if not, returning that an account does not exist, otherwise, entering the next step; the account information is legal and really exists in a chain, and the conventional transaction calling is carried out; the invention can prevent the loss of the assets on the chain caused by the filling error of the EOS address.

Description

Method for detecting validity of EOS block chain address
Technical Field
The invention relates to the technical field of block chains, in particular to a method for detecting the address validity of an EOS block chain.
Background
The EOS, which may be understood as Enterprise Operation System, is a block chain operating System designed for commercial distributed applications. EOS is a new blockchain architecture introduced, aiming at realizing the performance extension of distributed application. It is not currency like bitcoin and etherhouse, but rather tokens issued over EOS software items, called blockchain 3.0.
The total users of the EOS in 2019 exceeded 572000 with active users being approximately 518000. A total of 493 dapps were observed, 479 of which were active. The numerous users make frequent asset transfers on the EOS chain, and the loss of assets often occurs, wherein the forgetting/losing of the private key and the transferring of wrong accounts account a considerable proportion, and for such cases, it is basically the loss of property due to the fault of the coin holder, so it may not be practical to retrieve the lost property through the existing arbitration rules.
When the existing wallet transfers assets on an EOS chain, the legality of a received address is not verified, so that when the wallet is used for transfer operation, due to the fact that a clipboard changes, characters are inadvertently added or deleted in a text input area and the like, an incorrect address of an account is input, once the transfer operation is executed, the transferred assets cannot be retrieved basically, and asset loss is caused.
Disclosure of Invention
In order to solve the problems in the prior art, the invention aims to provide a method for detecting the validity of an EOS blockchain address, which can prevent the loss of assets on a chain caused by the filling error of the EOS address.
In order to achieve the purpose, the invention adopts the technical scheme that: a method for detecting the validity of an EOS blockchain address comprises the following steps:
step 1, constructing an input callback function of an address text, and receiving and storing a character string of a target transaction address;
step 2, removing spaces before and after the character string;
step 3, judging whether the account is legal or not by using an EOS account rule, if not, returning that the account does not exist, otherwise, entering the next step;
step 4, using an EOS node API get _ account to inquire the information of using the account;
step 5, analyzing the returned information of the interface API, judging whether an account _ name field exists, if not, returning that the account does not exist, otherwise, entering the next step;
and 6, the account information is legal and really exists in the chain, and the conventional transaction calling is carried out.
The invention has the beneficial effects that:
according to the invention, before the transaction is executed, the legality and authenticity of the account are verified, so that asset loss caused by a wrong account address is avoided.
Drawings
FIG. 1 is a block flow diagram of an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Examples
As shown in fig. 1, a method for detecting the validity of an EOS blockchain address, assuming that an existing EOS account "eosaccount12" is required to initiate a transfer transaction to the account address, specifically includes the following steps:
1. and constructing an input callback function of address text, and receiving and storing the character string of the target transaction address.
String aimAccount="eosaccount12";
2. And removing spaces before and after the character string.
aimAccount.trim();
3. And judging whether the account is legal or not by using the EOS account rule, if not, returning to the account, otherwise, entering the next step.
Judging that the usable characters are as follows according to EOS account naming rules:
1) the number in the account is 12345;
2) the letters in the account are a to z;
3) the symbol "-" in the account;
the judgment method is that the combination can contain a String valid String ═ 12345 zbcdefghijklmnopqrstwrwxyz'
Sequentially splitting the aimACCount into single characters k;
boolean status=validString.contains(k);
sequentially checking whether a single character k obtained by splitting the aimAccount is one of validString, and if so, entering the next step;
if not, the returned account is illegal.
4. And querying the information of the account number by using an EOS node API interface get _ account.
Figure BDA0003326912100000031
Figure BDA0003326912100000041
5. And analyzing the returned information of the interface API, judging whether an account _ name field exists, if not, returning that the account does not exist, otherwise, entering the next step.
6. The account information is legal and really exists in the chain, and the conventional transaction calling logic is entered.
The above-mentioned embodiments only express the specific embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (1)

1. A method for detecting the validity of an EOS blockchain address is characterized by comprising the following steps:
step 1, constructing an input callback function of an address text, and receiving and storing a character string of a target transaction address;
step 2, removing spaces before and after the character string;
step 3, judging whether the account is legal or not by using an EOS account rule, if not, returning that the account does not exist, otherwise, entering the next step;
step 4, using an EOS node API get _ account to inquire the information of using the account;
step 5, analyzing the returned information of the interface API, judging whether an account _ name field exists, if not, returning that the account does not exist, otherwise, entering the next step;
and 6, the account information is legal and really exists in the chain, and the conventional transaction calling is carried out.
CN202111265879.9A 2021-10-28 2021-10-28 Method for detecting validity of EOS block chain address Pending CN114020253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111265879.9A CN114020253A (en) 2021-10-28 2021-10-28 Method for detecting validity of EOS block chain address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111265879.9A CN114020253A (en) 2021-10-28 2021-10-28 Method for detecting validity of EOS block chain address

Publications (1)

Publication Number Publication Date
CN114020253A true CN114020253A (en) 2022-02-08

Family

ID=80058399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111265879.9A Pending CN114020253A (en) 2021-10-28 2021-10-28 Method for detecting validity of EOS block chain address

Country Status (1)

Country Link
CN (1) CN114020253A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679394A (en) * 2022-04-12 2022-06-28 北京理工大学 Bit currency address classification verification method based on network space search engine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109102269A (en) * 2018-06-13 2018-12-28 湖南搜云网络科技股份有限公司 Transfer account method and device, block chain node and storage medium based on block chain
CN109242461A (en) * 2018-08-01 2019-01-18 点点客信息技术股份有限公司 Block chain digital asset method of payment based on cell-phone number
CN109615348A (en) * 2018-10-18 2019-04-12 玄章技术有限公司 A kind of method of mark encryption currency wallet address and a kind of encryption money-system
CN112069526A (en) * 2020-10-15 2020-12-11 深圳壹账通智能科技有限公司 Block chain-based account attribute processing method and device and storage medium
KR20210111066A (en) * 2020-03-02 2021-09-10 삼성전자주식회사 Electronic device for providing transaction related information account and operating method therof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109102269A (en) * 2018-06-13 2018-12-28 湖南搜云网络科技股份有限公司 Transfer account method and device, block chain node and storage medium based on block chain
CN109242461A (en) * 2018-08-01 2019-01-18 点点客信息技术股份有限公司 Block chain digital asset method of payment based on cell-phone number
CN109615348A (en) * 2018-10-18 2019-04-12 玄章技术有限公司 A kind of method of mark encryption currency wallet address and a kind of encryption money-system
KR20210111066A (en) * 2020-03-02 2021-09-10 삼성전자주식회사 Electronic device for providing transaction related information account and operating method therof
CN112069526A (en) * 2020-10-15 2020-12-11 深圳壹账通智能科技有限公司 Block chain-based account attribute processing method and device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WEIXIN_39882589: "php验证输入合法性的代码, PHP-BTC、ETH地址合法性校验(正则)", pages 1, Retrieved from the Internet <URL:《https://blog.csdn.net/weixin_39882589/article/details/115661546》> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679394A (en) * 2022-04-12 2022-06-28 北京理工大学 Bit currency address classification verification method based on network space search engine
CN114679394B (en) * 2022-04-12 2023-09-15 北京理工大学 Bitcoin address classification verification method based on network space search engine

Similar Documents

Publication Publication Date Title
US11095586B2 (en) Detection of spam messages
CN104035923B (en) Inquire about the method and device of data
JP2020511059A (en) Information authentication method and system
CN106096967A (en) A kind of method that block chain carrys out reference numerals money flow
CN104320262A (en) User public key address binding, searching and verifying method and system based on crypto currency open account book technology
WO2017145049A1 (en) Consolidated blockchain-based data transfer control method and system
CN114868143A (en) Destination addressing for transactions associated with a distributed ledger
US8234496B1 (en) Image leak prevention using digital watermark
US20090106369A1 (en) Duplicate email address detection for a contact
CN108365961A (en) The response method and server that interface call method and terminal device, interface call
CN102663067B (en) File opening method based on Linux operating system terminal
CN114020253A (en) Method for detecting validity of EOS block chain address
KR102091625B1 (en) Method of de-mixing for Bitcoin mixing services
CN111723159A (en) Data verification method and device based on block chain
CN110517137A (en) A kind of method and system of systematic function modular safety contract
WO2021239354A1 (en) Filtering blockchain transactions
KR102311354B1 (en) Blockchain transaction method with reduced transaction size using cryptographic hash algorithm
KR101834808B1 (en) Apparatus and method for protecting file from encryption
WO2014165925A1 (en) Method and system for the secure transfer and verification of ownership of digital sequences
CN104052720A (en) Information authentication method and system thereof
CN110009343B (en) Method for pre-locking Token by adopting intelligent contract
US20200328892A1 (en) Root-of-trust blockchain verification
CN111797420A (en) Data authorization and evidence storage method and system based on block chain
CN111159774A (en) Decentralized intelligent contract escrow wallet method and system
CN108989418A (en) A kind of resource amount method of mixed cloud object storage common authentication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination