API Operations

Party Utilities

Utilities for party creation, management, and party-related operations.

Functions

createParty

Creates a party, optionally funds the wallet and if funded it then creates a preapproval contract for the party.

Parameters: CreatePartyOptions

Returns: Promise<PartyCreationResult>

Example:

import { createParty } from '@fairmint/canton-node-sdk';
import { LedgerJsonApiClient, ValidatorApiClient } from '@fairmint/canton-node-sdk';

async function createNewParty() {
  const ledgerClient = new LedgerJsonApiClient();
  const validatorClient = new ValidatorApiClient();

  const result = await createParty({
    ledgerClient,
    validatorClient,
    partyName: 'alice',
    amount: '100.0'
  });

  console.log(`Party created successfully! ID: ${result.partyId}, Preapproval: ${result.preapprovalContractId}`);
  
  return result;
}

Generated from https://github.com/Fairmint/canton-node-sdk v0.0.1

← Back to Utils Overview