import cobo_waas2
from cobo_waas2.models.satoshi_test_challenge import SatoshiTestChallenge
from cobo_waas2.rest import ApiException
from pprint import pprint
# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
# Replace `<YOUR_PRIVATE_KEY>` with your private key
api_private_key="<YOUR_PRIVATE_KEY>",
# Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cobo_waas2.TravelRuleApi(api_client)
challenge_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
try:
# Get Satoshi Test challenge
api_response = api_instance.get_satoshi_test_challenge(challenge_id)
print("The response of TravelRuleApi->get_satoshi_test_challenge:\n")
pprint(api_response)
except Exception as e:
print(
"Exception when calling TravelRuleApi->get_satoshi_test_challenge: %s\n" % e
)
// Import classes:
import com.cobo.waas2.ApiClient;
import com.cobo.waas2.ApiException;
import com.cobo.waas2.Configuration;
import com.cobo.waas2.Env;
import com.cobo.waas2.api.TravelRuleApi;
import com.cobo.waas2.model.*;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Select the development environment. To use the production environment, replace `Env.DEV` with
// `Env.PROD
defaultClient.setEnv(Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
defaultClient.setPrivKey("<YOUR_PRIVATE_KEY>");
TravelRuleApi apiInstance = new TravelRuleApi();
UUID challengeId = UUID.fromString("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
try {
SatoshiTestChallenge result = apiInstance.getSatoshiTestChallenge(challengeId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TravelRuleApi#getSatoshiTestChallenge");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
package main
import (
"context"
"fmt"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
"os"
)
func main() {
challengeId := "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.TravelRuleAPI.GetSatoshiTestChallenge(ctx).
ChallengeId(challengeId).
Execute()
if err != nil {
fmt.Fprintf(
os.Stderr,
"Error when calling `TravelRuleAPI.GetSatoshiTestChallenge``: %v\n",
err,
)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSatoshiTestChallenge`: SatoshiTestChallenge
fmt.Fprintf(os.Stdout, "Response from `TravelRuleAPI.GetSatoshiTestChallenge`: %v\n", resp)
}
const CoboWaas2 = require("@cobo/cobo-waas2");
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance;
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.TravelRuleApi();
const challenge_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
apiInstance.getSatoshiTestChallenge(challenge_id).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
{
"challenge_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"from_address": "0x1234567890abcdef1234567890abcdef12345678",
"to_address": "0xabcdef1234567890abcdef1234567890abcdef12",
"amount": "1100001000000000",
"token_id": "ETH",
"chain_id": "ETH",
"status": "PENDING",
"remaining_seconds": 10550,
"matched_txid": "0xabc123...",
"started_at": 1732523887000,
"expires_at": 1732534687000
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}Get Satoshi Test challenge
This operation returns the current state of a Satoshi Test challenge — useful for polling after submission. The response contains the challenge status and remaining_seconds.
Recommended polling interval: 10–30 seconds. The challenge will transition through PENDING → MATCHED → VERIFIED once the counterparty’s transfer is observed and confirmed on chain. If the challenge is not matched within 180 minutes, the status becomes EXPIRED.
import cobo_waas2
from cobo_waas2.models.satoshi_test_challenge import SatoshiTestChallenge
from cobo_waas2.rest import ApiException
from pprint import pprint
# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
# Replace `<YOUR_PRIVATE_KEY>` with your private key
api_private_key="<YOUR_PRIVATE_KEY>",
# Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cobo_waas2.TravelRuleApi(api_client)
challenge_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
try:
# Get Satoshi Test challenge
api_response = api_instance.get_satoshi_test_challenge(challenge_id)
print("The response of TravelRuleApi->get_satoshi_test_challenge:\n")
pprint(api_response)
except Exception as e:
print(
"Exception when calling TravelRuleApi->get_satoshi_test_challenge: %s\n" % e
)
// Import classes:
import com.cobo.waas2.ApiClient;
import com.cobo.waas2.ApiException;
import com.cobo.waas2.Configuration;
import com.cobo.waas2.Env;
import com.cobo.waas2.api.TravelRuleApi;
import com.cobo.waas2.model.*;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Select the development environment. To use the production environment, replace `Env.DEV` with
// `Env.PROD
defaultClient.setEnv(Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
defaultClient.setPrivKey("<YOUR_PRIVATE_KEY>");
TravelRuleApi apiInstance = new TravelRuleApi();
UUID challengeId = UUID.fromString("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
try {
SatoshiTestChallenge result = apiInstance.getSatoshiTestChallenge(challengeId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TravelRuleApi#getSatoshiTestChallenge");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
package main
import (
"context"
"fmt"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
"os"
)
func main() {
challengeId := "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.TravelRuleAPI.GetSatoshiTestChallenge(ctx).
ChallengeId(challengeId).
Execute()
if err != nil {
fmt.Fprintf(
os.Stderr,
"Error when calling `TravelRuleAPI.GetSatoshiTestChallenge``: %v\n",
err,
)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSatoshiTestChallenge`: SatoshiTestChallenge
fmt.Fprintf(os.Stdout, "Response from `TravelRuleAPI.GetSatoshiTestChallenge`: %v\n", resp)
}
const CoboWaas2 = require("@cobo/cobo-waas2");
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance;
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.TravelRuleApi();
const challenge_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
apiInstance.getSatoshiTestChallenge(challenge_id).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
{
"challenge_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"from_address": "0x1234567890abcdef1234567890abcdef12345678",
"to_address": "0xabcdef1234567890abcdef1234567890abcdef12",
"amount": "1100001000000000",
"token_id": "ETH",
"chain_id": "ETH",
"status": "PENDING",
"remaining_seconds": 10550,
"matched_txid": "0xabc123...",
"started_at": 1732523887000,
"expires_at": 1732534687000
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}import cobo_waas2
from cobo_waas2.models.satoshi_test_challenge import SatoshiTestChallenge
from cobo_waas2.rest import ApiException
from pprint import pprint
# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
# Replace `<YOUR_PRIVATE_KEY>` with your private key
api_private_key="<YOUR_PRIVATE_KEY>",
# Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cobo_waas2.TravelRuleApi(api_client)
challenge_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
try:
# Get Satoshi Test challenge
api_response = api_instance.get_satoshi_test_challenge(challenge_id)
print("The response of TravelRuleApi->get_satoshi_test_challenge:\n")
pprint(api_response)
except Exception as e:
print(
"Exception when calling TravelRuleApi->get_satoshi_test_challenge: %s\n" % e
)
// Import classes:
import com.cobo.waas2.ApiClient;
import com.cobo.waas2.ApiException;
import com.cobo.waas2.Configuration;
import com.cobo.waas2.Env;
import com.cobo.waas2.api.TravelRuleApi;
import com.cobo.waas2.model.*;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Select the development environment. To use the production environment, replace `Env.DEV` with
// `Env.PROD
defaultClient.setEnv(Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
defaultClient.setPrivKey("<YOUR_PRIVATE_KEY>");
TravelRuleApi apiInstance = new TravelRuleApi();
UUID challengeId = UUID.fromString("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
try {
SatoshiTestChallenge result = apiInstance.getSatoshiTestChallenge(challengeId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TravelRuleApi#getSatoshiTestChallenge");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
package main
import (
"context"
"fmt"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
"os"
)
func main() {
challengeId := "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.TravelRuleAPI.GetSatoshiTestChallenge(ctx).
ChallengeId(challengeId).
Execute()
if err != nil {
fmt.Fprintf(
os.Stderr,
"Error when calling `TravelRuleAPI.GetSatoshiTestChallenge``: %v\n",
err,
)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSatoshiTestChallenge`: SatoshiTestChallenge
fmt.Fprintf(os.Stdout, "Response from `TravelRuleAPI.GetSatoshiTestChallenge`: %v\n", resp)
}
const CoboWaas2 = require("@cobo/cobo-waas2");
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance;
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.TravelRuleApi();
const challenge_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
apiInstance.getSatoshiTestChallenge(challenge_id).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
Authorizations
The API key. For more details, refer to API key.
In the API playground, enter your API secret, and your API key will be accordingly calculated.
Query Parameters
The Satoshi Test challenge ID returned by the prepare or submit operation.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Response
The Satoshi Test challenge information (after submit or for status polling).
Full information about a Satoshi Test challenge, returned by the create and get operations.
The unique identifier of the Satoshi Test challenge.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
The counterparty (self-custody) wallet address that must transfer the micro-deposit.
"0x1234567890abcdef1234567890abcdef12345678"
The Cobo-generated verification address that will receive the micro-deposit.
"0xabcdef1234567890abcdef1234567890abcdef12"
The exact amount (in the token's smallest unit) that must be transferred. The amount is unique per challenge and is used together with to_address to identify a matching on-chain transfer.
"1100001000000000"
The ID of the token used for the micro-deposit (typically the chain's native asset).
"ETH"
The chain on which the micro-deposit is expected.
"ETH"
The lifecycle status of a Satoshi Test challenge.
PREPARE: Challenge created (address and amount returned); the 180-minute countdown is not started yet.PENDING: Challenge submitted; countdown active, waiting for the counterparty's on-chain transfer.MATCHED: An on-chain transfer matching the expected amount has been observed; waiting for block confirmations.VERIFIED: The matched transfer reached confirmation — the address is verified.EXPIRED: Challenge was not matched within 180 minutes.DELETED: Challenge was cancelled by the client.
PREPARE, PENDING, MATCHED, VERIFIED, EXPIRED, DELETED "PENDING"
Remaining time (in seconds) before the challenge expires. 0 when the challenge is not yet submitted or has already completed/expired.
10550
The on-chain transaction hash of the matching transfer, once matched.
"0xabc123..."
Timestamp (milliseconds) when the challenge was submitted and the countdown started.
1732523887000
Timestamp (milliseconds) when the challenge will expire if not matched.
1732534687000
Was this page helpful?
