@gol/sdk 0.3.0 → 0.5.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 +24 -17
- package/dist/account-dialects.d.ts +14 -6
- package/dist/account-dialects.d.ts.map +1 -1
- package/dist/account-dialects.js +31 -4
- package/dist/account-dialects.js.map +1 -1
- package/dist/agent.d.ts +232 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +299 -0
- package/dist/agent.js.map +1 -0
- package/dist/eip7702.d.ts +73 -0
- package/dist/eip7702.d.ts.map +1 -0
- package/dist/eip7702.js +173 -0
- package/dist/eip7702.js.map +1 -0
- package/dist/gas-approval.d.ts +8 -3
- package/dist/gas-approval.d.ts.map +1 -1
- package/dist/gas-approval.js +17 -9
- package/dist/gas-approval.js.map +1 -1
- package/dist/generated/platform.d.ts +2924 -544
- package/dist/generated/platform.d.ts.map +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/owner.d.ts +131 -27
- package/dist/owner.d.ts.map +1 -1
- package/dist/owner.js +257 -92
- package/dist/owner.js.map +1 -1
- package/dist/server.d.ts +38 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +108 -2
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/v3.d.ts +39 -0
- package/dist/v3.d.ts.map +1 -0
- package/dist/v3.js +41 -0
- package/dist/v3.js.map +1 -0
- package/package.json +18 -19
package/dist/v3.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { keccak256, stringToHex } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Version 3 core constants (hosted gas public API revision 2.0, compatibility
|
|
4
|
+
* profile 4). The core and router addresses come from the gas configuration
|
|
5
|
+
* route; these are the reviewed identities every client recomputes against.
|
|
6
|
+
*/
|
|
7
|
+
export const CORE_DOMAIN_NAME = "GOL Mandate";
|
|
8
|
+
export const CORE_DOMAIN_VERSION = "3";
|
|
9
|
+
/** Inline network-gas settlement (ADR 0018). */
|
|
10
|
+
export const GAS_FORMULA_INLINE = 2;
|
|
11
|
+
export const TRANSFER_ACTION_TAG = 1;
|
|
12
|
+
export const TRANSFER_SCHEMA_VERSION = 1;
|
|
13
|
+
export const TRANSFER_CAPABILITY_DIGEST = keccak256(stringToHex("gol.capability.erc20-direct-transfer.v1"));
|
|
14
|
+
export const NATIVE_FEE_ASSET = "0x0000000000000000000000000000000000000000";
|
|
15
|
+
/** Chargeable outcome bits in a gas policy. */
|
|
16
|
+
export const CHARGEABLE_OUTCOMES = {
|
|
17
|
+
success: 1,
|
|
18
|
+
refusal: 2,
|
|
19
|
+
revert: 4,
|
|
20
|
+
};
|
|
21
|
+
/** Biconomy Nexus 1.3.3, the reviewed EIP-7702 delegate of the `nexus7702` family. */
|
|
22
|
+
export const NEXUS_133_DELEGATE = "0x0000B1c01cB3b5770D8806f0D214d50131a08a5B";
|
|
23
|
+
export const NEXUS_133_CODEHASH = "0xfc3c26ffa661fd6db8009869d45aa5bf8534c63ae7823bb6d4d0c01cc053e1c7";
|
|
24
|
+
export const NEXUS_133_BOOTSTRAP = "0x0000B1c0A80cb7DD166a15e7390b8A4Ced4500C6";
|
|
25
|
+
export const NEXUS_133_DEFAULT_VALIDATOR = "0x0000B1C0790E5a28293276C320d2B95D651dBaD6";
|
|
26
|
+
/** The account code of an EOA delegated to the reviewed runtime. */
|
|
27
|
+
export const NEXUS_133_DELEGATION_CODE = `0xef0100${NEXUS_133_DELEGATE.slice(2).toLowerCase()}`;
|
|
28
|
+
/** Hosted mandate tree limits (ADR 0020). */
|
|
29
|
+
export const HOSTED_TREE_LIMITS = {
|
|
30
|
+
maxDepth: 2,
|
|
31
|
+
maxActiveDescendants: 16,
|
|
32
|
+
};
|
|
33
|
+
export function coreDomain(chainId, core) {
|
|
34
|
+
return {
|
|
35
|
+
name: CORE_DOMAIN_NAME,
|
|
36
|
+
version: CORE_DOMAIN_VERSION,
|
|
37
|
+
chainId,
|
|
38
|
+
verifyingContract: core,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=v3.js.map
|
package/dist/v3.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3.js","sourceRoot":"","sources":["../src/v3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAA0B,MAAM,MAAM,CAAC;AAEtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AACvC,gDAAgD;AAChD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AACpC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,0BAA0B,GAAG,SAAS,CACjD,WAAW,CAAC,yCAAyC,CAAC,CACvD,CAAC;AACF,MAAM,CAAC,MAAM,gBAAgB,GAC3B,4CAAuE,CAAC;AAE1E,+CAA+C;AAC/C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;CACD,CAAC;AAEX,sFAAsF;AACtF,MAAM,CAAC,MAAM,kBAAkB,GAC7B,4CAAuE,CAAC;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAC7B,oEAA2F,CAAC;AAC9F,MAAM,CAAC,MAAM,mBAAmB,GAC9B,4CAAuE,CAAC;AAC1E,MAAM,CAAC,MAAM,2BAA2B,GACtC,4CAAuE,CAAC;AAC1E,oEAAoE;AACpE,MAAM,CAAC,MAAM,yBAAyB,GACpC,WAAW,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAS,CAAC;AAEhE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,QAAQ,EAAE,CAAC;IACX,oBAAoB,EAAE,EAAE;CAChB,CAAC;AAEX,MAAM,UAAU,UAAU,CAAC,OAAe,EAAE,IAAa;IACvD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,mBAAmB;QAC5B,OAAO;QACP,iBAAiB,EAAE,IAAI;KACf,CAAC;AACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gol/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Public TypeScript SDK for GOL Network",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"packageManager": "pnpm@11.17.0",
|
|
7
6
|
"engines": {
|
|
8
7
|
"node": ">=22"
|
|
9
8
|
},
|
|
@@ -22,6 +21,22 @@
|
|
|
22
21
|
"import": "./dist/server.js"
|
|
23
22
|
}
|
|
24
23
|
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"viem": "2.37.13"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "24.3.1",
|
|
29
|
+
"openapi-typescript": "7.13.0",
|
|
30
|
+
"oxlint": "1.85.0",
|
|
31
|
+
"prettier": "3.9.6",
|
|
32
|
+
"tsx": "4.23.15",
|
|
33
|
+
"typescript": "5.9.3",
|
|
34
|
+
"vitest": "5.0.1"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public",
|
|
38
|
+
"provenance": false
|
|
39
|
+
},
|
|
25
40
|
"scripts": {
|
|
26
41
|
"build": "tsc -p tsconfig.build.json",
|
|
27
42
|
"typecheck": "tsc --noEmit",
|
|
@@ -38,21 +53,5 @@
|
|
|
38
53
|
"format": "prettier --write .",
|
|
39
54
|
"format:check": "prettier --check .",
|
|
40
55
|
"verify:owner-fork": "tsx scripts/verify-owner-fork.ts"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"viem": "2.37.13"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@types/node": "24.3.1",
|
|
47
|
-
"openapi-typescript": "7.13.0",
|
|
48
|
-
"oxlint": "1.85.0",
|
|
49
|
-
"prettier": "3.9.6",
|
|
50
|
-
"tsx": "4.23.15",
|
|
51
|
-
"typescript": "5.9.3",
|
|
52
|
-
"vitest": "5.0.1"
|
|
53
|
-
},
|
|
54
|
-
"publishConfig": {
|
|
55
|
-
"access": "public",
|
|
56
|
-
"provenance": false
|
|
57
56
|
}
|
|
58
|
-
}
|
|
57
|
+
}
|