1674572280
This is the Squarelink Web3 SDK which enables Squarelink enhancements to standard Web3 JSON RPC requests.
Check out the Squarelink Documentation for more information, quick-start guides, etc.
$ npm install squarelink
<script src="https://squarelink.com/js/squarelink.min.js"></script>
First, register your application at dev.squarelink.com to obtain your CLIENT ID
import Web3 from 'web3'
import Squarelink from 'squarelink'
const sqlk = new Squarelink('<CLIENT ID>')
// Use callback or Promise
sqlk.getProvider(provider => {
const web3 = new Web3(provider)
// Use the web3 library as you would normally!
web3.currentProvider.enable()
})
const sqlk = new Squarelink(clientId [, network][, opts])
Squarelink
-Object
- Initializes a Squarelink Web3 Provider for you
clientId
-String
- The Client ID provided to you when you register your DApp in the Squarelink Developer Console
network
-String|Object
- Configures the RPC node you're connecting to. See a list of our available networks. Defaults to 'mainnet'.
opts
- Object
- Pass additional options to the Squarelink SDK.
// connect to the Ropsten network
new Squarelink('<CLIENT ID>', 'ropsten')
// connect to a custom private network
new Squarelink('<CLIENT ID>', {
url: 'https://localhost:8545',
chainId: 420
})
opts
)scope
- Array
- Request additional scopes to use custom Squarelink functions.useSync
- Boolean
- See getProviderSync below for usage (default = false).user
- Equivalent to all scopes belowuser:name
- Access to read user's nameuser:email
- Access to user's email addressuser:security
- Access to read user's security settingsweb3.currentProvider.isSquarelink
Squarelink.getName() - requires the user
or user:name
scope
Squarelink.getEmail() - requires the user
or user:email
scope
Squarelink.getSecuritySettings() - requires the user
or user:security
scope
The getProvider
function fetches a list of our supported networks and their RPC endpoints from our API. This allows us to remotely switch RPC providers to ensure 100% uptime and remove faulty/compromised endpoints.
If you are unable to support callbacks/promises, you can use getProviderSync
which uses hard-coded RPC endpoints. NOTE: we cannot guarantee 100% uptime with this method.
const sqlk = new Squarelink('<CLIENT ID>', 'mainnet', { useSync: true })
const web3 = new Web(sqlk.getProviderSync())
Author: Squarelink-Inc
Source code: https://github.com/Squarelink-Inc/Squarelink-Web3
License: MIT license
#web3 #blockchain
1592668860
In this tutorial, we’ll read about the Android SDK Manager. We will see what is SDK manager in Android and why and how it is important for Android. So, SDK stands for Software Development Kit, which is a collection of software tools required. SDK basically helps Android to download tools and recent versions of Android. Every time a new Android version is released, along with it is released an SDK corresponding to it. This SDK must be installed by the developers for the devices.
What is SDK Manager?
A Software development kit is a set of tools required for the development of applications for Android. It also ensures that the progress of App development goes as flat as pancakes. We need SDK irrespective of the language we are using. Android SDK comes wrapped up with the Android Studio these days. An Android SDK separates the tools, platforms and other components into packages. These can be downloaded from the SDK Manager.
#android tutorials #android sdk manager #android sdk manager download #android sdk tools #android studio sdk manager #sdk download #sdk manager #sdk tools
1673695620
Installation
To install the SDK with the go get
command, run the following:
go get github.com/thirdweb-dev/go-sdk/v2/thirdweb
To start using this SDK, you just need to pass in a provider configuration.
Once you have all the necessary dependencies, you can follow the following setup steps to get started with SDK read-only functions:
package main
import (
"fmt"
"github.com/thirdweb-dev/go-sdk/v2/thirdweb"
)
func main() {
// Creates a new SDK instance to get read-only data for your contracts, you can pass:
// - a chain name (mainnet, rinkeby, goerli, polygon, mumbai, avalanche, fantom)
// - a custom RPC URL
sdk, err := thirdweb.NewThirdwebSDK("mumbai", nil)
if err != nil {
panic(err)
}
// Now we can interact with the SDK, like displaying the connected chain ID
chainId, err := sdk.GetChainID()
if err != nil {
panic(err)
}
fmt.Println("New SDK instance create on chain", chainId)
}
Once you instantiate the SDK, you can use it to access your thirdweb contracts. You can use SDK's contract getter functions like GetNFTCollection
, GetEdition
, and GetNFTDrop
, to get the respective SDK contract instances. To use an NFT Collection contract for example, you can do the following.
package main
import (
"fmt"
"github.com/thirdweb-dev/go-sdk/v2/thirdweb"
)
func main() {
sdk, err := thirdweb.NewThirdwebSDK("mumbai", nil)
if err != nil {
panic(err)
}
// Add your NFT Collection contract address here
address := "0x..."
nft, err := sdk.GetNFTCollection(address)
if err != nil {
panic(err)
}
// Now you can use any of the read-only SDK contract functions
nfts, err := nft.GetAll()
if err != nil {
panic(err)
}
fmt.Printf("%d NFTs found on this contract\n", len(nfts))
}
In order to execute transactions on your contract, the SDK needs to know the wallet that is performing those transactions. For that it needs the private key of the wallet you want to execute transactions from.
:warning: Never commit private keys to file tracking history, or your account could be compromised.
To connect your wallet to the SDK, you can use the following setup:
package main
import (
"fmt"
"encoding/json"
"github.com/thirdweb-dev/go-sdk/v2/thirdweb"
)
func main() {
// Get your private key securely (preferably from an environment variable)
privateKey := "..."
// Instantiate the SDK with your privateKey
sdk, err := thirdweb.NewThirdwebSDK("mumbai", &thirdweb.SDKOptions{
PrivateKey: privateKey,
})
if err != nil {
panic(err)
}
// Replace your contract address here
address := "0x..."
nft, err := sdk.GetNFTCollection(address)
if err != nil {
panic(err)
}
// Now you can execute transactions using the SDK contract functions
tx, err := nft.Mint(
&thirdweb.NFTMetadataInput{
Name: "Test NFT",
Description: "Minted with the thirdweb Go SDK",
Image: "ipfs://QmcCJC4T37rykDjR6oorM8hpB9GQWHKWbAi2YR1uTabUZu/0",
},
)
if err != nil {
panic(err)
}
result, _ := json.Marshal(&tx)
fmt.Println(string(result))
}
Author: thirdweb-dev
Source code: https://github.com/thirdweb-dev/go-sdk
License: Apache-2.0 license
#SDK #web3 #blockchain #Golang
1624342320
Welcome to the June release of the Azure SDK. We have updated the following libraries:
JsonWebKey
.#azure sdk #azure #azure-sdk #javascript #python #release #sdk
1674572280
This is the Squarelink Web3 SDK which enables Squarelink enhancements to standard Web3 JSON RPC requests.
Check out the Squarelink Documentation for more information, quick-start guides, etc.
$ npm install squarelink
<script src="https://squarelink.com/js/squarelink.min.js"></script>
First, register your application at dev.squarelink.com to obtain your CLIENT ID
import Web3 from 'web3'
import Squarelink from 'squarelink'
const sqlk = new Squarelink('<CLIENT ID>')
// Use callback or Promise
sqlk.getProvider(provider => {
const web3 = new Web3(provider)
// Use the web3 library as you would normally!
web3.currentProvider.enable()
})
const sqlk = new Squarelink(clientId [, network][, opts])
Squarelink
-Object
- Initializes a Squarelink Web3 Provider for you
clientId
-String
- The Client ID provided to you when you register your DApp in the Squarelink Developer Console
network
-String|Object
- Configures the RPC node you're connecting to. See a list of our available networks. Defaults to 'mainnet'.
opts
- Object
- Pass additional options to the Squarelink SDK.
// connect to the Ropsten network
new Squarelink('<CLIENT ID>', 'ropsten')
// connect to a custom private network
new Squarelink('<CLIENT ID>', {
url: 'https://localhost:8545',
chainId: 420
})
opts
)scope
- Array
- Request additional scopes to use custom Squarelink functions.useSync
- Boolean
- See getProviderSync below for usage (default = false).user
- Equivalent to all scopes belowuser:name
- Access to read user's nameuser:email
- Access to user's email addressuser:security
- Access to read user's security settingsweb3.currentProvider.isSquarelink
Squarelink.getName() - requires the user
or user:name
scope
Squarelink.getEmail() - requires the user
or user:email
scope
Squarelink.getSecuritySettings() - requires the user
or user:security
scope
The getProvider
function fetches a list of our supported networks and their RPC endpoints from our API. This allows us to remotely switch RPC providers to ensure 100% uptime and remove faulty/compromised endpoints.
If you are unable to support callbacks/promises, you can use getProviderSync
which uses hard-coded RPC endpoints. NOTE: we cannot guarantee 100% uptime with this method.
const sqlk = new Squarelink('<CLIENT ID>', 'mainnet', { useSync: true })
const web3 = new Web(sqlk.getProviderSync())
Author: Squarelink-Inc
Source code: https://github.com/Squarelink-Inc/Squarelink-Web3
License: MIT license
#web3 #blockchain
1620988892
In the modern development landscape, API and SDK are the driving force behind web communication and the implementation of third-party APIs. Watch this video to see how businesses save millions by using APIs.
APIs which stand for Application Programming Interfaces make the software development process easy by permitting a seamless and secure data transfer between two apps. It also helps to improve the exchange of functionality between two applications.
SDK stands for Software Development Kit. It is a collection of software development tools in one installable package. They facilitate the app development process.
Understanding the difference between API and SDK is incredibly important for fostering a developer ecosystem. Watch this video to see how businesses save millions by using APIs.
#sdk #api #sdk vs api #what's the difference between sdk and api