@crediolabs/policy-synth 0.1.16 → 0.1.17
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/dist/install/index.d.ts +1 -0
- package/dist/install/index.js +15 -0
- package/dist-cjs/install/index.d.ts +1 -0
- package/dist-cjs/install/index.js +21 -0
- package/package.json +11 -4
- package/src/install/index.ts +21 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ADD_CONTEXT_RULE_SYMBOL, DEFAULT_GRAMMAR_VERSION, buildAddContextRuleArgs, type AddContextRuleArgs, type BuildAddContextRuleArgs, } from './build-add-context-rule.ts';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Public entry for the install-argument builders.
|
|
2
|
+
//
|
|
3
|
+
// `buildAddContextRuleArgs` is the encoder `runInstallPolicy` uses to turn a
|
|
4
|
+
// ContextRuleDraft into the `add_context_rule` arguments. It was reachable
|
|
5
|
+
// only from inside this package, so a browser client that wants to build the
|
|
6
|
+
// same call had the choice of re-implementing the encoding or going without.
|
|
7
|
+
// Re-implementing it is not a real option: the interpreter compares
|
|
8
|
+
// sha256(context_rule.signers) at enforce time, so an encoding that differs in
|
|
9
|
+
// any field yields a rule that denies every call, and an omitted policy yields
|
|
10
|
+
// one that permits every call. Both failure modes have happened.
|
|
11
|
+
//
|
|
12
|
+
// Exported here rather than from the package root to keep the root surface
|
|
13
|
+
// about synthesis, and because these are transaction-building primitives whose
|
|
14
|
+
// callers should know they are reaching for them.
|
|
15
|
+
export { ADD_CONTEXT_RULE_SYMBOL, DEFAULT_GRAMMAR_VERSION, buildAddContextRuleArgs, } from "./build-add-context-rule.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ADD_CONTEXT_RULE_SYMBOL, DEFAULT_GRAMMAR_VERSION, buildAddContextRuleArgs, type AddContextRuleArgs, type BuildAddContextRuleArgs, } from './build-add-context-rule.ts';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildAddContextRuleArgs = exports.DEFAULT_GRAMMAR_VERSION = exports.ADD_CONTEXT_RULE_SYMBOL = void 0;
|
|
4
|
+
// Public entry for the install-argument builders.
|
|
5
|
+
//
|
|
6
|
+
// `buildAddContextRuleArgs` is the encoder `runInstallPolicy` uses to turn a
|
|
7
|
+
// ContextRuleDraft into the `add_context_rule` arguments. It was reachable
|
|
8
|
+
// only from inside this package, so a browser client that wants to build the
|
|
9
|
+
// same call had the choice of re-implementing the encoding or going without.
|
|
10
|
+
// Re-implementing it is not a real option: the interpreter compares
|
|
11
|
+
// sha256(context_rule.signers) at enforce time, so an encoding that differs in
|
|
12
|
+
// any field yields a rule that denies every call, and an omitted policy yields
|
|
13
|
+
// one that permits every call. Both failure modes have happened.
|
|
14
|
+
//
|
|
15
|
+
// Exported here rather than from the package root to keep the root surface
|
|
16
|
+
// about synthesis, and because these are transaction-building primitives whose
|
|
17
|
+
// callers should know they are reaching for them.
|
|
18
|
+
var build_add_context_rule_ts_1 = require("./build-add-context-rule.js");
|
|
19
|
+
Object.defineProperty(exports, "ADD_CONTEXT_RULE_SYMBOL", { enumerable: true, get: function () { return build_add_context_rule_ts_1.ADD_CONTEXT_RULE_SYMBOL; } });
|
|
20
|
+
Object.defineProperty(exports, "DEFAULT_GRAMMAR_VERSION", { enumerable: true, get: function () { return build_add_context_rule_ts_1.DEFAULT_GRAMMAR_VERSION; } });
|
|
21
|
+
Object.defineProperty(exports, "buildAddContextRuleArgs", { enumerable: true, get: function () { return build_add_context_rule_ts_1.buildAddContextRuleArgs; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crediolabs/policy-synth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Off-chain TypeScript synthesis core for the OZ Accounts Policy Builder. Records Soroban transactions, synthesises the minimal policy that permits exactly that flow, verifies it, and returns an unsigned install transaction.",
|
|
6
6
|
"type": "module",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/untangledfinance/
|
|
15
|
+
"url": "https://github.com/untangledfinance/octogate.git",
|
|
16
16
|
"directory": "packages/policy-synth"
|
|
17
17
|
},
|
|
18
|
-
"homepage": "https://github.com/untangledfinance/
|
|
18
|
+
"homepage": "https://github.com/untangledfinance/octogate#readme",
|
|
19
19
|
"bugs": {
|
|
20
|
-
"url": "https://github.com/untangledfinance/
|
|
20
|
+
"url": "https://github.com/untangledfinance/octogate/issues"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"stellar",
|
|
@@ -47,6 +47,13 @@
|
|
|
47
47
|
"require": "./dist-cjs/run/index.js",
|
|
48
48
|
"default": "./dist/run/index.js"
|
|
49
49
|
},
|
|
50
|
+
"./install": {
|
|
51
|
+
"types": "./dist/install/index.d.ts",
|
|
52
|
+
"bun": "./src/install/index.ts",
|
|
53
|
+
"import": "./dist/install/index.js",
|
|
54
|
+
"require": "./dist-cjs/install/index.js",
|
|
55
|
+
"default": "./dist/install/index.js"
|
|
56
|
+
},
|
|
50
57
|
"./package.json": "./package.json"
|
|
51
58
|
},
|
|
52
59
|
"files": [
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Public entry for the install-argument builders.
|
|
2
|
+
//
|
|
3
|
+
// `buildAddContextRuleArgs` is the encoder `runInstallPolicy` uses to turn a
|
|
4
|
+
// ContextRuleDraft into the `add_context_rule` arguments. It was reachable
|
|
5
|
+
// only from inside this package, so a browser client that wants to build the
|
|
6
|
+
// same call had the choice of re-implementing the encoding or going without.
|
|
7
|
+
// Re-implementing it is not a real option: the interpreter compares
|
|
8
|
+
// sha256(context_rule.signers) at enforce time, so an encoding that differs in
|
|
9
|
+
// any field yields a rule that denies every call, and an omitted policy yields
|
|
10
|
+
// one that permits every call. Both failure modes have happened.
|
|
11
|
+
//
|
|
12
|
+
// Exported here rather than from the package root to keep the root surface
|
|
13
|
+
// about synthesis, and because these are transaction-building primitives whose
|
|
14
|
+
// callers should know they are reaching for them.
|
|
15
|
+
export {
|
|
16
|
+
ADD_CONTEXT_RULE_SYMBOL,
|
|
17
|
+
DEFAULT_GRAMMAR_VERSION,
|
|
18
|
+
buildAddContextRuleArgs,
|
|
19
|
+
type AddContextRuleArgs,
|
|
20
|
+
type BuildAddContextRuleArgs,
|
|
21
|
+
} from './build-add-context-rule.ts'
|