weft-sdk 0.9.1 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/APIKeysApi.md +4 -0
- data/docs/AccountApi.md +1 -1
- data/docs/AccountBootstrapApproval.md +21 -0
- data/docs/AccountBootstrapCreated.md +29 -0
- data/docs/AccountBootstrapCreatedApproval.md +23 -0
- data/docs/AccountBootstrapCreatedResponse.md +17 -0
- data/docs/AccountBootstrapRequest.md +27 -0
- data/docs/AccountBootstrapStatus.md +25 -0
- data/docs/AccountBootstrapStatusResponse.md +17 -0
- data/docs/AgentBootstrapApi.md +209 -0
- data/docs/BalanceApi.md +1 -1
- data/docs/CuratedMarketplaceContract.md +31 -0
- data/docs/FetchApi.md +1 -1
- data/docs/FetchBalanceSnapshot.md +1 -1
- data/docs/FetchRequest.md +7 -1
- data/docs/RateLimitResponse.md +19 -0
- data/docs/SearchAccessMethod.md +37 -0
- data/docs/SearchApi.md +68 -1
- data/docs/SearchCuratedCallability.md +19 -0
- data/docs/SearchCuratedExecution.md +17 -0
- data/docs/SearchCuratedOperation.md +21 -0
- data/docs/SearchCuratedService.md +19 -0
- data/docs/SearchCuratedSource.md +21 -0
- data/docs/SearchEndpointHit.md +18 -0
- data/docs/SearchExecutionModeFilter.md +19 -0
- data/docs/SearchFilterSpec.md +11 -1
- data/docs/SearchMethodFilter.md +19 -0
- data/docs/SearchResponse.md +1 -3
- data/docs/SearchStringSetFilter.md +19 -0
- data/docs/SearchWeftFetchCompatibility.md +21 -0
- data/docs/Wallet.md +7 -3
- data/lib/weft/generated/api/account_api.rb +4 -4
- data/lib/weft/generated/api/agent_bootstrap_api.rb +224 -0
- data/lib/weft/generated/api/api_keys_api.rb +6 -2
- data/lib/weft/generated/api/auth_api.rb +2 -2
- data/lib/weft/generated/api/balance_api.rb +4 -4
- data/lib/weft/generated/api/default_api.rb +2 -2
- data/lib/weft/generated/api/fetch_api.rb +4 -4
- data/lib/weft/generated/api/payments_api.rb +2 -2
- data/lib/weft/generated/api/purchases_api.rb +2 -2
- data/lib/weft/generated/api/resources_api.rb +2 -2
- data/lib/weft/generated/api/search_api.rb +83 -4
- data/lib/weft/generated/api_client.rb +2 -2
- data/lib/weft/generated/api_error.rb +2 -2
- data/lib/weft/generated/api_model_base.rb +2 -2
- data/lib/weft/generated/configuration.rb +10 -10
- data/lib/weft/generated/models/account_bootstrap_approval.rb +259 -0
- data/lib/weft/generated/models/account_bootstrap_created.rb +349 -0
- data/lib/weft/generated/models/account_bootstrap_created_approval.rb +297 -0
- data/lib/weft/generated/models/account_bootstrap_created_response.rb +164 -0
- data/lib/weft/generated/models/account_bootstrap_request.rb +317 -0
- data/lib/weft/generated/models/account_bootstrap_status.rb +282 -0
- data/lib/weft/generated/models/account_bootstrap_status_response.rb +164 -0
- data/lib/weft/generated/models/account_details.rb +2 -2
- data/lib/weft/generated/models/api_key.rb +2 -2
- data/lib/weft/generated/models/api_key_created.rb +2 -2
- data/lib/weft/generated/models/api_key_created_response.rb +2 -2
- data/lib/weft/generated/models/api_key_list_response.rb +2 -2
- data/lib/weft/generated/models/auth_response.rb +2 -2
- data/lib/weft/generated/models/auth_response_data.rb +2 -2
- data/lib/weft/generated/models/balance_response.rb +2 -2
- data/lib/weft/generated/models/confirm_request.rb +2 -2
- data/lib/weft/generated/models/create_api_key_request.rb +2 -2
- data/lib/weft/generated/models/curated_marketplace_contract.rb +384 -0
- data/lib/weft/generated/models/enrolled_resource.rb +2 -2
- data/lib/weft/generated/models/error.rb +2 -2
- data/lib/weft/generated/models/error_response.rb +2 -2
- data/lib/weft/generated/models/fetch403_response.rb +2 -2
- data/lib/weft/generated/models/fetch_balance_snapshot.rb +3 -3
- data/lib/weft/generated/models/fetch_error_response.rb +4 -4
- data/lib/weft/generated/models/fetch_request.rb +36 -6
- data/lib/weft/generated/models/fetch_request_body.rb +2 -2
- data/lib/weft/generated/models/fetch_response.rb +2 -2
- data/lib/weft/generated/models/insufficient_scope_response.rb +2 -2
- data/lib/weft/generated/models/me_api_key.rb +2 -2
- data/lib/weft/generated/models/me_api_key_creator.rb +2 -2
- data/lib/weft/generated/models/me_response.rb +2 -2
- data/lib/weft/generated/models/me_response_data.rb +2 -2
- data/lib/weft/generated/models/merchant.rb +2 -2
- data/lib/weft/generated/models/message_response.rb +2 -2
- data/lib/weft/generated/models/message_response_data.rb +2 -2
- data/lib/weft/generated/models/pagination.rb +2 -2
- data/lib/weft/generated/models/password_reset_request.rb +2 -2
- data/lib/weft/generated/models/password_update_request.rb +2 -2
- data/lib/weft/generated/models/payment.rb +2 -2
- data/lib/weft/generated/models/payment_list_response.rb +2 -2
- data/lib/weft/generated/models/payment_response.rb +2 -2
- data/lib/weft/generated/models/principal_wallet.rb +2 -2
- data/lib/weft/generated/models/promo_balance.rb +2 -2
- data/lib/weft/generated/models/purchase.rb +2 -2
- data/lib/weft/generated/models/purchase_artifact.rb +2 -2
- data/lib/weft/generated/models/purchase_list_response.rb +2 -2
- data/lib/weft/generated/models/purchase_response.rb +2 -2
- data/lib/weft/generated/models/rate_limit_response.rb +214 -0
- data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
- data/lib/weft/generated/models/resource_enrollment_request.rb +2 -2
- data/lib/weft/generated/models/resource_enrollment_response.rb +2 -2
- data/lib/weft/generated/models/resource_stats.rb +2 -2
- data/lib/weft/generated/models/search_access_method.rb +341 -0
- data/lib/weft/generated/models/search_capability_ref.rb +2 -2
- data/lib/weft/generated/models/search_curated_callability.rb +216 -0
- data/lib/weft/generated/models/search_curated_execution.rb +181 -0
- data/lib/weft/generated/models/search_curated_operation.rb +199 -0
- data/lib/weft/generated/models/search_curated_service.rb +190 -0
- data/lib/weft/generated/models/search_curated_source.rb +240 -0
- data/lib/weft/generated/models/search_endpoint_call.rb +2 -2
- data/lib/weft/generated/models/search_endpoint_hit.rb +86 -3
- data/lib/weft/generated/models/search_endpoint_price.rb +2 -2
- data/lib/weft/generated/models/search_error_response.rb +2 -2
- data/lib/weft/generated/models/search_execution_mode_filter.rb +197 -0
- data/lib/weft/generated/models/search_filter_spec.rb +55 -6
- data/lib/weft/generated/models/search_method_filter.rb +197 -0
- data/lib/weft/generated/models/search_payment_offer.rb +2 -2
- data/lib/weft/generated/models/search_price_atomic_filter.rb +2 -2
- data/lib/weft/generated/models/search_price_usd_filter.rb +2 -2
- data/lib/weft/generated/models/search_protocol_filter.rb +2 -2
- data/lib/weft/generated/models/search_provider_ref.rb +2 -2
- data/lib/weft/generated/models/search_request.rb +2 -2
- data/lib/weft/generated/models/search_resource_type_filter.rb +2 -2
- data/lib/weft/generated/models/search_response.rb +7 -17
- data/lib/weft/generated/models/search_response_warnings_inner.rb +2 -2
- data/lib/weft/generated/models/search_result.rb +2 -2
- data/lib/weft/generated/models/search_string_set_filter.rb +177 -0
- data/lib/weft/generated/models/search_weft_fetch_compatibility.rb +240 -0
- data/lib/weft/generated/models/sign_in_request.rb +2 -2
- data/lib/weft/generated/models/sign_up_request.rb +2 -2
- data/lib/weft/generated/models/spending_policy.rb +2 -2
- data/lib/weft/generated/models/user.rb +2 -2
- data/lib/weft/generated/models/user_principal.rb +2 -2
- data/lib/weft/generated/models/wallet.rb +84 -6
- data/lib/weft/generated/version.rb +3 -3
- data/lib/weft/sdk.rb +1 -1
- metadata +42 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Weft::SearchCuratedExecution
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **mode** | **String** | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'weft-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Weft::SearchCuratedExecution.new(
|
|
15
|
+
mode: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Weft::SearchCuratedOperation
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **name** | **String** | | |
|
|
9
|
+
| **description** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'weft-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Weft::SearchCuratedOperation.new(
|
|
17
|
+
id: null,
|
|
18
|
+
name: null,
|
|
19
|
+
description: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Weft::SearchCuratedService
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **name** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'weft-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Weft::SearchCuratedService.new(
|
|
16
|
+
id: null,
|
|
17
|
+
name: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Weft::SearchCuratedSource
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **catalog** | **String** | | |
|
|
8
|
+
| **snapshot_version** | **Integer** | | |
|
|
9
|
+
| **captured_at** | **Time** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'weft-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Weft::SearchCuratedSource.new(
|
|
17
|
+
catalog: null,
|
|
18
|
+
snapshot_version: null,
|
|
19
|
+
captured_at: null
|
|
20
|
+
)
|
|
21
|
+
```
|
data/docs/SearchEndpointHit.md
CHANGED
|
@@ -11,6 +11,15 @@
|
|
|
11
11
|
| **call** | [**SearchEndpointCall**](SearchEndpointCall.md) | | [optional] |
|
|
12
12
|
| **price** | [**SearchEndpointPrice**](SearchEndpointPrice.md) | | [optional] |
|
|
13
13
|
| **payment** | [**Array<SearchPaymentOffer>**](SearchPaymentOffer.md) | The settlement routes this endpoint's own 402 challenge published — one entry per rail × network × asset × payee it accepts. Sibling of `call`: that block says how to shape the request, this says how to pay for it, so a caller can settle with its OWN x402/mpp SDK instead of guessing. A list because rails are irreducibly plural. Order is the provider's own preference order. Honest-empty when the pipeline observed no challenge. | [optional] |
|
|
14
|
+
| **access_methods** | [**Array<SearchAccessMethod>**](SearchAccessMethod.md) | | [optional] |
|
|
15
|
+
| **service** | [**SearchCuratedService**](SearchCuratedService.md) | | [optional] |
|
|
16
|
+
| **operation** | [**SearchCuratedOperation**](SearchCuratedOperation.md) | | [optional] |
|
|
17
|
+
| **output_schema** | **Object** | | [optional] |
|
|
18
|
+
| **output** | **Object** | | [optional] |
|
|
19
|
+
| **execution** | [**SearchCuratedExecution**](SearchCuratedExecution.md) | | [optional] |
|
|
20
|
+
| **callability** | [**SearchCuratedCallability**](SearchCuratedCallability.md) | | [optional] |
|
|
21
|
+
| **compatibility** | **Object** | | [optional] |
|
|
22
|
+
| **source** | [**SearchCuratedSource**](SearchCuratedSource.md) | | [optional] |
|
|
14
23
|
| **operator_type** | **String** | Who you are actually paying. `first_party` = operated by the provider that makes the capability; `reseller` = resold, so the price carries someone else's margin. Null until the platform resolves the operator. | [optional] |
|
|
15
24
|
| **operated_by_id** | **String** | | [optional] |
|
|
16
25
|
| **settled_via_facilitator_id** | **String** | | [optional] |
|
|
@@ -31,6 +40,15 @@ instance = Weft::SearchEndpointHit.new(
|
|
|
31
40
|
call: null,
|
|
32
41
|
price: null,
|
|
33
42
|
payment: null,
|
|
43
|
+
access_methods: null,
|
|
44
|
+
service: null,
|
|
45
|
+
operation: null,
|
|
46
|
+
output_schema: null,
|
|
47
|
+
output: null,
|
|
48
|
+
execution: null,
|
|
49
|
+
callability: null,
|
|
50
|
+
compatibility: null,
|
|
51
|
+
source: null,
|
|
34
52
|
operator_type: null,
|
|
35
53
|
operated_by_id: null,
|
|
36
54
|
settled_via_facilitator_id: null,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Weft::SearchExecutionModeFilter
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **eq** | **String** | | [optional] |
|
|
8
|
+
| **_in** | **Array<String>** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'weft-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Weft::SearchExecutionModeFilter.new(
|
|
16
|
+
eq: null,
|
|
17
|
+
_in: null
|
|
18
|
+
)
|
|
19
|
+
```
|
data/docs/SearchFilterSpec.md
CHANGED
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
| **price_atomic** | [**SearchPriceAtomicFilter**](SearchPriceAtomicFilter.md) | | [optional] |
|
|
9
9
|
| **type** | [**SearchResourceTypeFilter**](SearchResourceTypeFilter.md) | | [optional] |
|
|
10
10
|
| **protocol** | [**SearchProtocolFilter**](SearchProtocolFilter.md) | | [optional] |
|
|
11
|
+
| **category** | [**SearchStringSetFilter**](SearchStringSetFilter.md) | | [optional] |
|
|
12
|
+
| **method** | [**SearchMethodFilter**](SearchMethodFilter.md) | | [optional] |
|
|
13
|
+
| **execution_mode** | [**SearchExecutionModeFilter**](SearchExecutionModeFilter.md) | | [optional] |
|
|
14
|
+
| **weft_fetch_compatible** | **Boolean** | True requires at least one access method whose paid request is supported by the current Weft fetch runtime. For async operations this can mean submission-only coverage followed by the provider workflow. | [optional] |
|
|
15
|
+
| **include_unknown_prices** | **Boolean** | With a price constraint, also retain dynamic and unknown prices. | [optional][default to false] |
|
|
11
16
|
|
|
12
17
|
## Example
|
|
13
18
|
|
|
@@ -18,6 +23,11 @@ instance = Weft::SearchFilterSpec.new(
|
|
|
18
23
|
price: null,
|
|
19
24
|
price_atomic: null,
|
|
20
25
|
type: null,
|
|
21
|
-
protocol: null
|
|
26
|
+
protocol: null,
|
|
27
|
+
category: null,
|
|
28
|
+
method: null,
|
|
29
|
+
execution_mode: null,
|
|
30
|
+
weft_fetch_compatible: null,
|
|
31
|
+
include_unknown_prices: null
|
|
22
32
|
)
|
|
23
33
|
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Weft::SearchMethodFilter
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **eq** | **String** | | [optional] |
|
|
8
|
+
| **_in** | **Array<String>** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'weft-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Weft::SearchMethodFilter.new(
|
|
16
|
+
eq: null,
|
|
17
|
+
_in: null
|
|
18
|
+
)
|
|
19
|
+
```
|
data/docs/SearchResponse.md
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
| **reason** | **String** | Machine-readable cause of an empty result set, non-null exactly when `match_quality` is `none`. `below_relevance_floor`: candidates ranked but the best scored under the floor. `filter_collapsed_pool`: a caller filter cut the pool before ranking and nothing relevant survived — relax the filter. `no_catalog_coverage`: recall returned no candidates at all on an unfiltered query. `unsupported_filter_value`: a CATEGORICAL filter value (`type` / `protocol`) matches zero stored values, so it could never have matched — categorical only, since a continuous bound like `price` that matches nothing is reported as `filter_collapsed_pool` instead (the bound needs raising, the dimension is not unsupported). `index_unavailable`: no active index — an operational fault, paired with the `EMPTY_INDEX` warning. | [optional] |
|
|
23
23
|
| **suggestion** | **String** | Human/agent-readable explanation of `reason`, carrying the concrete numbers behind it (pool sizes, the best discarded score against the floor, the values actually stored for a filter). Non-null exactly when `reason` is. | [optional] |
|
|
24
24
|
| **results** | [**Array<SearchResult>**](SearchResult.md) | Ranked `(Provider + Capability)` results; empty when the index is empty or nothing cleared the relevance floor. Results BELOW the floor are never returned — an empty list plus a `reason` is the honest answer, not a list of near-misses in the same shape as a genuine match. | |
|
|
25
|
-
| **_mock** | **Boolean** | Present and `true` only when served by the mock backend. | [optional] |
|
|
26
25
|
|
|
27
26
|
## Example
|
|
28
27
|
|
|
@@ -47,7 +46,6 @@ instance = Weft::SearchResponse.new(
|
|
|
47
46
|
match_quality: null,
|
|
48
47
|
reason: null,
|
|
49
48
|
suggestion: null,
|
|
50
|
-
results: null
|
|
51
|
-
_mock: null
|
|
49
|
+
results: null
|
|
52
50
|
)
|
|
53
51
|
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Weft::SearchStringSetFilter
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **eq** | **String** | | [optional] |
|
|
8
|
+
| **_in** | **Array<String>** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'weft-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Weft::SearchStringSetFilter.new(
|
|
16
|
+
eq: null,
|
|
17
|
+
_in: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Weft::SearchWeftFetchCompatibility
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **state** | **String** | | |
|
|
8
|
+
| **reason** | **String** | | |
|
|
9
|
+
| **contract_version** | **Integer** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'weft-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Weft::SearchWeftFetchCompatibility.new(
|
|
17
|
+
state: null,
|
|
18
|
+
reason: null,
|
|
19
|
+
contract_version: null
|
|
20
|
+
)
|
|
21
|
+
```
|
data/docs/Wallet.md
CHANGED
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **
|
|
8
|
-
| **
|
|
7
|
+
| **provider** | **String** | Crossmint is the only buyer-wallet provider. | |
|
|
8
|
+
| **address** | **String** | Base smart-wallet address. Null only when Crossmint is unavailable. | |
|
|
9
|
+
| **tempo_address** | **String** | Paired Tempo smart-wallet address. Null only when Crossmint is unavailable. | |
|
|
10
|
+
| **balance_usdc** | **String** | Live Base USDC balance, exact to the micro-dollar (up to 6 decimals, minimum 2). Null when Crossmint is unreachable; consumers must not interpret null as zero. | |
|
|
9
11
|
| **tempo_usd** | **String** | Aggregated USD value of the allowlisted Tempo TIP-20 dollar tokens on the wallet's paired Tempo chain, exact to the micro-dollar. `null` when the value is UNKNOWN — the Tempo RPC read failed, or no dollar token is allowlisted for that chain yet (e.g. Tempo mainnet pre-launch). A null here is never \"0.00\"; it means \"we couldn't determine it\", and `total_usd` then reflects the Base component only. | |
|
|
10
12
|
| **total_usd** | **String** | Single aggregated USD balance = Base USDC + Tempo dollar tokens, exact to the micro-dollar. When `tempo_usd` is null (unavailable/unallowlisted) this equals `balance_usdc` alone. Null when the Base USDC provider is unreachable, because the surface never claims zero for a component it could not read. | |
|
|
11
|
-
| **network** | **String** |
|
|
13
|
+
| **network** | **String** | Selected Crossmint environment (`base_sepolia` or `base_mainnet`). | |
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -16,7 +18,9 @@
|
|
|
16
18
|
require 'weft-sdk'
|
|
17
19
|
|
|
18
20
|
instance = Weft::Wallet.new(
|
|
21
|
+
provider: null,
|
|
19
22
|
address: null,
|
|
23
|
+
tempo_address: null,
|
|
20
24
|
balance_usdc: 12.34,
|
|
21
25
|
tempo_usd: 3.00,
|
|
22
26
|
total_usd: 15.34,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Weft API
|
|
3
3
|
|
|
4
|
-
#The Weft API
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.
|
|
6
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -20,7 +20,7 @@ module Weft
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get the current credential principal
|
|
23
|
-
# Returns the Organization represented by
|
|
23
|
+
# Returns the seller Organization represented by an `ax_live_*` resource key, or the buyer User represented by a `wk_*` account key, OAuth access token, or claimed `wbt_*` bearer. Branch on `data.principal_type`.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [MeResponse]
|
|
26
26
|
def get_me(opts = {})
|
|
@@ -29,7 +29,7 @@ module Weft
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Get the current credential principal
|
|
32
|
-
# Returns the Organization represented by
|
|
32
|
+
# Returns the seller Organization represented by an `ax_live_*` resource key, or the buyer User represented by a `wk_*` account key, OAuth access token, or claimed `wbt_*` bearer. Branch on `data.principal_type`.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(MeResponse, Integer, Hash)>] MeResponse data, response status code and response headers
|
|
35
35
|
def get_me_with_http_info(opts = {})
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Weft API
|
|
3
|
+
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Weft
|
|
16
|
+
class AgentBootstrapApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Cancel or revoke a bootstrap credential
|
|
23
|
+
# A pending bootstrap becomes rejected. A claimed promoted credential becomes revoked and fails every subsequent request immediately.
|
|
24
|
+
# @param id [String]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [AccountBootstrapStatusResponse]
|
|
27
|
+
def cancel_account_bootstrap(id, opts = {})
|
|
28
|
+
data, _status_code, _headers = cancel_account_bootstrap_with_http_info(id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Cancel or revoke a bootstrap credential
|
|
33
|
+
# A pending bootstrap becomes rejected. A claimed promoted credential becomes revoked and fails every subsequent request immediately.
|
|
34
|
+
# @param id [String]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(AccountBootstrapStatusResponse, Integer, Hash)>] AccountBootstrapStatusResponse data, response status code and response headers
|
|
37
|
+
def cancel_account_bootstrap_with_http_info(id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AgentBootstrapApi.cancel_account_bootstrap ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentBootstrapApi.cancel_account_bootstrap"
|
|
44
|
+
end
|
|
45
|
+
pattern = Regexp.new(/^boot_[A-Za-z0-9_-]+$/)
|
|
46
|
+
if @api_client.config.client_side_validation && id !~ pattern
|
|
47
|
+
fail ArgumentError, "invalid value for 'id' when calling AgentBootstrapApi.cancel_account_bootstrap, must conform to the pattern #{pattern}."
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# resource path
|
|
51
|
+
local_var_path = '/api/v1/account_bootstraps/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
52
|
+
|
|
53
|
+
# query parameters
|
|
54
|
+
query_params = opts[:query_params] || {}
|
|
55
|
+
|
|
56
|
+
# header parameters
|
|
57
|
+
header_params = opts[:header_params] || {}
|
|
58
|
+
# HTTP header 'Accept' (if needed)
|
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body]
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'AccountBootstrapStatusResponse'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['bootstrapAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"AgentBootstrapApi.cancel_account_bootstrap",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: AgentBootstrapApi#cancel_account_bootstrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Create a temporary agent bootstrap
|
|
91
|
+
# Creates a 30-minute, search-only bootstrap and emails a separate claim link to the supplied address. Human approval binds the same `wbt_*` bearer to the account and promotes it to the fixed durable capability set. The response is deliberately identical for new and existing account emails and never contains the claim token. Rate limits apply per IP and normalized email; request bodies over 4 KiB are rejected before parsing. The bootstrap row and one-time credentials are committed only after the mail relay accepts the claim email. A retryable 503 leaves no bootstrap row behind.
|
|
92
|
+
# @param account_bootstrap_request [AccountBootstrapRequest]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [AccountBootstrapCreatedResponse]
|
|
95
|
+
def create_account_bootstrap(account_bootstrap_request, opts = {})
|
|
96
|
+
data, _status_code, _headers = create_account_bootstrap_with_http_info(account_bootstrap_request, opts)
|
|
97
|
+
data
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Create a temporary agent bootstrap
|
|
101
|
+
# Creates a 30-minute, search-only bootstrap and emails a separate claim link to the supplied address. Human approval binds the same `wbt_*` bearer to the account and promotes it to the fixed durable capability set. The response is deliberately identical for new and existing account emails and never contains the claim token. Rate limits apply per IP and normalized email; request bodies over 4 KiB are rejected before parsing. The bootstrap row and one-time credentials are committed only after the mail relay accepts the claim email. A retryable 503 leaves no bootstrap row behind.
|
|
102
|
+
# @param account_bootstrap_request [AccountBootstrapRequest]
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(AccountBootstrapCreatedResponse, Integer, Hash)>] AccountBootstrapCreatedResponse data, response status code and response headers
|
|
105
|
+
def create_account_bootstrap_with_http_info(account_bootstrap_request, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: AgentBootstrapApi.create_account_bootstrap ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'account_bootstrap_request' is set
|
|
110
|
+
if @api_client.config.client_side_validation && account_bootstrap_request.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'account_bootstrap_request' when calling AgentBootstrapApi.create_account_bootstrap"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/api/v1/account_bootstraps'
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Accept' (if needed)
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
|
+
# HTTP header 'Content-Type'
|
|
124
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
125
|
+
if !content_type.nil?
|
|
126
|
+
header_params['Content-Type'] = content_type
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# form parameters
|
|
130
|
+
form_params = opts[:form_params] || {}
|
|
131
|
+
|
|
132
|
+
# http body (model)
|
|
133
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(account_bootstrap_request)
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'AccountBootstrapCreatedResponse'
|
|
137
|
+
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || []
|
|
140
|
+
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"AgentBootstrapApi.create_account_bootstrap",
|
|
143
|
+
:header_params => header_params,
|
|
144
|
+
:query_params => query_params,
|
|
145
|
+
:form_params => form_params,
|
|
146
|
+
:body => post_body,
|
|
147
|
+
:auth_names => auth_names,
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: AgentBootstrapApi#create_account_bootstrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Read bootstrap lifecycle status
|
|
159
|
+
# @param id [String]
|
|
160
|
+
# @param [Hash] opts the optional parameters
|
|
161
|
+
# @return [AccountBootstrapStatusResponse]
|
|
162
|
+
def get_account_bootstrap(id, opts = {})
|
|
163
|
+
data, _status_code, _headers = get_account_bootstrap_with_http_info(id, opts)
|
|
164
|
+
data
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Read bootstrap lifecycle status
|
|
168
|
+
# @param id [String]
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @return [Array<(AccountBootstrapStatusResponse, Integer, Hash)>] AccountBootstrapStatusResponse data, response status code and response headers
|
|
171
|
+
def get_account_bootstrap_with_http_info(id, opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: AgentBootstrapApi.get_account_bootstrap ...'
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'id' is set
|
|
176
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentBootstrapApi.get_account_bootstrap"
|
|
178
|
+
end
|
|
179
|
+
pattern = Regexp.new(/^boot_[A-Za-z0-9_-]+$/)
|
|
180
|
+
if @api_client.config.client_side_validation && id !~ pattern
|
|
181
|
+
fail ArgumentError, "invalid value for 'id' when calling AgentBootstrapApi.get_account_bootstrap, must conform to the pattern #{pattern}."
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# resource path
|
|
185
|
+
local_var_path = '/api/v1/account_bootstraps/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
186
|
+
|
|
187
|
+
# query parameters
|
|
188
|
+
query_params = opts[:query_params] || {}
|
|
189
|
+
|
|
190
|
+
# header parameters
|
|
191
|
+
header_params = opts[:header_params] || {}
|
|
192
|
+
# HTTP header 'Accept' (if needed)
|
|
193
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
194
|
+
|
|
195
|
+
# form parameters
|
|
196
|
+
form_params = opts[:form_params] || {}
|
|
197
|
+
|
|
198
|
+
# http body (model)
|
|
199
|
+
post_body = opts[:debug_body]
|
|
200
|
+
|
|
201
|
+
# return_type
|
|
202
|
+
return_type = opts[:debug_return_type] || 'AccountBootstrapStatusResponse'
|
|
203
|
+
|
|
204
|
+
# auth_names
|
|
205
|
+
auth_names = opts[:debug_auth_names] || ['bootstrapAuth']
|
|
206
|
+
|
|
207
|
+
new_options = opts.merge(
|
|
208
|
+
:operation => :"AgentBootstrapApi.get_account_bootstrap",
|
|
209
|
+
:header_params => header_params,
|
|
210
|
+
:query_params => query_params,
|
|
211
|
+
:form_params => form_params,
|
|
212
|
+
:body => post_body,
|
|
213
|
+
:auth_names => auth_names,
|
|
214
|
+
:return_type => return_type
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
218
|
+
if @api_client.config.debugging
|
|
219
|
+
@api_client.config.logger.debug "API called: AgentBootstrapApi#get_account_bootstrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
220
|
+
end
|
|
221
|
+
return data, status_code, headers
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Weft API
|
|
3
3
|
|
|
4
|
-
#The Weft API
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.
|
|
6
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -20,6 +20,7 @@ module Weft
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create an API key
|
|
23
|
+
# Create an `ax_live_*` resource key for the authenticated seller Organization. Buyer `wk_*` keys are created in the buyer dashboard.
|
|
23
24
|
# @param create_api_key_request [CreateApiKeyRequest]
|
|
24
25
|
# @param [Hash] opts the optional parameters
|
|
25
26
|
# @return [ApiKeyCreatedResponse]
|
|
@@ -29,6 +30,7 @@ module Weft
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
# Create an API key
|
|
33
|
+
# Create an `ax_live_*` resource key for the authenticated seller Organization. Buyer `wk_*` keys are created in the buyer dashboard.
|
|
32
34
|
# @param create_api_key_request [CreateApiKeyRequest]
|
|
33
35
|
# @param [Hash] opts the optional parameters
|
|
34
36
|
# @return [Array<(ApiKeyCreatedResponse, Integer, Hash)>] ApiKeyCreatedResponse data, response status code and response headers
|
|
@@ -86,6 +88,7 @@ module Weft
|
|
|
86
88
|
end
|
|
87
89
|
|
|
88
90
|
# List API keys
|
|
91
|
+
# List `ax_live_*` resource keys for the seller Organization.
|
|
89
92
|
# @param [Hash] opts the optional parameters
|
|
90
93
|
# @return [ApiKeyListResponse]
|
|
91
94
|
def list_api_keys(opts = {})
|
|
@@ -94,6 +97,7 @@ module Weft
|
|
|
94
97
|
end
|
|
95
98
|
|
|
96
99
|
# List API keys
|
|
100
|
+
# List `ax_live_*` resource keys for the seller Organization.
|
|
97
101
|
# @param [Hash] opts the optional parameters
|
|
98
102
|
# @return [Array<(ApiKeyListResponse, Integer, Hash)>] ApiKeyListResponse data, response status code and response headers
|
|
99
103
|
def list_api_keys_with_http_info(opts = {})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Weft API
|
|
3
3
|
|
|
4
|
-
#The Weft API
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.
|
|
6
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Weft API
|
|
3
3
|
|
|
4
|
-
#The Weft API
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.
|
|
6
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -20,7 +20,7 @@ module Weft
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get wallet, spending policy, and current-window spend
|
|
23
|
-
# Read-only snapshot for the buyer behind the bearer token. The response always includes a `promo` block — values are zero in v1 and fill in once the freemium promo ledger ships, without a shape change.
|
|
23
|
+
# Read-only snapshot for the buyer behind the bearer token. The response always includes a `promo` block — values are zero in v1 and fill in once the freemium promo ledger ships, without a shape change. Base USDC and Tempo balances are fetched server-side through Crossmint. If Crossmint is unreachable, the balance fields are `null`; consumers must not interpret that as zero. Account-scoped: the bearer must be a buyer-scoped API key, an OAuth access token carrying `balance`, or a claimed `wbt_*` bearer.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [BalanceResponse]
|
|
26
26
|
def get_balance(opts = {})
|
|
@@ -29,7 +29,7 @@ module Weft
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Get wallet, spending policy, and current-window spend
|
|
32
|
-
# Read-only snapshot for the buyer behind the bearer token. The response always includes a `promo` block — values are zero in v1 and fill in once the freemium promo ledger ships, without a shape change.
|
|
32
|
+
# Read-only snapshot for the buyer behind the bearer token. The response always includes a `promo` block — values are zero in v1 and fill in once the freemium promo ledger ships, without a shape change. Base USDC and Tempo balances are fetched server-side through Crossmint. If Crossmint is unreachable, the balance fields are `null`; consumers must not interpret that as zero. Account-scoped: the bearer must be a buyer-scoped API key, an OAuth access token carrying `balance`, or a claimed `wbt_*` bearer.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(BalanceResponse, Integer, Hash)>] BalanceResponse data, response status code and response headers
|
|
35
35
|
def get_balance_with_http_info(opts = {})
|