@centrifuge/sdk 1.10.0 → 1.12.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.
Files changed (112) hide show
  1. package/dist/Centrifuge.d.ts +38 -0
  2. package/dist/Centrifuge.d.ts.map +1 -1
  3. package/dist/Centrifuge.js +163 -0
  4. package/dist/Centrifuge.js.map +1 -1
  5. package/dist/Centrifuge.test.js +219 -0
  6. package/dist/Centrifuge.test.js.map +1 -1
  7. package/dist/abi/MultiAdapter.abi.d.ts +1 -1
  8. package/dist/abi/MultiAdapter.abi.js +1 -1
  9. package/dist/abi/MultiAdapter.abi.js.map +1 -1
  10. package/dist/abi/OnchainPM.abi.d.ts +3 -0
  11. package/dist/abi/OnchainPM.abi.d.ts.map +1 -0
  12. package/dist/abi/OnchainPM.abi.js +14 -0
  13. package/dist/abi/OnchainPM.abi.js.map +1 -0
  14. package/dist/abi/OnchainPMFactory.abi.d.ts +3 -0
  15. package/dist/abi/OnchainPMFactory.abi.d.ts.map +1 -0
  16. package/dist/abi/OnchainPMFactory.abi.js +6 -0
  17. package/dist/abi/OnchainPMFactory.abi.js.map +1 -0
  18. package/dist/abi/OracleValuation.abi.d.ts +3 -0
  19. package/dist/abi/OracleValuation.abi.d.ts.map +1 -0
  20. package/dist/abi/OracleValuation.abi.js +9 -0
  21. package/dist/abi/OracleValuation.abi.js.map +1 -0
  22. package/dist/abi/ScriptHelpers.abi.d.ts +3 -0
  23. package/dist/abi/ScriptHelpers.abi.d.ts.map +1 -0
  24. package/dist/abi/ScriptHelpers.abi.js +5 -0
  25. package/dist/abi/ScriptHelpers.abi.js.map +1 -0
  26. package/dist/abi/index.d.ts +281 -0
  27. package/dist/abi/index.d.ts.map +1 -1
  28. package/dist/abi/index.js +8 -0
  29. package/dist/abi/index.js.map +1 -1
  30. package/dist/entities/OnchainPM.d.ts +203 -0
  31. package/dist/entities/OnchainPM.d.ts.map +1 -0
  32. package/dist/entities/OnchainPM.js +315 -0
  33. package/dist/entities/OnchainPM.js.map +1 -0
  34. package/dist/entities/OnchainPM.test.d.ts +2 -0
  35. package/dist/entities/OnchainPM.test.d.ts.map +1 -0
  36. package/dist/entities/OnchainPM.test.js +155 -0
  37. package/dist/entities/OnchainPM.test.js.map +1 -0
  38. package/dist/entities/Pool.d.ts +81 -3
  39. package/dist/entities/Pool.d.ts.map +1 -1
  40. package/dist/entities/Pool.js +207 -18
  41. package/dist/entities/Pool.js.map +1 -1
  42. package/dist/entities/PoolNetwork.d.ts +37 -0
  43. package/dist/entities/PoolNetwork.d.ts.map +1 -1
  44. package/dist/entities/PoolNetwork.js +136 -12
  45. package/dist/entities/PoolNetwork.js.map +1 -1
  46. package/dist/entities/PoolNetwork.test.js +134 -1
  47. package/dist/entities/PoolNetwork.test.js.map +1 -1
  48. package/dist/entities/ShareClass.d.ts.map +1 -1
  49. package/dist/entities/ShareClass.js +151 -126
  50. package/dist/entities/ShareClass.js.map +1 -1
  51. package/dist/entities/Vault.test.js +0 -5
  52. package/dist/entities/Vault.test.js.map +1 -1
  53. package/dist/entities/crosschainMessages.d.ts +127 -0
  54. package/dist/entities/crosschainMessages.d.ts.map +1 -0
  55. package/dist/entities/crosschainMessages.js +204 -0
  56. package/dist/entities/crosschainMessages.js.map +1 -0
  57. package/dist/index.d.ts +16 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +8 -0
  60. package/dist/index.js.map +1 -1
  61. package/dist/types/index.d.ts +3 -0
  62. package/dist/types/index.d.ts.map +1 -1
  63. package/dist/types/poolMetadata.d.ts +28 -0
  64. package/dist/types/poolMetadata.d.ts.map +1 -1
  65. package/dist/types/transaction.d.ts +5 -1
  66. package/dist/types/transaction.d.ts.map +1 -1
  67. package/dist/types/transaction.js.map +1 -1
  68. package/dist/types/workflow.d.ts +151 -0
  69. package/dist/types/workflow.d.ts.map +1 -0
  70. package/dist/types/workflow.js +5 -0
  71. package/dist/types/workflow.js.map +1 -0
  72. package/dist/utils/catalog.d.ts +29 -0
  73. package/dist/utils/catalog.d.ts.map +1 -0
  74. package/dist/utils/catalog.js +396 -0
  75. package/dist/utils/catalog.js.map +1 -0
  76. package/dist/utils/catalog.test.d.ts +2 -0
  77. package/dist/utils/catalog.test.d.ts.map +1 -0
  78. package/dist/utils/catalog.test.js +291 -0
  79. package/dist/utils/catalog.test.js.map +1 -0
  80. package/dist/utils/scriptHash.d.ts +32 -0
  81. package/dist/utils/scriptHash.d.ts.map +1 -0
  82. package/dist/utils/scriptHash.js +67 -0
  83. package/dist/utils/scriptHash.js.map +1 -0
  84. package/dist/utils/scriptHash.test.d.ts +2 -0
  85. package/dist/utils/scriptHash.test.d.ts.map +1 -0
  86. package/dist/utils/scriptHash.test.js +97 -0
  87. package/dist/utils/scriptHash.test.js.map +1 -0
  88. package/dist/utils/variables.d.ts +78 -0
  89. package/dist/utils/variables.d.ts.map +1 -0
  90. package/dist/utils/variables.js +105 -0
  91. package/dist/utils/variables.js.map +1 -0
  92. package/dist/utils/variables.test.d.ts +2 -0
  93. package/dist/utils/variables.test.d.ts.map +1 -0
  94. package/dist/utils/variables.test.js +110 -0
  95. package/dist/utils/variables.test.js.map +1 -0
  96. package/dist/utils/weiroll.d.ts +176 -0
  97. package/dist/utils/weiroll.d.ts.map +1 -0
  98. package/dist/utils/weiroll.js +341 -0
  99. package/dist/utils/weiroll.js.map +1 -0
  100. package/dist/utils/weiroll.test.d.ts +2 -0
  101. package/dist/utils/weiroll.test.d.ts.map +1 -0
  102. package/dist/utils/weiroll.test.js +430 -0
  103. package/dist/utils/weiroll.test.js.map +1 -0
  104. package/dist/utils/workflowExecute.d.ts +121 -0
  105. package/dist/utils/workflowExecute.d.ts.map +1 -0
  106. package/dist/utils/workflowExecute.js +577 -0
  107. package/dist/utils/workflowExecute.js.map +1 -0
  108. package/dist/utils/workflowExecute.test.d.ts +2 -0
  109. package/dist/utils/workflowExecute.test.d.ts.map +1 -0
  110. package/dist/utils/workflowExecute.test.js +117 -0
  111. package/dist/utils/workflowExecute.test.js.map +1 -0
  112. package/package.json +1 -1
@@ -0,0 +1,105 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Magic variable keys
3
+ // ---------------------------------------------------------------------------
4
+ /**
5
+ * All well-known magic variable keys. Each is prefixed with `$` to
6
+ * distinguish them from protocol-specific manifest variables.
7
+ *
8
+ * Magic variables are resolved automatically by the SDK from pool metadata;
9
+ * they are always pinned (stateBitmap bit = 1).
10
+ */
11
+ export const MAGIC_VARIABLE_KEYS = [
12
+ '$executor',
13
+ '$onchainPM',
14
+ '$poolEscrow',
15
+ '$onOffRamp',
16
+ '$poolId',
17
+ '$scId',
18
+ '$accountingTokenId',
19
+ '$accountingTokenAssetId',
20
+ ];
21
+ // ---------------------------------------------------------------------------
22
+ // resolveMagicVariables
23
+ // ---------------------------------------------------------------------------
24
+ /** Matches exactly 32 bytes ABI-encoded as a 0x-prefixed hex string. */
25
+ const BYTES32_RE = /^0x[0-9a-fA-F]{64}$/;
26
+ function assertBytes32(key, value) {
27
+ if (!BYTES32_RE.test(value)) {
28
+ throw new Error(`resolveMagicVariables: "${key}" must be a 32-byte ABI-encoded hex string (0x + 64 hex chars), got "${value}". ` +
29
+ `Addresses must be left-zero-padded; uint values must be right-aligned to 32 bytes.`);
30
+ }
31
+ }
32
+ /**
33
+ * Builds a `PoolContext` from a typed `MagicVariableContext` by mapping
34
+ * each `$`-prefixed magic variable key to its resolved value.
35
+ *
36
+ * Pass the returned object as `poolContext` in `buildScript()`:
37
+ *
38
+ * ```typescript
39
+ * const poolContext = resolveMagicVariables(ctx)
40
+ * const script = buildScript(workflow, { poolContext, configurableValues })
41
+ * ```
42
+ *
43
+ * @throws if any value is not a valid 32-byte ABI-encoded hex string
44
+ */
45
+ export function resolveMagicVariables(context) {
46
+ assertBytes32('executor', context.executor);
47
+ assertBytes32('poolEscrow', context.poolEscrow);
48
+ assertBytes32('onOffRamp', context.onOffRamp);
49
+ assertBytes32('poolId', context.poolId);
50
+ assertBytes32('scId', context.scId);
51
+ assertBytes32('accountingTokenId', context.accountingTokenId);
52
+ assertBytes32('accountingTokenAssetId', context.accountingTokenAssetId);
53
+ return {
54
+ $executor: context.executor,
55
+ // $onchainPM is an alias for $executor — the current "executor" used by
56
+ // workflows is always an OnchainPM instance. Templates may use either key.
57
+ $onchainPM: context.executor,
58
+ $poolEscrow: context.poolEscrow,
59
+ $onOffRamp: context.onOffRamp,
60
+ $poolId: context.poolId,
61
+ $scId: context.scId,
62
+ $accountingTokenId: context.accountingTokenId,
63
+ $accountingTokenAssetId: context.accountingTokenAssetId,
64
+ };
65
+ }
66
+ // ---------------------------------------------------------------------------
67
+ // resolveVariableLabel
68
+ // ---------------------------------------------------------------------------
69
+ /**
70
+ * Returns a human-readable `{ value, label }` pair for a resolved variable.
71
+ *
72
+ * Used by the backend to enrich API responses so the frontend never displays
73
+ * raw on-chain data. Example:
74
+ *
75
+ * ```typescript
76
+ * resolveVariableLabel('$scId', '0x00010000000000010000000000000001', meta)
77
+ * // → { value: '0x000100...', label: 'JTRSY' }
78
+ * ```
79
+ *
80
+ * Label resolution priority:
81
+ * 1. `poolMetadata.addressLabels[value]` — pool-manager-maintained free-form map
82
+ * 2. Key-specific fallbacks (e.g. pool name for `$poolId`)
83
+ * 3. Raw hex string as final fallback
84
+ *
85
+ * Pool managers can register labels for any address or slot value via the
86
+ * `addressLabels` field of the pool metadata to customise what the UI shows.
87
+ */
88
+ export function resolveVariableLabel(key, value, poolMetadata) {
89
+ const { addressLabels } = poolMetadata;
90
+ // Normalised lookup (case-insensitive for addresses)
91
+ const explicit = addressLabels?.[value] ??
92
+ addressLabels?.[value.toLowerCase()] ??
93
+ addressLabels?.[value.toUpperCase()];
94
+ if (explicit !== undefined) {
95
+ return { value, label: explicit };
96
+ }
97
+ // Key-specific fallbacks
98
+ switch (key) {
99
+ case '$poolId':
100
+ return { value, label: poolMetadata.pool.name };
101
+ default:
102
+ return { value, label: value };
103
+ }
104
+ }
105
+ //# sourceMappingURL=variables.js.map
@@ -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QAC5B,WAAW,EAAE,OAAO,CAAC,UAAU;QAC/B,UAAU,EAAE,OAAO,CAAC,SAAS;QAC7B,OAAO,EAAE,OAAO,CAAC,MAAM;QACvB,KAAK,EAAE,OAAO,CAAC,IAAI;QACnB,kBAAkB,EAAE,OAAO,CAAC,iBAAiB;QAC7C,uBAAuB,EAAE,OAAO,CAAC,sBAAsB;KACxD,CAAA;AACH,CAAC;AAED,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAW,EACX,KAAgB,EAChB,YAA0B;IAE1B,MAAM,EAAE,aAAa,EAAE,GAAG,YAAY,CAAA;IAEtC,qDAAqD;IACrD,MAAM,QAAQ,GACZ,aAAa,EAAE,CAAC,KAAK,CAAC;QACtB,aAAa,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QACpC,aAAa,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;IAEtC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAA;IACnC,CAAC;IAED,yBAAyB;IACzB,QAAQ,GAAgC,EAAE,CAAC;QACzC,KAAK,SAAS;YACZ,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;QACjD;YACE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IAClC,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=variables.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.test.d.ts","sourceRoot":"","sources":["../../src/utils/variables.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,110 @@
1
+ import { expect } from 'chai';
2
+ import { MAGIC_VARIABLE_KEYS, resolveMagicVariables, resolveVariableLabel } from './variables.js';
3
+ // ---------------------------------------------------------------------------
4
+ // Fixtures
5
+ // ---------------------------------------------------------------------------
6
+ const CTX = {
7
+ executor: '0x000000000000000000000000aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
8
+ poolEscrow: '0x000000000000000000000000bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
9
+ onOffRamp: '0x000000000000000000000000cccccccccccccccccccccccccccccccccccccccc',
10
+ poolId: '0x0000000000000000000000000000000000000000000000000000000000000001',
11
+ scId: '0x0001000000000001000000000000000100000000000000000000000000000000',
12
+ accountingTokenId: '0x0000000000000000000000000000000000000000000000000000000000000002',
13
+ accountingTokenAssetId: '0x0000000000000000000000000000000000000000000000000000000000000003',
14
+ };
15
+ // Minimal pool metadata
16
+ const POOL_META = {
17
+ pool: { name: 'Test Pool' },
18
+ shareClasses: {},
19
+ };
20
+ describe('utils/variables', () => {
21
+ describe('MAGIC_VARIABLE_KEYS', () => {
22
+ it('contains exactly the eight expected keys', () => {
23
+ expect(MAGIC_VARIABLE_KEYS).to.include('$executor');
24
+ expect(MAGIC_VARIABLE_KEYS).to.include('$onchainPM');
25
+ expect(MAGIC_VARIABLE_KEYS).to.include('$poolEscrow');
26
+ expect(MAGIC_VARIABLE_KEYS).to.include('$onOffRamp');
27
+ expect(MAGIC_VARIABLE_KEYS).to.include('$poolId');
28
+ expect(MAGIC_VARIABLE_KEYS).to.include('$scId');
29
+ expect(MAGIC_VARIABLE_KEYS).to.include('$accountingTokenId');
30
+ expect(MAGIC_VARIABLE_KEYS).to.include('$accountingTokenAssetId');
31
+ expect(MAGIC_VARIABLE_KEYS).to.have.length(8);
32
+ });
33
+ it('every key starts with $', () => {
34
+ for (const key of MAGIC_VARIABLE_KEYS) {
35
+ expect(key).to.match(/^\$/);
36
+ }
37
+ });
38
+ });
39
+ describe('resolveMagicVariables', () => {
40
+ it('maps all eight keys into a PoolContext', () => {
41
+ const ctx = resolveMagicVariables(CTX);
42
+ expect(ctx['$executor']).to.equal(CTX.executor);
43
+ expect(ctx['$onchainPM']).to.equal(CTX.executor);
44
+ expect(ctx['$poolEscrow']).to.equal(CTX.poolEscrow);
45
+ expect(ctx['$onOffRamp']).to.equal(CTX.onOffRamp);
46
+ expect(ctx['$poolId']).to.equal(CTX.poolId);
47
+ expect(ctx['$scId']).to.equal(CTX.scId);
48
+ expect(ctx['$accountingTokenId']).to.equal(CTX.accountingTokenId);
49
+ expect(ctx['$accountingTokenAssetId']).to.equal(CTX.accountingTokenAssetId);
50
+ });
51
+ it('produces exactly eight entries — no extras', () => {
52
+ const ctx = resolveMagicVariables(CTX);
53
+ expect(Object.keys(ctx)).to.have.length(8);
54
+ });
55
+ it('result keys match MAGIC_VARIABLE_KEYS', () => {
56
+ const ctx = resolveMagicVariables(CTX);
57
+ for (const key of MAGIC_VARIABLE_KEYS) {
58
+ expect(ctx).to.have.property(key);
59
+ }
60
+ });
61
+ it('is usable as poolContext in buildScript without throwing', () => {
62
+ // Just verifies the types are compatible — no actual execution needed.
63
+ const ctx = resolveMagicVariables(CTX);
64
+ expect(ctx).to.be.an('object');
65
+ });
66
+ });
67
+ describe('resolveVariableLabel', () => {
68
+ it('falls back to pool name for $poolId when no addressLabel exists', () => {
69
+ const result = resolveVariableLabel('$poolId', CTX.poolId, POOL_META);
70
+ expect(result.value).to.equal(CTX.poolId);
71
+ expect(result.label).to.equal('Test Pool');
72
+ });
73
+ it('falls back to raw hex for unknown keys without addressLabel', () => {
74
+ const result = resolveVariableLabel('$executor', CTX.executor, POOL_META);
75
+ expect(result.value).to.equal(CTX.executor);
76
+ expect(result.label).to.equal(CTX.executor);
77
+ });
78
+ it('uses addressLabels when present — exact match', () => {
79
+ const meta = {
80
+ ...POOL_META,
81
+ addressLabels: { [CTX.scId]: 'JTRSY' },
82
+ };
83
+ const result = resolveVariableLabel('$scId', CTX.scId, meta);
84
+ expect(result.value).to.equal(CTX.scId);
85
+ expect(result.label).to.equal('JTRSY');
86
+ });
87
+ it('uses addressLabels — case-insensitive lowercase match', () => {
88
+ const meta = {
89
+ ...POOL_META,
90
+ addressLabels: { [CTX.executor.toLowerCase()]: 'Strategist' },
91
+ };
92
+ const result = resolveVariableLabel('$executor', CTX.executor, meta);
93
+ expect(result.label).to.equal('Strategist');
94
+ });
95
+ it('addressLabel takes priority over key-specific fallback', () => {
96
+ const meta = {
97
+ ...POOL_META,
98
+ pool: { name: 'Should NOT appear' },
99
+ addressLabels: { [CTX.poolId]: 'Custom Pool Label' },
100
+ };
101
+ const result = resolveVariableLabel('$poolId', CTX.poolId, meta);
102
+ expect(result.label).to.equal('Custom Pool Label');
103
+ });
104
+ it('always returns the original value unchanged', () => {
105
+ const result = resolveVariableLabel('$anything', CTX.executor, POOL_META);
106
+ expect(result.value).to.equal(CTX.executor);
107
+ });
108
+ });
109
+ });
110
+ //# sourceMappingURL=variables.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.test.js","sourceRoot":"","sources":["../../src/utils/variables.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAIjG,8EAA8E;AAC9E,WAAW;AACX,8EAA8E;AAE9E,MAAM,GAAG,GAAyB;IAChC,QAAQ,EAAe,oEAAoE;IAC3F,UAAU,EAAa,oEAAoE;IAC3F,SAAS,EAAc,oEAAoE;IAC3F,MAAM,EAAiB,oEAAoE;IAC3F,IAAI,EAAmB,oEAAoE;IAC3F,iBAAiB,EAAM,oEAAoE;IAC3F,sBAAsB,EAAC,oEAAoE;CAC5F,CAAA;AAED,wBAAwB;AACxB,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAC3B,YAAY,EAAE,EAAE;CACU,CAAA;AAE5B,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,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CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAA;QACpD,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;YACrD,MAAM,MAAM,GAAG,oBAAoB,CAAC,WAAW,EAAE,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;YACzE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC7C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,176 @@
1
+ import type { HexString } from '../types/index.js';
2
+ /** State-changing call. */
3
+ export declare const CALL: 1;
4
+ /** Read-only call. */
5
+ export declare const STATICCALL: 2;
6
+ /** ETH-value call — ETH amount is taken from the first input specifier's state slot. */
7
+ export declare const VALUECALL: 3;
8
+ /** Raw calldata mode — set in the flags byte to bypass ABI encoding. */
9
+ export declare const FLAG_RAW: 32;
10
+ /** Extended command mode — the next command word contains up to 32 input specifiers. */
11
+ export declare const FLAG_EXTENDED_COMMAND: 64;
12
+ /** Sentinel value for unused input slots or a discarded return value. */
13
+ export declare const UNUSED_SLOT: 255;
14
+ export type WeirollCallType = typeof CALL | typeof STATICCALL | typeof VALUECALL;
15
+ export type WeirollTarget = HexString | {
16
+ type: 'magic';
17
+ key: string;
18
+ };
19
+ /** A single step in a weiroll script. */
20
+ export interface WeirollAction {
21
+ /** 20-byte target contract address. */
22
+ target: WeirollTarget;
23
+ /** 4-byte function selector (e.g. `0x12345678`). */
24
+ selector: HexString;
25
+ callType: WeirollCallType;
26
+ /**
27
+ * Weiroll input specifiers for the call's inputs.
28
+ * Fixed-length arguments use the state slot index directly.
29
+ * Variable-length arguments set the high bit and store the state slot index in
30
+ * the low 7 bits.
31
+ */
32
+ inputs: number[];
33
+ /** Weiroll output specifier, or UNUSED_SLOT to discard. */
34
+ output: number;
35
+ /** When true, sets FLAG_RAW — use for manually ABI-encoded calldata. */
36
+ rawMode?: boolean;
37
+ }
38
+ /**
39
+ * Describes the initial value of a single state slot.
40
+ *
41
+ * - `literal` — fixed ABI-encoded value, pinned at whitelist time
42
+ * - `magic` — resolved from PoolContext by key
43
+ * - `configurable` — resolved from configurableValues by key
44
+ * - `runtime` — placeholder filled at execution time (not pinned)
45
+ */
46
+ export type WorkflowStateSlot = {
47
+ type: 'literal';
48
+ value: HexString;
49
+ } | {
50
+ type: 'magic';
51
+ key: string;
52
+ } | {
53
+ type: 'configurable';
54
+ key: string;
55
+ label?: string;
56
+ parameter?: string;
57
+ actionName?: string;
58
+ actionIndex?: number;
59
+ inputIndex?: number;
60
+ anonymous?: boolean;
61
+ system?: 'payableValue';
62
+ } | {
63
+ type: 'rawcalldata';
64
+ selector: HexString;
65
+ parameterTypes: string[];
66
+ sourceSlots: number[];
67
+ actionName?: string;
68
+ actionIndex?: number;
69
+ } | {
70
+ type: 'template';
71
+ workflow: WorkflowDefinition;
72
+ label?: string;
73
+ actionName?: string;
74
+ actionIndex?: number;
75
+ inputIndex?: number;
76
+ } | {
77
+ type: 'runtime';
78
+ key: string;
79
+ label?: string;
80
+ parameter?: string;
81
+ actionName?: string;
82
+ actionIndex?: number;
83
+ inputIndex?: number;
84
+ anonymous?: boolean;
85
+ system?: 'payableValue';
86
+ };
87
+ /** The full description of a workflow: its actions and initial state layout. */
88
+ export interface WorkflowDefinition {
89
+ /** Stable identifier for the workflow (matches the catalog ref). */
90
+ workflowRef: string;
91
+ actions: WeirollAction[];
92
+ state: WorkflowStateSlot[];
93
+ /**
94
+ * Named runtime variables required at execution time. Copied from
95
+ * MarketplaceWorkflow. One input per entry; the value is written into every
96
+ * state slot whose key matches, enforcing a single value across multiple uses.
97
+ */
98
+ runtimeVariables?: string[];
99
+ }
100
+ /**
101
+ * Protocol-level values available for magic variable resolution.
102
+ * All values must already be ABI-encoded (e.g. uint256 as a 32-byte hex).
103
+ */
104
+ export type PoolContext = Record<string, HexString>;
105
+ export interface ScriptResult {
106
+ /** ABI-encoded bytes32 command words, one per action. */
107
+ commands: HexString[];
108
+ /** ABI-encoded state slot values. Runtime slots are initialized to empty bytes. */
109
+ state: HexString[];
110
+ /**
111
+ * uint128 where bit i = 1 means state[i] is pinned (known at whitelist time).
112
+ * Bit i = 0 means runtime — the executor fills the slot at call time.
113
+ */
114
+ stateBitmap: bigint;
115
+ }
116
+ /**
117
+ * Fills runtime state slots with execution-time values.
118
+ *
119
+ * `buildScript()` initializes runtime slots to empty bytes. Before calling
120
+ * `OnchainPM.execute()`, the strategist must fill each runtime slot with the
121
+ * concrete value for this particular execution.
122
+ *
123
+ * Returns a copy of `state` with each runtime slot replaced by the
124
+ * corresponding value from `runtimeValues` (keyed by the slot's `key` field).
125
+ *
126
+ * @throws if any required runtime variable in `workflow.runtimeVariables` has no
127
+ * corresponding entry in `runtimeValues`
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * const { commands, state, stateBitmap } = buildScript(workflow, { poolContext, configurableValues })
132
+ * const filledState = fillRuntimeSlots(state, workflow, { amount: '0x000...0de0b6b3a7640000' })
133
+ * // submit OnchainPM.execute(commands, filledState, stateBitmap, [], proof)
134
+ * ```
135
+ */
136
+ export declare function fillRuntimeSlots(state: HexString[], workflow: WorkflowDefinition, runtimeValues: Record<string, HexString>): HexString[];
137
+ /**
138
+ * Packs a single weiroll command into a 32-byte word.
139
+ *
140
+ * Bit layout (from MSB):
141
+ * ```
142
+ * bits [255:224] selector (bytes4) — function selector
143
+ * bits [223:216] flags (uint8) — callType | FLAG_RAW
144
+ * bits [215:168] inputs (bytes6) — 6 × 1-byte input specifiers, MSB first
145
+ * bits [167:160] output (uint8) — output specifier or UNUSED_SLOT
146
+ * bits [159:0] target (address) — 20-byte contract address
147
+ * ```
148
+ *
149
+ * Equivalent Solidity expression:
150
+ * ```solidity
151
+ * (uint256(uint32(selector)) << 224) | (flags << 216) | (indices << 168) | (output << 160) | uint160(target)
152
+ * ```
153
+ */
154
+ export declare function encodeCommand(selector: HexString, // 4 bytes
155
+ flags: number, // 1 byte: callType | optional FLAG_RAW
156
+ inputs: number[], // up to 6 weiroll input specifiers (padded to 6 with UNUSED_SLOT)
157
+ output: number, // output specifier or UNUSED_SLOT
158
+ target: HexString): HexString;
159
+ /**
160
+ * Builds the weiroll commands array and initial state from a workflow
161
+ * definition, resolving magic variables and configurable values.
162
+ *
163
+ * State slots classified as `literal`, `magic`, or `configurable` are pinned:
164
+ * their bit in `stateBitmap` is set to 1 and the resolved value is placed in
165
+ * `state[i]`. Slots classified as `runtime` are initialized to empty bytes
166
+ * with their bit set to 0 — the executor fills them at call time.
167
+ *
168
+ * @throws if a magic variable key is absent from `poolContext`
169
+ * @throws if a configurable key is absent from `configurableValues`
170
+ * @throws if the workflow has more than 128 state slots
171
+ */
172
+ export declare function buildScript(workflow: WorkflowDefinition, context: {
173
+ poolContext: PoolContext;
174
+ configurableValues: Record<string, HexString>;
175
+ }): ScriptResult;
176
+ //# sourceMappingURL=weiroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weiroll.d.ts","sourceRoot":"","sources":["../../src/utils/weiroll.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAMlD,2BAA2B;AAC3B,eAAO,MAAM,IAAI,GAAgB,CAAA;AACjC,sBAAsB;AACtB,eAAO,MAAM,UAAU,GAAgB,CAAA;AACvC,wFAAwF;AACxF,eAAO,MAAM,SAAS,GAAgB,CAAA;AAEtC,wEAAwE;AACxE,eAAO,MAAM,QAAQ,IAAgB,CAAA;AACrC,wFAAwF;AACxF,eAAO,MAAM,qBAAqB,IAAgB,CAAA;AAElD,yEAAyE;AACzE,eAAO,MAAM,WAAW,KAAgB,CAAA;AAYxC,MAAM,MAAM,eAAe,GAAG,OAAO,IAAI,GAAG,OAAO,UAAU,GAAG,OAAO,SAAS,CAAA;AAChF,MAAM,MAA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