@gol/sdk 0.5.0 → 0.5.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.
package/README.md CHANGED
@@ -4,12 +4,12 @@ TypeScript SDK for GOL Network bounded mandates with hosted, owner-paid network
4
4
 
5
5
  A developer's agent sends bounded USDC transfers from an end user's existing account. An owner-approved relayer, operated by GOL or by the developer, sends each action and fronts its network gas. The version 3 core meters the transaction and reimburses that relayer in native ETH from the same account in the same transaction, within caps the owner signed and a maximum the agent signed. With a GOL-operated relayer the owner can also consent to a later attested claim for a reverted transaction. The owner signs every authority in their own wallet and can pause, resume, or revoke without GOL.
6
6
 
7
- Version 0.5.0 implements hosted gas public API revision 2.0 for compatibility profile 4: the version 3 core (EIP-712 domain `GOL Mandate`, version `3`) and gas formula version 2. It covers five exact account configurations: Safe 1.4.1, Biconomy Nexus 1.0.0, ZeroDev Kernel v0.3.1, Alchemy Modular Account v2, and an owner's EOA delegated to Biconomy Nexus 1.3.3 under EIP-7702 (`nexus7702`). Support is stated only by an Active compatibility profile; check [docs.gol.network](https://docs.gol.network) for the current status. Approvals signed for the version 2 core (profiles 1 to 3) are not valid here. The transfer asset is Circle USDC on Base Sepolia. Read deployed addresses and limits from `getGasConfiguration`; do not hard-code them.
7
+ Version 0.5.1 retains hosted gas public API revision 2.0 for compatibility profile 4 and adds project display-name updates and audit cursors to the developer management client. The version 3 core uses EIP-712 domain `GOL Mandate`, version `3`, and gas formula version 2. It covers five exact account configurations: Safe 1.4.1, Biconomy Nexus 1.0.0, ZeroDev Kernel v0.3.1, Alchemy Modular Account v2, and an owner's EOA delegated to Biconomy Nexus 1.3.3 under EIP-7702 (`nexus7702`). Support is stated only by an Active compatibility profile; check [docs.gol.network](https://docs.gol.network) for the current status. Approvals signed for the version 2 core (profiles 1 to 3) are not valid here. The transfer asset is Circle USDC on Base Sepolia. Read deployed addresses and limits from `getGasConfiguration`; do not hard-code them.
8
8
 
9
9
  ## Install
10
10
 
11
11
  ```sh
12
- pnpm add @gol/sdk@0.5.0
12
+ pnpm add @gol/sdk@0.5.1
13
13
  ```
14
14
 
15
15
  Use Node.js 22 or later. The root entry point (`@gol/sdk`) is browser-safe: policy encoding, owner, agent, and EIP-7702 setup payloads, owner operations, and verification. API clients and webhook verification are in `@gol/sdk/server` and must run on your server, because they hold your API key.
@@ -125,6 +125,12 @@ const gol = new GolManagementClient({
125
125
  });
126
126
 
127
127
  const projects = await gol.listProjects();
128
+ const project = await gol.createProject({ name: "My test project" });
129
+ await gol.updateProject(project.id, { name: "Renamed project" });
130
+ const events = await gol.listAuditEvents(project.id, 100);
131
+ if (events.nextCursor) {
132
+ await gol.listAuditEvents(project.id, 100, events.nextCursor);
133
+ }
128
134
  ```
129
135
 
130
136
  ## Development
@@ -150,6 +150,22 @@ export interface paths {
150
150
  patch?: never;
151
151
  trace?: never;
152
152
  };
153
+ "/v1/projects/{projectId}": {
154
+ parameters: {
155
+ query?: never;
156
+ header?: never;
157
+ path?: never;
158
+ cookie?: never;
159
+ };
160
+ get?: never;
161
+ put?: never;
162
+ post?: never;
163
+ delete?: never;
164
+ options?: never;
165
+ head?: never;
166
+ patch: operations["updateProject"];
167
+ trace?: never;
168
+ };
153
169
  "/v1/projects/{projectId}/api-keys": {
154
170
  parameters: {
155
171
  query?: never;
@@ -2326,6 +2342,173 @@ export interface operations {
2326
2342
  };
2327
2343
  };
2328
2344
  };
2345
+ updateProject: {
2346
+ parameters: {
2347
+ query?: never;
2348
+ header?: never;
2349
+ path: {
2350
+ projectId: string;
2351
+ };
2352
+ cookie?: never;
2353
+ };
2354
+ requestBody: {
2355
+ content: {
2356
+ "application/json": {
2357
+ name: string;
2358
+ };
2359
+ };
2360
+ };
2361
+ responses: {
2362
+ /** @description Default Response */
2363
+ 200: {
2364
+ headers: {
2365
+ [name: string]: unknown;
2366
+ };
2367
+ content: {
2368
+ "application/json": {
2369
+ /** Format: uuid */
2370
+ id: string;
2371
+ name: string;
2372
+ slug: string;
2373
+ /** Format: date-time */
2374
+ createdAt: string;
2375
+ environments: {
2376
+ name: "test" | "live";
2377
+ status: "active" | "unavailable";
2378
+ }[];
2379
+ };
2380
+ };
2381
+ };
2382
+ /** @description Default Response */
2383
+ 400: {
2384
+ headers: {
2385
+ [name: string]: unknown;
2386
+ };
2387
+ content: {
2388
+ "application/json": {
2389
+ error: {
2390
+ code: string;
2391
+ message: string;
2392
+ /** Format: uuid */
2393
+ correlationId: string;
2394
+ };
2395
+ };
2396
+ };
2397
+ };
2398
+ /** @description Default Response */
2399
+ 401: {
2400
+ headers: {
2401
+ [name: string]: unknown;
2402
+ };
2403
+ content: {
2404
+ "application/json": {
2405
+ error: {
2406
+ code: string;
2407
+ message: string;
2408
+ /** Format: uuid */
2409
+ correlationId: string;
2410
+ };
2411
+ };
2412
+ };
2413
+ };
2414
+ /** @description Default Response */
2415
+ 403: {
2416
+ headers: {
2417
+ [name: string]: unknown;
2418
+ };
2419
+ content: {
2420
+ "application/json": {
2421
+ error: {
2422
+ code: string;
2423
+ message: string;
2424
+ /** Format: uuid */
2425
+ correlationId: string;
2426
+ };
2427
+ };
2428
+ };
2429
+ };
2430
+ /** @description Default Response */
2431
+ 404: {
2432
+ headers: {
2433
+ [name: string]: unknown;
2434
+ };
2435
+ content: {
2436
+ "application/json": {
2437
+ error: {
2438
+ code: string;
2439
+ message: string;
2440
+ /** Format: uuid */
2441
+ correlationId: string;
2442
+ };
2443
+ };
2444
+ };
2445
+ };
2446
+ /** @description Default Response */
2447
+ 409: {
2448
+ headers: {
2449
+ [name: string]: unknown;
2450
+ };
2451
+ content: {
2452
+ "application/json": {
2453
+ error: {
2454
+ code: string;
2455
+ message: string;
2456
+ /** Format: uuid */
2457
+ correlationId: string;
2458
+ };
2459
+ };
2460
+ };
2461
+ };
2462
+ /** @description Default Response */
2463
+ 429: {
2464
+ headers: {
2465
+ [name: string]: unknown;
2466
+ };
2467
+ content: {
2468
+ "application/json": {
2469
+ error: {
2470
+ code: string;
2471
+ message: string;
2472
+ /** Format: uuid */
2473
+ correlationId: string;
2474
+ };
2475
+ };
2476
+ };
2477
+ };
2478
+ /** @description Default Response */
2479
+ 500: {
2480
+ headers: {
2481
+ [name: string]: unknown;
2482
+ };
2483
+ content: {
2484
+ "application/json": {
2485
+ error: {
2486
+ code: string;
2487
+ message: string;
2488
+ /** Format: uuid */
2489
+ correlationId: string;
2490
+ };
2491
+ };
2492
+ };
2493
+ };
2494
+ /** @description Default Response */
2495
+ 503: {
2496
+ headers: {
2497
+ [name: string]: unknown;
2498
+ };
2499
+ content: {
2500
+ "application/json": {
2501
+ error: {
2502
+ code: string;
2503
+ message: string;
2504
+ /** Format: uuid */
2505
+ correlationId: string;
2506
+ };
2507
+ };
2508
+ };
2509
+ };
2510
+ };
2511
+ };
2329
2512
  listApiKeys: {
2330
2513
  parameters: {
2331
2514
  query?: never;
@@ -4010,6 +4193,7 @@ export interface operations {
4010
4193
  parameters: {
4011
4194
  query?: {
4012
4195
  limit?: number;
4196
+ cursor?: string;
4013
4197
  };
4014
4198
  header?: never;
4015
4199
  path: {
@@ -4039,6 +4223,7 @@ export interface operations {
4039
4223
  /** Format: date-time */
4040
4224
  createdAt: string;
4041
4225
  }[];
4226
+ nextCursor: string | null;
4042
4227
  };
4043
4228
  };
4044
4229
  };