spark_flashnet_confirmInitialDeposit
Use the spark_flashnet_confirmInitialDeposit
method to activate a newly created bonding (single-sided) pool on Flashnet after the initial Asset A deposit has been made.
This confirms the deposit proof and transitions the pool into an active state where it can start trading.
Example
import { request } from "sats-connect";
try {
const response = await request("spark_flashnet_confirmInitialDeposit", {
poolId: "03poollpidentitypubkeyfedcba9876543210fedcba9876543210fedcba9876",
assetASparkTransferId: "spark-transfer-uuid-or-hash-for-asset-a",
poolOwnerPublicKey: "03b06b7c3e39bf922be19b7ad5f19554bb7991cae585ed2e3374d51213ff4eeb3c",
nonce: "confirm-deposit-nonce-789"
});
if ("result" in response) {
console.log("Deposit confirmation result:", response.result);
} else {
console.error("Confirm deposit failed:", response.error.message);
}
} catch (error) {
console.error("Unexpected error:", error);
}
Parameters
poolId
(string, required) — ID of the Flashnet pool (public key).assetASparkTransferId
(string, required) — Spark transfer ID proving the initial Asset A deposit.poolOwnerPublicKey
(string, optional) — Public key of the pool owner. If omitted, derived from JWT.nonce
(string, required) — Unique value to prevent replay attacks.
What it does
When called, the wallet:
Validates the provided Spark transfer ID.
Shows the user a confirmation screen summarizing the deposit and pool activation.
On approval, signs the request with the user’s Spark key.
Submits the confirmation to Flashnet.
Returns the pool activation result.
Response
The method returns a Promise that resolves to a SparkFlashnetConfirmInitialDepositResult
object:
✅ Success
{
"poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899",
"confirmed": true,
"message": "Initial deposit confirmed and pool activated"
}
⚠️ Failure
{
"confirmed": false,
"error": "Invalid deposit transfer ID"
}
Last updated