@fairmint/canton-node-sdk 0.0.121 → 0.0.123

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 (58) hide show
  1. package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts +2 -0
  2. package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts.map +1 -1
  3. package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js +2 -0
  4. package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js.map +1 -1
  5. package/build/src/clients/ledger-json-api/operations/v2/parties/index.d.ts +1 -0
  6. package/build/src/clients/ledger-json-api/operations/v2/parties/index.d.ts.map +1 -1
  7. package/build/src/clients/ledger-json-api/operations/v2/parties/index.js +1 -0
  8. package/build/src/clients/ledger-json-api/operations/v2/parties/index.js.map +1 -1
  9. package/build/src/clients/ledger-json-api/operations/v2/parties/list.d.ts +19 -0
  10. package/build/src/clients/ledger-json-api/operations/v2/parties/list.d.ts.map +1 -0
  11. package/build/src/clients/ledger-json-api/operations/v2/parties/list.js +24 -0
  12. package/build/src/clients/ledger-json-api/operations/v2/parties/list.js.map +1 -0
  13. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.d.ts.map +1 -1
  14. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.js +17 -3
  15. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.js.map +1 -1
  16. package/build/src/clients/ledger-json-api/operations/v2/users/revoke-user-rights.d.ts +28 -6
  17. package/build/src/clients/ledger-json-api/operations/v2/users/revoke-user-rights.d.ts.map +1 -1
  18. package/build/src/clients/ledger-json-api/schemas/operations/users.d.ts +28 -6
  19. package/build/src/clients/ledger-json-api/schemas/operations/users.d.ts.map +1 -1
  20. package/build/src/clients/ledger-json-api/schemas/operations/users.js +8 -6
  21. package/build/src/clients/ledger-json-api/schemas/operations/users.js.map +1 -1
  22. package/build/src/clients/validator-api/ValidatorApiClient.generated.d.ts +6 -0
  23. package/build/src/clients/validator-api/ValidatorApiClient.generated.d.ts.map +1 -1
  24. package/build/src/clients/validator-api/ValidatorApiClient.generated.js +6 -0
  25. package/build/src/clients/validator-api/ValidatorApiClient.generated.js.map +1 -1
  26. package/build/src/clients/validator-api/operations/v0/admin/dump-participant-identities.d.ts +16 -0
  27. package/build/src/clients/validator-api/operations/v0/admin/dump-participant-identities.d.ts.map +1 -0
  28. package/build/src/clients/validator-api/operations/v0/admin/dump-participant-identities.js +21 -0
  29. package/build/src/clients/validator-api/operations/v0/admin/dump-participant-identities.js.map +1 -0
  30. package/build/src/clients/validator-api/operations/v0/admin/index.d.ts +3 -0
  31. package/build/src/clients/validator-api/operations/v0/admin/index.d.ts.map +1 -1
  32. package/build/src/clients/validator-api/operations/v0/admin/index.js +3 -0
  33. package/build/src/clients/validator-api/operations/v0/admin/index.js.map +1 -1
  34. package/build/src/clients/validator-api/operations/v0/admin/list-external-party-setup-proposals.d.ts +13 -0
  35. package/build/src/clients/validator-api/operations/v0/admin/list-external-party-setup-proposals.d.ts.map +1 -0
  36. package/build/src/clients/validator-api/operations/v0/admin/list-external-party-setup-proposals.js +21 -0
  37. package/build/src/clients/validator-api/operations/v0/admin/list-external-party-setup-proposals.js.map +1 -0
  38. package/build/src/clients/validator-api/operations/v0/admin/list-users.d.ts +13 -0
  39. package/build/src/clients/validator-api/operations/v0/admin/list-users.d.ts.map +1 -0
  40. package/build/src/clients/validator-api/operations/v0/admin/list-users.js +21 -0
  41. package/build/src/clients/validator-api/operations/v0/admin/list-users.js.map +1 -0
  42. package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.js +1 -1
  43. package/build/src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.js.map +1 -1
  44. package/build/src/utils/external-signing/create-external-party-privy.d.ts +2 -0
  45. package/build/src/utils/external-signing/create-external-party-privy.d.ts.map +1 -1
  46. package/build/src/utils/external-signing/create-external-party-privy.js +61 -36
  47. package/build/src/utils/external-signing/create-external-party-privy.js.map +1 -1
  48. package/build/src/utils/external-signing/create-external-party.d.ts +2 -0
  49. package/build/src/utils/external-signing/create-external-party.d.ts.map +1 -1
  50. package/build/src/utils/external-signing/create-external-party.js +47 -27
  51. package/build/src/utils/external-signing/create-external-party.js.map +1 -1
  52. package/build/src/utils/external-signing/stellar-utils.d.ts +14 -4
  53. package/build/src/utils/external-signing/stellar-utils.d.ts.map +1 -1
  54. package/build/src/utils/external-signing/stellar-utils.js +31 -5
  55. package/build/src/utils/external-signing/stellar-utils.js.map +1 -1
  56. package/build/src/utils/privy/signData.d.ts.map +1 -1
  57. package/build/src/utils/privy/signData.js.map +1 -1
  58. package/package.json +5 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dump-participant-identities.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/dump-participant-identities.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,8CAAyD;AAGzD;;;;;;;;GAQG;AACU,QAAA,yBAAyB,GAAG,IAAA,yBAAkB,EAGzD;IACA,YAAY,EAAE,OAAC,CAAC,IAAI,EAAE;IACtB,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAc,EAAE,EAAE,CAAC,GAAG,MAAM,gDAAgD;IAChG,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;CAC7B,CAAC,CAAC"}
@@ -1,5 +1,8 @@
1
1
  export * from './create-user';
2
+ export * from './dump-participant-identities';
2
3
  export * from './generate-external-party-topology';
3
4
  export * from './get-external-party-balance';
5
+ export * from './list-external-party-setup-proposals';
6
+ export * from './list-users';
4
7
  export * from './submit-external-party-topology';
5
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC"}
@@ -15,7 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-user"), exports);
18
+ __exportStar(require("./dump-participant-identities"), exports);
18
19
  __exportStar(require("./generate-external-party-topology"), exports);
19
20
  __exportStar(require("./get-external-party-balance"), exports);
21
+ __exportStar(require("./list-external-party-setup-proposals"), exports);
22
+ __exportStar(require("./list-users"), exports);
20
23
  __exportStar(require("./submit-external-party-topology"), exports);
21
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,qEAAmD;AACnD,+DAA6C;AAC7C,mEAAiD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gEAA8C;AAC9C,qEAAmD;AACnD,+DAA6C;AAC7C,wEAAsD;AACtD,+CAA6B;AAC7B,mEAAiD"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * List all external party setup proposals
3
+ *
4
+ * @example
5
+ * ```typescript
6
+ * const result = await client.listExternalPartySetupProposals();
7
+ * console.log('Proposals:', result.contracts);
8
+ * ```;
9
+ */
10
+ export declare const ListExternalPartySetupProposals: new (client: import("../../../../../core").BaseClient) => import("../../../../../core").ApiOperation<void, {
11
+ contracts: import("../../../../../generated/apps/validator/src/main/openapi/validator-internal").components["schemas"]["ContractWithState"][];
12
+ }>;
13
+ //# sourceMappingURL=list-external-party-setup-proposals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-external-party-setup-proposals.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/list-external-party-setup-proposals.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B;eAS4kiB,2GAAsB;EAD5oiB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListExternalPartySetupProposals = void 0;
4
+ const zod_1 = require("zod");
5
+ const core_1 = require("../../../../../core");
6
+ /**
7
+ * List all external party setup proposals
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const result = await client.listExternalPartySetupProposals();
12
+ * console.log('Proposals:', result.contracts);
13
+ * ```;
14
+ */
15
+ exports.ListExternalPartySetupProposals = (0, core_1.createApiOperation)({
16
+ paramsSchema: zod_1.z.void(),
17
+ method: 'GET',
18
+ buildUrl: (_params, apiUrl) => `${apiUrl}/api/validator/v0/admin/external-party/setup-proposal`,
19
+ buildRequestData: () => ({}),
20
+ });
21
+ //# sourceMappingURL=list-external-party-setup-proposals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-external-party-setup-proposals.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/list-external-party-setup-proposals.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,8CAAyD;AAGzD;;;;;;;;GAQG;AACU,QAAA,+BAA+B,GAAG,IAAA,yBAAkB,EAG/D;IACA,YAAY,EAAE,OAAC,CAAC,IAAI,EAAE;IACtB,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAc,EAAE,EAAE,CAAC,GAAG,MAAM,uDAAuD;IACvG,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;CAC7B,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * List all users onboarded onto this validator
3
+ *
4
+ * @example
5
+ * ```typescript
6
+ * const result = await client.listUsers();
7
+ * console.log('Usernames:', result.usernames);
8
+ * ```;
9
+ */
10
+ export declare const ListUsers: new (client: import("../../../../../core").BaseClient) => import("../../../../../core").ApiOperation<void, {
11
+ usernames: string[];
12
+ }>;
13
+ //# sourceMappingURL=list-users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-users.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/list-users.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS;;EAQpB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListUsers = void 0;
4
+ const zod_1 = require("zod");
5
+ const core_1 = require("../../../../../core");
6
+ /**
7
+ * List all users onboarded onto this validator
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const result = await client.listUsers();
12
+ * console.log('Usernames:', result.usernames);
13
+ * ```;
14
+ */
15
+ exports.ListUsers = (0, core_1.createApiOperation)({
16
+ paramsSchema: zod_1.z.void(),
17
+ method: 'GET',
18
+ buildUrl: (_params, apiUrl) => `${apiUrl}/api/validator/v0/admin/users`,
19
+ buildRequestData: () => ({}),
20
+ });
21
+ //# sourceMappingURL=list-users.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-users.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/admin/list-users.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,8CAAyD;AAGzD;;;;;;;;GAQG;AACU,QAAA,SAAS,GAAG,IAAA,yBAAkB,EAGzC;IACA,YAAY,EAAE,OAAC,CAAC,IAAI,EAAE;IACtB,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAc,EAAE,EAAE,CAAC,GAAG,MAAM,+BAA+B;IAC/E,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;CAC7B,CAAC,CAAC"}
@@ -31,7 +31,7 @@ class GetMemberTrafficStatus extends ApiOperation_1.ApiOperation {
31
31
  const domainId = params.domainId ?? (await (0, mining_rounds_1.getCurrentMiningRoundDomainId)(this.client));
32
32
  // Auto-determine memberId if not provided
33
33
  const memberId = params.memberId ?? this.client.getPartyId();
34
- const url = `${this.getApiUrl()}/api/validator/v0/scan-proxy/v0/domains/${encodeURIComponent(domainId)}/members/${encodeURIComponent(memberId)}/traffic-status`;
34
+ const url = `${this.getApiUrl()}/api/validator/v0/scan-proxy/domains/${encodeURIComponent(domainId)}/members/${encodeURIComponent(memberId)}/traffic-status`;
35
35
  return this.makeGetRequest(url);
36
36
  }
37
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-member-traffic-status.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.ts"],"names":[],"mappings":";;;AAAA,8EAA2E;AAE3E,6EAA0F;AAI1F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,sBAAuB,SAAQ,2BAG3C;IACC,KAAK,CAAC,OAAO,CACX,MAAoC;QAEpC,0CAA0C;QAC1C,MAAM,QAAQ,GACZ,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,IAAA,6CAA6B,EAAC,IAAI,CAAC,MAAuC,CAAC,CAAC,CAAC;QAEzG,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAK,IAAI,CAAC,MAAuC,CAAC,UAAU,EAAE,CAAC;QAE/F,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,2CAA2C,kBAAkB,CAAC,QAAQ,CAAC,YAAY,kBAAkB,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QAEhK,OAAO,IAAI,CAAC,cAAc,CACxB,GAAG,CACJ,CAAC;IACJ,CAAC;CACF;AApBD,wDAoBC"}
1
+ {"version":3,"file":"get-member-traffic-status.js","sourceRoot":"","sources":["../../../../../../../src/clients/validator-api/operations/v0/scan-proxy/get-member-traffic-status.ts"],"names":[],"mappings":";;;AAAA,8EAA2E;AAE3E,6EAA0F;AAI1F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,sBAAuB,SAAQ,2BAG3C;IACC,KAAK,CAAC,OAAO,CACX,MAAoC;QAEpC,0CAA0C;QAC1C,MAAM,QAAQ,GACZ,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,IAAA,6CAA6B,EAAC,IAAI,CAAC,MAAuC,CAAC,CAAC,CAAC;QAEzG,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAK,IAAI,CAAC,MAAuC,CAAC,UAAU,EAAE,CAAC;QAE/F,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,wCAAwC,kBAAkB,CAAC,QAAQ,CAAC,YAAY,kBAAkB,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QAE7J,OAAO,IAAI,CAAC,cAAc,CACxB,GAAG,CACJ,CAAC;IACJ,CAAC;CACF;AApBD,wDAoBC"}
@@ -11,6 +11,8 @@ export interface CreateExternalPartyPrivyParams {
11
11
  partyName: string;
12
12
  /** Synchronizer ID to onboard the party on */
13
13
  synchronizerId: string;
14
+ /** Identity provider ID (default: 'default') */
15
+ identityProviderId?: string;
14
16
  /** Optional: existing Privy wallet to use. If not provided, creates a new one */
15
17
  wallet?: StellarWallet;
16
18
  /** Optional: user ID to link the wallet to (format: did:privy:...) */
@@ -1 +1 @@
1
- {"version":3,"file":"create-external-party-privy.d.ts","sourceRoot":"","sources":["../../../../src/utils/external-signing/create-external-party-privy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,2DAA2D;AAC3D,MAAM,WAAW,8BAA8B;IAC7C,4BAA4B;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,sCAAsC;IACtC,YAAY,EAAE,mBAAmB,CAAC;IAClC,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,iFAAiF;IACjF,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,gEAAgE;IAChE,8BAA8B,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1C,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,sDAAsD;IACtD,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,sDAAsD;AACtD,MAAM,WAAW,8BAA8B;IAC7C,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,+BAA+B;IAC/B,MAAM,EAAE,aAAa,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,8BAA8B,CAAC,CA6EzC"}
1
+ {"version":3,"file":"create-external-party-privy.d.ts","sourceRoot":"","sources":["../../../../src/utils/external-signing/create-external-party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-34,7 +34,6 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.createExternalPartyPrivy = createExternalPartyPrivy;
37
- const validator_api_1 = require("../../clients/validator-api");
38
37
  /**
39
38
  * Creates an external party in Canton using Privy for key management
40
39
  *
@@ -69,9 +68,7 @@ const validator_api_1 = require("../../clients/validator-api");
69
68
  * @returns Party details including party ID, wallet info, and key fingerprint
70
69
  */
71
70
  async function createExternalPartyPrivy(params) {
72
- const { privyClient, partyName, wallet: existingWallet, userId } = params;
73
- // Initialize Validator API client
74
- const validatorClient = new validator_api_1.ValidatorApiClient();
71
+ const { privyClient, ledgerClient, partyName, synchronizerId, identityProviderId = '', wallet: existingWallet, userId, localParticipantObservationOnly, otherConfirmingParticipantUids, confirmationThreshold, observingParticipantUids, } = params;
75
72
  // Step 1: Get or create Privy wallet
76
73
  let wallet;
77
74
  if (existingWallet) {
@@ -82,51 +79,79 @@ async function createExternalPartyPrivy(params) {
82
79
  const { createStellarWallet } = await Promise.resolve().then(() => __importStar(require('../privy/createWallet')));
83
80
  wallet = await createStellarWallet(privyClient, userId ? { userId } : undefined);
84
81
  }
85
- // Step 2: Convert public key from base64 to hex for Validator API
86
- const publicKeyHex = Buffer.from(wallet.publicKeyBase64, 'base64').toString('hex');
87
- // Step 3: Generate external party topology using Validator API
88
- const topology = await validatorClient.generateExternalPartyTopology({
89
- party_hint: partyName,
90
- public_key: publicKeyHex,
82
+ // Step 2: Wrap the raw public key in DER X.509 SubjectPublicKeyInfo format
83
+ // wallet.publicKeyBase64 is the raw 32-byte Ed25519 public key
84
+ // Canton's Ledger API requires it to be wrapped in DER format
85
+ const { wrapEd25519PublicKeyInDER } = await Promise.resolve().then(() => __importStar(require('./stellar-utils')));
86
+ const rawPublicKey = Buffer.from(wallet.publicKeyBase64, 'base64');
87
+ const derWrappedPublicKey = wrapEd25519PublicKeyInDER(rawPublicKey);
88
+ const derPublicKeyBase64 = derWrappedPublicKey.toString('base64');
89
+ // Also keep hex version for return value (from raw key, not DER-wrapped)
90
+ const publicKeyHex = rawPublicKey.toString('hex');
91
+ // Step 3: Generate external party topology using Ledger JSON API
92
+ const topology = await ledgerClient.generateExternalPartyTopology({
93
+ synchronizer: synchronizerId,
94
+ partyHint: partyName,
95
+ publicKey: {
96
+ format: 'CRYPTO_KEY_FORMAT_DER_X509_SUBJECT_PUBLIC_KEY_INFO',
97
+ keyData: derPublicKeyBase64,
98
+ keySpec: 'SIGNING_KEY_SPEC_EC_CURVE25519',
99
+ },
100
+ localParticipantObservationOnly,
101
+ otherConfirmingParticipantUids,
102
+ confirmationThreshold,
103
+ observingParticipantUids,
91
104
  });
92
- const { party_id, topology_txs } = topology;
93
- if (!party_id) {
105
+ const { partyId, multiHash, topologyTransactions } = topology;
106
+ if (!partyId) {
94
107
  throw new Error('No party ID returned from topology generation');
95
108
  }
96
- if (topology_txs.length === 0) {
109
+ if (!multiHash) {
110
+ throw new Error('No multi-hash returned from topology generation');
111
+ }
112
+ if (!topologyTransactions || topologyTransactions.length === 0) {
97
113
  throw new Error('No topology transactions returned from topology generation');
98
114
  }
99
- // Step 4: Sign each topology transaction hash using Privy
115
+ // Step 4: Sign the multi-hash using Privy
116
+ // The multiHash from Canton is in base64 format, but signWithWallet expects hex
117
+ const multiHashBuffer = Buffer.from(multiHash, 'base64');
118
+ const multiHashHex = multiHashBuffer.toString('hex');
100
119
  const { signWithWallet } = await Promise.resolve().then(() => __importStar(require('../privy/signData')));
101
- const signedTopologyTxs = await Promise.all(topology_txs.map(async (tx) => {
102
- const signResult = await signWithWallet(privyClient, {
103
- walletId: wallet.id,
104
- data: tx.hash,
105
- });
106
- // Convert signature from hex (with 0x prefix) to hex without prefix
107
- const signatureHex = signResult.signature.startsWith('0x') ? signResult.signature.slice(2) : signResult.signature;
108
- return {
109
- topology_tx: tx.topology_tx,
110
- signed_hash: signatureHex,
111
- };
112
- }));
113
- // Step 5: Submit the signed topology transactions using Validator API
114
- const submitResult = await validatorClient.submitExternalPartyTopology({
115
- public_key: publicKeyHex,
116
- signed_topology_txs: signedTopologyTxs,
120
+ const signResult = await signWithWallet(privyClient, {
121
+ walletId: wallet.id,
122
+ data: multiHashHex,
123
+ });
124
+ // Convert signature from hex (with 0x prefix) to base64 for Canton
125
+ const signatureHex = signResult.signature.startsWith('0x') ? signResult.signature.slice(2) : signResult.signature;
126
+ const signatureBase64 = Buffer.from(signatureHex, 'hex').toString('base64');
127
+ // Step 5: Allocate the party using Ledger JSON API
128
+ // We need to pass both the topology transactions and the multi-hash signature
129
+ // Transform the topology transactions (array of strings) into the expected format
130
+ const onboardingTransactions = topologyTransactions.map((transaction) => ({ transaction }));
131
+ const allocateResult = await ledgerClient.allocateExternalParty({
132
+ synchronizer: synchronizerId,
133
+ identityProviderId,
134
+ onboardingTransactions,
135
+ multiHashSignatures: [
136
+ {
137
+ format: 'SIGNATURE_FORMAT_RAW',
138
+ signature: signatureBase64,
139
+ signedBy: partyId.split('::')[1] ?? '', // fingerprint
140
+ signingAlgorithmSpec: 'SIGNING_ALGORITHM_SPEC_ED25519',
141
+ },
142
+ ],
117
143
  });
118
- if (!submitResult.party_id) {
119
- throw new Error('Failed to submit external party topology - no party ID returned');
144
+ if (!allocateResult.partyId) {
145
+ throw new Error('Failed to allocate external party - no party ID returned');
120
146
  }
121
147
  // Note: For external parties, we don't need to create a separate user or grant rights.
122
148
  // When preparing transactions, we'll use the validator operator's user ID (fetched automatically
123
- // by prepareExternalTransaction from the validator API). The external signature itself provides
124
- // the authorization for the transaction.
149
+ // by prepareExternalTransaction). The external signature itself provides the authorization.
125
150
  return {
126
- partyId: submitResult.party_id,
151
+ partyId: allocateResult.partyId,
127
152
  userId: '', // Will be resolved automatically when preparing transactions
128
153
  publicKey: publicKeyHex,
129
- publicKeyFingerprint: party_id.split('::')[1] ?? '', // Extract fingerprint from party ID
154
+ publicKeyFingerprint: partyId.split('::')[1] ?? '', // Extract fingerprint from party ID
130
155
  wallet,
131
156
  };
132
157
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-external-party-privy.js","sourceRoot":"","sources":["../../../../src/utils/external-signing/create-external-party-privy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,4DA+EC;AAzJD,+DAAiE;AAyCjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACI,KAAK,UAAU,wBAAwB,CAC5C,MAAsC;IAEtC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE1E,kCAAkC;IAClC,MAAM,eAAe,GAAG,IAAI,kCAAkB,EAAE,CAAC;IAEjD,qCAAqC;IACrC,IAAI,MAAqB,CAAC;IAC1B,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,GAAG,cAAc,CAAC;IAC1B,CAAC;SAAM,CAAC;QACN,wEAAwE;QACxE,MAAM,EAAE,mBAAmB,EAAE,GAAG,wDAAa,uBAAuB,GAAC,CAAC;QACtE,MAAM,GAAG,MAAM,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnF,CAAC;IAED,kEAAkE;IAClE,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEnF,+DAA+D;IAC/D,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,6BAA6B,CAAC;QACnE,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,YAAY;KACzB,CAAC,CAAC;IAEH,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;IAE5C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAA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C,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,oCAAoC;QACzF,MAAM;KACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"create-external-party-privy.js","sourceRoot":"","sources":["../../../../src/utils/external-signing/create-external-party-privy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,4DAqHC;AAtJD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACI,KAAK,UAAU,wBAAwB,CAC5C,MAAsC;IAEtC,MAAM,EACJ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,cAAc,EACd,kBAAkB,GAAG,EAAE,EACvB,MAAM,EAAE,cAAc,EACtB,MAAM,EACN,+BAA+B,EAC/B,8BAA8B,EAC9B,qBAAqB,EACrB,wBAAwB,GACzB,GAAG,MAAM,CAAC;IAEX,qCAAqC;IACrC,IAAI,MAAqB,CAAC;IAC1B,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,GAAG,cAAc,CAAC;IAC1B,CAAC;SAAM,CAAC;QACN,wEAAwE;QACxE,MAAM,EAAE,mBAAmB,EAAE,GAAG,wDAAa,uBAAuB,GAAC,CAAC;QACtE,MAAM,GAAG,MAAM,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnF,CAAC;IAED,2EAA2E;IAC3E,+DAA+D;IAC/D,8DAA8D;IAC9D,MAAM,EAAE,yBAAyB,EAAE,GAAG,wDAAa,iBAAiB,GAAC,CAAC;IACtE,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IACnE,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,YAAY,CAAC,CAAC;IACpE,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAElE,yEAA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onboard the party on */
12
12
  synchronizerId: string;
13
+ /** Identity provider ID (default: 'default') */
14
+ identityProviderId?: string;
13
15
  /** If true, the local participant will only observe, not confirm (default: false) */
14
16
  localParticipantObservationOnly?: boolean;
15
17
  /** Other participant UIDs that should confirm for this party */
@@ -1 +1 @@
1
- {"version":3,"file":"create-external-party.d.ts","sourceRoot":"","sources":["../../../../src/utils/external-signing/create-external-party.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIzE,gDAAgD;AAChD,MAAM,WAAW,yBAAyB;IACxC,sCAAsC;IACtC,YAAY,EAAE,mBAAmB,CAAC;IAClC,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,gEAAgE;IAChE,8BAA8B,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1C,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,sDAAsD;IACtD,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,2CAA2C;AAC3C,MAAM,WAAW,yBAAyB;IACxC,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qDAAqD;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAsD/G"}
1
+ {"version":3,"file":"create-external-party.d.ts","sourceRoot":"","sources":["../../../../src/utils/external-signing/create-external-party.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,gDAAgD;AAChD,MAAM,WAAW,yBAAyB;IACxC,sCAAsC;IACtC,YAAY,EAAE,mBAAmB,CAAC;IAClC,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qFAAqF;IACrF,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,gEAAgE;IAChE,8BAA8B,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1C,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,sDAAsD;IACtD,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,2CAA2C;AAC3C,MAAM,WAAW,yBAAyB;IACxC,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qDAAqD;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAsF/G"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createExternalParty = createExternalParty;
4
- const validator_api_1 = require("../../clients/validator-api");
5
4
  const stellar_utils_1 = require("./stellar-utils");
6
5
  /**
7
6
  * Creates an external party in Canton
@@ -35,45 +34,66 @@ const stellar_utils_1 = require("./stellar-utils");
35
34
  * @returns Party details including party ID and key fingerprint
36
35
  */
37
36
  async function createExternalParty(params) {
38
- const { keypair, partyName } = params;
39
- // Initialize Validator API client
40
- const validatorClient = new validator_api_1.ValidatorApiClient();
41
- // Step 1: Convert Stellar public key to hex for Validator API
37
+ const { ledgerClient, keypair, partyName, synchronizerId, identityProviderId = 'default', localParticipantObservationOnly, otherConfirmingParticipantUids, confirmationThreshold, observingParticipantUids, } = params;
38
+ // Step 1: Convert Stellar public key to base64 for Ledger API
39
+ const publicKeyBase64 = (0, stellar_utils_1.stellarPublicKeyToBase64)(keypair);
42
40
  const publicKeyHex = (0, stellar_utils_1.stellarPublicKeyToHex)(keypair);
43
- // Step 2: Generate external party topology using Validator API
44
- const topology = await validatorClient.generateExternalPartyTopology({
45
- party_hint: partyName,
46
- public_key: publicKeyHex,
41
+ // Step 2: Generate external party topology using Ledger JSON API
42
+ const topology = await ledgerClient.generateExternalPartyTopology({
43
+ synchronizer: synchronizerId,
44
+ partyHint: partyName,
45
+ publicKey: {
46
+ format: 'CRYPTO_KEY_FORMAT_DER_X509_SUBJECT_PUBLIC_KEY_INFO',
47
+ keyData: publicKeyBase64,
48
+ keySpec: 'SIGNING_KEY_SPEC_EC_CURVE25519',
49
+ },
50
+ localParticipantObservationOnly,
51
+ otherConfirmingParticipantUids,
52
+ confirmationThreshold,
53
+ observingParticipantUids,
47
54
  });
48
- const { party_id, topology_txs } = topology;
49
- if (!party_id) {
55
+ const { partyId, multiHash, topologyTransactions } = topology;
56
+ if (!partyId) {
50
57
  throw new Error('No party ID returned from topology generation');
51
58
  }
52
- if (topology_txs.length === 0) {
59
+ if (!multiHash) {
60
+ throw new Error('No multi-hash returned from topology generation');
61
+ }
62
+ if (!topologyTransactions || topologyTransactions.length === 0) {
53
63
  throw new Error('No topology transactions returned from topology generation');
54
64
  }
55
- // Step 3: Sign each topology transaction hash using the Stellar keypair
56
- const signedTopologyTxs = topology_txs.map((tx) => ({
57
- topology_tx: tx.topology_tx,
58
- signed_hash: (0, stellar_utils_1.signHexWithStellarKeypair)(keypair, tx.hash),
59
- }));
60
- // Step 4: Submit the signed topology transactions using Validator API
61
- const submitResult = await validatorClient.submitExternalPartyTopology({
62
- public_key: publicKeyHex,
63
- signed_topology_txs: signedTopologyTxs,
65
+ // Step 3: Sign the multi-hash using the Stellar keypair
66
+ const multiHashSignatureHex = (0, stellar_utils_1.signHexWithStellarKeypair)(keypair, multiHash);
67
+ // Convert signature from hex to base64 for Canton
68
+ const multiHashSignature = Buffer.from(multiHashSignatureHex, 'hex').toString('base64');
69
+ // Step 4: Allocate the party using Ledger JSON API
70
+ // We need to pass both the topology transactions and the multi-hash signature
71
+ // Transform the topology transactions (array of strings) into the expected format
72
+ const onboardingTransactions = topologyTransactions.map((transaction) => ({ transaction }));
73
+ const allocateResult = await ledgerClient.allocateExternalParty({
74
+ synchronizer: synchronizerId,
75
+ identityProviderId,
76
+ onboardingTransactions,
77
+ multiHashSignatures: [
78
+ {
79
+ format: 'SIGNATURE_FORMAT_RAW',
80
+ signature: multiHashSignature,
81
+ signedBy: partyId.split('::')[1] ?? '', // fingerprint
82
+ signingAlgorithmSpec: 'SIGNING_ALGORITHM_SPEC_ED25519',
83
+ },
84
+ ],
64
85
  });
65
- if (!submitResult.party_id) {
66
- throw new Error('Failed to submit external party topology - no party ID returned');
86
+ if (!allocateResult.partyId) {
87
+ throw new Error('Failed to allocate external party - no party ID returned');
67
88
  }
68
89
  // Note: For external parties, we don't need to create a separate user or grant rights.
69
90
  // When preparing transactions, we'll use the validator operator's user ID (fetched automatically
70
- // by prepareExternalTransaction from the validator API). The external signature itself provides
71
- // the authorization for the transaction.
91
+ // by prepareExternalTransaction). The external signature itself provides the authorization.
72
92
  return {
73
- partyId: submitResult.party_id,
93
+ partyId: allocateResult.partyId,
74
94
  userId: '', // Will be resolved automatically when preparing transactions
75
95
  publicKey: publicKeyHex,
76
- publicKeyFingerprint: party_id.split('::')[1] ?? '', // Extract fingerprint from party ID
96
+ publicKeyFingerprint: partyId.split('::')[1] ?? '', // Extract fingerprint from party ID
77
97
  stellarAddress: keypair.publicKey(),
78
98
  stellarSecret: keypair.secret(),
79
99
  };
@@ -1 +1 @@
1
- {"version":3,"file":"create-external-party.js","sourceRoot":"","sources":["../../../../src/utils/external-signing/create-external-party.ts"],"names":[],"mappings":";;AAwEA,kDAsDC;AA5HD,+DAAiE;AACjE,mDAAmF;AAsCnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACI,KAAK,UAAU,mBAAmB,CAAC,MAAiC;IACzE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAEtC,kCAAkC;IAClC,MAAM,eAAe,GAAG,IAAI,kCAAkB,EAAE,CAAC;IAEjD,8DAA8D;IAC9D,MAAM,YAAY,GAAG,IAAA,qCAAqB,EAAC,OAAO,CAAC,CAAC;IAEpD,+DAA+D;IAC/D,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,6BAA6B,CAAC;QACnE,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,YAAY;KACzB,CAAC,CAAC;IAEH,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;IAE5C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IAED,wEAAwE;IACxE,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAClD,WAAW,EAAE,EAAE,CAAC,WAAW;QAC3B,WAAW,EAAE,IAAA,yCAAyB,EAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC;KACzD,CAAC,CAAC,CAAC;IAEJ,sEAAsE;IACtE,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC,2BAA2B,CAAC;QACrE,UAAU,EAAE,YAAY;QACxB,mBAAmB,EAAE,iBAAiB;KACvC,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrF,CAAC;IAED,uFAAuF;IACvF,iGAAiG;IACjG,gGAAgG;IAChG,yCAAyC;IAEzC,OAAO;QACL,OAAO,EAAE,YAAY,CAAC,QAAQ;QAC9B,MAAM,EAAE,EAAE,EAAE,6DAA6D;QACzE,SAAS,EAAE,YAAY;QACvB,oBAAoB,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,oCAAoC;QACzF,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE;QACnC,aAAa,EAAE,OAAO,CAAC,MAAM,EAAE;KAChC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"create-external-party.js","sourceRoot":"","sources":["../../../../src/utils/external-signing/create-external-party.ts"],"names":[],"mappings":";;AAyEA,kDAsFC;AA7JD,mDAA6G;AAwC7G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACI,KAAK,UAAU,mBAAmB,CAAC,MAAiC;IACzE,MAAM,EACJ,YAAY,EACZ,OAAO,EACP,SAAS,EACT,cAAc,EACd,kBAAkB,GAAG,SAAS,EAC9B,+BAA+B,EAC/B,8BAA8B,EAC9B,qBAAqB,EACrB,wBAAwB,GACzB,GAAG,MAAM,CAAC;IAEX,8DAA8D;IA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5F,MAAM,cAAc,GAAG,MAAM,YAAY,CAAC,qBAAqB,CAAC;QAC9D,YAAY,EAAE,cAAc;QAC5B,kBAAkB;QAClB,sBAAsB;QACtB,mBAAmB,EAAE;YACnB;gBACE,MAAM,EAAE,sBAAsB;gBAC9B,SAAS,EAAE,kBAAkB;gBAC7B,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,cAAc;gBACtD,oBAAoB,EAAE,gCAAgC;aACvD;SACF;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IAED,uFAAuF;IACvF,iGAAiG;IACjG,4FAA4F;IAE5F,OAAO;QACL,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,MAAM,EAAE,EAAE,EAAE,6DAA6D;QACzE,SAAS,EAAE,YAAY;QACvB,oBAAoB,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,oCAAoC;QACxF,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE;QACnC,aAAa,EAAE,OAAO,CAAC,MAAM,EAAE;KAChC,CAAC;AACJ,CAAC"}
@@ -1,12 +1,22 @@
1
1
  import { Keypair } from '@stellar/stellar-base';
2
2
  /**
3
- * Converts a Stellar public key to base64 format for Canton
3
+ * Wraps a raw Ed25519 public key in DER X.509 SubjectPublicKeyInfo format
4
4
  *
5
- * Stellar Ed25519 keys can be used for Canton external signing. This function extracts the raw 32-byte public key and
6
- * converts it to base64.
5
+ * The DER structure for Ed25519 public keys is: SEQUENCE { SEQUENCE { OBJECT IDENTIFIER id-Ed25519 (1.3.101.112) } BIT
6
+ * STRING (raw public key) }
7
+ *
8
+ * @param rawPublicKey - Raw 32-byte Ed25519 public key
9
+ * @returns DER-encoded public key in X.509 SubjectPublicKeyInfo format
10
+ */
11
+ export declare function wrapEd25519PublicKeyInDER(rawPublicKey: Buffer): Buffer;
12
+ /**
13
+ * Converts a Stellar public key to base64 format for Canton (DER-wrapped)
14
+ *
15
+ * Stellar Ed25519 keys can be used for Canton external signing. This function extracts the raw 32-byte public key,
16
+ * wraps it in DER X.509 SubjectPublicKeyInfo format, and converts to base64.
7
17
  *
8
18
  * @param keypair - Stellar Keypair object
9
- * @returns Base64-encoded public key
19
+ * @returns Base64-encoded DER-wrapped public key in X.509 SubjectPublicKeyInfo format
10
20
  */
11
21
  export declare function stellarPublicKeyToBase64(keypair: Keypair): string;
12
22
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"stellar-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/external-signing/stellar-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEjE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAItF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAInF"}
1
+ {"version":3,"file":"stellar-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/external-signing/stellar-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAetE;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAIjE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAItF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAInF"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.wrapEd25519PublicKeyInDER = wrapEd25519PublicKeyInDER;
3
4
  exports.stellarPublicKeyToBase64 = stellarPublicKeyToBase64;
4
5
  exports.signWithStellarKeypair = signWithStellarKeypair;
5
6
  exports.loadStellarKeypair = loadStellarKeypair;
@@ -8,16 +9,41 @@ exports.stellarPublicKeyToHex = stellarPublicKeyToHex;
8
9
  exports.signHexWithStellarKeypair = signHexWithStellarKeypair;
9
10
  const stellar_base_1 = require("@stellar/stellar-base");
10
11
  /**
11
- * Converts a Stellar public key to base64 format for Canton
12
+ * Wraps a raw Ed25519 public key in DER X.509 SubjectPublicKeyInfo format
12
13
  *
13
- * Stellar Ed25519 keys can be used for Canton external signing. This function extracts the raw 32-byte public key and
14
- * converts it to base64.
14
+ * The DER structure for Ed25519 public keys is: SEQUENCE { SEQUENCE { OBJECT IDENTIFIER id-Ed25519 (1.3.101.112) } BIT
15
+ * STRING (raw public key) }
16
+ *
17
+ * @param rawPublicKey - Raw 32-byte Ed25519 public key
18
+ * @returns DER-encoded public key in X.509 SubjectPublicKeyInfo format
19
+ */
20
+ function wrapEd25519PublicKeyInDER(rawPublicKey) {
21
+ if (rawPublicKey.length !== 32) {
22
+ throw new Error(`Invalid Ed25519 public key length: ${rawPublicKey.length}, expected 32 bytes`);
23
+ }
24
+ // DER prefix for Ed25519 public keys in X.509 SubjectPublicKeyInfo format
25
+ // 30 2a: SEQUENCE, length 42 (0x2a)
26
+ // 30 05: SEQUENCE, length 5
27
+ // 06 03: OBJECT IDENTIFIER, length 3
28
+ // 2b 65 70: OID 1.3.101.112 (id-Ed25519)
29
+ // 03 21: BIT STRING, length 33 (0x21)
30
+ // 00: no unused bits
31
+ const derPrefix = Buffer.from('302a300506032b6570032100', 'hex');
32
+ return Buffer.concat([derPrefix, rawPublicKey]);
33
+ }
34
+ /**
35
+ * Converts a Stellar public key to base64 format for Canton (DER-wrapped)
36
+ *
37
+ * Stellar Ed25519 keys can be used for Canton external signing. This function extracts the raw 32-byte public key,
38
+ * wraps it in DER X.509 SubjectPublicKeyInfo format, and converts to base64.
15
39
  *
16
40
  * @param keypair - Stellar Keypair object
17
- * @returns Base64-encoded public key
41
+ * @returns Base64-encoded DER-wrapped public key in X.509 SubjectPublicKeyInfo format
18
42
  */
19
43
  function stellarPublicKeyToBase64(keypair) {
20
- return keypair.rawPublicKey().toString('base64');
44
+ const rawPublicKey = keypair.rawPublicKey();
45
+ const derWrapped = wrapEd25519PublicKeyInDER(rawPublicKey);
46
+ return derWrapped.toString('base64');
21
47
  }
22
48
  /**
23
49
  * Signs data with a Stellar keypair
@@ -1 +1 @@
1
- {"version":3,"file":"stellar-utils.js","sourceRoot":"","sources":["../../../../src/utils/external-signing/stellar-utils.ts"],"names":[],"mappings":";;AAWA,4DAEC;AASD,wDAIC;AAQD,gDAEC;AAOD,wDAEC;AAQD,sDAEC;AASD,8DAIC;AApED,wDAAgD;AAEhD;;;;;;;;GAQG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;;;GAIG;AACH,SAAgB,sBAAsB;IACpC,OAAO,sBAAO,CAAC,MAAM,EAAE,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,OAAgB;IACpD,OAAO,OAAO,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,yBAAyB,CAAC,OAAgB,EAAE,OAAe;IACzE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/C,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3C,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"signData.d.ts","sourceRoot":"","sources":["../../../../src/utils/privy/signData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA+BxG"}
1
+ {"version":3,"file":"signData.d.ts","sourceRoot":"","sources":["../../../../src/utils/privy/signData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA8BxG"}
@@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,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE5E,OAAO;QACL,SAAS;QACT,QAAQ;QACR,eAAe;KAChB,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairmint/canton-node-sdk",
3
- "version": "0.0.121",
3
+ "version": "0.0.123",
4
4
  "description": "Canton Node SDK",
5
5
  "keywords": [
6
6
  "canton",
@@ -48,6 +48,7 @@
48
48
  "prepack": "npm run clean && npm run build:core",
49
49
  "prepare-release": "tsx scripts/prepare-release.ts",
50
50
  "prepublishOnly": "npm run prepack",
51
+ "revoke-user-rights": "tsx scripts/revoke-user-rights.ts",
51
52
  "simulate": "tsx --tsconfig tsconfig.lint.json scripts/run-simulations.ts",
52
53
  "simulate:events": "tsx --tsconfig tsconfig.lint.json scripts/run-events-simulation.ts",
53
54
  "test": "jest",
@@ -57,7 +58,6 @@
57
58
  },
58
59
  "dependencies": {
59
60
  "@canton-network/wallet-sdk": "0.15.0",
60
- "@privy-io/node": "^0.3.0",
61
61
  "@stellar/stellar-base": "^14.0.1",
62
62
  "axios": "1.12.2",
63
63
  "dotenv": "17.2.3",
@@ -91,6 +91,9 @@
91
91
  "tsx": "4.20.6",
92
92
  "typescript": "5.9.3"
93
93
  },
94
+ "optionalDependencies": {
95
+ "@privy-io/node": "^0.3.0"
96
+ },
94
97
  "engines": {
95
98
  "node": ">=18.0.0"
96
99
  },