Steps
Search Gas Fee
Retreives the current network fee (gas fee) information for the network (blockchain) corresponding to the ChainID.
val gas = fncyWallet.(
chainId = 3
)
See Also
Before creating a ticket, it checks for transferability, nonce, gasLimit, etc.
There are three types of ticket transfers.
AssetTransfer : CoinTransfer
SmartContract : TokenTransfer & Contract Execution
WalletConnect : Used when connecting to WalletConnect
See Also
Transfer Coin
val info = fncyWallet.estimateTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.AssetTransfer,
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO //For ETH Transfers
)
Transfer Token(Contract Execution)
val info = fncyWallet.estimateTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.SmartContract, //
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "0".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
contractAddress = "0x1234...", //Contract Address
txInput = "0x123456....", //Data
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO //For ETH Transfers
)
WalletConnect
val info = fncyWallet.estimateTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.WalletConnect, //
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice: "10000000000".toBigInteger(), //Gas Price (in wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId: 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO //For ETH Transfers
)
Create Ticket
Registers ticket (transaction information) in the server to send to the network, and reterieves the UUID information for that ticket.
See Also
Transfer Coin
val info = fncyWallet.makeTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.AssetTransfer,
toAddress = "0x1234...", //Address to Receive Coinss
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO, //For ETH Transfers
txGasLimit = "21000".toBigInteger() // Gas Limit
)
Transfer Token(Contract Execution)
val info = fncyWallet.makeTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.SmartContract,
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO, //For ETH Transfers
txGasLimit = "21000".toBigInteger() // Gas Limit
)
WalletConnect
val info = fncyWallet.makeTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.WalletConnect,
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO, //For ETH Transfers
txGasLimit = "21000".toBigInteger() // Gas Limit
)
Use TicketUuid to get the ticket information corresponding to that Uuid.
val info = fncyWallet.getTicketInfo(
ticketUuid = "ticketUuid", // Ticekt UUID
)
See Also
Transfer Ticket
Passes the issued ticket UUID and wallet password to execute an actual transaction with that ticket information.
val result = fncyWallet.sendTicket(
ticketUuids = "ticketUuid", // Ticekt UUID
pinNumber = "000000" // Wallet Password
)
See Also