-
Notifications
You must be signed in to change notification settings - Fork 0
create external party
HardlyDifficult edited this page Apr 30, 2026
·
1 revision
Steps executed internally:
- Encode
Keypairpublic key (CRYPTO_KEY_FORMAT_DER_X509_SUBJECT_PUBLIC_KEY_INFO). -
generateExternalPartyTopologyvialedgerClientwith participant hints. - Validate
partyId,multiHash,topologyTransactionsresponses. - Sign
multiHashusingsignHexWithStellarKeypair. -
allocateExternalPartywith hashed signatures referencingpublicKeyFingerprintparsed frompartyId.
Returns descriptive OperationError PARTY_CREATION_FAILED when any prerequisite missing.
import { Keypair } from '@stellar/stellar-base';
import { Canton, createExternalParty } from '@fairmint/canton-node-sdk';
const canton = new Canton({
network: 'NETWORK_NAME',
partyId: 'PARTY_ID',
});const keypair = Keypair.random();
const party = await createExternalParty({
ledgerClient: canton.ledger,
keypair,
partyName: 'alice',
synchronizerId: 'SYNCHRONIZER_ID',
});
console.log(party.partyId, party.publicKeyFingerprint);CreateExternalPartyParams:
-
ledgerClient,keypair,partyName,synchronizerId(required) — Topology inputs. -
identityProviderId(optional, default'default') -
localParticipantObservationOnly,otherConfirmingParticipantUids,confirmationThreshold,observingParticipantUids(optional) — Multi-hosted onboarding knobs forwarded togenerateExternalPartyTopology.
Promise<CreateExternalPartyResult> — partyId, publicKey hex, publicKeyFingerprint, stellarAddress, stellarSecret (keep secret offline).
Throws OperationError PARTY_CREATION_FAILED when topology omit fields or allocate lacks partyId.
Uses authenticated ledgerClient for topology + allocate endpoints; Keypair proves offline custody.