Default Methods

walletudrox.oauth and walletudrox.connect (methods)

These two methods must be used to connect the client's udrox wallet with their app

// best way to use onclick button, see the examples
walletudrox.oauth();
walletudrox.connect();

walletudrox.transaction (method)

("wallet address 0x...","amounth","token")

Parameters:

  1. (String) Address where the funds will arrive

  2. (String) Transaction value, examples "5" "5.4444534" or "81767.6776666"

  3. (String) Token, You can use the DEFAULT CONTRACTS TOKENS or you can also customize your own token adapting it to the walletudrox.useContract method, It is also possible to use the contract address for custom contracts.

With this function we can carry out a transaction authorized by the client user to any wallet address

Using DEFAULT CONTRACTS:

walletudrox.transaction("0xd1f02F69B9CA9fD4AC52fED6c55db92C8F81ce90","5","UDROX");

or custom contract

walletudrox.transaction("0x0B77E2947375318fb0F6395A0C36855628685D0a","5","0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035");

walletudrox.changeNet (method)

Allows the client user to change the network they work with in their app

// best way to use onclick
walletudrox.changeNet();

walletudrox.changeAccount (method)

Allows the client user to change the udrox wallet account with which they work in their app

// best way to use onclick
walletudrox.changeAccount();

walletudrox.useContract (Method)

The implementation of the useContract method is not necessary if the DEFAULT CONTRACTS AND NETS are used

If we want a client to add a contract before making a transaction, we can use this method

// best way to use onclick
walletudrox.useContract("USDC");

If we want to work with our custom contracts we must make the client agree to add to the Wallet Udrox

// best way to use onclick
walletudrox.useContract("0xdC33B264de35cF207c661FE37Cb16447F09b74B4","https://wallet.udrox.com/wallet/img/criptos/copc-ico.png");

Parameters

  1. (String) Contract Address

  2. (String) Url image for Wallet Udrox

So we can add a personalized contact with whom I want to operate

walletudrox.useNet (Method)

With this function we make the client user integrate into an udrox wallet some DEFAULT NETWORKS or a network added from walletudrox.addNet

// best way to use onclick
walletudrox.useNet("MINTME");

walletudrox.addNet - Custom (if working with custom networks) (Method)

An example of using addNet:

walletudrox.addNet("1101","https://zkevm-rpc.com","Polygon zkEVM Network","ETH","https://zkevm.polygonscan.com");
Parameters (Strings)
Explanation

"1101"

Indicates the NETWORK ID

"https://zkevm-rpc.com"

Network RCP

"Polygon zkEVM Network"

Network name

"ETH"

Main currency abbreviation

"https://zkevm.polygonscan.com"

Url where transactions can be scanned

This step is only necessary the network is not default in udrox you can SEE DEFAULT NETWORKS

Last updated