@gol/sdk 0.5.1 → 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 +5 -3
- package/dist/generated/platform.d.ts +107 -8
- package/dist/generated/platform.d.ts.map +1 -1
- package/dist/server.d.ts +14 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +57 -3
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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.
|
|
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
|
-
|
|
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).
|
|
@@ -769,6 +769,26 @@ export interface components {
|
|
|
769
769
|
relayerMode: "gol" | "developer" | null;
|
|
770
770
|
submitter: string | null;
|
|
771
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
|
+
}[];
|
|
772
792
|
quote: {
|
|
773
793
|
maxChargeWei: string;
|
|
774
794
|
acceptedOwnerMaximumWei: string;
|
|
@@ -972,6 +992,8 @@ export interface components {
|
|
|
972
992
|
validFrom: number;
|
|
973
993
|
expiresAt: number;
|
|
974
994
|
creationTransactionHash: string | null;
|
|
995
|
+
submissionTransactionHash?: string | null;
|
|
996
|
+
inclusion?: "pending" | "included" | "reverted" | "orphaned" | "mismatch" | null;
|
|
975
997
|
sponsored: boolean;
|
|
976
998
|
/** Format: date-time */
|
|
977
999
|
createdAt: string;
|
|
@@ -985,6 +1007,7 @@ export interface components {
|
|
|
985
1007
|
account: string;
|
|
986
1008
|
state: "accepted" | "signed" | "submitted" | "confirmed" | "failed";
|
|
987
1009
|
transactionHash: string | null;
|
|
1010
|
+
inclusion?: "pending" | "included" | "reverted" | "orphaned" | "mismatch" | null;
|
|
988
1011
|
blockNumber: string | null;
|
|
989
1012
|
failureReason: string | null;
|
|
990
1013
|
/** Format: date-time */
|
|
@@ -3601,6 +3624,26 @@ export interface operations {
|
|
|
3601
3624
|
relayerMode: "gol" | "developer" | null;
|
|
3602
3625
|
submitter: string | null;
|
|
3603
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
|
+
}[];
|
|
3604
3647
|
quote: {
|
|
3605
3648
|
maxChargeWei: string;
|
|
3606
3649
|
acceptedOwnerMaximumWei: string;
|
|
@@ -3713,6 +3756,26 @@ export interface operations {
|
|
|
3713
3756
|
relayerMode: "gol" | "developer" | null;
|
|
3714
3757
|
submitter: string | null;
|
|
3715
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
|
+
}[];
|
|
3716
3779
|
quote: {
|
|
3717
3780
|
maxChargeWei: string;
|
|
3718
3781
|
acceptedOwnerMaximumWei: string;
|
|
@@ -3973,6 +4036,26 @@ export interface operations {
|
|
|
3973
4036
|
relayerMode: "gol" | "developer" | null;
|
|
3974
4037
|
submitter: string | null;
|
|
3975
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
|
+
}[];
|
|
3976
4059
|
quote: {
|
|
3977
4060
|
maxChargeWei: string;
|
|
3978
4061
|
acceptedOwnerMaximumWei: string;
|
|
@@ -4572,6 +4655,26 @@ export interface operations {
|
|
|
4572
4655
|
relayerMode: "gol" | "developer" | null;
|
|
4573
4656
|
submitter: string | null;
|
|
4574
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
|
+
}[];
|
|
4575
4678
|
quote: {
|
|
4576
4679
|
maxChargeWei: string;
|
|
4577
4680
|
acceptedOwnerMaximumWei: string;
|
|
@@ -5976,8 +6079,7 @@ export interface operations {
|
|
|
5976
6079
|
};
|
|
5977
6080
|
content: {
|
|
5978
6081
|
"application/json": {
|
|
5979
|
-
|
|
5980
|
-
status: "observing";
|
|
6082
|
+
status: "observing" | "included" | "reverted" | "orphaned" | "mismatch";
|
|
5981
6083
|
transactionHash: string;
|
|
5982
6084
|
/** Format: uuid */
|
|
5983
6085
|
draftId?: string;
|
|
@@ -6706,8 +6808,7 @@ export interface operations {
|
|
|
6706
6808
|
};
|
|
6707
6809
|
content: {
|
|
6708
6810
|
"application/json": {
|
|
6709
|
-
|
|
6710
|
-
status: "observing";
|
|
6811
|
+
status: "observing" | "included" | "reverted" | "orphaned" | "mismatch";
|
|
6711
6812
|
transactionHash: string;
|
|
6712
6813
|
/** Format: uuid */
|
|
6713
6814
|
draftId?: string;
|
|
@@ -7366,8 +7467,7 @@ export interface operations {
|
|
|
7366
7467
|
};
|
|
7367
7468
|
content: {
|
|
7368
7469
|
"application/json": {
|
|
7369
|
-
|
|
7370
|
-
status: "observing";
|
|
7470
|
+
status: "observing" | "included" | "reverted" | "orphaned" | "mismatch";
|
|
7371
7471
|
transactionHash: string;
|
|
7372
7472
|
/** Format: uuid */
|
|
7373
7473
|
draftId?: string;
|
|
@@ -7723,8 +7823,7 @@ export interface operations {
|
|
|
7723
7823
|
};
|
|
7724
7824
|
content: {
|
|
7725
7825
|
"application/json": {
|
|
7726
|
-
|
|
7727
|
-
status: "observing";
|
|
7826
|
+
status: "observing" | "included" | "reverted" | "orphaned" | "mismatch";
|
|
7728
7827
|
transactionHash: string;
|
|
7729
7828
|
/** Format: uuid */
|
|
7730
7829
|
draftId?: string;
|