@distilled.cloud/coinbase 0.8.0 → 0.10.0
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.
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +2 -2
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +51 -51
- package/lib/operations/createWebhookSubscription.d.ts +3 -0
- package/lib/operations/createWebhookSubscription.d.ts.map +1 -1
- package/lib/operations/createWebhookSubscription.js +3 -0
- package/lib/operations/createWebhookSubscription.js.map +1 -1
- package/lib/operations/getSQLGrammar.d.ts +3 -2
- package/lib/operations/getSQLGrammar.d.ts.map +1 -1
- package/lib/operations/getSQLGrammar.js +3 -2
- package/lib/operations/getSQLGrammar.js.map +1 -1
- package/lib/operations/getSQLSchema.d.ts +31 -0
- package/lib/operations/getSQLSchema.d.ts.map +1 -0
- package/lib/operations/getSQLSchema.js +37 -0
- package/lib/operations/getSQLSchema.js.map +1 -0
- package/lib/operations/getWebhookSubscription.d.ts +1 -0
- package/lib/operations/getWebhookSubscription.d.ts.map +1 -1
- package/lib/operations/getWebhookSubscription.js +1 -0
- package/lib/operations/getWebhookSubscription.js.map +1 -1
- package/lib/operations/index.d.ts +2 -0
- package/lib/operations/index.d.ts.map +1 -1
- package/lib/operations/index.js +2 -0
- package/lib/operations/index.js.map +1 -1
- package/lib/operations/listWebhookSubscriptionEvents.d.ts +52 -0
- package/lib/operations/listWebhookSubscriptionEvents.d.ts.map +1 -0
- package/lib/operations/listWebhookSubscriptionEvents.js +70 -0
- package/lib/operations/listWebhookSubscriptionEvents.js.map +1 -0
- package/lib/operations/listWebhookSubscriptions.d.ts +1 -0
- package/lib/operations/listWebhookSubscriptions.d.ts.map +1 -1
- package/lib/operations/listWebhookSubscriptions.js +1 -0
- package/lib/operations/listWebhookSubscriptions.js.map +1 -1
- package/lib/operations/requestSolanaFaucet.d.ts +2 -2
- package/lib/operations/requestSolanaFaucet.js +2 -2
- package/lib/operations/requestSolanaFaucet.js.map +1 -1
- package/lib/operations/runSQLQuery.d.ts +20 -8
- package/lib/operations/runSQLQuery.d.ts.map +1 -1
- package/lib/operations/runSQLQuery.js +20 -8
- package/lib/operations/runSQLQuery.js.map +1 -1
- package/lib/operations/sendSolanaTransaction.d.ts +1 -0
- package/lib/operations/sendSolanaTransaction.d.ts.map +1 -1
- package/lib/operations/sendSolanaTransaction.js +1 -0
- package/lib/operations/sendSolanaTransaction.js.map +1 -1
- package/lib/operations/settleX402Payment.d.ts +1 -0
- package/lib/operations/settleX402Payment.d.ts.map +1 -1
- package/lib/operations/settleX402Payment.js +1 -0
- package/lib/operations/settleX402Payment.js.map +1 -1
- package/lib/operations/supportedX402PaymentKinds.d.ts +1 -1
- package/lib/operations/supportedX402PaymentKinds.js +1 -1
- package/lib/operations/supportedX402PaymentKinds.js.map +1 -1
- package/lib/operations/updateWebhookSubscription.d.ts +1 -0
- package/lib/operations/updateWebhookSubscription.d.ts.map +1 -1
- package/lib/operations/updateWebhookSubscription.js +1 -0
- package/lib/operations/updateWebhookSubscription.js.map +1 -1
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +2 -2
- package/lib/retry.js.map +1 -1
- package/package.json +4 -4
- package/src/credentials.ts +2 -2
- package/src/operations/createWebhookSubscription.ts +3 -0
- package/src/operations/getSQLGrammar.ts +3 -2
- package/src/operations/getSQLSchema.ts +49 -0
- package/src/operations/getWebhookSubscription.ts +1 -0
- package/src/operations/index.ts +2 -0
- package/src/operations/listWebhookSubscriptionEvents.ts +82 -0
- package/src/operations/listWebhookSubscriptions.ts +1 -0
- package/src/operations/requestSolanaFaucet.ts +2 -2
- package/src/operations/runSQLQuery.ts +20 -8
- package/src/operations/sendSolanaTransaction.ts +1 -0
- package/src/operations/settleX402Payment.ts +1 -0
- package/src/operations/supportedX402PaymentKinds.ts +1 -1
- package/src/operations/updateWebhookSubscription.ts +1 -0
- package/src/retry.ts +2 -4
package/lib/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;;AAE1D;;GAEG;AACH,qBAAa,KAAM,SAAQ,UAAiD;CAAG;AAE/E;;GAEG;AACH,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,IAAI,mFAEhB,CAAC"}
|
package/lib/retry.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as
|
|
6
|
+
import * as Context from "effect/Context";
|
|
7
7
|
export { makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
|
|
8
8
|
/**
|
|
9
9
|
* Context tag for configuring retry behavior of Coinbase API calls.
|
|
10
10
|
*/
|
|
11
|
-
export class Retry extends
|
|
11
|
+
export class Retry extends Context.Service()("CoinbaseRetry") {
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Provides a custom retry policy to all Coinbase API calls.
|
package/lib/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAGrC;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,eAAe,CAAC;CAAG;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/coinbase",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/alchemy-run/distilled",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"specs:update": "git -C specs/cdp-sdk fetch && git -C specs/cdp-sdk checkout main && git -C specs/cdp-sdk pull"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@distilled.cloud/core": "0.
|
|
77
|
-
"effect": "4.0.0-beta.
|
|
76
|
+
"@distilled.cloud/core": "0.10.0",
|
|
77
|
+
"effect": "4.0.0-beta.48"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/bun": "^1.3.0",
|
|
@@ -84,6 +84,6 @@
|
|
|
84
84
|
"yaml": "^2.8.2"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"effect": "4.0.0-beta.
|
|
87
|
+
"effect": "4.0.0-beta.48"
|
|
88
88
|
}
|
|
89
89
|
}
|
package/src/credentials.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
5
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_API_BASE_URL = "https://api.cdp.coinbase.com/platform";
|
|
@@ -32,7 +32,7 @@ export interface Config {
|
|
|
32
32
|
readonly apiBaseUrl: string;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export class Credentials extends
|
|
35
|
+
export class Credentials extends Context.Service<Credentials, Config>()(
|
|
36
36
|
"CoinbaseCredentials",
|
|
37
37
|
) {}
|
|
38
38
|
|
|
@@ -23,6 +23,7 @@ export type CreateWebhookSubscriptionInput =
|
|
|
23
23
|
export const CreateWebhookSubscriptionOutput =
|
|
24
24
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
25
25
|
createdAt: Schema.String,
|
|
26
|
+
updatedAt: Schema.optional(Schema.String),
|
|
26
27
|
description: Schema.optional(Schema.Struct({})),
|
|
27
28
|
eventTypes: Schema.Array(Schema.String),
|
|
28
29
|
isEnabled: Schema.Boolean,
|
|
@@ -62,6 +63,8 @@ export type CreateWebhookSubscriptionOutput =
|
|
|
62
63
|
* - `payments.transfers.processing`
|
|
63
64
|
* - `payments.transfers.completed`
|
|
64
65
|
* - `payments.transfers.failed`
|
|
66
|
+
* - `payments.transfers.travel_rule_incomplete`
|
|
67
|
+
* - `payments.transfers.travel_rule_completed`
|
|
65
68
|
* - **No labels required** - enable the transfers webhook to monitor status transitions
|
|
66
69
|
* **Wallet Events** - Wallet activity notifications:
|
|
67
70
|
* - `wallet.activity.detected`
|
|
@@ -17,8 +17,9 @@ export type GetSQLGrammarOutput = typeof GetSQLGrammarOutput.Type;
|
|
|
17
17
|
* Get SQL grammar
|
|
18
18
|
*
|
|
19
19
|
* Retrieve the SQL grammar for the SQL API.
|
|
20
|
-
* The SQL queries that are supported by the SQL API are defined
|
|
21
|
-
* This endpoint returns the ANTLR4 grammar that is used to evaluate the SQL queries so that developers can understand the SQL API and build SQL queries with high confidence and correctness.
|
|
20
|
+
* The SQL queries that are supported by the SQL API are defined in ANTLR4 grammar which is evaluated by server before executing the query. This ensures the safety and soundness of the SQL query before execution.
|
|
21
|
+
* This endpoint returns the ANTLR4 grammar that is used to evaluate the SQL queries so that developers can understand the SQL API and build SQL queries with high confidence and correctness.
|
|
22
|
+
* LLMs interact well with ANTLR4 grammar. You can feed the grammar directly into the LLMs to help generate SQL queries.
|
|
22
23
|
*/
|
|
23
24
|
export const getSQLGrammar = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
24
25
|
inputSchema: GetSQLGrammarInput,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const GetSQLSchemaInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
database: Schema.optional(Schema.Literals(["base", "base_sepolia"])),
|
|
8
|
+
table: Schema.optional(Schema.String),
|
|
9
|
+
}).pipe(T.Http({ method: "GET", path: "/v2/data/query/schema" }));
|
|
10
|
+
export type GetSQLSchemaInput = typeof GetSQLSchemaInput.Type;
|
|
11
|
+
|
|
12
|
+
// Output Schema
|
|
13
|
+
export const GetSQLSchemaOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
14
|
+
tables: Schema.optional(
|
|
15
|
+
Schema.Array(
|
|
16
|
+
Schema.Struct({
|
|
17
|
+
database: Schema.optional(Schema.String),
|
|
18
|
+
table: Schema.optional(Schema.String),
|
|
19
|
+
columns: Schema.optional(
|
|
20
|
+
Schema.Array(
|
|
21
|
+
Schema.Struct({
|
|
22
|
+
name: Schema.optional(Schema.String),
|
|
23
|
+
type: Schema.optional(Schema.String),
|
|
24
|
+
nullable: Schema.optional(Schema.Boolean),
|
|
25
|
+
description: Schema.optional(Schema.Struct({})),
|
|
26
|
+
indexOrder: Schema.optional(Schema.Number),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
),
|
|
30
|
+
}),
|
|
31
|
+
),
|
|
32
|
+
),
|
|
33
|
+
});
|
|
34
|
+
export type GetSQLSchemaOutput = typeof GetSQLSchemaOutput.Type;
|
|
35
|
+
|
|
36
|
+
// The operation
|
|
37
|
+
/**
|
|
38
|
+
* Get schemas details
|
|
39
|
+
*
|
|
40
|
+
* Retrieve the schema information for the available tables in the SQL API's indexed data.
|
|
41
|
+
* This includes table names, column definitions, data types, and indexed fields.
|
|
42
|
+
*
|
|
43
|
+
* @param database - The name of the database to query. Defaults to "base" when not specified.
|
|
44
|
+
* @param table - Get the schema for a specific table.
|
|
45
|
+
*/
|
|
46
|
+
export const getSQLSchema = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
47
|
+
inputSchema: GetSQLSchemaInput,
|
|
48
|
+
outputSchema: GetSQLSchemaOutput,
|
|
49
|
+
}));
|
|
@@ -20,6 +20,7 @@ export type GetWebhookSubscriptionInput =
|
|
|
20
20
|
export const GetWebhookSubscriptionOutput =
|
|
21
21
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
22
22
|
createdAt: Schema.String,
|
|
23
|
+
updatedAt: Schema.optional(Schema.String),
|
|
23
24
|
description: Schema.optional(Schema.Struct({})),
|
|
24
25
|
eventTypes: Schema.Array(Schema.String),
|
|
25
26
|
isEnabled: Schema.Boolean,
|
package/src/operations/index.ts
CHANGED
|
@@ -57,6 +57,7 @@ export * from "./requestSolanaFaucet";
|
|
|
57
57
|
export * from "./listSolanaTokenBalances";
|
|
58
58
|
export * from "./runSQLQuery";
|
|
59
59
|
export * from "./getSQLGrammar";
|
|
60
|
+
export * from "./getSQLSchema";
|
|
60
61
|
export * from "./listTokensForAccount";
|
|
61
62
|
export * from "./listDataTokenBalances";
|
|
62
63
|
export * from "./listWebhookSubscriptions";
|
|
@@ -64,6 +65,7 @@ export * from "./createWebhookSubscription";
|
|
|
64
65
|
export * from "./getWebhookSubscription";
|
|
65
66
|
export * from "./updateWebhookSubscription";
|
|
66
67
|
export * from "./deleteWebhookSubscription";
|
|
68
|
+
export * from "./listWebhookSubscriptionEvents";
|
|
67
69
|
export * from "./verifyX402Payment";
|
|
68
70
|
export * from "./settleX402Payment";
|
|
69
71
|
export * from "./supportedX402PaymentKinds";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const ListWebhookSubscriptionEventsInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
subscriptionId: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
eventId: Schema.optional(Schema.String),
|
|
10
|
+
minCreatedAt: Schema.optional(Schema.String),
|
|
11
|
+
maxCreatedAt: Schema.optional(Schema.String),
|
|
12
|
+
eventTypeNames: Schema.optional(Schema.String),
|
|
13
|
+
}).pipe(
|
|
14
|
+
T.Http({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: "/v2/data/webhooks/subscriptions/{subscriptionId}/events",
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
19
|
+
export type ListWebhookSubscriptionEventsInput =
|
|
20
|
+
typeof ListWebhookSubscriptionEventsInput.Type;
|
|
21
|
+
|
|
22
|
+
// Output Schema
|
|
23
|
+
export const ListWebhookSubscriptionEventsOutput =
|
|
24
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
25
|
+
events: Schema.Array(
|
|
26
|
+
Schema.Struct({
|
|
27
|
+
eventId: Schema.String,
|
|
28
|
+
eventTypeName: Schema.String,
|
|
29
|
+
status: Schema.Literals([
|
|
30
|
+
"pending",
|
|
31
|
+
"processing",
|
|
32
|
+
"succeeded",
|
|
33
|
+
"failed",
|
|
34
|
+
"retrying",
|
|
35
|
+
]),
|
|
36
|
+
createdAt: Schema.String,
|
|
37
|
+
succeededAt: Schema.optional(Schema.String),
|
|
38
|
+
retryCount: Schema.Number,
|
|
39
|
+
response: Schema.optional(
|
|
40
|
+
Schema.Struct({
|
|
41
|
+
httpCode: Schema.optional(Schema.Number),
|
|
42
|
+
elapsedTimeMs: Schema.optional(Schema.Number),
|
|
43
|
+
body: Schema.optional(Schema.String),
|
|
44
|
+
errorName: Schema.optional(Schema.String),
|
|
45
|
+
}),
|
|
46
|
+
),
|
|
47
|
+
}),
|
|
48
|
+
),
|
|
49
|
+
});
|
|
50
|
+
export type ListWebhookSubscriptionEventsOutput =
|
|
51
|
+
typeof ListWebhookSubscriptionEventsOutput.Type;
|
|
52
|
+
|
|
53
|
+
// The operation
|
|
54
|
+
/**
|
|
55
|
+
* List webhook subscription events
|
|
56
|
+
*
|
|
57
|
+
* Retrieve webhook event delivery attempts for a specific subscription.
|
|
58
|
+
* Returns event deliveries in descending order by creation time (newest first),
|
|
59
|
+
* including delivery status, retry count, and response details.
|
|
60
|
+
* ### Use Cases
|
|
61
|
+
* - Debug webhook delivery failures and inspect response codes
|
|
62
|
+
* - Monitor delivery status and retry counts
|
|
63
|
+
* - Audit event delivery history for a subscription
|
|
64
|
+
* - Verify that expected events were sent to webhook URLs
|
|
65
|
+
* ### Filtering
|
|
66
|
+
* Use optional query parameters to narrow results:
|
|
67
|
+
* - `eventId` — find a specific event by ID
|
|
68
|
+
* - `minCreatedAt` / `maxCreatedAt` — filter by time range
|
|
69
|
+
* - `eventTypeNames` — filter by event type (comma-separated)
|
|
70
|
+
* **Note:** Results are limited to the 50 most recent events (newest first). No pagination is supported.
|
|
71
|
+
*
|
|
72
|
+
* @param subscriptionId - Unique identifier for the webhook subscription.
|
|
73
|
+
* @param eventId - Filter by a specific event ID.
|
|
74
|
+
* @param minCreatedAt - Filter events created at or after this timestamp (RFC 3339 format).
|
|
75
|
+
* @param maxCreatedAt - Filter events created at or before this timestamp (RFC 3339 format).
|
|
76
|
+
* @param eventTypeNames - Filter by event type names (comma-separated).
|
|
77
|
+
*/
|
|
78
|
+
export const listWebhookSubscriptionEvents =
|
|
79
|
+
/*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
80
|
+
inputSchema: ListWebhookSubscriptionEventsInput,
|
|
81
|
+
outputSchema: ListWebhookSubscriptionEventsOutput,
|
|
82
|
+
}));
|
|
@@ -18,6 +18,7 @@ export const ListWebhookSubscriptionsOutput =
|
|
|
18
18
|
subscriptions: Schema.Array(
|
|
19
19
|
Schema.Struct({
|
|
20
20
|
createdAt: Schema.String,
|
|
21
|
+
updatedAt: Schema.optional(Schema.String),
|
|
21
22
|
description: Schema.optional(Schema.Struct({})),
|
|
22
23
|
eventTypes: Schema.Array(Schema.String),
|
|
23
24
|
isEnabled: Schema.Boolean,
|
|
@@ -6,7 +6,7 @@ import * as T from "../traits";
|
|
|
6
6
|
export const RequestSolanaFaucetInput =
|
|
7
7
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
8
|
address: Schema.String,
|
|
9
|
-
token: Schema.Literals(["sol", "usdc"]),
|
|
9
|
+
token: Schema.Literals(["sol", "usdc", "cbtusd"]),
|
|
10
10
|
}).pipe(T.Http({ method: "POST", path: "/v2/solana/faucet" }));
|
|
11
11
|
export type RequestSolanaFaucetInput = typeof RequestSolanaFaucetInput.Type;
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ export type RequestSolanaFaucetOutput = typeof RequestSolanaFaucetOutput.Type;
|
|
|
22
22
|
* Request funds on Solana devnet
|
|
23
23
|
*
|
|
24
24
|
* Request funds from the CDP Faucet on Solana devnet.
|
|
25
|
-
* Faucets are available for SOL.
|
|
25
|
+
* Faucets are available for SOL, USDC, and CBTUSD.
|
|
26
26
|
* To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
|
|
27
27
|
* These limits are applied at both the CDP Project level and the blockchain address level.
|
|
28
28
|
* A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
|
|
@@ -72,19 +72,31 @@ export type RunSQLQueryOutput = typeof RunSQLQueryOutput.Type;
|
|
|
72
72
|
* This endpoint provides direct SQL access to comprehensive blockchain data across supported networks.
|
|
73
73
|
* Queries are executed against optimized data structures for high-performance analytics.
|
|
74
74
|
* ### Allowed Queries
|
|
75
|
-
* - Standard SQL syntax (ClickHouse dialect)
|
|
75
|
+
* - Standard SQL syntax (CoinbaSeQL dialect, based on ClickHouse dialect)
|
|
76
76
|
* - Read-only queries (SELECT statements)
|
|
77
77
|
* - No DDL or DML operations
|
|
78
|
-
* -
|
|
78
|
+
* - Query that follow limits (defined below)
|
|
79
79
|
* ### Supported Tables
|
|
80
|
-
* -
|
|
81
|
-
* -
|
|
82
|
-
* -
|
|
83
|
-
* -
|
|
84
|
-
* - `
|
|
80
|
+
* - `<network>.events` - Base mainnet decoded event logs with parameters, event signature, topics, and more.
|
|
81
|
+
* - `<network>.transactions` - Base mainnet transaction data including hash, block number, gas usage.
|
|
82
|
+
* - `<network>.blocks` - Base mainnet block information.
|
|
83
|
+
* - `<network>.encoded_logs` - Encoded log data of event logs that aren't able to be decoded by our event decoder (ex: log0 opcode).
|
|
84
|
+
* - `<network>.decoded_user_operations` - Decoded user operations data including hash, block number, gas usage, builder codes, entrypoint version, and more.
|
|
85
|
+
* - `<network>.transaction_attributions` - Information about the attributions of a transaction to a builder and associated builder codes.
|
|
86
|
+
* ### Supported Networks
|
|
87
|
+
* - Base Mainnet: `base`
|
|
88
|
+
* - Base Sepolia: `base_sepolia`
|
|
89
|
+
* So for example, valid tables are: `base.events`, `base_sepolia.events`, `base.transactions`, etc.
|
|
85
90
|
* ### Query Limits
|
|
86
|
-
* - Maximum result set:
|
|
91
|
+
* - Maximum result set: 50,000 rows
|
|
92
|
+
* - Maximum query length: 10,000 characters
|
|
93
|
+
* - Maximum on-disk data to read: 100GB
|
|
94
|
+
* - Maximum memory usage: 15GB
|
|
87
95
|
* - Query timeout: 30 seconds
|
|
96
|
+
* - Maximum JOINs: 12
|
|
97
|
+
* ### Query Caching
|
|
98
|
+
* By default, each query result is returned from cache so long as the result is from an identical query and less than 750ms old. This freshness tolerance can be modified upwards, to a maximum of 900000ms (i.e. 900s, 15m).
|
|
99
|
+
* This can be helpful for users who wish to reduce expensive calls to the SQL API by reusing cached results.
|
|
88
100
|
*/
|
|
89
101
|
export const runSQLQuery = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
90
102
|
inputSchema: RunSQLQueryInput,
|
|
@@ -7,6 +7,7 @@ export const SendSolanaTransactionInput =
|
|
|
7
7
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
8
|
network: Schema.Literals(["solana", "solana-devnet"]),
|
|
9
9
|
transaction: Schema.String,
|
|
10
|
+
useCdpSponsor: Schema.optional(Schema.Boolean),
|
|
10
11
|
}).pipe(
|
|
11
12
|
T.Http({ method: "POST", path: "/v2/solana/accounts/send/transaction" }),
|
|
12
13
|
);
|
|
@@ -16,7 +16,7 @@ export const SupportedX402PaymentKindsOutput =
|
|
|
16
16
|
kinds: Schema.Array(
|
|
17
17
|
Schema.Struct({
|
|
18
18
|
x402Version: Schema.Literals(["1", "2"]),
|
|
19
|
-
scheme: Schema.Literals(["exact"]),
|
|
19
|
+
scheme: Schema.Literals(["exact", "upto"]),
|
|
20
20
|
network: Schema.Literals([
|
|
21
21
|
"base-sepolia",
|
|
22
22
|
"base",
|
|
@@ -29,6 +29,7 @@ export type UpdateWebhookSubscriptionInput =
|
|
|
29
29
|
export const UpdateWebhookSubscriptionOutput =
|
|
30
30
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
31
31
|
createdAt: Schema.String,
|
|
32
|
+
updatedAt: Schema.optional(Schema.String),
|
|
32
33
|
description: Schema.optional(Schema.Struct({})),
|
|
33
34
|
eventTypes: Schema.Array(Schema.String),
|
|
34
35
|
isEnabled: Schema.Boolean,
|
package/src/retry.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as
|
|
6
|
+
import * as Context from "effect/Context";
|
|
7
7
|
export {
|
|
8
8
|
type Options,
|
|
9
9
|
type Factory,
|
|
@@ -19,9 +19,7 @@ import type { Policy } from "@distilled.cloud/core/retry";
|
|
|
19
19
|
/**
|
|
20
20
|
* Context tag for configuring retry behavior of Coinbase API calls.
|
|
21
21
|
*/
|
|
22
|
-
export class Retry extends
|
|
23
|
-
"CoinbaseRetry",
|
|
24
|
-
) {}
|
|
22
|
+
export class Retry extends Context.Service<Retry, Policy>()("CoinbaseRetry") {}
|
|
25
23
|
|
|
26
24
|
/**
|
|
27
25
|
* Provides a custom retry policy to all Coinbase API calls.
|