SkillzMarket Class
API reference for the SkillzMarket consumer client.
SkillzMarket Class
The main client for discovering and calling paid skills.
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
options | SkillzMarketOptions | Configuration options |
SkillzMarketOptions
| Property | Type | Default | Description |
|---|---|---|---|
apiUrl | string | 'https://api.skillz.market' | API endpoint URL |
wallet | WalletConfig | - | Wallet for payments |
network | string | 'eip155:8453' | Network for payments |
WalletConfig
Can be either:
- A viem
PrivateKeyAccount(fromprivateKeyToAccount) - A hex private key string (e.g.,
'0x...')
Methods
search()
Search for skills by keyword.
Parameters
| Name | Type | Description |
|---|---|---|
query | string | Search query |
filters | SearchFilters | Optional filters |
SearchFilters
Returns
Promise<Skill[]> - Array of matching skills
Example
info()
Get detailed information about a skill.
Parameters
| Name | Type | Description |
|---|---|---|
slug | string | Skill slug identifier |
Returns
Promise<Skill> - Skill details
Example
call()
Call a skill with automatic payment.
Parameters
| Name | Type | Description |
|---|---|---|
slug | string | Skill slug identifier |
input | Record<string, unknown> | Input data for the skill |
Returns
Promise<T> - Skill result
Throws
Error('Wallet required for calling paid skills')- If no wallet configuredError('Skill [slug] is not active')- If skill is disabledError('Skill call failed: ...')- If skill returns an error
Example
getCreator()
Get a creator's profile.
Parameters
| Name | Type | Description |
|---|---|---|
address | string | Creator's wallet address |
Returns
Promise<Creator> - Creator profile
getReviews()
Get reviews for a skill.
Parameters
| Name | Type | Description |
|---|---|---|
skillSlug | string | Skill slug identifier |
Returns
Promise<Review[]> - Array of reviews
getGroups()
List skill groups, optionally filtered by creator.
Parameters
| Name | Type | Description |
|---|---|---|
creatorAddress | string | Optional creator wallet address filter |
Returns
Promise<SkillGroup[]> - Array of skill groups
Example
getGroup()
Get a specific group with its skills.
Parameters
| Name | Type | Description |
|---|---|---|
slug | string | Group slug identifier |
creatorAddress | string | Optional creator wallet address for scoping |
Returns
Promise<SkillGroupWithSkills> - Group with its skills and creator info
Example
authenticate()
Authenticate with wallet signature.
Returns
Promise<string> - Auth token (stored internally)
Throws
Error('Wallet required for authentication')- If no wallet configured
feedback()
Submit a review for a skill.
Parameters
| Name | Type | Description |
|---|---|---|
slug | string | Skill slug identifier |
score | number | Score from 0-100 |
comment | string | Optional comment |