NPM Documentation
NPM Library
Initialization
[!NOTE] An empty SCLWallet object must be created to use the library.
Create Wallet
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
wallet_name | string | The name of the wallet. | "WalletName" |
password | string | The password of the wallet. | "password" |
Code
Results
Output | Type | Description |
---|---|---|
| result | The wallet is created successfully. |
| result | The wallet has already been created with that name. |
| error | There is an issue with the indexedDB. |
Init
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
wallet_name | string | The name of the wallet. | "WalletName" |
password | string | The password of the wallet. | "password" |
network | string | The network you are using (mainnet or testnet). | "mainnet" |
esplora_url | string | The address of the esplora you are using. | "https://blockstream.info/" |
Code
Results
Output | Type | Description |
---|---|---|
| result | The wallet is loaded successfully. |
| error | There is an issue with the indexedDB. |
| error | The password is incorrect. |
| error | A wallet has not been created yet. |
Generate Wallet
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
wallet_name | string | The name of the wallet. | "WalletName" |
password | string | The password of the wallet. | "password" |
seed_phrase | string | The seed phrase generated on wallet creation. | "water danger cupboard garlic offer display lake boring piece clay identify giggle" |
Code
Results
Output | Type | Description |
---|---|---|
| result | The wallet is created successfully. |
| result | The wallet has already been created with that name. |
| error | There is an issue with the indexedDB. |
| error | The mnemonic is invalid. |
Has Wallet
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
wallet_name | string | The name of the wallet. | "WalletName" |
Code
Results
Output | Type | Description |
---|---|---|
| result | The wallet exists. |
| result | The wallet does not exist. |
| error | There is an issue with the indexedDB. |
Generate Seed Phrase
Code
Results
Output | Type | Description |
---|---|---|
| result | Generate the mnemonic. |
Get Mnemonic
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
password | string | The password of the wallet. | "password" |
Code
Results
Output | Type | Description |
---|---|---|
| result | The mnemonic is returned. |
| error | There is an issue with the indexedDB. |
| error | The wallet is not initialized. |
| error | There is an issue deserializing the mnemonic. |
| error | The password is incorrect. |
Sync
Code
Results
Output | Type | Description |
---|---|---|
| result | The wallet has synced successfully. |
| error | There is an issue with the indexedDB. |
| error | There is an issue with finding the esplora url/finding the address. |
| error | There is an issue checking the UTXOs. |
"Unable to deserialize response" | error | There is an issue deserializing the UTXOs. |
"error" | error | There is an issue creating the url with the esplora_url and address. |
Sync SCL Balances
Code
Results
Output | Type | Description |
---|---|---|
| result | The wallet has synced successfully. |
| error | There is an issue with the unspent UTXOs. |
| error | There is an issue with the indexedDB. |
| error | There is an issue checking the UTXOs. |
"Unable to deserialize response" | error | There is an issue deserializing the UTXOs. |
BTC
Get Balance
Code
Results
Output | Type | Description |
---|---|---|
| result | The confirmed and unconfirmed balances of BTC. |
| error | The wallet is not initialized. |
Send BTC
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
addresses | string | The addresses to send to. Seperate multiple addresses by a space. | "tb1qgc0pnx734s3kt8n875u2cqtum0vrk5re3nfrj3" |
amount | string | The send amount in sats. Seperate multiple amounts by a space. | "10000" |
fee | int_64 | The transaction fee worked out in estimate_fee_btc. | 420 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the send transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The format of the address is incorrect. |
| error | The format of the amount is incorrect. |
| error | There is insufficient BTC to make this send transaction. |
| error | There is an issue deserializing the send transaction. |
| error | There is an issue broadcasting the send transaction. |
Get BTC Transaction History
Code
Results
Output | Type | Description |
---|---|---|
see example json below | result | The transaction history for BTC. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
error | response error |
SCL
Get SCL Balance
Code
Results
Output | Type | Description |
---|---|---|
result | The confirmed and unconfirmed balances of all SCL assets. | |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
error | response error |
Send SCL
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
addresses | string | The addresses to send to. Seperate multiple addresses by a space. | "tb1qgc0pnx734s3kt8n875u2cqtum0vrk5re3nfrj3" |
amount | string | The send amount in SCL. Seperate multiple amounts by a space. | "10000" |
contract_id | string | The ID of the contract. | "792965f15b1d4254e547681832b9bdc3feb411bf2d80ce1a6b6bb22793880b6b" |
fee | int_64 | The fee worked out in estimate_fee_scl. | 420 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the send transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The format of the address is incorrect. |
| error | The format of the amount is incorrect. |
| error | The contract ID is not in the wallet. |
| error | There is insufficient SCL assets to make this send transaction. |
| error | There is insufficient BTC to make this send transaction. |
| error | There is an issue deserializing the send transaction. |
| error | There is an issue broadcasting the send transaction. |
| error | There is an issue broadcasting the send transaction. |
Get Transaction History
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_id | string | The ID of the contract being used. | "792965f15b1d4254e547681832b9bdc3feb411bf2d80ce1a6b6bb22793880b6b" |
Code
Results
Output | Type | Description |
---|---|---|
result | The transaction history for SCL assets. | |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | The contract ID is not in the wallet. |
error | response error |
Fees
Estimate Fee BTC
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
addresses | string | The addresses to send to. Seperate multiple addresses by a space. | "tb1qgc0pnx734s3kt8n875u2cqtum0vrk5re3nfrj3" |
amount | string | The send amount in BTC. Seperate multiple amounts by a space. | "63210" |
number_of_blocks | int_32 | The number of blocks for fee estimation. The lower the number, the higher the fee. | 5 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The fee estimation for a BTC transaction. |
| error | The wallet has not synced yet. |
| error | The format of the address is incorrect. |
| error | The format of the amount is incorrect. |
Estimate Fee SCL
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
addresses | string | The addresses to send to. Seperate multiple addresses by a space. | "tb1qgc0pnx734s3kt8n875u2cqtum0vrk5re3nfrj3" |
amount | string | The send amount in SCL. Seperate multiple amounts by a space. | "125 150 4500" |
contract_id | string | The id of the contract being used. | "792965f15b1d4254e547681832b9bdc3feb411bf2d80ce1a6b6bb22793880b6b" |
number_of_blocks | int_32 | The number of blocks for fee estimation. The lower the number, the higher the fee. | 5 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The fee estimation to send this SCL transaction. |
| error | The wallet has not synced yet. |
| error | The format of the address is incorrect. |
| error | The format of the amount is incorrect. |
| error | The contract ID is not in the wallet. |
Estimate Fee Mint
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
number_of_blocks | int_32 | The number of blocks for fee estimation. The lower the number, the higher the fee. | 5 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The fee estimation to make this mint. |
| error | The wallet has not synced yet. |
Estimate Fee List
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
list_order_json | string | A list of listings containing contract_id, amount, price_per_token. | see example json below |
number_of_blocks | int_32 | The number of blocks for fee estimation. The lower the number, the higher the fee. | 5 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The fee estimation to make this listing. The actual fee followed by the hard fee. |
| error | The list order json failed to deserialize. |
| error | The wallet has not synced yet. |
| error | The contract ID is not in the wallet. |
Estimate Fee List Cancel
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
listing_utxo | string | The UTXO the listing is bound to. | "dba8b3df2aaaa9c9a9e61a4ac61f2fabe5bd6cb2682dc4a17cbf9af3ae16e548" |
number_of_blocks | int_32 | The number of blocks for fee estimation. The lower the number, the higher the fee. | 5 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The fee estimation to cancel this listing. |
| error | The wallet has not synced yet. |
| error | The listing has already been successfully bid on. |
Estimate Fee Bid
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
bid_order_json | string | A list of bids containing a list of contracts with their associated orders. | see example json below |
number_of_blocks | int_32 | The number of blocks for fee estimation. The lower the number, the higher the fee. | 5 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The fee estimation for bidding on this listing. |
| error | The bid order json failed to deserialize. |
| error | The wallet has not synced yet. |
| error | The contract ID is not in the wallet. |
Estimate Fee Bid Cancel
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
number_of_blocks | int_32 | The number of blocks for fee estimation. The lower the number, the higher the fee. | 5 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The fee estimation for cancelling this bid. |
| error | The wallet has not synced yet. |
Estimate Fee Airdop
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
number_of_airdops | int_32 | The number of airdrops. | 125 |
number_of_blocks | int_32 | The number of blocks for fee estimation. The lower the number, the higher the fee. | 5 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The fee estimation to claim this airdrop. |
| error | The wallet has not synced yet. |
Contracts
Import Contract
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_json | string | The serialized json of the contract. | see example json below |
Code
Results
Output | Type | Description |
---|---|---|
| result | The contract was imported successfully. |
| error | There is an issue with the indexedDB. |
Delete Contract
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_id | string | The id of the contract to be deleted. | "792965f15b1d4254e547681832b9bdc3feb411bf2d80ce1a6b6bb22793880b6b" |
Code
Results
Output | Type | Description |
---|---|---|
| result | The contract was deleted successfully. |
| error | There is an issue with the indexedDB. |
| error | The contract does not exist in the wallet. |
Get Contract
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_id | string | The id of the contract to get. | "792965f15b1d4254e547681832b9bdc3feb411bf2d80ce1a6b6bb22793880b6b" |
Code
Results
Output | Type | Description |
---|---|---|
result | The contract was gotten successfully. | |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
Get Contracts
Code
Results
Output | Type | Description |
---|---|---|
result | The contracts were gotten successfully. | |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
Minting
Mint SCL01 Contract
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
ticker | string | The name of the SCL asset. | "SMOL" |
max_supply | string | The max supply of SCL assets. | "31415900000000" |
decimals | string | The number of decimals the SCL asset has. | "8" |
fee | int_64 | The fee worked out in estimate_fee_mint. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the mint transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | There is insufficient BTC to mint this contract. |
| error | There is an issue deserializing the mint transaction. |
| error | There is an issue broadcasting the mint transaction. |
Mint SCL02 Contract
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
ticker | string | The name of the SCL asset. | "ELON" |
max_supply | string | The max supply of SCL assets. | "42069420690" |
decimals | string | The number of decimals the SCL asset has. | "8" |
fee | int_64 | The fee worked out in estimate_fee_mint. | 1756 |
airdrop_amount | string | The amount of SCL assets per airdop. | 420690 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the mint transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | There is insufficient BTC to mint this contract. |
| error | There is an issue deserializing the mint transaction. |
| error | There is an issue broadcasting the mint transaction. |
Mint SCL03 Contract
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
ticker | string | The name of the SCL asset. | "DFG" |
decimals | string | The number of decimals the SCL asset has. | "8" |
address | string | The address of the minted assets. Seperate multiple addresses by a space. | "tb1qlh458zyuv4kc9g4pawvczss0tz09ht0u28e7u3" |
amount | string | The amount of SCL assets minted. Seperate multiple amounts by a space. | "10000000000000000" |
fee | int_64 | The fee worked out in estimate_fee_mint. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the mint transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | There is an issue with the parsing one of the addresses. |
| error | There is an issue with the parsing one of the amounts. |
| error | There is insufficient BTC to mint this contract. |
| error | There is an issue deserializing the mint transaction. |
| error | There is an issue broadcasting the mint transaction. |
Right to Mint
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
rights_utxo | string | The UTXO that has the right to mint. | "" |
rights_address | string | The address that has the right to mint. | "" |
fee | int_64 | The fee worked out in estimate_fee_mint. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the right to mint transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the parsing the rights address. |
| error | The contract ID is not in the wallet. |
| error | There is insufficient BTC to mint this contract. |
| error | There is an issue deserializing the mint transaction. |
| error | There is an issue broadcasting the mint transaction. |
| error | There is an issue broadcasting the right to mint payload. |
Listing
Create Listing
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
list_order_json | string | An array of listings. | see example json below |
fee | int_64 | The fee worked out in estimate_fee_list. The actual fee followed by the hard fee. | "1756 585" |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the listing transaction. |
| error | The list order json failed to deserialize. |
| error | The format of the fee is incorrect. |
| error | There is an issue parsing the actual/hard fee. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The contract ID is not in the wallet. |
| error | There are not enough tokens to make this listing transaction. |
| error | There is insufficient BTC to make this listing transaction. |
| error | There is an issue deserializing the listing transaction. |
| error | There is an issue broadcasting the listing transaction. |
| error | There is an issue broadcasting the listing payload. |
Cancel Listing
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
listing_utxo | string | The UTXO the listing is bound to. | "dba8b3df2aaaa9c9a9e61a4ac61f2fabe5bd6cb2682dc4a17cbf9af3ae16e548" |
fee | int_64 | The fee worked out in estimate_fee_list_cancel. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the cancel listing transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The listing has already been successfully bid on. |
| error | There is insufficient BTC to make this cancel listing transaction. |
| error | There is an issue deserializing the cancel listing transaction. |
| error | There is an issue broadcasting the cancel listing transaction. |
| error | There is an issue broadcasting the cancel listing payload. |
Bidding
Create Bid
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
bid_order_json | string | An array of bids containing a array of contracts with their associated bids. | see example json below |
fee | int_64 | The fee worked out in estimate_fee_bid. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the bid transaction. |
| error | The bid_order_json failed to deserialize. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The contract ID is not in the wallet. |
| error | There is insufficient BTC to make this listing transaction. |
| error | There is an issue deserializing the bid transaction. |
| error | There is an issue broadcasting the bid transaction. |
| error | There is an issue broadcasting the bid payload. |
Accept Bid
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
unsigned_tx_hex | string | "0200000001900327a4f57651ac442c35066dcaaa6e17de5c7510277b5fa42565a60fa6e87a0100000000ffffffff022602000000000000160014f3c7491bedda954b105ee60e7a32d7aee6e685860000000000000000226a20da1ecba9ebbf936b53c940a22e1bda3a16492871faa63054906d74a15a6de66c00000000" | |
fulfil_tx | string | "02000000000102b5ba860041b15437601ab4bf2c54ccf5d9f7ae757f08ac8a467b3c97f654bd350000000000ffffffff378695168ed4aa95bcf572b6250f91d7aaa85caa04a9330f3e188a0448d6cb660000000000ffffffff032602000000000000160014f3c7491bedda954b105ee60e7a32d7aee6e685862d00000000000000160014eaf28ef3486a7b6bdd359aa2d5a2becdd7a52a840000000000000000226a20ad18a45f73df467ffea6fcecbf1574b7841fda0fd1be948a48118f9583757f1902483045022100bfa467b40a6715079b7d3e07be92447de2e61c21458702d9b1365894f75591df0220429005625d57e4ea44d46459a2a0768d3732dce1c746d2cc801e8528c1a793580121036674a057f385a5a8a74dfbd457711f282b9ea28cb781422cbbd6b6f42d9ab6c702483045022100f5a73800f696a877d5f5194e3a3daefebc27601ddcbfeae5946ff0daca213ed802204fa7939d43efa79fd37758bf70288a7743d50a0b4ab10e17800f0b55763457030121036674a057f385a5a8a74dfbd457711f282b9ea28cb781422cbbd6b6f42d9ab6c700000000" | |
contract_id | string | "792965f15b1d4254e547681832b9bdc3feb411bf2d80ce1a6b6bb22793880b6b" |
Code
Results
Output | Type | Description |
---|---|---|
result | The transaction ID of the accept bid transaction. | |
| error | The wallet has not synced yet. |
| error | The unsigned_tx_hex is invalid. |
| error | The fulfil_tx is invalid. |
| error | The wallet is not initialized. |
| error | The contract ID is not in the wallet. |
| error | There is an issue deserializing the unsigned_tx_hex. |
| error | There is an issue deserializing the accept bid transaction. |
| error | There is an issue broadcasting the accept bid transaction. |
| error | There is an issue broadcasting the accept bid payload. |
Cancel Bid
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
bid_utxo | string | The UTXO the bid is bound to. | "dba8b3df2aaaa9c9a9e61a4ac61f2fabe5bd6cb2682dc4a17cbf9af3ae16e548" |
fee | int_64 | The fee worked out in estimate_fee_bid_cancel. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the cancel bid transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The bid has already been successfully accepted. |
| error | There is insufficient BTC to make this cancel bid transaction. |
| error | There is an issue deserializing the cancel bid transaction. |
| error | There is an issue broadcasting the cancel bid transaction. |
| error | There is an issue broadcasting the cancel bid payload. |
Airdrop
Claim Airdrop
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_ids | string | The IDs of the contracts that is being claimed. Seperate multiple contracts by a space. | "09f590fc69175307307af184c2c53358a40630eddce420a45b14a959b8d03bd3" |
fee | int_64 | The fee worked out in estimate_fee_airdop. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the claim airdrop transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | There is insufficient BTC to make this claim airdrop transaction. |
| error | There is an issue deserializing the claim airdrop transaction. |
| error | There is an issue broadcasting the claim airdrop transaction. |
| error | There is an issue broadcasting the claim airdrop payload. |
Create Diminishing Airdrop
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_id | string | The ID of the contract. | "3b1b20518485ec89ce9acf5bb23c5ccdb0ac26d0661e377014e894d295eec29e" |
pool_amount | string | The total amount available to be airdropped. | "40000000000000" |
stepdown_amount | string | The amount the airdrop diminishes by per step. | "10" |
stepdown_period | string | The amount of claims before the airdrop diminishes. | "160" |
max_amount | string | The first airdrop amount that will be received at the beginning of the stepdown period. | "250" |
min_amount | string | The last airdrop amount that will be received at the end of the stepdown period. | "50" |
single_drop | string | Indicates if multiple claims can be made from one address or not. Either true/false. | "true" |
fee | int_64 | The fee worked out in estimate_fee_scl. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the create diminishing airdrop transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The contract ID is not in the wallet. |
| error | There is insufficient SCL to make this create diminishing airdrop transaction. |
| error | There is insufficient BTC to make this create diminishing airdrop transaction. |
| error | There is an issue deserializing the create diminishing airdrop transaction. |
| error | There is an issue broadcasting the create diminishing airdrop transaction. |
| error | There is an issue broadcasting the create diminishing airdrop payload. |
Claim Diminishing Airdrop
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_id | string | The ID of the contract. | "" |
dimairdop_id | string | The ID of the Diminishing Airdrop. | "" |
fee | int_64 | The fee worked out in estimate_fee_airdrop. | 685 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the claim diminishing airdrop transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The contract ID is not in the wallet. |
| error | There is insufficient BTC to make this claim diminishing airdrop transaction. |
| error | There is an issue deserializing the claim diminishing airdrop transaction. |
| error | There is an issue broadcasting the claim diminishing airdrop transaction. |
| error | There is an issue broadcasting the claim diminishing airdrop payload. |
Drips
Create Drip
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
addresses | string | The addresses to drip to. Seperate multiple addresses by a space. | "tb1qgc0pnx734s3kt8n875u2cqtum0vrk5re3nfrj3" |
amount | string | The drip amount in sats. Seperate multiple amounts by a space. | "10000" |
contract_id | string | The ID of the contract. | "3b1b20518485ec89ce9acf5bb23c5ccdb0ac26d0661e377014e894d295eec29e" |
duration | string | The amount of blocks the drip will be active for | "12960" |
fee | int_64 | The fee worked out in estimate_fee_scl. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
result | The transaction ID of the create drip transaction. | |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The format of the address is incorrect. |
| error | The format of the amount is incorrect. |
| error | The contract ID is not in the wallet. |
| error | There is insufficient SCL to make this create drip transaction. |
| error | There is insufficient BTC to make this create drip transaction. |
| error | There is an issue deserializing the create drip transaction. |
| error | There is an issue broadcasting the create drip transaction. |
| error | There is an issue broadcasting the create drip payload. |
Create DGE
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_id | string | The ID of the contract. | "3b1b20518485ec89ce9acf5bb23c5ccdb0ac26d0661e377014e894d295eec29e" |
pool_amount | string | The total amount of tokens put up for DGE. | "700000000000000" |
sats_rate | string | The amount of sats exchanged per token. | "5351" |
max_drop | string | The upper limit (in tokens) per drop. | "70000000000" |
drip_duration | string | How long the drip should last measured in number of blocks. | "12960" |
donation_address | string | The address the donations go to. | "tb1qlh458zyuv4kc9g4pawvczss0tz09ht0u28e7u3" |
single_drop | string | Indicates if multiple claims can be made from one address or not. Either true/false. | "true" |
fee | int_64 | The fee worked out in estimate_fee_scl. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the create dge transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the indexedDB. |
| error | The contract ID is not in the wallet. |
| error | There is insufficient SCL to make this create dge transaction. |
| error | There is insufficient BTC to make this create dge transaction. |
| error | There is an issue deserializing the create dge transaction. |
| error | There is an issue broadcasting the create dge transaction. |
| error | There is an issue broadcasting the create dge payload. |
Claim DGE
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
contract_id | string | The ID of the contract. | "3b1b20518485ec89ce9acf5bb23c5ccdb0ac26d0661e377014e894d295eec29e" |
dge_id | string | The first spender UTXO from the create dge command. | "782f9b6e1329a400bb0f6dc3b678a1b3a0c3a8186b44d5cd7b82b19478264548:0" |
donation_address | string | The address the donations go to. | "tb1qlh458zyuv4kc9g4pawvczss0tz09ht0u28e7u3" |
amount | string | The amount that is getting donated in sats. | "45000" |
fee | int_64 | The fee worked out in estimate_fee_airdrop. | 1756 |
Code
Results
Output | Type | Description |
---|---|---|
| result | The transaction ID of the claim dge transaction. |
| error | The wallet has not synced yet. |
| error | The wallet is not initialized. |
| error | There is an issue with the parsing the donation address. |
| error | There is an issue with the indexedDB. |
| error | The contract ID is not in the wallet. |
| error | There is insufficient VTC to make this claim dge transaction. |
| error | There is an issue deserializing the claim dge transaction. |
| error | There is an issue broadcasting the claim dge transaction. |
| error | There is an issue broadcasting the claim dge payload. |
Utilities
New Address
Code
Results
Output | Type | Description |
---|---|---|
| result | The address of the wallet. |
| error | The address is invalid. |
Is Address
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
address | string | The address of the wallet. | "tb1qgc0pnx734s3kt8n875u2cqtum0vrk5re3nfrj3" |
Code
Results
Output | Type | Description |
---|---|---|
true | result | The address is valid. |
false | result | The address is invalid. |
Last updated