Download OpenAPI specification:Download
Easiest way to create and manage crypto wallets. Get started by creating an API key at https://app.wally.xyz
npm install wally-sdk
Then follow the instructions in the README
Create a developer account, along with an organization and your first app, at https://app.wally.xyz. You can (and most likely will) have multiple apps. This will help you manage things between your testnet and mainnet services. Store your API key somewhere to be used in your app. You won't be able to access this API key again, but we can easily generate a new one for you in the dashboard.
Somewhere in your code, (most likely in your register user endpoint), you will want to add a request to create a wallet.
fetch(
'https://api.wally.xyz/{v1}/wallets', {
method: 'POST',
body: JSON.stringify({
'email': email,
'id': user.id,
}),
headers={
'Content-Type': 'application/json',
'Authorization': `Bearer ${wally_api_key}`
},
}
)
(See the expected response here)
You should now successfully have a wallet for that user. You can now reference it either by the ID you passed in, or their email address.
You can now send messages or transactions to be signed on behalf of this user like follows:
fetch(
'https://api.wally.xyz/{v1}/wallets/${user.id}/sign-message', {
method: 'POST',
body: JSON.stringify({
'message': message,
}),
headers={
'Content-Type': 'application/json',
'Authorization': `Bearer ${wally_api_key}`
},
}
)
(See the expected response here)
It's as simple as that! And users can always access their wallet via https://app.wally.xyz/wallet.
Copy the script from your app's dashboard and paste it into your app's HTML within the head tag. If you already have Google Analytics, Google Tag Manager, HotJar or another analytics script install, you can paste it after that in the same part of the code.
<script src="https://analytics.wally.xyz/index.js" clientId="WALLY-CLIENT-ID"></script>
Navigate to the Settings for your project (note this is not in the Designer UI). Click on "Custom Code" and paste the script into the Head Code section.
In your _document.js file, add the script inside a Head tag within your Render function. Your render function should look something like this:
render() {
return (
<Html>
<Head>
<meta
name="description"
content="Seamless onboarding infrastructure for the future of Web3"
/>
<link rel="icon" href="/favicon.ico" />
<script src="https://analytics.wally.xyz/index.js" clientId="WALLY-CLIENT-ID"></script>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
Sign a transaction with a Wallet
{- "to": "string",
- "from": "string",
- "nonce": 0,
- "gasLimit": 0,
- "gasPrice": 0,
- "data": "string",
- "value": 0,
- "chainId": 0,
- "type": 0,
- "maxPriorityFeePerGas": 0,
- "maxFeePerGas": 0,
- "customData": { },
- "ccipReadEnabled": true
}
{- "signature": "string"
}
Send a transaction with a Wallet
{- "to": "string",
- "from": "string",
- "nonce": 0,
- "gasLimit": 0,
- "gasPrice": 0,
- "data": "string",
- "value": 0,
- "chainId": 0,
- "type": 0,
- "maxPriorityFeePerGas": 0,
- "maxFeePerGas": 0,
- "customData": { },
- "ccipReadEnabled": true
}
{- "response": { }
}
Designed to relay requests to Thirdbuy's forwarder contract and paygas on the caller's behalf
{- "forwarderAddress": "string",
- "request": { },
- "signature": "string",
- "type": "string"
}
{- "code": "NOT_FOUND",
- "status": 404,
- "message": "Resource not found"
}
Deploy a contract for your App. NOTE: In order to complete this action, you will need to have Eth in your App's Wallet.
ImmutableX and MINT_NFT type contracts require metadataURI. Third Web contracts require structured metadata.
type | string Default: "MINT_NFT" The type of Contract you want to deploy |
name | string Default: "App name" Defines the token’s name, which other contracts and applications can identify. (e.g. Bored Ape Yacht Club) |
symbol | string Default: "App name with no vowels" Used to define token’s shorthand name or symbol (e.g BAYC) |
maxSupply | number Used to set the max number of NFTs |
units | string Default: "gwei" Used to set the format for the output of gas prices and transaction fees |
collectionDescription | string Used to set the description of the collection |
collectionIconUrl | string Used to set the description of the collection |
collectionMetadataApiUrl | string Used to set the metadata_api_url of the collection for retrieving NFT metadata json |
collectionImageUrl | string Used to set the image of the collection |
metadataSchema | Array of objects Default: [{"name":"name","type":"text","filterable":true},{"name":"description","type":"text","filterable":true},{"name":"image","type":"text","filterable":false},{"name":"properties","type":"continuous","filterable":true}] Used to set the schema for the metadata on ImmutableX |
metadataURI | string Metadata URI for the contract. This allows you to customize things about how the contract appears on marketplaces, and set attributes like resale royalties https://docs.opensea.io/docs/contract-level-metadata. There is a separate metadata URI that you can set for individual NFTs as well that specify data like rarity attributes. See the NFT documentation for more info on this. |
object Structured metadata for deploying the contract. Use this instead of metadataURI when deploying Third Web contracts. See more about Third Web metadata here: https://portal.thirdweb.com/typescript/sdk.nftcontractdeploymetadata. |
{- "type": "MINT_NFT",
- "name": "App name",
- "symbol": "App name with no vowels",
- "maxSupply": 0,
- "units": "wei",
- "collectionDescription": "string",
- "collectionIconUrl": "string",
- "collectionMetadataApiUrl": "string",
- "collectionImageUrl": "string",
- "metadataSchema": [
- {
- "name": "name",
- "type": "text",
- "filterable": true
}, - {
- "name": "description",
- "type": "text",
- "filterable": true
}, - {
- "name": "image",
- "type": "text",
- "filterable": false
}, - {
- "name": "properties",
- "type": "continuous",
- "filterable": true
}
], - "metadataURI": "string",
- "metadata": {
- "description": "string",
- "external_link": "string",
- "fee_recipient": "string",
- "image": "string",
- "name": "string",
- "platform_fee_basis_points": 0,
- "platform_fee_recipient": "string",
- "primary_sale_recipient": "string",
- "seller_fee_basis_points": 0,
- "symbol": "string",
- "trusted_forwarders": [
- "string"
]
}
}
{- "id": "string",
- "contractAddress": "string",
- "transactionHash": "string",
- "gasPrice": "string",
- "gasLimit": "string",
- "type": "MINT_NFT",
- "created": "2019-08-24T14:15:22Z"
}
Connect a contract deployed by thirdweb to your App. NOTE: This only works for contracts deployed by thirdweb
{- "type": "MINT_NFT",
- "name": "App name",
- "contractAddress": "string"
}
{- "id": "string",
- "contractAddress": "string",
- "type": "MINT_NFT"
}
Get all NFTs are that from a specific contract
[- {
- "id": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string",
- "metadata": { }
}
]
Set the claim conditions for a contract deployed by Third Web
{- "contractAddress": "string",
- "tokenId": 0
}
{ }
Estimate the fees needed to deploy a contract. Remember that gas fees fluctuate over time.
type | string Default: "MINT_NFT" The type of Contract you want to deploy |
name | string Default: "App name" Defines the token’s name, which other contracts and applications can identify. (e.g. Bored Ape Yacht Club) |
symbol | string Default: "App name with no vowels" Used to define token’s shorthand name or symbol (e.g BAYC) |
maxSupply | number Used to set the max number of NFTs |
units | string Default: "gwei" Used to set the format for the output of gas prices and transaction fees |
collectionDescription | string Used to set the description of the collection |
collectionIconUrl | string Used to set the description of the collection |
collectionMetadataApiUrl | string Used to set the metadata_api_url of the collection for retrieving NFT metadata json |
collectionImageUrl | string Used to set the image of the collection |
metadataURI | string Metadata URI for the contract. This allows you to customize things about how the contract appears on marketplaces, and set attributes like resale royalties https://docs.opensea.io/docs/contract-level-metadata. There is a separate metadata URI that you can set for individual NFTs as well that specify data like rarity attributes. See the NFT documentation for more info on this. |
description | string A human readable description of the item. |
external_link | string Optional url for the contract. |
fee_recipient | string The address that will receive the proceeds from secondary sales (royalties). |
image | string The URL to the image of the item. Can be just about any type of image, and can be IPFS URLs or paths. |
name | string Name of the item. |
platform_fee_basis_points | number The percentage (in basis points) of platform fees. |
platform_fee_recipient | string The address that will receive the proceeds from platform fees. |
primary_sale_recipient | string The address that will receive the proceeds from primary sales. Defaults to app wallet address if not provided. |
seller_fee_basis_points | number The percentage (in basis points) of royalties for secondary sales. |
symbol | string Symbol for the NFTs |
trusted_forwarders | Array of strings Custom gasless trusted forwarder addresses |
{- "gasUnits": "string",
- "feeData": {
- "maxFeePerGas": "string",
- "gasPrice": "string",
- "maxPriorityFeePerGas": "string"
}, - "type": "MINT_NFT",
- "fees": "string"
}
Create a new Wallet for the App specified in the authorization header
If email is provided and wallet address is NOT provided, it will attempt to create the user and the wallet. If the wallet address is provided, it will record the wallet address with the provided email or id if it exists in the request.
{- "email": "string",
- "id": "string",
- "address": "string",
- "tags": [
- "string"
]
}
{- "id": "string",
- "address": "string",
- "tags": [
- "string"
]
}
Create a wallet from analytics script upon metamask connect event
{- "device_id": "string",
- "address": "string",
- "clientId": "string",
- "provider_name": "string",
- "chain_name": "string",
- "device_type": "string"
}
{ }
Log user and create wallet if available from analytics script upon view page event
{- "device_id": "string",
- "address": "string",
- "clientId": "string",
- "provider_name": "string",
- "chain_name": "string",
- "device_type": "string"
}
{ }
Sign a transaction with a Wallet
{- "to": "string",
- "from": "string",
- "nonce": 0,
- "gasLimit": 0,
- "gasPrice": 0,
- "data": "string",
- "value": 0,
- "chainId": 0,
- "type": 0,
- "maxPriorityFeePerGas": 0,
- "maxFeePerGas": 0,
- "customData": { },
- "ccipReadEnabled": true
}
{- "signature": "string"
}
Sign typed data with a Wallet
{- "types": { },
- "primaryType": "string",
- "domain": {
- "name": "string",
- "version": "string",
- "chainId": { },
- "verifyingContract": "string",
- "salt": { }
}, - "message": { }
}
{- "address": "string",
- "signature": "string"
}
Send a transaction with a Wallet
{- "to": "string",
- "from": "string",
- "nonce": 0,
- "gasLimit": 0,
- "gasPrice": 0,
- "data": "string",
- "value": 0,
- "chainId": 0,
- "type": 0,
- "maxPriorityFeePerGas": 0,
- "maxFeePerGas": 0,
- "customData": { },
- "ccipReadEnabled": true
}
{- "response": { }
}
Preauthorize the transfer of an NFT created
{- "allowed": true,
- "expiry": { },
- "holder": "string",
- "nonce": 0,
- "r": "string",
- "s": "string",
- "spender": "string",
- "v": 0
}
Transfer using token using permit
{- "proof": {
- "allowed": true,
- "expiry": { },
- "holder": "string",
- "nonce": 0,
- "r": "string",
- "s": "string",
- "spender": "string",
- "v": 0
}, - "tokenId": "string",
- "gasPrice": 0,
- "data": "string",
- "value": 0,
- "chainId": 0,
- "type": 0,
- "maxPriorityFeePerGas": 0,
- "maxFeePerGas": 0,
- "toAddress": "string"
}
{- "permit": { },
- "transfer": { }
}
Create an NFT from a uri and assign it to a Wallet
{- "contractID": "string",
- "options": false,
- "tokenID": 0,
- "walletID": "string",
- "amount": 0
}
{- "appBalance": "string",
- "contractAddress": "string",
- "nfts": [
- {
- "id": "string",
- "tx": "string"
}
], - "walletId": "string"
}
Create an ERC721 NFT from a uri and assign it to a Wallet
{- "contractId": "string",
- "options": false,
- "uri": "string",
- "walletId": "string"
}
{- "id": "string",
- "appBalance": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string"
}
Create an ERC721 NFT from structured metadata and assign it to a Wallet based on the OpenSea metadata standard (https://docs.opensea.io/docs/metadata-standards)
{- "options": false,
- "contractAddress": "string",
- "metadata": { },
- "walletId": "string"
}
{- "id": "string",
- "appBalance": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string"
}
Create an ERC721 NFT from structured metadata and assign it to a Wallet based on the OpenSea metadata standard (https://docs.opensea.io/docs/metadata-standards)
{- "options": false,
- "contractAddress": "string",
- "tokenId": 0,
- "walletId": "string"
}
{- "id": "string",
- "appBalance": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string"
}
Create an NFT from structured metadata and assign it to a Wallet based on the OpenSea metadata standard (https://docs.opensea.io/docs/metadata-standards)
{- "options": false,
- "tokenId": 0,
- "contractId": "string",
- "metadata": { },
- "walletId": "string"
}
{- "id": "string",
- "appBalance": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string"
}
Create an NFT from a uri and assign it to a Wallet
{- "tokenId": 0,
- "contractId": "string",
- "options": false,
- "uri": "string",
- "walletId": "string"
}
{- "id": "string",
- "appBalance": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string"
}
Update an NFTs from a uri and assign it to an existing NFT
{- "uri": "string",
- "nftId": "string",
- "contractId": "string"
}
{- "id": "string",
- "uri": "string"
}
Search NFTs by wallet, address, and/or contract
[- {
- "id": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string",
- "metadata": { }
}
]
Get details about an NFT created with Wally
{- "id": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string",
- "metadata": { }
}
Transfer an NFT created with Wally to another Wallet within Wally
{- "id": "string",
- "toWalletId": "string"
}
{- "id": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string",
- "metadata": { }
}
Transfer an NFT created with Wally to an external wallet address
{- "nftId": "string",
- "toAddress": "string"
}
{- "id": "string",
- "contractAddress": "string",
- "txHash": "string",
- "uri": "string",
- "walletId": "string",
- "metadata": { }
}
Transfer tokens between internal Wallets
{- "amount": 0,
- "walletId": "string"
}
{- "walletId": "string"
}
Transfer tokens to external wallet addresses
{- "amount": 0,
- "toAddress": "string"
}
{- "address": "string"
}