@gol/sdk 0.5.0 → 0.6.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/README.md CHANGED
@@ -2,14 +2,16 @@
2
2
 
3
3
  TypeScript SDK for GOL Network bounded mandates with hosted, owner-paid network gas on Base Sepolia testnet (chain `84532`).
4
4
 
5
+ Version 0.6.0 adds typed provisional inclusion fields and wait helpers for owner approval, sponsored child mandates, EIP-7702 setup, and actions or claims. The inclusion helpers check every second and can return `included`, `reverted`, `orphaned`, or `mismatch` while final confirmation and settlement continue. Existing final-confirmation helpers keep their 15-second default interval. Hosted API 0.6.0 on Base Sepolia verified signed Alchemy webhook inclusion for a sponsored setup, owner approval, and developer-relayed action on 2026-09-29. The webhook rollout is bounded, so clients must allow for reconciliation when a hook is unavailable. An `included` result is provisional and does not mean safe-head settlement or finalized observation.
6
+
5
7
  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
8
 
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.
9
+ Version 0.6.0 retains hosted gas public API revision 2.0 and the project display-name and audit cursor methods from 0.5.1. 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
10
 
9
11
  ## Install
10
12
 
11
13
  ```sh
12
- pnpm add @gol/sdk@0.5.0
14
+ pnpm add @gol/sdk@0.6.0
13
15
  ```
14
16
 
15
17
  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.
@@ -18,7 +20,7 @@ Use Node.js 22 or later. The root entry point (`@gol/sdk`) is browser-safe: poli
18
20
 
19
21
  ## Integration flow
20
22
 
21
- Create a test project and an API key with `project:read`, `accounts:read`, `mandates:read`, `mandates:write`, `actions:submit`, and `webhooks:manage` at [console.gol.network](https://console.gol.network).
23
+ With console access, create a test project and an API key with `project:read`, `accounts:read`, `mandates:read`, `mandates:write`, `actions:submit`, and `webhooks:manage` at [console.gol.network](https://console.gol.network). The hosted console is currently unpublished behind a password gate; project creation requires that access before the developer sign-in flow. Existing test API keys continue to authenticate directly to the public API.
22
24
 
23
25
  1. **Install the core on the owner's account.** `getAccountStatus` reports the detected family, its delegation for an EOA, and whether the core is installed.
24
26
  - Smart accounts: build the owner operation in the browser with `prepareOwnerInstallation` and `prepareOwnerOperation`, have the owner sign it with `signOwnerOperation`, and submit the returned transaction (a Safe transaction, or an EntryPoint v0.7 user operation for Nexus, Kernel, and Alchemy).
@@ -125,6 +127,12 @@ const gol = new GolManagementClient({
125
127
  });
126
128
 
127
129
  const projects = await gol.listProjects();
130
+ const project = await gol.createProject({ name: "My test project" });
131
+ await gol.updateProject(project.id, { name: "Renamed project" });
132
+ const events = await gol.listAuditEvents(project.id, 100);
133
+ if (events.nextCursor) {
134
+ await gol.listAuditEvents(project.id, 100, events.nextCursor);
135
+ }
128
136
  ```
129
137
 
130
138
  ## 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;
@@ -753,6 +769,26 @@ export interface components {
753
769
  relayerMode: "gol" | "developer" | null;
754
770
  submitter: string | null;
755
771
  state: string;
772
+ inclusion?: null | {
773
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
774
+ workflow: string;
775
+ transactionHash: string;
776
+ blockHash: string | null;
777
+ blockNumber: string | null;
778
+ outcome: string | null;
779
+ observedAt: string | null;
780
+ finalizedAt: string | null;
781
+ };
782
+ inclusions?: {
783
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
784
+ workflow: string;
785
+ transactionHash: string;
786
+ blockHash: string | null;
787
+ blockNumber: string | null;
788
+ outcome: string | null;
789
+ observedAt: string | null;
790
+ finalizedAt: string | null;
791
+ }[];
756
792
  quote: {
757
793
  maxChargeWei: string;
758
794
  acceptedOwnerMaximumWei: string;
@@ -956,6 +992,8 @@ export interface components {
956
992
  validFrom: number;
957
993
  expiresAt: number;
958
994
  creationTransactionHash: string | null;
995
+ submissionTransactionHash?: string | null;
996
+ inclusion?: "pending" | "included" | "reverted" | "orphaned" | "mismatch" | null;
959
997
  sponsored: boolean;
960
998
  /** Format: date-time */
961
999
  createdAt: string;
@@ -969,6 +1007,7 @@ export interface components {
969
1007
  account: string;
970
1008
  state: "accepted" | "signed" | "submitted" | "confirmed" | "failed";
971
1009
  transactionHash: string | null;
1010
+ inclusion?: "pending" | "included" | "reverted" | "orphaned" | "mismatch" | null;
972
1011
  blockNumber: string | null;
973
1012
  failureReason: string | null;
974
1013
  /** Format: date-time */
@@ -2326,6 +2365,173 @@ export interface operations {
2326
2365
  };
2327
2366
  };
2328
2367
  };
2368
+ updateProject: {
2369
+ parameters: {
2370
+ query?: never;
2371
+ header?: never;
2372
+ path: {
2373
+ projectId: string;
2374
+ };
2375
+ cookie?: never;
2376
+ };
2377
+ requestBody: {
2378
+ content: {
2379
+ "application/json": {
2380
+ name: string;
2381
+ };
2382
+ };
2383
+ };
2384
+ responses: {
2385
+ /** @description Default Response */
2386
+ 200: {
2387
+ headers: {
2388
+ [name: string]: unknown;
2389
+ };
2390
+ content: {
2391
+ "application/json": {
2392
+ /** Format: uuid */
2393
+ id: string;
2394
+ name: string;
2395
+ slug: string;
2396
+ /** Format: date-time */
2397
+ createdAt: string;
2398
+ environments: {
2399
+ name: "test" | "live";
2400
+ status: "active" | "unavailable";
2401
+ }[];
2402
+ };
2403
+ };
2404
+ };
2405
+ /** @description Default Response */
2406
+ 400: {
2407
+ headers: {
2408
+ [name: string]: unknown;
2409
+ };
2410
+ content: {
2411
+ "application/json": {
2412
+ error: {
2413
+ code: string;
2414
+ message: string;
2415
+ /** Format: uuid */
2416
+ correlationId: string;
2417
+ };
2418
+ };
2419
+ };
2420
+ };
2421
+ /** @description Default Response */
2422
+ 401: {
2423
+ headers: {
2424
+ [name: string]: unknown;
2425
+ };
2426
+ content: {
2427
+ "application/json": {
2428
+ error: {
2429
+ code: string;
2430
+ message: string;
2431
+ /** Format: uuid */
2432
+ correlationId: string;
2433
+ };
2434
+ };
2435
+ };
2436
+ };
2437
+ /** @description Default Response */
2438
+ 403: {
2439
+ headers: {
2440
+ [name: string]: unknown;
2441
+ };
2442
+ content: {
2443
+ "application/json": {
2444
+ error: {
2445
+ code: string;
2446
+ message: string;
2447
+ /** Format: uuid */
2448
+ correlationId: string;
2449
+ };
2450
+ };
2451
+ };
2452
+ };
2453
+ /** @description Default Response */
2454
+ 404: {
2455
+ headers: {
2456
+ [name: string]: unknown;
2457
+ };
2458
+ content: {
2459
+ "application/json": {
2460
+ error: {
2461
+ code: string;
2462
+ message: string;
2463
+ /** Format: uuid */
2464
+ correlationId: string;
2465
+ };
2466
+ };
2467
+ };
2468
+ };
2469
+ /** @description Default Response */
2470
+ 409: {
2471
+ headers: {
2472
+ [name: string]: unknown;
2473
+ };
2474
+ content: {
2475
+ "application/json": {
2476
+ error: {
2477
+ code: string;
2478
+ message: string;
2479
+ /** Format: uuid */
2480
+ correlationId: string;
2481
+ };
2482
+ };
2483
+ };
2484
+ };
2485
+ /** @description Default Response */
2486
+ 429: {
2487
+ headers: {
2488
+ [name: string]: unknown;
2489
+ };
2490
+ content: {
2491
+ "application/json": {
2492
+ error: {
2493
+ code: string;
2494
+ message: string;
2495
+ /** Format: uuid */
2496
+ correlationId: string;
2497
+ };
2498
+ };
2499
+ };
2500
+ };
2501
+ /** @description Default Response */
2502
+ 500: {
2503
+ headers: {
2504
+ [name: string]: unknown;
2505
+ };
2506
+ content: {
2507
+ "application/json": {
2508
+ error: {
2509
+ code: string;
2510
+ message: string;
2511
+ /** Format: uuid */
2512
+ correlationId: string;
2513
+ };
2514
+ };
2515
+ };
2516
+ };
2517
+ /** @description Default Response */
2518
+ 503: {
2519
+ headers: {
2520
+ [name: string]: unknown;
2521
+ };
2522
+ content: {
2523
+ "application/json": {
2524
+ error: {
2525
+ code: string;
2526
+ message: string;
2527
+ /** Format: uuid */
2528
+ correlationId: string;
2529
+ };
2530
+ };
2531
+ };
2532
+ };
2533
+ };
2534
+ };
2329
2535
  listApiKeys: {
2330
2536
  parameters: {
2331
2537
  query?: never;
@@ -3418,6 +3624,26 @@ export interface operations {
3418
3624
  relayerMode: "gol" | "developer" | null;
3419
3625
  submitter: string | null;
3420
3626
  state: string;
3627
+ inclusion?: null | {
3628
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
3629
+ workflow: string;
3630
+ transactionHash: string;
3631
+ blockHash: string | null;
3632
+ blockNumber: string | null;
3633
+ outcome: string | null;
3634
+ observedAt: string | null;
3635
+ finalizedAt: string | null;
3636
+ };
3637
+ inclusions?: {
3638
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
3639
+ workflow: string;
3640
+ transactionHash: string;
3641
+ blockHash: string | null;
3642
+ blockNumber: string | null;
3643
+ outcome: string | null;
3644
+ observedAt: string | null;
3645
+ finalizedAt: string | null;
3646
+ }[];
3421
3647
  quote: {
3422
3648
  maxChargeWei: string;
3423
3649
  acceptedOwnerMaximumWei: string;
@@ -3530,6 +3756,26 @@ export interface operations {
3530
3756
  relayerMode: "gol" | "developer" | null;
3531
3757
  submitter: string | null;
3532
3758
  state: string;
3759
+ inclusion?: null | {
3760
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
3761
+ workflow: string;
3762
+ transactionHash: string;
3763
+ blockHash: string | null;
3764
+ blockNumber: string | null;
3765
+ outcome: string | null;
3766
+ observedAt: string | null;
3767
+ finalizedAt: string | null;
3768
+ };
3769
+ inclusions?: {
3770
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
3771
+ workflow: string;
3772
+ transactionHash: string;
3773
+ blockHash: string | null;
3774
+ blockNumber: string | null;
3775
+ outcome: string | null;
3776
+ observedAt: string | null;
3777
+ finalizedAt: string | null;
3778
+ }[];
3533
3779
  quote: {
3534
3780
  maxChargeWei: string;
3535
3781
  acceptedOwnerMaximumWei: string;
@@ -3790,6 +4036,26 @@ export interface operations {
3790
4036
  relayerMode: "gol" | "developer" | null;
3791
4037
  submitter: string | null;
3792
4038
  state: string;
4039
+ inclusion?: null | {
4040
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
4041
+ workflow: string;
4042
+ transactionHash: string;
4043
+ blockHash: string | null;
4044
+ blockNumber: string | null;
4045
+ outcome: string | null;
4046
+ observedAt: string | null;
4047
+ finalizedAt: string | null;
4048
+ };
4049
+ inclusions?: {
4050
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
4051
+ workflow: string;
4052
+ transactionHash: string;
4053
+ blockHash: string | null;
4054
+ blockNumber: string | null;
4055
+ outcome: string | null;
4056
+ observedAt: string | null;
4057
+ finalizedAt: string | null;
4058
+ }[];
3793
4059
  quote: {
3794
4060
  maxChargeWei: string;
3795
4061
  acceptedOwnerMaximumWei: string;
@@ -4010,6 +4276,7 @@ export interface operations {
4010
4276
  parameters: {
4011
4277
  query?: {
4012
4278
  limit?: number;
4279
+ cursor?: string;
4013
4280
  };
4014
4281
  header?: never;
4015
4282
  path: {
@@ -4039,6 +4306,7 @@ export interface operations {
4039
4306
  /** Format: date-time */
4040
4307
  createdAt: string;
4041
4308
  }[];
4309
+ nextCursor: string | null;
4042
4310
  };
4043
4311
  };
4044
4312
  };
@@ -4387,6 +4655,26 @@ export interface operations {
4387
4655
  relayerMode: "gol" | "developer" | null;
4388
4656
  submitter: string | null;
4389
4657
  state: string;
4658
+ inclusion?: null | {
4659
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
4660
+ workflow: string;
4661
+ transactionHash: string;
4662
+ blockHash: string | null;
4663
+ blockNumber: string | null;
4664
+ outcome: string | null;
4665
+ observedAt: string | null;
4666
+ finalizedAt: string | null;
4667
+ };
4668
+ inclusions?: {
4669
+ state: "pending" | "included" | "reverted" | "orphaned" | "mismatch";
4670
+ workflow: string;
4671
+ transactionHash: string;
4672
+ blockHash: string | null;
4673
+ blockNumber: string | null;
4674
+ outcome: string | null;
4675
+ observedAt: string | null;
4676
+ finalizedAt: string | null;
4677
+ }[];
4390
4678
  quote: {
4391
4679
  maxChargeWei: string;
4392
4680
  acceptedOwnerMaximumWei: string;
@@ -5791,8 +6079,7 @@ export interface operations {
5791
6079
  };
5792
6080
  content: {
5793
6081
  "application/json": {
5794
- /** @enum {string} */
5795
- status: "observing";
6082
+ status: "observing" | "included" | "reverted" | "orphaned" | "mismatch";
5796
6083
  transactionHash: string;
5797
6084
  /** Format: uuid */
5798
6085
  draftId?: string;
@@ -6521,8 +6808,7 @@ export interface operations {
6521
6808
  };
6522
6809
  content: {
6523
6810
  "application/json": {
6524
- /** @enum {string} */
6525
- status: "observing";
6811
+ status: "observing" | "included" | "reverted" | "orphaned" | "mismatch";
6526
6812
  transactionHash: string;
6527
6813
  /** Format: uuid */
6528
6814
  draftId?: string;
@@ -7181,8 +7467,7 @@ export interface operations {
7181
7467
  };
7182
7468
  content: {
7183
7469
  "application/json": {
7184
- /** @enum {string} */
7185
- status: "observing";
7470
+ status: "observing" | "included" | "reverted" | "orphaned" | "mismatch";
7186
7471
  transactionHash: string;
7187
7472
  /** Format: uuid */
7188
7473
  draftId?: string;
@@ -7538,8 +7823,7 @@ export interface operations {
7538
7823
  };
7539
7824
  content: {
7540
7825
  "application/json": {
7541
- /** @enum {string} */
7542
- status: "observing";
7826
+ status: "observing" | "included" | "reverted" | "orphaned" | "mismatch";
7543
7827
  transactionHash: string;
7544
7828
  /** Format: uuid */
7545
7829
  draftId?: string;