Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
supplyPublicKey
must be passed for the NFT
assetType
maxSupply
cannot be passed for INFINITE
supply type
If you don't pass in supplyPublicKey
you will not be able to mint or burn tokens
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the name of the token, symbol, decimals, initialSupply, etc
Calls the Hedera SDK Create Token API to create a new fungible or non-fungible token (NFT) on the Hedera network.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with the account that has the ability to pause. This is defined during account creation with pausePublicKey
parameter.
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId.
Calls the Hedera SDK Pause Token API to pause a token. A token pause transaction prevents the token from being involved in any kind of operation. The token's pause key is required to sign the transaction. This is a key that is specified during the creation of a token. If a token has no pause key, you will not be able to pause the token. If the pause key was not set during the creation of a token, you will not be able to update the token to add this key.
This action cannot be called if this token was created without passing the pausePublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You do not need to pass the amount
for NFTs
You do not need to pass the metadata
for fungible tokens
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId, amount, etc.
Calls the Hedera SDK Mint Token API to mint new tokens for both fungible and non-fungible token (NFT) types, thereby increasing the total supply of the specified token. The new tokens are sent to the treasury account.
This action cannot be called if this token was created without passing the supplyPublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with the account that has the ability to unpause. This is defined during account creation with pausePublicKey
parameter.
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId.
Calls the Hedera SDK Unpause Token API to unpause a token. A token unpause transaction is a transaction that unpauses the token that was previously disabled from participating in transactions. The token's pause key is required to sign the transaction. Once the unpause transaction is submitted the token pause status is updated to unpause
.
This action cannot be called if this token was created without passing the pausePublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You do not need to pass the amount
for NFTs
You do not need to pass the metadata
for fungible tokens
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId, amount, etc.
Calls the Hedera SDK Burn Token API to burn tokens owned by the treasury account for both fungible and non-fungible token (NFT) types, thereby decreasing the total supply of the specified token.
This action cannot be called if this token was created without passing the supplyPublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
Note that you can also pass in multiple token Ids to associate multiple tokens to an account.
Parses the arguments that were passed
Returns the transaction receipt as response.
Some example responses:
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with the account that has the ability to unfreeze an account. This is defined during account creation with freezePublicKey
parameter.
Parses the arguments that were passed such as the tokenId, accountId, etc
This action cannot be called if this token was created without passing the freezePublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this .
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new is created and the account info is saved in snap state.
Calls the to associate the account with the token Ids that are passed in parameters. This works for associating both fungible and non-fungible tokens.
If you're getting any errors with the live demo, make sure you go through the section to learn about what you may be missing. You need to install in your browser for the live demo to work
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at .
You can also check out the to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this .
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new is created and the account info is saved in snap state.
Calls the to unfreeze an account. It unfreezes transfers of the specified token for the account.
If you're getting any errors with the live demo, make sure you go through the section to learn about what you may be missing. You need to install in your browser for the live demo to work
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at .
You can also check out the to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
Note that you can also pass in multiple token Ids to dissociate multiple tokens from an account.
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed
Calls the Hedera SDK Disassociate Tokens API to dissociate the account with the token Ids that are passed in parameters. This works for dissociating both fungible and non-fungible tokens.
Returns the transaction receipt as response.
Some example responses:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with the account that has the ability to grant KYC to an account. This is defined during account creation with kycPublicKey
parameter.
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId, accountId, etc
Calls the Hedera SDK Enable KYC Flag API to grant KYC to the Hedera accounts for the given Hedera token.
This action cannot be called if this token was created without passing the kycPublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with the account that has the ability to revoke KYC from an account. This is defined during account creation with kycPublicKey
parameter.
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId, accountId, etc
Calls the Hedera SDK Disable KYC Flag API to revoke KYC from the Hedera accounts for the given Hedera token.
This action cannot be called if this token was created without passing the kycPublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with the account that has the ability to wipe tokens from an account. This is defined during account creation with wipePublicKey
parameter.
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId, accountId, amount, etc.
Calls the Hedera SDK Wipe Token API to wipes the provided amount of fungible or non-fungible tokens from the specified Hedera account. This transaction does not delete tokens from the treasury account. Wiping an account's tokens burns the tokens and decreases the total supply.
This action cannot be called if this token was created without passing the wipePublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with the account that has the ability to update token fee schedule. This is defined during account creation with feeSchedulePublicKey
parameter.
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed
Calls the Hedera Token Update Token Fee Schedule API to update the custom fees for a given token. If the token does not have a fee schedule, the network response returned will be CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES. You will need to sign the transaction with the fee schedule key to update the fee schedule for the token.
This action cannot be called if this token was created without passing the feeScheedulePublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
At least one optional parameter must be passed before calling this API or it will fail
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed
Calls the Hedera SDK Update Token API to update the properties of the existing token. The admin key must sign this transaction to update any of the token properties. With one exception. All secondary keys can sign a transaction to change themselves. The admin key can update exisitng keys, but cannot add new keys if they were not set during the creation of the token. If no value is given for a field, that field is left unchanged.
This action cannot be called if this token was created without the admin key being set during token creation. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with an admin account. This is the account that had created the token originally
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId.
Calls the Hedera SDK Delete Token API to delete a token . Deleing a token marks a token as deleted, though it will remain in the ledger. The operation must be signed by the specified Admin Key of the Token. If the Admin Key is not set, the Transaction will result in TOKEN_IS_IMMUTABlE. Once deleted update, mint, burn, wipe, freeze, unfreeze, grant KYC, revoke KYC and token transfer transactions will resolve to TOKEN_WAS_DELETED.
This action cannot be called if this token was created without the admin key being set during token creation. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
Before this API can be called, a corresponding hts/initiateSwap
API must first be called that will initialize the atomic swap between two parties
This API must be called within 30 minutes after initializing the swap or the transaction will fail
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed
Uses scheduled transaction to implement the atomic swap feature whereby the requester
initiates the swap with the responder
by calling the hts/initiateSwap
API upon which the snap sends this transaction as a scheduled transaction to the ledger. Within 30 minutes, if the responder
calls this API with the scheduleId of the transaction, the swap is complete.
Returns the transaction receipt as response
Let's assume Alice wants to swap her 1 Hbar with 10 Tuum token that Bob has(basically a peer to peer swap)
Alice calls the snap API for hts/initiateSwap
and as part of the parameters, she says she wants to give her 1 Hbar to Bob if Bob can give Alice 10 Tuum tokens
Snap creates this atomic swap transaction and sends it to the network as a scheduled transaction with a max expiry of 30 minutes
Snap returns the schedule Id for this transaction
Alice lets Bob know about this atomic swap transaction and gives him the schedule Id
Bob queries the schedule Id and verifies everything looks good
Bob calls the snap API for hts/completeSwap
with the schedule Id
The scheduled transaction is executed and the atomic swap transaction is complete
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
You must call this API with the account that has the ability to freeze an account. This is defined during account creation with freezePublicKey
parameter.
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed such as the tokenId, accountId, etc
Calls the Hedera SDK Freeze Account API to freeze an account. It freezes transfers of the specified token for the account.
This action cannot be called if this token was created without passing the freezePublicKey
parameter. Furthermore, this action must also be called using the same public key account.
Returns the transaction receipt as response
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.
Hedera Wallet Snap connects to your currently connected Metamask account by default. To learn how apps can connect to Hedera Wallet Snap using a non-metamask(external) account, refer to this documentation.
Then, depending on whether you're trying to connect to a metamask account or a non-metamask account, you can call the snap API in the following way:
Both the requester and responder must be passed
You can have multiple atomic swaps as part of the same transaction with multiple requester and responder but all the parties must call the hts/completeSwap
API to complete the transaction or the transaction will fail
The responder
must must sign the transaction by calling hts/completeSwap
API within 30 minutes or the transaction will fail
Swap cannot be initiated with the same token. So, for example, requester cannot try to swap 1 Hbar with the responder for 10 Hbar
Retrieves the currently connected account the user has selected on Metamask. If it's the first time, a new snap account is created and the account info is saved in snap state.
Parses the arguments that were passed
Uses scheduled transaction to implement the atomic swap feature whereby the requester
initiates the swap with the responder
by calling this API upon which the snap sends this transaction as a scheduled transaction to the ledger. Within 30 minutes, if the responder
calls the hts/completeSwap
API with the scheduleId of the transaction, the swap is complete.
Returns the transaction receipt as response
Let's assume Alice wants to swap her 1 Hbar with 10 Tuum token that Bob has(basically a peer to peer swap)
Alice calls the snap API for hts/initiateSwap
and as part of the parameters, she says she wants to give her 1 Hbar to Bob if Bob can give Alice 10 Tuum tokens
Snap creates this atomic swap transaction and sends it to the network as a scheduled transaction with a max expiry of 30 minutes
Snap returns the schedule Id for this transaction
Alice lets Bob know about this atomic swap transaction and gives him the schedule Id
Bob queries the schedule Id and verifies everything looks good
Bob calls the snap API for hts/completeSwap
with the schedule Id
The scheduled transaction is executed and the atomic swap transaction is complete
An example response:
To ease the integration of Hedera Wallet Snap on an application, we have created a template web application that you can run locally and check out the code in its entirety to learn how you can integrate and interact with various APIs exposed by Hedera Wallet Snap. Check out the full source code at template application github repository.
You can also check out the API reference to learn how each API works.