@fairmint/canton-node-sdk
Version:
Canton Node SDK
96 lines • 8.24 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LedgerJsonApiClient = void 0;
const core_1 = require("../../core");
const submit_1 = require("./operations/v2/commands/async/submit");
const submit_reassignment_1 = require("./operations/v2/commands/async/submit-reassignment");
const completions_1 = require("./operations/v2/commands/completions");
const submit_and_wait_1 = require("./operations/v2/commands/submit-and-wait");
const submit_and_wait_for_transaction_1 = require("./operations/v2/commands/submit-and-wait-for-transaction");
const submit_and_wait_for_transaction_tree_1 = require("./operations/v2/commands/submit-and-wait-for-transaction-tree");
const get_events_by_contract_id_1 = require("./operations/v2/events/get-events-by-contract-id");
const get_transaction_by_offset_1 = require("./operations/v2/updates/get-transaction-by-offset");
const get_transaction_tree_by_offset_1 = require("./operations/v2/updates/get-transaction-tree-by-offset");
const get_update_by_offset_1 = require("./operations/v2/updates/get-update-by-offset");
const get_update_by_id_1 = require("./operations/v2/updates/get-update-by-id");
const get_transaction_by_id_1 = require("./operations/v2/updates/get-transaction-by-id");
const get_transaction_tree_by_id_1 = require("./operations/v2/updates/get-transaction-tree-by-id");
const get_active_contracts_1 = require("./operations/v2/state/get-active-contracts");
const get_connected_synchronizers_1 = require("./operations/v2/state/get-connected-synchronizers");
const get_ledger_end_1 = require("./operations/v2/state/get-ledger-end");
const get_latest_pruned_offsets_1 = require("./operations/v2/state/get-latest-pruned-offsets");
const create_user_1 = require("./operations/v2/users/create-user");
const delete_user_1 = require("./operations/v2/users/delete-user");
const get_user_1 = require("./operations/v2/users/get-user");
const grant_user_rights_1 = require("./operations/v2/users/grant-user-rights");
const list_user_rights_1 = require("./operations/v2/users/list-user-rights");
const list_users_1 = require("./operations/v2/users/list-users");
const revoke_user_rights_1 = require("./operations/v2/users/revoke-user-rights");
const update_user_identity_provider_1 = require("./operations/v2/users/update-user-identity-provider");
const update_user_1 = require("./operations/v2/users/update-user");
const get_1 = require("./operations/v2/packages/get");
const post_1 = require("./operations/v2/packages/post");
const allocate_party_1 = require("./operations/v2/interactive-submission/allocate-party");
const create_user_2 = require("./operations/v2/interactive-submission/create-user");
const upload_dar_1 = require("./operations/v2/interactive-submission/upload-dar");
const get_preferred_package_version_1 = require("./operations/v2/interactive-submission/get-preferred-package-version");
const get_preferred_packages_1 = require("./operations/v2/interactive-submission/get-preferred-packages");
const get_2 = require("./operations/v2/parties/get");
const get_participant_id_1 = require("./operations/v2/parties/get-participant-id");
const get_party_details_1 = require("./operations/v2/parties/get-party-details");
const post_2 = require("./operations/v2/parties/post");
const update_party_details_1 = require("./operations/v2/parties/update-party-details");
/** Client for interacting with Canton's Ledger JSON API */
class LedgerJsonApiClient extends core_1.BaseClient {
constructor(clientConfig) {
super('LEDGER_JSON_API', clientConfig);
// Commands
this.asyncSubmit = (params) => new submit_1.AsyncSubmit(this).execute(params);
this.asyncSubmitReassignment = (params) => new submit_reassignment_1.AsyncSubmitReassignment(this).execute(params);
this.completions = (params) => new completions_1.Completions(this).execute(params);
this.submitAndWait = (params) => new submit_and_wait_1.SubmitAndWait(this).execute(params);
this.submitAndWaitForTransactionTree = (params) => new submit_and_wait_for_transaction_tree_1.SubmitAndWaitForTransactionTree(this).execute(params);
this.submitAndWaitForTransaction = (params) => new submit_and_wait_for_transaction_1.SubmitAndWaitForTransaction(this).execute(params);
// Events
this.getEventsByContractId = (params) => new get_events_by_contract_id_1.GetEventsByContractId(this).execute(params);
// Updates
this.getTransactionByOffset = (params) => new get_transaction_by_offset_1.GetTransactionByOffset(this).execute(params);
this.getTransactionTreeByOffset = (params) => new get_transaction_tree_by_offset_1.GetTransactionTreeByOffset(this).execute(params);
this.getUpdateByOffset = (params) => new get_update_by_offset_1.GetUpdateByOffset(this).execute(params);
this.getUpdateById = (params) => new get_update_by_id_1.GetUpdateById(this).execute(params);
this.getTransactionById = (params) => new get_transaction_by_id_1.GetTransactionById(this).execute(params);
this.getTransactionTreeById = (params) => new get_transaction_tree_by_id_1.GetTransactionTreeById(this).execute(params);
// State
this.getActiveContracts = (params) => new get_active_contracts_1.GetActiveContracts(this).execute(params);
this.getConnectedSynchronizers = (params) => new get_connected_synchronizers_1.GetConnectedSynchronizers(this).execute(params);
this.getLedgerEnd = (params) => new get_ledger_end_1.GetLedgerEnd(this).execute(params);
this.getLatestPrunedOffsets = (params) => new get_latest_pruned_offsets_1.GetLatestPrunedOffsets(this).execute(params);
// Users
this.createUser = (params) => new create_user_1.CreateUser(this).execute(params);
this.deleteUser = (params) => new delete_user_1.DeleteUser(this).execute(params);
this.getUser = (params) => new get_user_1.GetUser(this).execute(params);
this.grantUserRights = (params) => new grant_user_rights_1.GrantUserRights(this).execute(params);
this.listUserRights = (params) => new list_user_rights_1.ListUserRights(this).execute(params);
this.listUsers = (params) => new list_users_1.ListUsers(this).execute(params);
this.revokeUserRights = (params) => new revoke_user_rights_1.RevokeUserRights(this).execute(params);
this.updateUserIdentityProvider = (params) => new update_user_identity_provider_1.UpdateUserIdentityProvider(this).execute(params);
this.updateUser = (params) => new update_user_1.UpdateUser(this).execute(params);
// Parties
this.getParties = (params) => new get_2.GetParties(this).execute(params);
this.getParticipantId = (params) => new get_participant_id_1.GetParticipantId(this).execute(params);
this.getPartyDetails = (params) => new get_party_details_1.GetPartyDetails(this).execute(params);
this.allocateParty = (params) => new post_2.AllocateParty(this).execute(params);
this.updatePartyDetails = (params) => new update_party_details_1.UpdatePartyDetails(this).execute(params);
this.listPackages = () => new get_1.ListPackages(this).execute();
this.uploadDarFile = (params) => new post_1.UploadDarFile(this).execute(params);
this.getVersion = () => new (require('./operations/v2/version/get').GetVersion)(this).execute();
// Interactive Submission
this.interactiveSubmissionAllocateParty = (params) => new allocate_party_1.InteractiveSubmissionAllocateParty(this).execute(params);
this.interactiveSubmissionCreateUser = (params) => new create_user_2.InteractiveSubmissionCreateUser(this).execute(params);
this.interactiveSubmissionUploadDar = (params) => new upload_dar_1.InteractiveSubmissionUploadDar(this).execute(params);
this.interactiveSubmissionGetPreferredPackageVersion = (params) => new get_preferred_package_version_1.InteractiveSubmissionGetPreferredPackageVersion(this).execute(params);
this.interactiveSubmissionGetPreferredPackages = (params) => new get_preferred_packages_1.InteractiveSubmissionGetPreferredPackages(this).execute(params);
}
}
exports.LedgerJsonApiClient = LedgerJsonApiClient;
//# sourceMappingURL=LedgerJsonApiClient.js.map