Uptick Web3 SDK is a core element of these services. It consolidates essential Web3 functions into a single package, enabling developers to efficiently create business-specific applications using Uptick infrastructure. This approach allows developers to focus on business logic without needing to manage general-purpose modules or possess deep blockchain expertise.
Uptick Web3 SDK is a JavaScript SDK that currently supports the Vue development framework. React and React Native developers can refer to the contract files and calling methods within the SDK to assemble the signature manually. The React Native version of the SDK will be launched soon. SDKs for other programming languages are also in development, so stay tuned.
The Uptick Web3 SDK is a powerful tool for Vue projects, simplifying user connections to decentralized applications (DApps) and streamlining blockchain interactions. It supports both MetaMask and WalletConnect logins, making it ideal for applications that require user authentication and blockchain transactions.
This enables traditional businesses to integrate smoothly with Web3, and combines essential blockchain operations all into one package. The SDK saves time and resources, and empowers developers to build applications that integrate business logic without unnecessary complexity.
The SDK offers a range of NFT and RWA operations, including:
- Deploying smart contracts
- Minting NFTs/RWAs
- Transferring assets
- Supporting multiple sales modes, such as fixed-price listings, discounted sales, timed auctions, and lazy mints
These features allow developers to create decentralized wallets, launch NFT/RWA trading markets with a wide range of sales models, build membership systems, and engage with the evolving RWA ecosystem.
This SDK release marks the first step in making Uptick’s full range of services available to developers.
Next, we’ll deliver Uptick Services via cloud APIs, rolling out the service layer through iterative releases to simplify Web3 business application development for traditional developers.
To install with Yarn, run:
yarn add @uptickjs/uptick-web3-sdk
To install with NPM, run:
npm install @uptickjs/uptick-web3-sdk
Initialize SDK in the project entry file app.js
import { init as metaMaskInit } from '@uptickjs/uptick-web3-sdk/src/index';
let chainId=process.env.VUE_APP_ADD_NETWORK_CHAIN_ID;
let rpc=process.env.VUE_APP_ADD_NETWORK_CHAIN_UPC_URL;
let wallet=metaMaskInit(rpc,chainId)
Vue.prototype.$wallet = wallet.wallet;
import { EthereumProvider } from "@walletconnect/ethereum-provider";
import { ethers } from "ethers";
export async function initProvider(){
const provider = await EthereumProvider.init({
projectId,
optionalChains: [chainIdInt], //current chainId
metadata: {
name: 'UptickNFT',
description: 'Build your NFT world on Uptick',
url: gethost(), // origin must match your domain & subdomain
icons: ['https://uptick.upticknft.com/logo.jpg']
},
optionalMethods: ["eth_sendTransaction",
"personal_sign",
"eth_estimateGas",
"eth_signTypedData"],
showQrModal: true,
qrModalOptions: {
themeMode: "light",
},
rpcMap: {
117:uptickUrl,
}
});
provider.chainId=chainIdInt;
const WalletProvider = new ethers.providers.Web3Provider(provider)
provider.on("display_uri", (uri) => {
events.$emit('wallet_is_connect',uri)
});
// chain changed
provider.on('chainChanged', (result) => {
});
// accounts changed
provider.on('accountsChanged', (accounts) => {
});
// session established
provider.on('connect', (result) => {
let walletparams = {
connected:true
}
localStorage.setItem("walletconnect",JSON.stringify(walletparams) );
});
provider.on('session_event', (result) => {
});
provider.on('disconnect',(result) => {
});
window.walletProvider=provider;
return provider;
}
getAccountInfo()
getUptickAddress()
Params | Parameter type | Parameter description |
---|---|---|
evmAddress | String | User address |
getTokenBalance()
Params | Parameter type | Parameter description |
---|---|---|
owner | String | User address |
deploy()
Params | Parameter type | Require | Parameter description |
---|---|---|---|
nftType | String | true | nft type |
name | String | true | contract name |
metadataUrl | String | false | metadata information |
lazySignAddress | String | false | signature address, used to verify signature when minting assets |
mintNft()
Params | Parameter type | Require | Parameter description |
---|---|---|---|
nftType | String | true | nft type |
toAddress | String | true | receiving address |
nftId | String | true | nftId |
metaDataUrl | String | true | metadata information |
royaltyPercentage | String | true | Share ratio |
amountValue | Number | false | Quantity |
lazyNftMint()
Params | Parameter type | Require | Parameter description |
---|---|---|---|
toAddress | String | true | Receiving address |
nftId | String | true | nftId |
metaDataUrl | String | true | Metadata information |
payAddress | String | true | Payment address of token contract |
payAmount | Number | true | Payment amount |
creatorFee | Number | true | Payment fee |
signature | String | true | Signature information |
setContractAddress()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
platformAddress | String | transaction contract address |
transferFrom()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
toAddress | String | receiving address |
nftId | String | nftId |
amountValue | Number | transfer amount |
onSale()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftid | String | nftid |
value | String | Listing price |
fee | Number | Handling fee |
amount | Number | Listing quantity |
payAddress | String | The token contract address for selling your NFT |
onSaleBatch()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftids | Array | nftid |
value | Array | Listing price |
fee | Number | Handling fee |
amounts | Array | Listing quantity |
payAddress | Array | The token contract address for selling your NFT |
couponOnSale()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftid | String | nftid |
value | String | Listing price |
couponCode | String | Discount code |
reducedPrice | Number | Discount price |
fee | Number | Handling fee |
amount | Number | Listing quantity |
payAddress | String | The token contract address for selling your NFT |
auction_onsale()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftid | String | nftid |
startTimeStamp | String | auction start time |
endTimeStamp | String | auction end time |
startBid | String | starting price |
fixPrice | String | fixed price |
ReserveBid | String | reserve price |
fee | Number | handling fee |
amount | Number | listing quantity |
payAddress | String | The token contract address for selling your NFT |
auction_placeBid()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftid | String | nftid |
fixPrice | Number | Bidding price |
payAddress | String | The token contract address for bidding |
owner | String | Bidder address |
offSale()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftid | String | nftid |
offSaleBatch()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftids | Array | nftid |
auction_end()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftid | String | nftid |
owner | String | ERC1155 type, requires the address of the owner |
placeOrder()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
nftAddress | String | nft contract address |
nftid | String | nftid |
toAddress | String | buyer address |
price | Number | purchase price |
marketType | String | purchase type |
couponCode | String | coupon code, fill in ‘0’ if none |
couponLink | String | couponLink, fill in ‘0’ if none |
payAddress | String | The token contract address for purchasing |
createOffer()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
offerNumber | String | Offer number (random number) |
nftAddress | String | nft contract address |
nftid | String | nftid |
payAddress | String | The token contract address for offer |
payAmount | Number | Offer amount |
expiry | String | Offer validity period |
fee | Number | Handling fee |
cancelOffer()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
offerNumber | String | Offer number (random number) |
acceptOffer()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
offerNumber | String | offer number (random number) |
nftAddress | String | nft contract address |
nftid | String | nftid |
offerPlatformAddress | String | offer contract address |
setBridgeApproval()
Params | Parameter type | Parameter description |
---|---|---|
nftType | String | nft type |
getFeeByChainID()
Params | Parameter type | Parameter description |
---|---|---|
tokenIds | Array | tokenid |
chainId | Number | chainid |
uptickCrossToEVM()
Params | Parameter type | Parameter description |
---|---|---|
srcChainName | String | Source chain name |
destinationChainId | Number | Target chain chainid |
toAddress | String | Receiving address |
metadate | String | Metadate information |
offerPlatformAddress | String | Offer contract address |