space-data-module-sdk 0.8.26 → 0.8.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "space-data-module-sdk",
3
- "version": "0.8.26",
3
+ "version": "0.8.27",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Module SDK for building, validating, signing, and deploying WebAssembly modules on the Space Data Network.",
6
6
  "type": "module",
package/src/index.d.ts CHANGED
@@ -3055,6 +3055,8 @@ export function encodeLicensingChallengeRequest(options: {
3055
3055
  requestedTimeoutMs: number;
3056
3056
  requestedAtMs: number;
3057
3057
  providerPeerId: string;
3058
+ /** The requester's $EPM FlatBuffer; an allowlisted module requires it. */
3059
+ requesterEpm?: Uint8Array;
3058
3060
  }): Uint8Array;
3059
3061
 
3060
3062
  export function decodeLicensingChallengeMessage(
@@ -60,6 +60,15 @@ export function encodeLicensingChallengeRequest(options) {
60
60
  const providerPeerIdOffset = builder.createString(
61
61
  normalizeRequiredString(options.providerPeerId, "providerPeerId"),
62
62
  );
63
+ // The requester's $EPM, re-sent per grant: an allowlisted module needs it to
64
+ // bind the requester's xpub to the signing key it is about to prove.
65
+ const requesterEpmOffset =
66
+ options.requesterEpm == null
67
+ ? 0
68
+ : LCH.createRequesterEpmVector(
69
+ builder,
70
+ cloneRequiredBytes(options.requesterEpm, "requesterEpm"),
71
+ );
63
72
  const root = LCH.createLCH(
64
73
  builder,
65
74
  licensingChallengeMessageType.Request,
@@ -79,7 +88,7 @@ export function encodeLicensingChallengeRequest(options) {
79
88
  providerPeerIdOffset,
80
89
  0,
81
90
  0,
82
- 0,
91
+ requesterEpmOffset,
83
92
  );
84
93
  LCH.finishLCHBuffer(builder, root);
85
94
  return builder.asUint8Array();