@canton-network/core-wallet-user-rpc-client 1.16.0 → 1.17.0

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/dist/index.cjs CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
5
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/typeof.js
6
6
  function _typeof(o) {
7
7
  "@babel/helpers - typeof";
8
8
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -11,8 +11,7 @@ function _typeof(o) {
11
11
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
12
12
  }, _typeof(o);
13
13
  }
14
- //#endregion
15
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
14
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/toPrimitive.js
16
15
  function toPrimitive(t, r) {
17
16
  if ("object" != _typeof(t) || !t) return t;
18
17
  var e = t[Symbol.toPrimitive];
@@ -23,14 +22,12 @@ function toPrimitive(t, r) {
23
22
  }
24
23
  return ("string" === r ? String : Number)(t);
25
24
  }
26
- //#endregion
27
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
25
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/toPropertyKey.js
28
26
  function toPropertyKey(t) {
29
27
  var i = toPrimitive(t, "string");
30
28
  return "symbol" == _typeof(i) ? i : i + "";
31
29
  }
32
- //#endregion
33
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
30
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/defineProperty.js
34
31
  function _defineProperty(e, r, t) {
35
32
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
36
33
  value: t,
@@ -39,8 +36,7 @@ function _defineProperty(e, r, t) {
39
36
  writable: !0
40
37
  }) : e[r] = t, e;
41
38
  }
42
- //#endregion
43
- //#region src/index.ts
39
+ // src/index.ts
44
40
  var WalletJSONRPCUserAPI = class {
45
41
  constructor(transport) {
46
42
  _defineProperty(this, "transport", void 0);
@@ -50,7 +46,6 @@ var WalletJSONRPCUserAPI = class {
50
46
  return (await this.transport.submit(args)).result;
51
47
  }
52
48
  };
53
- //#endregion
54
49
  exports.WalletJSONRPCUserAPI = WalletJSONRPCUserAPI;
55
50
  exports.default = WalletJSONRPCUserAPI;
56
51
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// Code generated by @open-rpc/generator DO NOT EDIT.\nimport type { RequestArgs, RequestPayload } from '@canton-network/core-types'\nimport type { RpcTransport } from '@canton-network/core-rpc-transport'\n\n/* oxlint-disable no-unused-vars */\n/**\n *\n * The network ID the wallet corresponds to.\n *\n */\nexport type NetworkId = string\nexport type Name = string\n/**\n *\n * Description of network\n *\n */\nexport type Description = string\n/**\n *\n * Synchronizer ID\n *\n */\nexport type SynchronizerId = string\n/**\n *\n * Identity Provider ID\n *\n */\nexport type IdentityProviderId = string\nexport type AuthorizationCodeAuthMethod = 'authorization_code'\nexport type Scope = string\nexport type ClientId = string\n/**\n *\n * Bare participant ID, with no https://daml.com/jwt/aud/participant/ prefix (unlike the other auth methods).\n *\n */\nexport type Audience = string\ntype AlwaysFalse = any\n/**\n *\n * Authorization code authentication configuration\n *\n */\nexport interface AuthorizationCodeAuth {\n method: AuthorizationCodeAuthMethod\n scope: Scope\n clientId: ClientId\n audience: Audience\n}\nexport type ClientCredentialsAuthMethod = 'client_credentials'\n/**\n *\n * Overrides the network's identity provider for client credentials token acquisition\n *\n */\nexport type ClientCredentialsIdentityProviderId = string\nexport type ClientSecret = string\n/**\n *\n * Client credentials authentication configuration\n *\n */\nexport interface ClientCredentialsAuth {\n method: ClientCredentialsAuthMethod\n identityProviderId?: ClientCredentialsIdentityProviderId\n scope: Scope\n clientId: ClientId\n clientSecret: ClientSecret\n audience: Audience\n}\nexport type SelfSignedAuthMethod = 'self_signed'\n/**\n *\n * Issuer of identity provider\n *\n */\nexport type Issuer = string\n/**\n *\n * Self-signed authentication configuration\n *\n */\nexport interface SelfSignedAuth {\n method: SelfSignedAuthMethod\n scope: Scope\n clientId: ClientId\n clientSecret: ClientSecret\n issuer: Issuer\n audience: Audience\n}\nexport type SelfIssuedAuthMethod = 'self_issued'\n/**\n *\n * Self-issued authentication configuration\n *\n */\nexport interface SelfIssuedAuth {\n method: SelfIssuedAuthMethod\n scope: Scope\n audience: Audience\n}\n/**\n *\n * Authentication configuration for a network\n *\n */\nexport type Auth =\n | AuthorizationCodeAuth\n | ClientCredentialsAuth\n | SelfSignedAuth\n | SelfIssuedAuth\n/**\n *\n * Ledger api url\n *\n */\nexport type LedgerApi = string\n/**\n *\n * Connected network metadata. Privileged credentials (adminAuth, serviceAccountAuth) are included only for the admin user.\n *\n */\nexport interface Network {\n id: NetworkId\n name: Name\n description: Description\n synchronizerId?: SynchronizerId\n identityProviderId: IdentityProviderId\n auth: Auth\n adminAuth?: Auth\n serviceAccountAuth?: Auth\n ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\nexport type Id = string\n/**\n *\n * OAuth identity provider\n *\n */\nexport type OauthIdpType = 'oauth'\n/**\n *\n * The configuration URL for the identity provider.\n *\n */\nexport type ConfigUrl = string\nexport interface OauthIdp {\n id: Id\n type: OauthIdpType\n issuer: Issuer\n configUrl: ConfigUrl\n}\n/**\n *\n * Self-signed identity provider\n *\n */\nexport type SelfSignedIdpType = 'self_signed'\nexport interface SelfSignedIdp {\n id: Id\n type: SelfSignedIdpType\n issuer: Issuer\n}\n/**\n *\n * Self-issued identity provider\n *\n */\nexport type SelfIssuedIdpType = 'self_issued'\nexport interface SelfIssuedIdp {\n id: Id\n type: SelfIssuedIdpType\n}\n/**\n *\n * Structure representing an identity provider\n *\n */\nexport type Idp = OauthIdp | SelfSignedIdp | SelfIssuedIdp\n/**\n *\n * Set as primary wallet for dApp usage.\n *\n */\nexport type Primary = boolean\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type PartyHint = string\n/**\n *\n * The signing provider ID the wallet corresponds to.\n *\n */\nexport type SigningProviderId = string\n/**\n *\n * Name of signing provider's key to use for getting keys.\n *\n */\nexport type KeyName = string\n/**\n *\n * User id used while onboarding.\n *\n */\nexport type Username = string\n/**\n *\n * The origin (dApp URL) that initiated this transaction request.\n *\n */\nexport type Origin = string\n/**\n *\n * Onboarding session id required by the remaining self-issued onboarding methods.\n *\n */\nexport type SessionId = string\n/**\n *\n * The party ID corresponding to the wallet.\n *\n */\nexport type PartyId = string\n/**\n *\n * Filter wallets by network IDs.\n *\n */\nexport type NetworkIds = NetworkId[]\n/**\n *\n * Filter wallets by signing provider IDs.\n *\n */\nexport type SigningProviderIds = SigningProviderId[]\n/**\n *\n * Filter for the wallets to be returned.\n *\n */\nexport interface WalletFilter {\n networkIds?: NetworkIds\n signingProviderIds?: SigningProviderIds\n}\n/**\n *\n * The internal transaction identifier.\n *\n */\nexport type TransactionId = string\n/**\n *\n * The internal identifier of the pending message-signing request.\n *\n */\nexport type MessageId = string\n/**\n *\n * Limit of transactions to return.\n *\n */\nexport type Limit = number\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type CursorAsString = string\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type Cursor = CursorAsString\n/**\n *\n * The public key of the party.\n *\n */\nexport type PublicKey = string\n/**\n *\n * Authentication method configured for this network\n *\n */\nexport type AuthMethod = string\n/**\n *\n * Network metadata exposed by listNetworks without sensitive auth configuration\n *\n */\nexport interface PublicNetwork {\n id: NetworkId\n name: Name\n description: Description\n synchronizerId?: SynchronizerId\n identityProviderId: IdentityProviderId\n ledgerApi: LedgerApi\n authMethod: AuthMethod\n clientId?: ClientId\n scope?: Scope\n audience?: Audience\n}\nexport type Networks = PublicNetwork[]\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\nexport type Idps = Idp[]\n/**\n *\n * The status of the wallet.\n *\n */\nexport type WalletStatus = 'initialized' | 'allocated' | 'removed'\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type Hint = string\n/**\n *\n * The namespace of the party.\n *\n */\nexport type Namespace = string\n/**\n *\n * Unique identifier of the signed transaction given by the Signing Provider. This may not be the same as the internal txId given by the Wallet Gateway.\n *\n */\nexport type ExternalTxId = string\n/**\n *\n * The topology transactions\n *\n */\nexport type TopologyTransactions = string\n/**\n *\n * Whether the wallet is disabled. Wallets are disabled when no signing provider matches the party's namespace during sync. Disabled wallets use participant as the default signing provider.\n *\n */\nexport type Disabled = boolean\n/**\n *\n * Reason for the wallet state, e.g., 'no signing provider matched'.\n *\n */\nexport type Reason = string\n/**\n *\n * Whether the party authenticates the user with self-issued tokens.\n *\n */\nexport type IsAuthParty = boolean\nexport type PartyLevelRight = 'CanActAs' | 'CanReadAs' | 'CanExecuteAs'\n/**\n *\n * The rights of the wallet.\n *\n */\nexport type PartyRights = PartyLevelRight[]\n/**\n *\n * Structure representing a wallet\n *\n */\nexport interface Wallet {\n primary: Primary\n partyId: PartyId\n status: WalletStatus\n hint: Hint\n publicKey: PublicKey\n namespace: Namespace\n networkId: NetworkId\n signingProviderId: SigningProviderId\n externalTxId?: ExternalTxId\n topologyTransactions?: TopologyTransactions\n disabled?: Disabled\n reason?: Reason\n isAuthParty?: IsAuthParty\n rights: PartyRights\n}\n/**\n *\n * create when there is no ledger user yet. select when the user already authenticates with a primary party.\n *\n */\nexport type SelfIssuedLoginMode = 'create' | 'select'\ntype AlwaysTrue = any\n/**\n *\n * Party ids of non-disabled wallets added in this syncWallets call.\n *\n */\nexport type SyncWalletsResultAdded = PartyId[]\n/**\n *\n * Party ids of existing wallets whose status became initialized, whose rights changed, or whose isAuthParty flag changed in this syncWallets call.\n *\n */\nexport type SyncWalletsResultUpdated = PartyId[]\n/**\n *\n * Party ids of wallets added disabled, or existing wallets disabled, in this syncWallets call.\n *\n */\nexport type SyncWalletsResultDisabled = PartyId[]\n/**\n *\n * Whether wallet sync is needed. Returns true if there are disabled wallets or parties on the ledger that aren't in the store.\n *\n */\nexport type WalletSyncNeeded = boolean\nexport type TxStatusSigned = 'signed'\n/**\n *\n * The signature of the message.\n *\n */\nexport type Signature = string\nexport type SignedBy = string\nexport interface SignResultSigned {\n status: TxStatusSigned\n signature: Signature\n signedBy: SignedBy\n partyId: PartyId\n externalTxId?: ExternalTxId\n}\nexport type TxStatusPending = 'pending'\nexport interface SignResultPending {\n status: TxStatusPending\n partyId: PartyId\n externalTxId: ExternalTxId\n}\nexport type TxStatusRejected = 'rejected'\nexport interface SignResultRejected {\n status: TxStatusRejected\n partyId: PartyId\n externalTxId: ExternalTxId\n}\nexport type TxStatusFailed = 'failed'\nexport interface SignResultFailed {\n status: TxStatusFailed\n partyId: PartyId\n externalTxId: ExternalTxId\n}\n/**\n *\n * The status of the transaction.\n *\n */\nexport type Status = string\n/**\n *\n * Reason for why the transaction failed.\n *\n */\nexport type FailureReason = string\n/**\n *\n * The message to sign.\n *\n */\nexport type Message = string\n/**\n *\n * The timestamp when the API key was created.\n *\n */\nexport type CreatedAt = string\n/**\n *\n * The timestamp when the transaction was signed.\n *\n */\nexport type SignedAt = string\nexport interface MessageRaw {\n id: MessageId\n status: Status\n partyId: PartyId\n publicKey: PublicKey\n message: Message\n origin?: Origin\n createdAt: CreatedAt\n signedAt?: SignedAt\n signature?: Signature\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport type Messages = MessageRaw[]\nexport type UserLevelRight = 'CanReadAsAnyParty' | 'CanExecuteAsAnyParty'\n/**\n *\n * The rights of the user for the network.\n *\n */\nexport type UserRights = UserLevelRight[]\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n id: Id\n origin?: Origin\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n rights: UserRights\n}\nexport type Sessions = Session[]\n/**\n *\n * The unique identifier of the command associated with the transaction.\n *\n */\nexport type CommandId = string\n/**\n *\n * The transaction data corresponding to the command ID.\n *\n */\nexport type PreparedTransaction = string\n/**\n *\n * The hash of the prepared transaction.\n *\n */\nexport type PreparedTransactionHash = string\n/**\n *\n * Optional payload associated with the transaction.\n *\n */\nexport type Payload = string\nexport interface Transaction {\n id: TransactionId\n commandId: CommandId\n status: Status\n createdAt?: CreatedAt\n signedAt?: SignedAt\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n payload?: Payload\n origin?: Origin\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport type Transactions = Transaction[]\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type NextCursor = string\n/**\n *\n * Number of total transactions for the user.\n *\n */\nexport type Count = number\n/**\n *\n * The unique identifier of the current user.\n *\n */\nexport type UserIdentifier = string\n/**\n *\n * Whether the current user is an admin.\n *\n */\nexport type IsAdminFlag = boolean\n/**\n *\n * The generated API key.\n *\n */\nexport type ApiKeyResult = string\nexport interface ApiKey {\n id: Id\n name: Name\n createdAt: CreatedAt\n}\n/**\n *\n * The list of API keys.\n *\n */\nexport type ApiKeys = ApiKey[]\n/**\n *\n * The IDs of the available signing providers.\n *\n */\nexport type SigningProviders = SigningProviderId[]\nexport interface Key {\n id: Id\n name: Name\n publicKey: PublicKey\n}\n/**\n *\n * The list of signing provider's available keys.\n *\n */\nexport type Keys = Key[]\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface AddNetworkParams {\n network: Network\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\n}\nexport interface GetNetworkParams {\n networkId: NetworkId\n}\nexport interface SelfSignedAccessTokenParams {\n networkId: NetworkId\n clientId: ClientId\n clientSecret: ClientSecret\n}\nexport interface AddIdpParams {\n idp: Idp\n}\nexport interface RemoveIdpParams {\n identityProviderId: IdentityProviderId\n}\nexport interface CreateWalletParams {\n primary?: Primary\n partyHint: PartyHint\n signingProviderId: SigningProviderId\n keyName?: KeyName\n}\nexport interface StartSelfIssuedLoginSessionParams {\n username: Username\n networkId: NetworkId\n origin: Origin\n}\nexport interface GetSelfIssuedLoginModeParams {\n sessionId: SessionId\n}\nexport interface CreateSelfIssuedWalletParams {\n sessionId: SessionId\n partyHint: PartyHint\n signingProviderId: SigningProviderId\n}\nexport interface AllocateSelfIssuedWalletParams {\n sessionId: SessionId\n partyId: PartyId\n}\nexport interface CompleteSelfIssuedLoginParams {\n sessionId: SessionId\n partyId: PartyId\n}\nexport interface RemoveSelfIssuedLoginSessionParams {\n sessionId: SessionId\n}\nexport interface AllocatePartyForWalletParams {\n partyId: PartyId\n}\nexport interface SetPrimaryWalletParams {\n partyId: PartyId\n}\nexport interface RemoveWalletParams {\n partyId: PartyId\n}\nexport interface ListWalletsParams {\n filter?: WalletFilter\n}\nexport interface SignParams {\n transactionId: TransactionId\n partyId: PartyId\n}\nexport interface SignMessageParams {\n messageId: MessageId\n partyId?: PartyId\n}\nexport interface GetSignMessageStatusParams {\n messageId: MessageId\n}\nexport interface GetMessageToSignParams {\n messageId: MessageId\n}\nexport interface DeleteMessageToSignParams {\n messageId: MessageId\n}\nexport interface ExecuteParams {\n partyId: PartyId\n transactionId: TransactionId\n}\nexport interface AddSessionParams {\n origin: Origin\n networkId: NetworkId\n}\nexport interface GetTransactionParams {\n transactionId: TransactionId\n}\nexport interface GetTransactionStatusParams {\n transactionId: TransactionId\n partyId?: PartyId\n}\nexport interface ListTransactionsParams {\n limit?: Limit\n cursor?: Cursor\n}\nexport interface DeleteTransactionParams {\n transactionId: TransactionId\n}\nexport interface GenerateApiKeyParams {\n name: Name\n}\nexport interface RemoveApiKeyParams {\n id: Id\n}\nexport interface ListSigningProviderKeysParams {\n signingProviderId: SigningProviderId\n}\nexport interface GetWalletParams {\n partyId: PartyId\n}\nexport interface ChangeSigningProviderParams {\n signingProviderId: SigningProviderId\n partyId: PartyId\n publicKey: PublicKey\n}\nexport interface ListNetworksResult {\n networks: Networks\n}\nexport interface GetNetworkResult {\n network: Network\n}\nexport interface SelfSignedAccessTokenResult {\n accessToken: AccessToken\n}\nexport interface ListIdpsResult {\n idps: Idps\n}\nexport interface CreateWalletResult {\n wallet: Wallet\n}\nexport interface StartSelfIssuedLoginSessionResult {\n sessionId: SessionId\n}\nexport interface GetSelfIssuedLoginModeResult {\n mode: SelfIssuedLoginMode\n wallet?: Wallet\n}\nexport interface CreateSelfIssuedWalletResult {\n wallet: Wallet\n}\nexport interface AllocateSelfIssuedWalletResult {\n wallet: Wallet\n}\nexport interface CompleteSelfIssuedLoginResult {\n wallet: Wallet\n accessToken: AccessToken\n sessionId: SessionId\n}\nexport interface AllocatePartyForWalletResult {\n wallet: Wallet\n}\nexport interface RemovePartyResult {\n [key: string]: any\n}\n/**\n *\n * An array of wallets that match the filter criteria.\n *\n */\nexport type ListWalletsResult = Wallet[]\n/**\n *\n * Added, updated and disabled wallets as a result of the sync.\n *\n */\nexport interface SyncWalletsResult {\n added: SyncWalletsResultAdded\n updated: SyncWalletsResultUpdated\n disabled: SyncWalletsResultDisabled\n}\nexport interface IsWalletSyncNeededResult {\n walletSyncNeeded: WalletSyncNeeded\n}\nexport type SignResult =\n | SignResultSigned\n | SignResultPending\n | SignResultRejected\n | SignResultFailed\nexport interface SignMessageResult {\n signature?: Signature\n publicKey: PublicKey\n status: Status\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface GetSignMessageStatusResult {\n status: Status\n externalTxId?: ExternalTxId\n signature?: Signature\n failureReason?: FailureReason\n}\nexport interface GetMessageToSignResult {\n message: MessageRaw\n}\nexport interface ListMessagesToSignResult {\n messages: Messages\n}\nexport interface ExecuteResult {\n [key: string]: any\n}\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface AddSessionResult {\n id: Id\n origin?: Origin\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n rights: UserRights\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n}\nexport interface GetTransactionResult {\n id: TransactionId\n commandId: CommandId\n status: Status\n createdAt?: CreatedAt\n signedAt?: SignedAt\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n payload?: Payload\n origin?: Origin\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface GetTransactionStatusResult {\n status: Status\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface ListTransactionsResult {\n transactions: Transactions\n nextCursor?: NextCursor\n count: Count\n}\nexport interface GetUserResult {\n userId: UserIdentifier\n isAdmin: IsAdminFlag\n}\nexport interface GeneratedApiKey {\n id: Id\n apiKey: ApiKeyResult\n}\nexport interface ListApiKeysResult {\n apiKeys: ApiKeys\n}\nexport interface ListSigningProvidersResult {\n signingProviders: SigningProviders\n}\nexport interface ListSigningProviderKeysResult {\n keys: Keys\n}\nexport type GetWalletResult = Wallet | Null\n/**\n *\n * Generated! Represents an alias to any of the provided schemas\n *\n */\n\nexport type AddNetwork = (params: AddNetworkParams) => Promise<Null>\nexport type RemoveNetwork = (params: RemoveNetworkParams) => Promise<Null>\nexport type ListNetworks = () => Promise<ListNetworksResult>\nexport type GetNetwork = (params: GetNetworkParams) => Promise<GetNetworkResult>\nexport type SelfSignedAccessToken = (\n params: SelfSignedAccessTokenParams\n) => Promise<SelfSignedAccessTokenResult>\nexport type AddIdp = (params: AddIdpParams) => Promise<Null>\nexport type RemoveIdp = (params: RemoveIdpParams) => Promise<Null>\nexport type ListIdps = () => Promise<ListIdpsResult>\nexport type CreateWallet = (\n params: CreateWalletParams\n) => Promise<CreateWalletResult>\nexport type StartSelfIssuedLoginSession = (\n params: StartSelfIssuedLoginSessionParams\n) => Promise<StartSelfIssuedLoginSessionResult>\nexport type GetSelfIssuedLoginMode = (\n params: GetSelfIssuedLoginModeParams\n) => Promise<GetSelfIssuedLoginModeResult>\nexport type CreateSelfIssuedWallet = (\n params: CreateSelfIssuedWalletParams\n) => Promise<CreateSelfIssuedWalletResult>\nexport type AllocateSelfIssuedWallet = (\n params: AllocateSelfIssuedWalletParams\n) => Promise<AllocateSelfIssuedWalletResult>\nexport type CompleteSelfIssuedLogin = (\n params: CompleteSelfIssuedLoginParams\n) => Promise<CompleteSelfIssuedLoginResult>\nexport type RemoveSelfIssuedLoginSession = (\n params: RemoveSelfIssuedLoginSessionParams\n) => Promise<Null>\nexport type AllocatePartyForWallet = (\n params: AllocatePartyForWalletParams\n) => Promise<AllocatePartyForWalletResult>\nexport type SetPrimaryWallet = (params: SetPrimaryWalletParams) => Promise<Null>\nexport type RemoveWallet = (\n params: RemoveWalletParams\n) => Promise<RemovePartyResult>\nexport type ListWallets = (\n params: ListWalletsParams\n) => Promise<ListWalletsResult>\nexport type SyncWallets = () => Promise<SyncWalletsResult>\nexport type IsWalletSyncNeeded = () => Promise<IsWalletSyncNeededResult>\nexport type Sign = (params: SignParams) => Promise<SignResult>\nexport type SignMessage = (\n params: SignMessageParams\n) => Promise<SignMessageResult>\nexport type GetSignMessageStatus = (\n params: GetSignMessageStatusParams\n) => Promise<GetSignMessageStatusResult>\nexport type GetMessageToSign = (\n params: GetMessageToSignParams\n) => Promise<GetMessageToSignResult>\nexport type ListMessagesToSign = () => Promise<ListMessagesToSignResult>\nexport type DeleteMessageToSign = (\n params: DeleteMessageToSignParams\n) => Promise<Null>\nexport type Execute = (params: ExecuteParams) => Promise<ExecuteResult>\nexport type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>\nexport type RemoveSession = () => Promise<Null>\nexport type ListSessions = () => Promise<ListSessionsResult>\nexport type GetTransaction = (\n params: GetTransactionParams\n) => Promise<GetTransactionResult>\nexport type GetTransactionStatus = (\n params: GetTransactionStatusParams\n) => Promise<GetTransactionStatusResult>\nexport type ListTransactions = (\n params: ListTransactionsParams\n) => Promise<ListTransactionsResult>\nexport type DeleteTransaction = (\n params: DeleteTransactionParams\n) => Promise<Null>\nexport type GetUser = () => Promise<GetUserResult>\nexport type GenerateApiKey = (\n params: GenerateApiKeyParams\n) => Promise<GeneratedApiKey>\nexport type ListApiKeys = () => Promise<ListApiKeysResult>\nexport type RemoveApiKey = (params: RemoveApiKeyParams) => Promise<Null>\nexport type ListSigningProviders = () => Promise<ListSigningProvidersResult>\nexport type ListSigningProviderKeys = (\n params: ListSigningProviderKeysParams\n) => Promise<ListSigningProviderKeysResult>\nexport type GetWallet = (params: GetWalletParams) => Promise<GetWalletResult>\nexport type ChangeSigningProvider = (\n params: ChangeSigningProviderParams\n) => Promise<Null>\n/* oxlint-enable no-unused-vars */\n\ntype Params<T> = T extends (...args: infer A) => any\n ? A extends []\n ? never\n : A[0]\n : never\ntype Result<T> = T extends (...args: any[]) => Promise<infer R> ? R : never\n\nexport type RpcTypes = {\n addNetwork: {\n params: Params<AddNetwork>\n result: Result<AddNetwork>\n }\n\n removeNetwork: {\n params: Params<RemoveNetwork>\n result: Result<RemoveNetwork>\n }\n\n listNetworks: {\n params: Params<ListNetworks>\n result: Result<ListNetworks>\n }\n\n getNetwork: {\n params: Params<GetNetwork>\n result: Result<GetNetwork>\n }\n\n selfSignedAccessToken: {\n params: Params<SelfSignedAccessToken>\n result: Result<SelfSignedAccessToken>\n }\n\n addIdp: {\n params: Params<AddIdp>\n result: Result<AddIdp>\n }\n\n removeIdp: {\n params: Params<RemoveIdp>\n result: Result<RemoveIdp>\n }\n\n listIdps: {\n params: Params<ListIdps>\n result: Result<ListIdps>\n }\n\n createWallet: {\n params: Params<CreateWallet>\n result: Result<CreateWallet>\n }\n\n startSelfIssuedLoginSession: {\n params: Params<StartSelfIssuedLoginSession>\n result: Result<StartSelfIssuedLoginSession>\n }\n\n getSelfIssuedLoginMode: {\n params: Params<GetSelfIssuedLoginMode>\n result: Result<GetSelfIssuedLoginMode>\n }\n\n createSelfIssuedWallet: {\n params: Params<CreateSelfIssuedWallet>\n result: Result<CreateSelfIssuedWallet>\n }\n\n allocateSelfIssuedWallet: {\n params: Params<AllocateSelfIssuedWallet>\n result: Result<AllocateSelfIssuedWallet>\n }\n\n completeSelfIssuedLogin: {\n params: Params<CompleteSelfIssuedLogin>\n result: Result<CompleteSelfIssuedLogin>\n }\n\n removeSelfIssuedLoginSession: {\n params: Params<RemoveSelfIssuedLoginSession>\n result: Result<RemoveSelfIssuedLoginSession>\n }\n\n allocatePartyForWallet: {\n params: Params<AllocatePartyForWallet>\n result: Result<AllocatePartyForWallet>\n }\n\n setPrimaryWallet: {\n params: Params<SetPrimaryWallet>\n result: Result<SetPrimaryWallet>\n }\n\n removeWallet: {\n params: Params<RemoveWallet>\n result: Result<RemoveWallet>\n }\n\n listWallets: {\n params: Params<ListWallets>\n result: Result<ListWallets>\n }\n\n syncWallets: {\n params: Params<SyncWallets>\n result: Result<SyncWallets>\n }\n\n isWalletSyncNeeded: {\n params: Params<IsWalletSyncNeeded>\n result: Result<IsWalletSyncNeeded>\n }\n\n sign: {\n params: Params<Sign>\n result: Result<Sign>\n }\n\n signMessage: {\n params: Params<SignMessage>\n result: Result<SignMessage>\n }\n\n getSignMessageStatus: {\n params: Params<GetSignMessageStatus>\n result: Result<GetSignMessageStatus>\n }\n\n getMessageToSign: {\n params: Params<GetMessageToSign>\n result: Result<GetMessageToSign>\n }\n\n listMessagesToSign: {\n params: Params<ListMessagesToSign>\n result: Result<ListMessagesToSign>\n }\n\n deleteMessageToSign: {\n params: Params<DeleteMessageToSign>\n result: Result<DeleteMessageToSign>\n }\n\n execute: {\n params: Params<Execute>\n result: Result<Execute>\n }\n\n addSession: {\n params: Params<AddSession>\n result: Result<AddSession>\n }\n\n removeSession: {\n params: Params<RemoveSession>\n result: Result<RemoveSession>\n }\n\n listSessions: {\n params: Params<ListSessions>\n result: Result<ListSessions>\n }\n\n getTransaction: {\n params: Params<GetTransaction>\n result: Result<GetTransaction>\n }\n\n getTransactionStatus: {\n params: Params<GetTransactionStatus>\n result: Result<GetTransactionStatus>\n }\n\n listTransactions: {\n params: Params<ListTransactions>\n result: Result<ListTransactions>\n }\n\n deleteTransaction: {\n params: Params<DeleteTransaction>\n result: Result<DeleteTransaction>\n }\n\n getUser: {\n params: Params<GetUser>\n result: Result<GetUser>\n }\n\n generateApiKey: {\n params: Params<GenerateApiKey>\n result: Result<GenerateApiKey>\n }\n\n listApiKeys: {\n params: Params<ListApiKeys>\n result: Result<ListApiKeys>\n }\n\n removeApiKey: {\n params: Params<RemoveApiKey>\n result: Result<RemoveApiKey>\n }\n\n listSigningProviders: {\n params: Params<ListSigningProviders>\n result: Result<ListSigningProviders>\n }\n\n listSigningProviderKeys: {\n params: Params<ListSigningProviderKeys>\n result: Result<ListSigningProviderKeys>\n }\n\n getWallet: {\n params: Params<GetWallet>\n result: Result<GetWallet>\n }\n\n changeSigningProvider: {\n params: Params<ChangeSigningProvider>\n result: Result<ChangeSigningProvider>\n }\n}\n\nexport class WalletJSONRPCUserAPI {\n public transport: RpcTransport\n\n constructor(transport: RpcTransport) {\n this.transport = transport\n }\n\n public async request<M extends keyof RpcTypes>(\n args: RequestArgs<RpcTypes, M>\n ): Promise<RpcTypes[M]['result']> {\n const response = await this.transport.submit(args as RequestPayload)\n return response.result as RpcTypes[M]['result']\n }\n}\nexport default WalletJSONRPCUserAPI\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgsCA,IAAa,uBAAb,MAAkC;CAG9B,YAAY,WAAyB;EAF9B,gBAAA,MAAA,aAAA,KAAA,CAAA;EAGH,KAAK,YAAY;CACrB;CAEA,MAAa,QACT,MAC8B;EAE9B,QAAO,MADgB,KAAK,UAAU,OAAO,IAAsB,EAAA,CACnD;CACpB;AACJ"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// Code generated by @open-rpc/generator DO NOT EDIT.\nimport type { RequestArgs, RequestPayload } from '@canton-network/core-types'\nimport type { RpcTransport } from '@canton-network/core-rpc-transport'\n\n/* oxlint-disable no-unused-vars */\n/**\n *\n * The network ID the wallet corresponds to.\n *\n */\nexport type NetworkId = string\nexport type Name = string\n/**\n *\n * Description of network\n *\n */\nexport type Description = string\n/**\n *\n * Synchronizer ID\n *\n */\nexport type SynchronizerId = string\n/**\n *\n * Identity Provider ID\n *\n */\nexport type IdentityProviderId = string\nexport type AuthorizationCodeAuthMethod = 'authorization_code'\nexport type Scope = string\nexport type ClientId = string\n/**\n *\n * Bare participant ID, with no https://daml.com/jwt/aud/participant/ prefix (unlike the other auth methods).\n *\n */\nexport type Audience = string\ntype AlwaysFalse = any\n/**\n *\n * Authorization code authentication configuration\n *\n */\nexport interface AuthorizationCodeAuth {\n method: AuthorizationCodeAuthMethod\n scope: Scope\n clientId: ClientId\n audience: Audience\n}\nexport type ClientCredentialsAuthMethod = 'client_credentials'\n/**\n *\n * Overrides the network's identity provider for client credentials token acquisition\n *\n */\nexport type ClientCredentialsIdentityProviderId = string\nexport type ClientSecret = string\n/**\n *\n * Client credentials authentication configuration\n *\n */\nexport interface ClientCredentialsAuth {\n method: ClientCredentialsAuthMethod\n identityProviderId?: ClientCredentialsIdentityProviderId\n scope: Scope\n clientId: ClientId\n clientSecret: ClientSecret\n audience: Audience\n}\nexport type SelfSignedAuthMethod = 'self_signed'\n/**\n *\n * Issuer of identity provider\n *\n */\nexport type Issuer = string\n/**\n *\n * Self-signed authentication configuration\n *\n */\nexport interface SelfSignedAuth {\n method: SelfSignedAuthMethod\n scope: Scope\n clientId: ClientId\n clientSecret: ClientSecret\n issuer: Issuer\n audience: Audience\n}\nexport type SelfIssuedAuthMethod = 'self_issued'\n/**\n *\n * Self-issued authentication configuration\n *\n */\nexport interface SelfIssuedAuth {\n method: SelfIssuedAuthMethod\n scope: Scope\n audience: Audience\n}\n/**\n *\n * Authentication configuration for a network\n *\n */\nexport type Auth =\n | AuthorizationCodeAuth\n | ClientCredentialsAuth\n | SelfSignedAuth\n | SelfIssuedAuth\n/**\n *\n * Ledger api url\n *\n */\nexport type LedgerApi = string\n/**\n *\n * Connected network metadata. Privileged credentials (adminAuth, serviceAccountAuth) are included only for the admin user.\n *\n */\nexport interface Network {\n id: NetworkId\n name: Name\n description: Description\n synchronizerId?: SynchronizerId\n identityProviderId: IdentityProviderId\n auth: Auth\n adminAuth?: Auth\n serviceAccountAuth?: Auth\n ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\nexport type Id = string\n/**\n *\n * OAuth identity provider\n *\n */\nexport type OauthIdpType = 'oauth'\n/**\n *\n * The configuration URL for the identity provider.\n *\n */\nexport type ConfigUrl = string\nexport interface OauthIdp {\n id: Id\n type: OauthIdpType\n issuer: Issuer\n configUrl: ConfigUrl\n}\n/**\n *\n * Self-signed identity provider\n *\n */\nexport type SelfSignedIdpType = 'self_signed'\nexport interface SelfSignedIdp {\n id: Id\n type: SelfSignedIdpType\n issuer: Issuer\n}\n/**\n *\n * Self-issued identity provider\n *\n */\nexport type SelfIssuedIdpType = 'self_issued'\nexport interface SelfIssuedIdp {\n id: Id\n type: SelfIssuedIdpType\n}\n/**\n *\n * Structure representing an identity provider\n *\n */\nexport type Idp = OauthIdp | SelfSignedIdp | SelfIssuedIdp\n/**\n *\n * Set as primary wallet for dApp usage.\n *\n */\nexport type Primary = boolean\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type PartyHint = string\n/**\n *\n * The signing provider ID the wallet corresponds to.\n *\n */\nexport type SigningProviderId = string\n/**\n *\n * Name of signing provider's key to use for getting keys.\n *\n */\nexport type KeyName = string\n/**\n *\n * User id used while onboarding.\n *\n */\nexport type Username = string\n/**\n *\n * The origin (dApp URL) that initiated this transaction request.\n *\n */\nexport type Origin = string\n/**\n *\n * Onboarding session id required by the remaining self-issued onboarding methods.\n *\n */\nexport type SessionId = string\n/**\n *\n * The party ID corresponding to the wallet.\n *\n */\nexport type PartyId = string\n/**\n *\n * Filter wallets by network IDs.\n *\n */\nexport type NetworkIds = NetworkId[]\n/**\n *\n * Filter wallets by signing provider IDs.\n *\n */\nexport type SigningProviderIds = SigningProviderId[]\n/**\n *\n * Filter for the wallets to be returned.\n *\n */\nexport interface WalletFilter {\n networkIds?: NetworkIds\n signingProviderIds?: SigningProviderIds\n}\n/**\n *\n * The internal transaction identifier.\n *\n */\nexport type TransactionId = string\n/**\n *\n * The internal identifier of the pending message-signing request.\n *\n */\nexport type MessageId = string\n/**\n *\n * Limit of transactions to return.\n *\n */\nexport type Limit = number\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type CursorAsString = string\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type Cursor = CursorAsString\n/**\n *\n * The public key of the party.\n *\n */\nexport type PublicKey = string\n/**\n *\n * Authentication method configured for this network\n *\n */\nexport type AuthMethod = string\n/**\n *\n * Network metadata exposed by listNetworks without sensitive auth configuration\n *\n */\nexport interface PublicNetwork {\n id: NetworkId\n name: Name\n description: Description\n synchronizerId?: SynchronizerId\n identityProviderId: IdentityProviderId\n ledgerApi: LedgerApi\n authMethod: AuthMethod\n clientId?: ClientId\n scope?: Scope\n audience?: Audience\n}\nexport type Networks = PublicNetwork[]\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\nexport type Idps = Idp[]\n/**\n *\n * The status of the wallet.\n *\n */\nexport type WalletStatus = 'initialized' | 'allocated' | 'removed'\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type Hint = string\n/**\n *\n * The namespace of the party.\n *\n */\nexport type Namespace = string\n/**\n *\n * Unique identifier of the signed transaction given by the Signing Provider. This may not be the same as the internal txId given by the Wallet Gateway.\n *\n */\nexport type ExternalTxId = string\n/**\n *\n * The topology transactions\n *\n */\nexport type TopologyTransactions = string\n/**\n *\n * Whether the wallet is disabled. Wallets are disabled when no signing provider matches the party's namespace during sync. Disabled wallets use participant as the default signing provider.\n *\n */\nexport type Disabled = boolean\n/**\n *\n * Reason for the wallet state, e.g., 'no signing provider matched'.\n *\n */\nexport type Reason = string\n/**\n *\n * Whether the party authenticates the user with self-issued tokens.\n *\n */\nexport type IsAuthParty = boolean\nexport type PartyLevelRight = 'CanActAs' | 'CanReadAs' | 'CanExecuteAs'\n/**\n *\n * The rights of the wallet.\n *\n */\nexport type PartyRights = PartyLevelRight[]\n/**\n *\n * Structure representing a wallet\n *\n */\nexport interface Wallet {\n primary: Primary\n partyId: PartyId\n status: WalletStatus\n hint: Hint\n publicKey: PublicKey\n namespace: Namespace\n networkId: NetworkId\n signingProviderId: SigningProviderId\n externalTxId?: ExternalTxId\n topologyTransactions?: TopologyTransactions\n disabled?: Disabled\n reason?: Reason\n isAuthParty?: IsAuthParty\n rights: PartyRights\n}\n/**\n *\n * create when there is no ledger user yet. select when the user already authenticates with a primary party.\n *\n */\nexport type SelfIssuedLoginMode = 'create' | 'select'\ntype AlwaysTrue = any\n/**\n *\n * Party ids of non-disabled wallets added in this syncWallets call.\n *\n */\nexport type SyncWalletsResultAdded = PartyId[]\n/**\n *\n * Party ids of existing wallets whose status became initialized, whose rights changed, or whose isAuthParty flag changed in this syncWallets call.\n *\n */\nexport type SyncWalletsResultUpdated = PartyId[]\n/**\n *\n * Party ids of wallets added disabled, or existing wallets disabled, in this syncWallets call.\n *\n */\nexport type SyncWalletsResultDisabled = PartyId[]\n/**\n *\n * Whether wallet sync is needed. Returns true if there are disabled wallets or parties on the ledger that aren't in the store.\n *\n */\nexport type WalletSyncNeeded = boolean\nexport type TxStatusSigned = 'signed'\n/**\n *\n * The signature of the message.\n *\n */\nexport type Signature = string\nexport type SignedBy = string\nexport interface SignResultSigned {\n status: TxStatusSigned\n signature: Signature\n signedBy: SignedBy\n partyId: PartyId\n externalTxId?: ExternalTxId\n}\nexport type TxStatusPending = 'pending'\nexport interface SignResultPending {\n status: TxStatusPending\n partyId: PartyId\n externalTxId: ExternalTxId\n}\nexport type TxStatusRejected = 'rejected'\nexport interface SignResultRejected {\n status: TxStatusRejected\n partyId: PartyId\n externalTxId: ExternalTxId\n}\nexport type TxStatusFailed = 'failed'\nexport interface SignResultFailed {\n status: TxStatusFailed\n partyId: PartyId\n externalTxId: ExternalTxId\n}\n/**\n *\n * The status of the transaction.\n *\n */\nexport type Status = string\n/**\n *\n * Reason for why the transaction failed.\n *\n */\nexport type FailureReason = string\n/**\n *\n * The message to sign.\n *\n */\nexport type Message = string\n/**\n *\n * The timestamp when the API key was created.\n *\n */\nexport type CreatedAt = string\n/**\n *\n * The timestamp when the transaction was signed.\n *\n */\nexport type SignedAt = string\nexport interface MessageRaw {\n id: MessageId\n status: Status\n partyId: PartyId\n publicKey: PublicKey\n message: Message\n origin?: Origin\n createdAt: CreatedAt\n signedAt?: SignedAt\n signature?: Signature\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport type Messages = MessageRaw[]\nexport type UserLevelRight = 'CanReadAsAnyParty' | 'CanExecuteAsAnyParty'\n/**\n *\n * The rights of the user for the network.\n *\n */\nexport type UserRights = UserLevelRight[]\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n id: Id\n origin?: Origin\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n rights: UserRights\n}\nexport type Sessions = Session[]\n/**\n *\n * The unique identifier of the command associated with the transaction.\n *\n */\nexport type CommandId = string\n/**\n *\n * The transaction data corresponding to the command ID.\n *\n */\nexport type PreparedTransaction = string\n/**\n *\n * The hash of the prepared transaction.\n *\n */\nexport type PreparedTransactionHash = string\n/**\n *\n * Optional payload associated with the transaction.\n *\n */\nexport type Payload = string\nexport interface Transaction {\n id: TransactionId\n commandId: CommandId\n status: Status\n createdAt?: CreatedAt\n signedAt?: SignedAt\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n payload?: Payload\n origin?: Origin\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport type Transactions = Transaction[]\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type NextCursor = string\n/**\n *\n * Number of total transactions for the user.\n *\n */\nexport type Count = number\n/**\n *\n * The unique identifier of the current user.\n *\n */\nexport type UserIdentifier = string\n/**\n *\n * Whether the current user is an admin.\n *\n */\nexport type IsAdminFlag = boolean\n/**\n *\n * The generated API key.\n *\n */\nexport type ApiKeyResult = string\nexport interface ApiKey {\n id: Id\n name: Name\n createdAt: CreatedAt\n}\n/**\n *\n * The list of API keys.\n *\n */\nexport type ApiKeys = ApiKey[]\n/**\n *\n * The IDs of the available signing providers.\n *\n */\nexport type SigningProviders = SigningProviderId[]\nexport interface Key {\n id: Id\n name: Name\n publicKey: PublicKey\n}\n/**\n *\n * The list of signing provider's available keys.\n *\n */\nexport type Keys = Key[]\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface AddNetworkParams {\n network: Network\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\n}\nexport interface GetNetworkParams {\n networkId: NetworkId\n}\nexport interface SelfSignedAccessTokenParams {\n networkId: NetworkId\n clientId: ClientId\n clientSecret: ClientSecret\n}\nexport interface AddIdpParams {\n idp: Idp\n}\nexport interface RemoveIdpParams {\n identityProviderId: IdentityProviderId\n}\nexport interface CreateWalletParams {\n primary?: Primary\n partyHint: PartyHint\n signingProviderId: SigningProviderId\n keyName?: KeyName\n}\nexport interface StartSelfIssuedLoginSessionParams {\n username: Username\n networkId: NetworkId\n origin: Origin\n}\nexport interface GetSelfIssuedLoginModeParams {\n sessionId: SessionId\n}\nexport interface CreateSelfIssuedWalletParams {\n sessionId: SessionId\n partyHint: PartyHint\n signingProviderId: SigningProviderId\n}\nexport interface AllocateSelfIssuedWalletParams {\n sessionId: SessionId\n partyId: PartyId\n}\nexport interface CompleteSelfIssuedLoginParams {\n sessionId: SessionId\n partyId: PartyId\n}\nexport interface RemoveSelfIssuedLoginSessionParams {\n sessionId: SessionId\n}\nexport interface AllocatePartyForWalletParams {\n partyId: PartyId\n}\nexport interface SetPrimaryWalletParams {\n partyId: PartyId\n}\nexport interface RemoveWalletParams {\n partyId: PartyId\n}\nexport interface ListWalletsParams {\n filter?: WalletFilter\n}\nexport interface SignParams {\n transactionId: TransactionId\n partyId: PartyId\n}\nexport interface SignMessageParams {\n messageId: MessageId\n partyId?: PartyId\n}\nexport interface GetSignMessageStatusParams {\n messageId: MessageId\n}\nexport interface GetMessageToSignParams {\n messageId: MessageId\n}\nexport interface DeleteMessageToSignParams {\n messageId: MessageId\n}\nexport interface ExecuteParams {\n partyId: PartyId\n transactionId: TransactionId\n}\nexport interface AddSessionParams {\n origin: Origin\n networkId: NetworkId\n}\nexport interface GetTransactionParams {\n transactionId: TransactionId\n}\nexport interface GetTransactionStatusParams {\n transactionId: TransactionId\n partyId?: PartyId\n}\nexport interface ListTransactionsParams {\n limit?: Limit\n cursor?: Cursor\n}\nexport interface DeleteTransactionParams {\n transactionId: TransactionId\n}\nexport interface GenerateApiKeyParams {\n name: Name\n}\nexport interface RemoveApiKeyParams {\n id: Id\n}\nexport interface ListSigningProviderKeysParams {\n signingProviderId: SigningProviderId\n}\nexport interface GetWalletParams {\n partyId: PartyId\n}\nexport interface ChangeSigningProviderParams {\n signingProviderId: SigningProviderId\n partyId: PartyId\n publicKey: PublicKey\n}\nexport interface ListNetworksResult {\n networks: Networks\n}\nexport interface GetNetworkResult {\n network: Network\n}\nexport interface SelfSignedAccessTokenResult {\n accessToken: AccessToken\n}\nexport interface ListIdpsResult {\n idps: Idps\n}\nexport interface CreateWalletResult {\n wallet: Wallet\n}\nexport interface StartSelfIssuedLoginSessionResult {\n sessionId: SessionId\n}\nexport interface GetSelfIssuedLoginModeResult {\n mode: SelfIssuedLoginMode\n wallet?: Wallet\n}\nexport interface CreateSelfIssuedWalletResult {\n wallet: Wallet\n}\nexport interface AllocateSelfIssuedWalletResult {\n wallet: Wallet\n}\nexport interface CompleteSelfIssuedLoginResult {\n wallet: Wallet\n accessToken: AccessToken\n sessionId: SessionId\n}\nexport interface AllocatePartyForWalletResult {\n wallet: Wallet\n}\nexport interface RemovePartyResult {\n [key: string]: any\n}\n/**\n *\n * An array of wallets that match the filter criteria.\n *\n */\nexport type ListWalletsResult = Wallet[]\n/**\n *\n * Added, updated and disabled wallets as a result of the sync.\n *\n */\nexport interface SyncWalletsResult {\n added: SyncWalletsResultAdded\n updated: SyncWalletsResultUpdated\n disabled: SyncWalletsResultDisabled\n}\nexport interface IsWalletSyncNeededResult {\n walletSyncNeeded: WalletSyncNeeded\n}\nexport type SignResult =\n | SignResultSigned\n | SignResultPending\n | SignResultRejected\n | SignResultFailed\nexport interface SignMessageResult {\n signature?: Signature\n publicKey: PublicKey\n status: Status\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface GetSignMessageStatusResult {\n status: Status\n externalTxId?: ExternalTxId\n signature?: Signature\n failureReason?: FailureReason\n}\nexport interface GetMessageToSignResult {\n message: MessageRaw\n}\nexport interface ListMessagesToSignResult {\n messages: Messages\n}\nexport interface ExecuteResult {\n [key: string]: any\n}\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface AddSessionResult {\n id: Id\n origin?: Origin\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n rights: UserRights\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n}\nexport interface GetTransactionResult {\n id: TransactionId\n commandId: CommandId\n status: Status\n createdAt?: CreatedAt\n signedAt?: SignedAt\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n payload?: Payload\n origin?: Origin\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface GetTransactionStatusResult {\n status: Status\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface ListTransactionsResult {\n transactions: Transactions\n nextCursor?: NextCursor\n count: Count\n}\nexport interface GetUserResult {\n userId: UserIdentifier\n isAdmin: IsAdminFlag\n}\nexport interface GeneratedApiKey {\n id: Id\n apiKey: ApiKeyResult\n}\nexport interface ListApiKeysResult {\n apiKeys: ApiKeys\n}\nexport interface ListSigningProvidersResult {\n signingProviders: SigningProviders\n}\nexport interface ListSigningProviderKeysResult {\n keys: Keys\n}\nexport type GetWalletResult = Wallet | Null\n/**\n *\n * Generated! Represents an alias to any of the provided schemas\n *\n */\n\nexport type AddNetwork = (params: AddNetworkParams) => Promise<Null>\nexport type RemoveNetwork = (params: RemoveNetworkParams) => Promise<Null>\nexport type ListNetworks = () => Promise<ListNetworksResult>\nexport type GetNetwork = (params: GetNetworkParams) => Promise<GetNetworkResult>\nexport type SelfSignedAccessToken = (\n params: SelfSignedAccessTokenParams\n) => Promise<SelfSignedAccessTokenResult>\nexport type AddIdp = (params: AddIdpParams) => Promise<Null>\nexport type RemoveIdp = (params: RemoveIdpParams) => Promise<Null>\nexport type ListIdps = () => Promise<ListIdpsResult>\nexport type CreateWallet = (\n params: CreateWalletParams\n) => Promise<CreateWalletResult>\nexport type StartSelfIssuedLoginSession = (\n params: StartSelfIssuedLoginSessionParams\n) => Promise<StartSelfIssuedLoginSessionResult>\nexport type GetSelfIssuedLoginMode = (\n params: GetSelfIssuedLoginModeParams\n) => Promise<GetSelfIssuedLoginModeResult>\nexport type CreateSelfIssuedWallet = (\n params: CreateSelfIssuedWalletParams\n) => Promise<CreateSelfIssuedWalletResult>\nexport type AllocateSelfIssuedWallet = (\n params: AllocateSelfIssuedWalletParams\n) => Promise<AllocateSelfIssuedWalletResult>\nexport type CompleteSelfIssuedLogin = (\n params: CompleteSelfIssuedLoginParams\n) => Promise<CompleteSelfIssuedLoginResult>\nexport type RemoveSelfIssuedLoginSession = (\n params: RemoveSelfIssuedLoginSessionParams\n) => Promise<Null>\nexport type AllocatePartyForWallet = (\n params: AllocatePartyForWalletParams\n) => Promise<AllocatePartyForWalletResult>\nexport type SetPrimaryWallet = (params: SetPrimaryWalletParams) => Promise<Null>\nexport type RemoveWallet = (\n params: RemoveWalletParams\n) => Promise<RemovePartyResult>\nexport type ListWallets = (\n params: ListWalletsParams\n) => Promise<ListWalletsResult>\nexport type SyncWallets = () => Promise<SyncWalletsResult>\nexport type IsWalletSyncNeeded = () => Promise<IsWalletSyncNeededResult>\nexport type Sign = (params: SignParams) => Promise<SignResult>\nexport type SignMessage = (\n params: SignMessageParams\n) => Promise<SignMessageResult>\nexport type GetSignMessageStatus = (\n params: GetSignMessageStatusParams\n) => Promise<GetSignMessageStatusResult>\nexport type GetMessageToSign = (\n params: GetMessageToSignParams\n) => Promise<GetMessageToSignResult>\nexport type ListMessagesToSign = () => Promise<ListMessagesToSignResult>\nexport type DeleteMessageToSign = (\n params: DeleteMessageToSignParams\n) => Promise<Null>\nexport type Execute = (params: ExecuteParams) => Promise<ExecuteResult>\nexport type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>\nexport type RemoveSession = () => Promise<Null>\nexport type ListSessions = () => Promise<ListSessionsResult>\nexport type GetTransaction = (\n params: GetTransactionParams\n) => Promise<GetTransactionResult>\nexport type GetTransactionStatus = (\n params: GetTransactionStatusParams\n) => Promise<GetTransactionStatusResult>\nexport type ListTransactions = (\n params: ListTransactionsParams\n) => Promise<ListTransactionsResult>\nexport type DeleteTransaction = (\n params: DeleteTransactionParams\n) => Promise<Null>\nexport type GetUser = () => Promise<GetUserResult>\nexport type GenerateApiKey = (\n params: GenerateApiKeyParams\n) => Promise<GeneratedApiKey>\nexport type ListApiKeys = () => Promise<ListApiKeysResult>\nexport type RemoveApiKey = (params: RemoveApiKeyParams) => Promise<Null>\nexport type ListSigningProviders = () => Promise<ListSigningProvidersResult>\nexport type ListSigningProviderKeys = (\n params: ListSigningProviderKeysParams\n) => Promise<ListSigningProviderKeysResult>\nexport type GetWallet = (params: GetWalletParams) => Promise<GetWalletResult>\nexport type ChangeSigningProvider = (\n params: ChangeSigningProviderParams\n) => Promise<Null>\n/* oxlint-enable no-unused-vars */\n\ntype Params<T> = T extends (...args: infer A) => any\n ? A extends []\n ? never\n : A[0]\n : never\ntype Result<T> = T extends (...args: any[]) => Promise<infer R> ? R : never\n\nexport type RpcTypes = {\n addNetwork: {\n params: Params<AddNetwork>\n result: Result<AddNetwork>\n }\n\n removeNetwork: {\n params: Params<RemoveNetwork>\n result: Result<RemoveNetwork>\n }\n\n listNetworks: {\n params: Params<ListNetworks>\n result: Result<ListNetworks>\n }\n\n getNetwork: {\n params: Params<GetNetwork>\n result: Result<GetNetwork>\n }\n\n selfSignedAccessToken: {\n params: Params<SelfSignedAccessToken>\n result: Result<SelfSignedAccessToken>\n }\n\n addIdp: {\n params: Params<AddIdp>\n result: Result<AddIdp>\n }\n\n removeIdp: {\n params: Params<RemoveIdp>\n result: Result<RemoveIdp>\n }\n\n listIdps: {\n params: Params<ListIdps>\n result: Result<ListIdps>\n }\n\n createWallet: {\n params: Params<CreateWallet>\n result: Result<CreateWallet>\n }\n\n startSelfIssuedLoginSession: {\n params: Params<StartSelfIssuedLoginSession>\n result: Result<StartSelfIssuedLoginSession>\n }\n\n getSelfIssuedLoginMode: {\n params: Params<GetSelfIssuedLoginMode>\n result: Result<GetSelfIssuedLoginMode>\n }\n\n createSelfIssuedWallet: {\n params: Params<CreateSelfIssuedWallet>\n result: Result<CreateSelfIssuedWallet>\n }\n\n allocateSelfIssuedWallet: {\n params: Params<AllocateSelfIssuedWallet>\n result: Result<AllocateSelfIssuedWallet>\n }\n\n completeSelfIssuedLogin: {\n params: Params<CompleteSelfIssuedLogin>\n result: Result<CompleteSelfIssuedLogin>\n }\n\n removeSelfIssuedLoginSession: {\n params: Params<RemoveSelfIssuedLoginSession>\n result: Result<RemoveSelfIssuedLoginSession>\n }\n\n allocatePartyForWallet: {\n params: Params<AllocatePartyForWallet>\n result: Result<AllocatePartyForWallet>\n }\n\n setPrimaryWallet: {\n params: Params<SetPrimaryWallet>\n result: Result<SetPrimaryWallet>\n }\n\n removeWallet: {\n params: Params<RemoveWallet>\n result: Result<RemoveWallet>\n }\n\n listWallets: {\n params: Params<ListWallets>\n result: Result<ListWallets>\n }\n\n syncWallets: {\n params: Params<SyncWallets>\n result: Result<SyncWallets>\n }\n\n isWalletSyncNeeded: {\n params: Params<IsWalletSyncNeeded>\n result: Result<IsWalletSyncNeeded>\n }\n\n sign: {\n params: Params<Sign>\n result: Result<Sign>\n }\n\n signMessage: {\n params: Params<SignMessage>\n result: Result<SignMessage>\n }\n\n getSignMessageStatus: {\n params: Params<GetSignMessageStatus>\n result: Result<GetSignMessageStatus>\n }\n\n getMessageToSign: {\n params: Params<GetMessageToSign>\n result: Result<GetMessageToSign>\n }\n\n listMessagesToSign: {\n params: Params<ListMessagesToSign>\n result: Result<ListMessagesToSign>\n }\n\n deleteMessageToSign: {\n params: Params<DeleteMessageToSign>\n result: Result<DeleteMessageToSign>\n }\n\n execute: {\n params: Params<Execute>\n result: Result<Execute>\n }\n\n addSession: {\n params: Params<AddSession>\n result: Result<AddSession>\n }\n\n removeSession: {\n params: Params<RemoveSession>\n result: Result<RemoveSession>\n }\n\n listSessions: {\n params: Params<ListSessions>\n result: Result<ListSessions>\n }\n\n getTransaction: {\n params: Params<GetTransaction>\n result: Result<GetTransaction>\n }\n\n getTransactionStatus: {\n params: Params<GetTransactionStatus>\n result: Result<GetTransactionStatus>\n }\n\n listTransactions: {\n params: Params<ListTransactions>\n result: Result<ListTransactions>\n }\n\n deleteTransaction: {\n params: Params<DeleteTransaction>\n result: Result<DeleteTransaction>\n }\n\n getUser: {\n params: Params<GetUser>\n result: Result<GetUser>\n }\n\n generateApiKey: {\n params: Params<GenerateApiKey>\n result: Result<GenerateApiKey>\n }\n\n listApiKeys: {\n params: Params<ListApiKeys>\n result: Result<ListApiKeys>\n }\n\n removeApiKey: {\n params: Params<RemoveApiKey>\n result: Result<RemoveApiKey>\n }\n\n listSigningProviders: {\n params: Params<ListSigningProviders>\n result: Result<ListSigningProviders>\n }\n\n listSigningProviderKeys: {\n params: Params<ListSigningProviderKeys>\n result: Result<ListSigningProviderKeys>\n }\n\n getWallet: {\n params: Params<GetWallet>\n result: Result<GetWallet>\n }\n\n changeSigningProvider: {\n params: Params<ChangeSigningProvider>\n result: Result<ChangeSigningProvider>\n }\n}\n\nexport class WalletJSONRPCUserAPI {\n public transport: RpcTransport\n\n constructor(transport: RpcTransport) {\n this.transport = transport\n }\n\n public async request<M extends keyof RpcTypes>(\n args: RequestArgs<RpcTypes, M>\n ): Promise<RpcTypes[M]['result']> {\n const response = await this.transport.submit(args as RequestPayload)\n return response.result as RpcTypes[M]['result']\n }\n}\nexport default WalletJSONRPCUserAPI\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgsCA,IAAa,uBAAb,MAAkC;CAG9B,YAAY,WAAyB;EAF9B,gBAAA,MAAA,aAAA,KAAA,CAAA;EAGH,KAAK,YAAY;CACrB;CAEA,MAAa,QACT,MAC8B;EAE9B,QAAO,MADgB,KAAK,UAAU,OAAO,IAAsB,EAAA,CACnD;CACpB;AACJ"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
1
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/typeof.js
2
2
  function _typeof(o) {
3
3
  "@babel/helpers - typeof";
4
4
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -7,8 +7,7 @@ function _typeof(o) {
7
7
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
8
  }, _typeof(o);
9
9
  }
10
- //#endregion
11
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
10
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/toPrimitive.js
12
11
  function toPrimitive(t, r) {
13
12
  if ("object" != _typeof(t) || !t) return t;
14
13
  var e = t[Symbol.toPrimitive];
@@ -19,14 +18,12 @@ function toPrimitive(t, r) {
19
18
  }
20
19
  return ("string" === r ? String : Number)(t);
21
20
  }
22
- //#endregion
23
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
21
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/toPropertyKey.js
24
22
  function toPropertyKey(t) {
25
23
  var i = toPrimitive(t, "string");
26
24
  return "symbol" == _typeof(i) ? i : i + "";
27
25
  }
28
- //#endregion
29
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
26
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/defineProperty.js
30
27
  function _defineProperty(e, r, t) {
31
28
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
32
29
  value: t,
@@ -35,8 +32,7 @@ function _defineProperty(e, r, t) {
35
32
  writable: !0
36
33
  }) : e[r] = t, e;
37
34
  }
38
- //#endregion
39
- //#region src/index.ts
35
+ // src/index.ts
40
36
  var WalletJSONRPCUserAPI = class {
41
37
  constructor(transport) {
42
38
  _defineProperty(this, "transport", void 0);
@@ -46,7 +42,6 @@ var WalletJSONRPCUserAPI = class {
46
42
  return (await this.transport.submit(args)).result;
47
43
  }
48
44
  };
49
- //#endregion
50
45
  export { WalletJSONRPCUserAPI, WalletJSONRPCUserAPI as default };
51
46
 
52
47
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// Code generated by @open-rpc/generator DO NOT EDIT.\nimport type { RequestArgs, RequestPayload } from '@canton-network/core-types'\nimport type { RpcTransport } from '@canton-network/core-rpc-transport'\n\n/* oxlint-disable no-unused-vars */\n/**\n *\n * The network ID the wallet corresponds to.\n *\n */\nexport type NetworkId = string\nexport type Name = string\n/**\n *\n * Description of network\n *\n */\nexport type Description = string\n/**\n *\n * Synchronizer ID\n *\n */\nexport type SynchronizerId = string\n/**\n *\n * Identity Provider ID\n *\n */\nexport type IdentityProviderId = string\nexport type AuthorizationCodeAuthMethod = 'authorization_code'\nexport type Scope = string\nexport type ClientId = string\n/**\n *\n * Bare participant ID, with no https://daml.com/jwt/aud/participant/ prefix (unlike the other auth methods).\n *\n */\nexport type Audience = string\ntype AlwaysFalse = any\n/**\n *\n * Authorization code authentication configuration\n *\n */\nexport interface AuthorizationCodeAuth {\n method: AuthorizationCodeAuthMethod\n scope: Scope\n clientId: ClientId\n audience: Audience\n}\nexport type ClientCredentialsAuthMethod = 'client_credentials'\n/**\n *\n * Overrides the network's identity provider for client credentials token acquisition\n *\n */\nexport type ClientCredentialsIdentityProviderId = string\nexport type ClientSecret = string\n/**\n *\n * Client credentials authentication configuration\n *\n */\nexport interface ClientCredentialsAuth {\n method: ClientCredentialsAuthMethod\n identityProviderId?: ClientCredentialsIdentityProviderId\n scope: Scope\n clientId: ClientId\n clientSecret: ClientSecret\n audience: Audience\n}\nexport type SelfSignedAuthMethod = 'self_signed'\n/**\n *\n * Issuer of identity provider\n *\n */\nexport type Issuer = string\n/**\n *\n * Self-signed authentication configuration\n *\n */\nexport interface SelfSignedAuth {\n method: SelfSignedAuthMethod\n scope: Scope\n clientId: ClientId\n clientSecret: ClientSecret\n issuer: Issuer\n audience: Audience\n}\nexport type SelfIssuedAuthMethod = 'self_issued'\n/**\n *\n * Self-issued authentication configuration\n *\n */\nexport interface SelfIssuedAuth {\n method: SelfIssuedAuthMethod\n scope: Scope\n audience: Audience\n}\n/**\n *\n * Authentication configuration for a network\n *\n */\nexport type Auth =\n | AuthorizationCodeAuth\n | ClientCredentialsAuth\n | SelfSignedAuth\n | SelfIssuedAuth\n/**\n *\n * Ledger api url\n *\n */\nexport type LedgerApi = string\n/**\n *\n * Connected network metadata. Privileged credentials (adminAuth, serviceAccountAuth) are included only for the admin user.\n *\n */\nexport interface Network {\n id: NetworkId\n name: Name\n description: Description\n synchronizerId?: SynchronizerId\n identityProviderId: IdentityProviderId\n auth: Auth\n adminAuth?: Auth\n serviceAccountAuth?: Auth\n ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\nexport type Id = string\n/**\n *\n * OAuth identity provider\n *\n */\nexport type OauthIdpType = 'oauth'\n/**\n *\n * The configuration URL for the identity provider.\n *\n */\nexport type ConfigUrl = string\nexport interface OauthIdp {\n id: Id\n type: OauthIdpType\n issuer: Issuer\n configUrl: ConfigUrl\n}\n/**\n *\n * Self-signed identity provider\n *\n */\nexport type SelfSignedIdpType = 'self_signed'\nexport interface SelfSignedIdp {\n id: Id\n type: SelfSignedIdpType\n issuer: Issuer\n}\n/**\n *\n * Self-issued identity provider\n *\n */\nexport type SelfIssuedIdpType = 'self_issued'\nexport interface SelfIssuedIdp {\n id: Id\n type: SelfIssuedIdpType\n}\n/**\n *\n * Structure representing an identity provider\n *\n */\nexport type Idp = OauthIdp | SelfSignedIdp | SelfIssuedIdp\n/**\n *\n * Set as primary wallet for dApp usage.\n *\n */\nexport type Primary = boolean\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type PartyHint = string\n/**\n *\n * The signing provider ID the wallet corresponds to.\n *\n */\nexport type SigningProviderId = string\n/**\n *\n * Name of signing provider's key to use for getting keys.\n *\n */\nexport type KeyName = string\n/**\n *\n * User id used while onboarding.\n *\n */\nexport type Username = string\n/**\n *\n * The origin (dApp URL) that initiated this transaction request.\n *\n */\nexport type Origin = string\n/**\n *\n * Onboarding session id required by the remaining self-issued onboarding methods.\n *\n */\nexport type SessionId = string\n/**\n *\n * The party ID corresponding to the wallet.\n *\n */\nexport type PartyId = string\n/**\n *\n * Filter wallets by network IDs.\n *\n */\nexport type NetworkIds = NetworkId[]\n/**\n *\n * Filter wallets by signing provider IDs.\n *\n */\nexport type SigningProviderIds = SigningProviderId[]\n/**\n *\n * Filter for the wallets to be returned.\n *\n */\nexport interface WalletFilter {\n networkIds?: NetworkIds\n signingProviderIds?: SigningProviderIds\n}\n/**\n *\n * The internal transaction identifier.\n *\n */\nexport type TransactionId = string\n/**\n *\n * The internal identifier of the pending message-signing request.\n *\n */\nexport type MessageId = string\n/**\n *\n * Limit of transactions to return.\n *\n */\nexport type Limit = number\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type CursorAsString = string\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type Cursor = CursorAsString\n/**\n *\n * The public key of the party.\n *\n */\nexport type PublicKey = string\n/**\n *\n * Authentication method configured for this network\n *\n */\nexport type AuthMethod = string\n/**\n *\n * Network metadata exposed by listNetworks without sensitive auth configuration\n *\n */\nexport interface PublicNetwork {\n id: NetworkId\n name: Name\n description: Description\n synchronizerId?: SynchronizerId\n identityProviderId: IdentityProviderId\n ledgerApi: LedgerApi\n authMethod: AuthMethod\n clientId?: ClientId\n scope?: Scope\n audience?: Audience\n}\nexport type Networks = PublicNetwork[]\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\nexport type Idps = Idp[]\n/**\n *\n * The status of the wallet.\n *\n */\nexport type WalletStatus = 'initialized' | 'allocated' | 'removed'\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type Hint = string\n/**\n *\n * The namespace of the party.\n *\n */\nexport type Namespace = string\n/**\n *\n * Unique identifier of the signed transaction given by the Signing Provider. This may not be the same as the internal txId given by the Wallet Gateway.\n *\n */\nexport type ExternalTxId = string\n/**\n *\n * The topology transactions\n *\n */\nexport type TopologyTransactions = string\n/**\n *\n * Whether the wallet is disabled. Wallets are disabled when no signing provider matches the party's namespace during sync. Disabled wallets use participant as the default signing provider.\n *\n */\nexport type Disabled = boolean\n/**\n *\n * Reason for the wallet state, e.g., 'no signing provider matched'.\n *\n */\nexport type Reason = string\n/**\n *\n * Whether the party authenticates the user with self-issued tokens.\n *\n */\nexport type IsAuthParty = boolean\nexport type PartyLevelRight = 'CanActAs' | 'CanReadAs' | 'CanExecuteAs'\n/**\n *\n * The rights of the wallet.\n *\n */\nexport type PartyRights = PartyLevelRight[]\n/**\n *\n * Structure representing a wallet\n *\n */\nexport interface Wallet {\n primary: Primary\n partyId: PartyId\n status: WalletStatus\n hint: Hint\n publicKey: PublicKey\n namespace: Namespace\n networkId: NetworkId\n signingProviderId: SigningProviderId\n externalTxId?: ExternalTxId\n topologyTransactions?: TopologyTransactions\n disabled?: Disabled\n reason?: Reason\n isAuthParty?: IsAuthParty\n rights: PartyRights\n}\n/**\n *\n * create when there is no ledger user yet. select when the user already authenticates with a primary party.\n *\n */\nexport type SelfIssuedLoginMode = 'create' | 'select'\ntype AlwaysTrue = any\n/**\n *\n * Party ids of non-disabled wallets added in this syncWallets call.\n *\n */\nexport type SyncWalletsResultAdded = PartyId[]\n/**\n *\n * Party ids of existing wallets whose status became initialized, whose rights changed, or whose isAuthParty flag changed in this syncWallets call.\n *\n */\nexport type SyncWalletsResultUpdated = PartyId[]\n/**\n *\n * Party ids of wallets added disabled, or existing wallets disabled, in this syncWallets call.\n *\n */\nexport type SyncWalletsResultDisabled = PartyId[]\n/**\n *\n * Whether wallet sync is needed. Returns true if there are disabled wallets or parties on the ledger that aren't in the store.\n *\n */\nexport type WalletSyncNeeded = boolean\nexport type TxStatusSigned = 'signed'\n/**\n *\n * The signature of the message.\n *\n */\nexport type Signature = string\nexport type SignedBy = string\nexport interface SignResultSigned {\n status: TxStatusSigned\n signature: Signature\n signedBy: SignedBy\n partyId: PartyId\n externalTxId?: ExternalTxId\n}\nexport type TxStatusPending = 'pending'\nexport interface SignResultPending {\n status: TxStatusPending\n partyId: PartyId\n externalTxId: ExternalTxId\n}\nexport type TxStatusRejected = 'rejected'\nexport interface SignResultRejected {\n status: TxStatusRejected\n partyId: PartyId\n externalTxId: ExternalTxId\n}\nexport type TxStatusFailed = 'failed'\nexport interface SignResultFailed {\n status: TxStatusFailed\n partyId: PartyId\n externalTxId: ExternalTxId\n}\n/**\n *\n * The status of the transaction.\n *\n */\nexport type Status = string\n/**\n *\n * Reason for why the transaction failed.\n *\n */\nexport type FailureReason = string\n/**\n *\n * The message to sign.\n *\n */\nexport type Message = string\n/**\n *\n * The timestamp when the API key was created.\n *\n */\nexport type CreatedAt = string\n/**\n *\n * The timestamp when the transaction was signed.\n *\n */\nexport type SignedAt = string\nexport interface MessageRaw {\n id: MessageId\n status: Status\n partyId: PartyId\n publicKey: PublicKey\n message: Message\n origin?: Origin\n createdAt: CreatedAt\n signedAt?: SignedAt\n signature?: Signature\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport type Messages = MessageRaw[]\nexport type UserLevelRight = 'CanReadAsAnyParty' | 'CanExecuteAsAnyParty'\n/**\n *\n * The rights of the user for the network.\n *\n */\nexport type UserRights = UserLevelRight[]\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n id: Id\n origin?: Origin\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n rights: UserRights\n}\nexport type Sessions = Session[]\n/**\n *\n * The unique identifier of the command associated with the transaction.\n *\n */\nexport type CommandId = string\n/**\n *\n * The transaction data corresponding to the command ID.\n *\n */\nexport type PreparedTransaction = string\n/**\n *\n * The hash of the prepared transaction.\n *\n */\nexport type PreparedTransactionHash = string\n/**\n *\n * Optional payload associated with the transaction.\n *\n */\nexport type Payload = string\nexport interface Transaction {\n id: TransactionId\n commandId: CommandId\n status: Status\n createdAt?: CreatedAt\n signedAt?: SignedAt\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n payload?: Payload\n origin?: Origin\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport type Transactions = Transaction[]\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type NextCursor = string\n/**\n *\n * Number of total transactions for the user.\n *\n */\nexport type Count = number\n/**\n *\n * The unique identifier of the current user.\n *\n */\nexport type UserIdentifier = string\n/**\n *\n * Whether the current user is an admin.\n *\n */\nexport type IsAdminFlag = boolean\n/**\n *\n * The generated API key.\n *\n */\nexport type ApiKeyResult = string\nexport interface ApiKey {\n id: Id\n name: Name\n createdAt: CreatedAt\n}\n/**\n *\n * The list of API keys.\n *\n */\nexport type ApiKeys = ApiKey[]\n/**\n *\n * The IDs of the available signing providers.\n *\n */\nexport type SigningProviders = SigningProviderId[]\nexport interface Key {\n id: Id\n name: Name\n publicKey: PublicKey\n}\n/**\n *\n * The list of signing provider's available keys.\n *\n */\nexport type Keys = Key[]\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface AddNetworkParams {\n network: Network\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\n}\nexport interface GetNetworkParams {\n networkId: NetworkId\n}\nexport interface SelfSignedAccessTokenParams {\n networkId: NetworkId\n clientId: ClientId\n clientSecret: ClientSecret\n}\nexport interface AddIdpParams {\n idp: Idp\n}\nexport interface RemoveIdpParams {\n identityProviderId: IdentityProviderId\n}\nexport interface CreateWalletParams {\n primary?: Primary\n partyHint: PartyHint\n signingProviderId: SigningProviderId\n keyName?: KeyName\n}\nexport interface StartSelfIssuedLoginSessionParams {\n username: Username\n networkId: NetworkId\n origin: Origin\n}\nexport interface GetSelfIssuedLoginModeParams {\n sessionId: SessionId\n}\nexport interface CreateSelfIssuedWalletParams {\n sessionId: SessionId\n partyHint: PartyHint\n signingProviderId: SigningProviderId\n}\nexport interface AllocateSelfIssuedWalletParams {\n sessionId: SessionId\n partyId: PartyId\n}\nexport interface CompleteSelfIssuedLoginParams {\n sessionId: SessionId\n partyId: PartyId\n}\nexport interface RemoveSelfIssuedLoginSessionParams {\n sessionId: SessionId\n}\nexport interface AllocatePartyForWalletParams {\n partyId: PartyId\n}\nexport interface SetPrimaryWalletParams {\n partyId: PartyId\n}\nexport interface RemoveWalletParams {\n partyId: PartyId\n}\nexport interface ListWalletsParams {\n filter?: WalletFilter\n}\nexport interface SignParams {\n transactionId: TransactionId\n partyId: PartyId\n}\nexport interface SignMessageParams {\n messageId: MessageId\n partyId?: PartyId\n}\nexport interface GetSignMessageStatusParams {\n messageId: MessageId\n}\nexport interface GetMessageToSignParams {\n messageId: MessageId\n}\nexport interface DeleteMessageToSignParams {\n messageId: MessageId\n}\nexport interface ExecuteParams {\n partyId: PartyId\n transactionId: TransactionId\n}\nexport interface AddSessionParams {\n origin: Origin\n networkId: NetworkId\n}\nexport interface GetTransactionParams {\n transactionId: TransactionId\n}\nexport interface GetTransactionStatusParams {\n transactionId: TransactionId\n partyId?: PartyId\n}\nexport interface ListTransactionsParams {\n limit?: Limit\n cursor?: Cursor\n}\nexport interface DeleteTransactionParams {\n transactionId: TransactionId\n}\nexport interface GenerateApiKeyParams {\n name: Name\n}\nexport interface RemoveApiKeyParams {\n id: Id\n}\nexport interface ListSigningProviderKeysParams {\n signingProviderId: SigningProviderId\n}\nexport interface GetWalletParams {\n partyId: PartyId\n}\nexport interface ChangeSigningProviderParams {\n signingProviderId: SigningProviderId\n partyId: PartyId\n publicKey: PublicKey\n}\nexport interface ListNetworksResult {\n networks: Networks\n}\nexport interface GetNetworkResult {\n network: Network\n}\nexport interface SelfSignedAccessTokenResult {\n accessToken: AccessToken\n}\nexport interface ListIdpsResult {\n idps: Idps\n}\nexport interface CreateWalletResult {\n wallet: Wallet\n}\nexport interface StartSelfIssuedLoginSessionResult {\n sessionId: SessionId\n}\nexport interface GetSelfIssuedLoginModeResult {\n mode: SelfIssuedLoginMode\n wallet?: Wallet\n}\nexport interface CreateSelfIssuedWalletResult {\n wallet: Wallet\n}\nexport interface AllocateSelfIssuedWalletResult {\n wallet: Wallet\n}\nexport interface CompleteSelfIssuedLoginResult {\n wallet: Wallet\n accessToken: AccessToken\n sessionId: SessionId\n}\nexport interface AllocatePartyForWalletResult {\n wallet: Wallet\n}\nexport interface RemovePartyResult {\n [key: string]: any\n}\n/**\n *\n * An array of wallets that match the filter criteria.\n *\n */\nexport type ListWalletsResult = Wallet[]\n/**\n *\n * Added, updated and disabled wallets as a result of the sync.\n *\n */\nexport interface SyncWalletsResult {\n added: SyncWalletsResultAdded\n updated: SyncWalletsResultUpdated\n disabled: SyncWalletsResultDisabled\n}\nexport interface IsWalletSyncNeededResult {\n walletSyncNeeded: WalletSyncNeeded\n}\nexport type SignResult =\n | SignResultSigned\n | SignResultPending\n | SignResultRejected\n | SignResultFailed\nexport interface SignMessageResult {\n signature?: Signature\n publicKey: PublicKey\n status: Status\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface GetSignMessageStatusResult {\n status: Status\n externalTxId?: ExternalTxId\n signature?: Signature\n failureReason?: FailureReason\n}\nexport interface GetMessageToSignResult {\n message: MessageRaw\n}\nexport interface ListMessagesToSignResult {\n messages: Messages\n}\nexport interface ExecuteResult {\n [key: string]: any\n}\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface AddSessionResult {\n id: Id\n origin?: Origin\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n rights: UserRights\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n}\nexport interface GetTransactionResult {\n id: TransactionId\n commandId: CommandId\n status: Status\n createdAt?: CreatedAt\n signedAt?: SignedAt\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n payload?: Payload\n origin?: Origin\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface GetTransactionStatusResult {\n status: Status\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface ListTransactionsResult {\n transactions: Transactions\n nextCursor?: NextCursor\n count: Count\n}\nexport interface GetUserResult {\n userId: UserIdentifier\n isAdmin: IsAdminFlag\n}\nexport interface GeneratedApiKey {\n id: Id\n apiKey: ApiKeyResult\n}\nexport interface ListApiKeysResult {\n apiKeys: ApiKeys\n}\nexport interface ListSigningProvidersResult {\n signingProviders: SigningProviders\n}\nexport interface ListSigningProviderKeysResult {\n keys: Keys\n}\nexport type GetWalletResult = Wallet | Null\n/**\n *\n * Generated! Represents an alias to any of the provided schemas\n *\n */\n\nexport type AddNetwork = (params: AddNetworkParams) => Promise<Null>\nexport type RemoveNetwork = (params: RemoveNetworkParams) => Promise<Null>\nexport type ListNetworks = () => Promise<ListNetworksResult>\nexport type GetNetwork = (params: GetNetworkParams) => Promise<GetNetworkResult>\nexport type SelfSignedAccessToken = (\n params: SelfSignedAccessTokenParams\n) => Promise<SelfSignedAccessTokenResult>\nexport type AddIdp = (params: AddIdpParams) => Promise<Null>\nexport type RemoveIdp = (params: RemoveIdpParams) => Promise<Null>\nexport type ListIdps = () => Promise<ListIdpsResult>\nexport type CreateWallet = (\n params: CreateWalletParams\n) => Promise<CreateWalletResult>\nexport type StartSelfIssuedLoginSession = (\n params: StartSelfIssuedLoginSessionParams\n) => Promise<StartSelfIssuedLoginSessionResult>\nexport type GetSelfIssuedLoginMode = (\n params: GetSelfIssuedLoginModeParams\n) => Promise<GetSelfIssuedLoginModeResult>\nexport type CreateSelfIssuedWallet = (\n params: CreateSelfIssuedWalletParams\n) => Promise<CreateSelfIssuedWalletResult>\nexport type AllocateSelfIssuedWallet = (\n params: AllocateSelfIssuedWalletParams\n) => Promise<AllocateSelfIssuedWalletResult>\nexport type CompleteSelfIssuedLogin = (\n params: CompleteSelfIssuedLoginParams\n) => Promise<CompleteSelfIssuedLoginResult>\nexport type RemoveSelfIssuedLoginSession = (\n params: RemoveSelfIssuedLoginSessionParams\n) => Promise<Null>\nexport type AllocatePartyForWallet = (\n params: AllocatePartyForWalletParams\n) => Promise<AllocatePartyForWalletResult>\nexport type SetPrimaryWallet = (params: SetPrimaryWalletParams) => Promise<Null>\nexport type RemoveWallet = (\n params: RemoveWalletParams\n) => Promise<RemovePartyResult>\nexport type ListWallets = (\n params: ListWalletsParams\n) => Promise<ListWalletsResult>\nexport type SyncWallets = () => Promise<SyncWalletsResult>\nexport type IsWalletSyncNeeded = () => Promise<IsWalletSyncNeededResult>\nexport type Sign = (params: SignParams) => Promise<SignResult>\nexport type SignMessage = (\n params: SignMessageParams\n) => Promise<SignMessageResult>\nexport type GetSignMessageStatus = (\n params: GetSignMessageStatusParams\n) => Promise<GetSignMessageStatusResult>\nexport type GetMessageToSign = (\n params: GetMessageToSignParams\n) => Promise<GetMessageToSignResult>\nexport type ListMessagesToSign = () => Promise<ListMessagesToSignResult>\nexport type DeleteMessageToSign = (\n params: DeleteMessageToSignParams\n) => Promise<Null>\nexport type Execute = (params: ExecuteParams) => Promise<ExecuteResult>\nexport type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>\nexport type RemoveSession = () => Promise<Null>\nexport type ListSessions = () => Promise<ListSessionsResult>\nexport type GetTransaction = (\n params: GetTransactionParams\n) => Promise<GetTransactionResult>\nexport type GetTransactionStatus = (\n params: GetTransactionStatusParams\n) => Promise<GetTransactionStatusResult>\nexport type ListTransactions = (\n params: ListTransactionsParams\n) => Promise<ListTransactionsResult>\nexport type DeleteTransaction = (\n params: DeleteTransactionParams\n) => Promise<Null>\nexport type GetUser = () => Promise<GetUserResult>\nexport type GenerateApiKey = (\n params: GenerateApiKeyParams\n) => Promise<GeneratedApiKey>\nexport type ListApiKeys = () => Promise<ListApiKeysResult>\nexport type RemoveApiKey = (params: RemoveApiKeyParams) => Promise<Null>\nexport type ListSigningProviders = () => Promise<ListSigningProvidersResult>\nexport type ListSigningProviderKeys = (\n params: ListSigningProviderKeysParams\n) => Promise<ListSigningProviderKeysResult>\nexport type GetWallet = (params: GetWalletParams) => Promise<GetWalletResult>\nexport type ChangeSigningProvider = (\n params: ChangeSigningProviderParams\n) => Promise<Null>\n/* oxlint-enable no-unused-vars */\n\ntype Params<T> = T extends (...args: infer A) => any\n ? A extends []\n ? never\n : A[0]\n : never\ntype Result<T> = T extends (...args: any[]) => Promise<infer R> ? R : never\n\nexport type RpcTypes = {\n addNetwork: {\n params: Params<AddNetwork>\n result: Result<AddNetwork>\n }\n\n removeNetwork: {\n params: Params<RemoveNetwork>\n result: Result<RemoveNetwork>\n }\n\n listNetworks: {\n params: Params<ListNetworks>\n result: Result<ListNetworks>\n }\n\n getNetwork: {\n params: Params<GetNetwork>\n result: Result<GetNetwork>\n }\n\n selfSignedAccessToken: {\n params: Params<SelfSignedAccessToken>\n result: Result<SelfSignedAccessToken>\n }\n\n addIdp: {\n params: Params<AddIdp>\n result: Result<AddIdp>\n }\n\n removeIdp: {\n params: Params<RemoveIdp>\n result: Result<RemoveIdp>\n }\n\n listIdps: {\n params: Params<ListIdps>\n result: Result<ListIdps>\n }\n\n createWallet: {\n params: Params<CreateWallet>\n result: Result<CreateWallet>\n }\n\n startSelfIssuedLoginSession: {\n params: Params<StartSelfIssuedLoginSession>\n result: Result<StartSelfIssuedLoginSession>\n }\n\n getSelfIssuedLoginMode: {\n params: Params<GetSelfIssuedLoginMode>\n result: Result<GetSelfIssuedLoginMode>\n }\n\n createSelfIssuedWallet: {\n params: Params<CreateSelfIssuedWallet>\n result: Result<CreateSelfIssuedWallet>\n }\n\n allocateSelfIssuedWallet: {\n params: Params<AllocateSelfIssuedWallet>\n result: Result<AllocateSelfIssuedWallet>\n }\n\n completeSelfIssuedLogin: {\n params: Params<CompleteSelfIssuedLogin>\n result: Result<CompleteSelfIssuedLogin>\n }\n\n removeSelfIssuedLoginSession: {\n params: Params<RemoveSelfIssuedLoginSession>\n result: Result<RemoveSelfIssuedLoginSession>\n }\n\n allocatePartyForWallet: {\n params: Params<AllocatePartyForWallet>\n result: Result<AllocatePartyForWallet>\n }\n\n setPrimaryWallet: {\n params: Params<SetPrimaryWallet>\n result: Result<SetPrimaryWallet>\n }\n\n removeWallet: {\n params: Params<RemoveWallet>\n result: Result<RemoveWallet>\n }\n\n listWallets: {\n params: Params<ListWallets>\n result: Result<ListWallets>\n }\n\n syncWallets: {\n params: Params<SyncWallets>\n result: Result<SyncWallets>\n }\n\n isWalletSyncNeeded: {\n params: Params<IsWalletSyncNeeded>\n result: Result<IsWalletSyncNeeded>\n }\n\n sign: {\n params: Params<Sign>\n result: Result<Sign>\n }\n\n signMessage: {\n params: Params<SignMessage>\n result: Result<SignMessage>\n }\n\n getSignMessageStatus: {\n params: Params<GetSignMessageStatus>\n result: Result<GetSignMessageStatus>\n }\n\n getMessageToSign: {\n params: Params<GetMessageToSign>\n result: Result<GetMessageToSign>\n }\n\n listMessagesToSign: {\n params: Params<ListMessagesToSign>\n result: Result<ListMessagesToSign>\n }\n\n deleteMessageToSign: {\n params: Params<DeleteMessageToSign>\n result: Result<DeleteMessageToSign>\n }\n\n execute: {\n params: Params<Execute>\n result: Result<Execute>\n }\n\n addSession: {\n params: Params<AddSession>\n result: Result<AddSession>\n }\n\n removeSession: {\n params: Params<RemoveSession>\n result: Result<RemoveSession>\n }\n\n listSessions: {\n params: Params<ListSessions>\n result: Result<ListSessions>\n }\n\n getTransaction: {\n params: Params<GetTransaction>\n result: Result<GetTransaction>\n }\n\n getTransactionStatus: {\n params: Params<GetTransactionStatus>\n result: Result<GetTransactionStatus>\n }\n\n listTransactions: {\n params: Params<ListTransactions>\n result: Result<ListTransactions>\n }\n\n deleteTransaction: {\n params: Params<DeleteTransaction>\n result: Result<DeleteTransaction>\n }\n\n getUser: {\n params: Params<GetUser>\n result: Result<GetUser>\n }\n\n generateApiKey: {\n params: Params<GenerateApiKey>\n result: Result<GenerateApiKey>\n }\n\n listApiKeys: {\n params: Params<ListApiKeys>\n result: Result<ListApiKeys>\n }\n\n removeApiKey: {\n params: Params<RemoveApiKey>\n result: Result<RemoveApiKey>\n }\n\n listSigningProviders: {\n params: Params<ListSigningProviders>\n result: Result<ListSigningProviders>\n }\n\n listSigningProviderKeys: {\n params: Params<ListSigningProviderKeys>\n result: Result<ListSigningProviderKeys>\n }\n\n getWallet: {\n params: Params<GetWallet>\n result: Result<GetWallet>\n }\n\n changeSigningProvider: {\n params: Params<ChangeSigningProvider>\n result: Result<ChangeSigningProvider>\n }\n}\n\nexport class WalletJSONRPCUserAPI {\n public transport: RpcTransport\n\n constructor(transport: RpcTransport) {\n this.transport = transport\n }\n\n public async request<M extends keyof RpcTypes>(\n args: RequestArgs<RpcTypes, M>\n ): Promise<RpcTypes[M]['result']> {\n const response = await this.transport.submit(args as RequestPayload)\n return response.result as RpcTypes[M]['result']\n }\n}\nexport default WalletJSONRPCUserAPI\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgsCA,IAAa,uBAAb,MAAkC;CAG9B,YAAY,WAAyB;EAF9B,gBAAA,MAAA,aAAA,KAAA,CAAA;EAGH,KAAK,YAAY;CACrB;CAEA,MAAa,QACT,MAC8B;EAE9B,QAAO,MADgB,KAAK,UAAU,OAAO,IAAsB,EAAA,CACnD;CACpB;AACJ"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// Code generated by @open-rpc/generator DO NOT EDIT.\nimport type { RequestArgs, RequestPayload } from '@canton-network/core-types'\nimport type { RpcTransport } from '@canton-network/core-rpc-transport'\n\n/* oxlint-disable no-unused-vars */\n/**\n *\n * The network ID the wallet corresponds to.\n *\n */\nexport type NetworkId = string\nexport type Name = string\n/**\n *\n * Description of network\n *\n */\nexport type Description = string\n/**\n *\n * Synchronizer ID\n *\n */\nexport type SynchronizerId = string\n/**\n *\n * Identity Provider ID\n *\n */\nexport type IdentityProviderId = string\nexport type AuthorizationCodeAuthMethod = 'authorization_code'\nexport type Scope = string\nexport type ClientId = string\n/**\n *\n * Bare participant ID, with no https://daml.com/jwt/aud/participant/ prefix (unlike the other auth methods).\n *\n */\nexport type Audience = string\ntype AlwaysFalse = any\n/**\n *\n * Authorization code authentication configuration\n *\n */\nexport interface AuthorizationCodeAuth {\n method: AuthorizationCodeAuthMethod\n scope: Scope\n clientId: ClientId\n audience: Audience\n}\nexport type ClientCredentialsAuthMethod = 'client_credentials'\n/**\n *\n * Overrides the network's identity provider for client credentials token acquisition\n *\n */\nexport type ClientCredentialsIdentityProviderId = string\nexport type ClientSecret = string\n/**\n *\n * Client credentials authentication configuration\n *\n */\nexport interface ClientCredentialsAuth {\n method: ClientCredentialsAuthMethod\n identityProviderId?: ClientCredentialsIdentityProviderId\n scope: Scope\n clientId: ClientId\n clientSecret: ClientSecret\n audience: Audience\n}\nexport type SelfSignedAuthMethod = 'self_signed'\n/**\n *\n * Issuer of identity provider\n *\n */\nexport type Issuer = string\n/**\n *\n * Self-signed authentication configuration\n *\n */\nexport interface SelfSignedAuth {\n method: SelfSignedAuthMethod\n scope: Scope\n clientId: ClientId\n clientSecret: ClientSecret\n issuer: Issuer\n audience: Audience\n}\nexport type SelfIssuedAuthMethod = 'self_issued'\n/**\n *\n * Self-issued authentication configuration\n *\n */\nexport interface SelfIssuedAuth {\n method: SelfIssuedAuthMethod\n scope: Scope\n audience: Audience\n}\n/**\n *\n * Authentication configuration for a network\n *\n */\nexport type Auth =\n | AuthorizationCodeAuth\n | ClientCredentialsAuth\n | SelfSignedAuth\n | SelfIssuedAuth\n/**\n *\n * Ledger api url\n *\n */\nexport type LedgerApi = string\n/**\n *\n * Connected network metadata. Privileged credentials (adminAuth, serviceAccountAuth) are included only for the admin user.\n *\n */\nexport interface Network {\n id: NetworkId\n name: Name\n description: Description\n synchronizerId?: SynchronizerId\n identityProviderId: IdentityProviderId\n auth: Auth\n adminAuth?: Auth\n serviceAccountAuth?: Auth\n ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\nexport type Id = string\n/**\n *\n * OAuth identity provider\n *\n */\nexport type OauthIdpType = 'oauth'\n/**\n *\n * The configuration URL for the identity provider.\n *\n */\nexport type ConfigUrl = string\nexport interface OauthIdp {\n id: Id\n type: OauthIdpType\n issuer: Issuer\n configUrl: ConfigUrl\n}\n/**\n *\n * Self-signed identity provider\n *\n */\nexport type SelfSignedIdpType = 'self_signed'\nexport interface SelfSignedIdp {\n id: Id\n type: SelfSignedIdpType\n issuer: Issuer\n}\n/**\n *\n * Self-issued identity provider\n *\n */\nexport type SelfIssuedIdpType = 'self_issued'\nexport interface SelfIssuedIdp {\n id: Id\n type: SelfIssuedIdpType\n}\n/**\n *\n * Structure representing an identity provider\n *\n */\nexport type Idp = OauthIdp | SelfSignedIdp | SelfIssuedIdp\n/**\n *\n * Set as primary wallet for dApp usage.\n *\n */\nexport type Primary = boolean\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type PartyHint = string\n/**\n *\n * The signing provider ID the wallet corresponds to.\n *\n */\nexport type SigningProviderId = string\n/**\n *\n * Name of signing provider's key to use for getting keys.\n *\n */\nexport type KeyName = string\n/**\n *\n * User id used while onboarding.\n *\n */\nexport type Username = string\n/**\n *\n * The origin (dApp URL) that initiated this transaction request.\n *\n */\nexport type Origin = string\n/**\n *\n * Onboarding session id required by the remaining self-issued onboarding methods.\n *\n */\nexport type SessionId = string\n/**\n *\n * The party ID corresponding to the wallet.\n *\n */\nexport type PartyId = string\n/**\n *\n * Filter wallets by network IDs.\n *\n */\nexport type NetworkIds = NetworkId[]\n/**\n *\n * Filter wallets by signing provider IDs.\n *\n */\nexport type SigningProviderIds = SigningProviderId[]\n/**\n *\n * Filter for the wallets to be returned.\n *\n */\nexport interface WalletFilter {\n networkIds?: NetworkIds\n signingProviderIds?: SigningProviderIds\n}\n/**\n *\n * The internal transaction identifier.\n *\n */\nexport type TransactionId = string\n/**\n *\n * The internal identifier of the pending message-signing request.\n *\n */\nexport type MessageId = string\n/**\n *\n * Limit of transactions to return.\n *\n */\nexport type Limit = number\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type CursorAsString = string\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type Cursor = CursorAsString\n/**\n *\n * The public key of the party.\n *\n */\nexport type PublicKey = string\n/**\n *\n * Authentication method configured for this network\n *\n */\nexport type AuthMethod = string\n/**\n *\n * Network metadata exposed by listNetworks without sensitive auth configuration\n *\n */\nexport interface PublicNetwork {\n id: NetworkId\n name: Name\n description: Description\n synchronizerId?: SynchronizerId\n identityProviderId: IdentityProviderId\n ledgerApi: LedgerApi\n authMethod: AuthMethod\n clientId?: ClientId\n scope?: Scope\n audience?: Audience\n}\nexport type Networks = PublicNetwork[]\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\nexport type Idps = Idp[]\n/**\n *\n * The status of the wallet.\n *\n */\nexport type WalletStatus = 'initialized' | 'allocated' | 'removed'\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type Hint = string\n/**\n *\n * The namespace of the party.\n *\n */\nexport type Namespace = string\n/**\n *\n * Unique identifier of the signed transaction given by the Signing Provider. This may not be the same as the internal txId given by the Wallet Gateway.\n *\n */\nexport type ExternalTxId = string\n/**\n *\n * The topology transactions\n *\n */\nexport type TopologyTransactions = string\n/**\n *\n * Whether the wallet is disabled. Wallets are disabled when no signing provider matches the party's namespace during sync. Disabled wallets use participant as the default signing provider.\n *\n */\nexport type Disabled = boolean\n/**\n *\n * Reason for the wallet state, e.g., 'no signing provider matched'.\n *\n */\nexport type Reason = string\n/**\n *\n * Whether the party authenticates the user with self-issued tokens.\n *\n */\nexport type IsAuthParty = boolean\nexport type PartyLevelRight = 'CanActAs' | 'CanReadAs' | 'CanExecuteAs'\n/**\n *\n * The rights of the wallet.\n *\n */\nexport type PartyRights = PartyLevelRight[]\n/**\n *\n * Structure representing a wallet\n *\n */\nexport interface Wallet {\n primary: Primary\n partyId: PartyId\n status: WalletStatus\n hint: Hint\n publicKey: PublicKey\n namespace: Namespace\n networkId: NetworkId\n signingProviderId: SigningProviderId\n externalTxId?: ExternalTxId\n topologyTransactions?: TopologyTransactions\n disabled?: Disabled\n reason?: Reason\n isAuthParty?: IsAuthParty\n rights: PartyRights\n}\n/**\n *\n * create when there is no ledger user yet. select when the user already authenticates with a primary party.\n *\n */\nexport type SelfIssuedLoginMode = 'create' | 'select'\ntype AlwaysTrue = any\n/**\n *\n * Party ids of non-disabled wallets added in this syncWallets call.\n *\n */\nexport type SyncWalletsResultAdded = PartyId[]\n/**\n *\n * Party ids of existing wallets whose status became initialized, whose rights changed, or whose isAuthParty flag changed in this syncWallets call.\n *\n */\nexport type SyncWalletsResultUpdated = PartyId[]\n/**\n *\n * Party ids of wallets added disabled, or existing wallets disabled, in this syncWallets call.\n *\n */\nexport type SyncWalletsResultDisabled = PartyId[]\n/**\n *\n * Whether wallet sync is needed. Returns true if there are disabled wallets or parties on the ledger that aren't in the store.\n *\n */\nexport type WalletSyncNeeded = boolean\nexport type TxStatusSigned = 'signed'\n/**\n *\n * The signature of the message.\n *\n */\nexport type Signature = string\nexport type SignedBy = string\nexport interface SignResultSigned {\n status: TxStatusSigned\n signature: Signature\n signedBy: SignedBy\n partyId: PartyId\n externalTxId?: ExternalTxId\n}\nexport type TxStatusPending = 'pending'\nexport interface SignResultPending {\n status: TxStatusPending\n partyId: PartyId\n externalTxId: ExternalTxId\n}\nexport type TxStatusRejected = 'rejected'\nexport interface SignResultRejected {\n status: TxStatusRejected\n partyId: PartyId\n externalTxId: ExternalTxId\n}\nexport type TxStatusFailed = 'failed'\nexport interface SignResultFailed {\n status: TxStatusFailed\n partyId: PartyId\n externalTxId: ExternalTxId\n}\n/**\n *\n * The status of the transaction.\n *\n */\nexport type Status = string\n/**\n *\n * Reason for why the transaction failed.\n *\n */\nexport type FailureReason = string\n/**\n *\n * The message to sign.\n *\n */\nexport type Message = string\n/**\n *\n * The timestamp when the API key was created.\n *\n */\nexport type CreatedAt = string\n/**\n *\n * The timestamp when the transaction was signed.\n *\n */\nexport type SignedAt = string\nexport interface MessageRaw {\n id: MessageId\n status: Status\n partyId: PartyId\n publicKey: PublicKey\n message: Message\n origin?: Origin\n createdAt: CreatedAt\n signedAt?: SignedAt\n signature?: Signature\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport type Messages = MessageRaw[]\nexport type UserLevelRight = 'CanReadAsAnyParty' | 'CanExecuteAsAnyParty'\n/**\n *\n * The rights of the user for the network.\n *\n */\nexport type UserRights = UserLevelRight[]\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n id: Id\n origin?: Origin\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n rights: UserRights\n}\nexport type Sessions = Session[]\n/**\n *\n * The unique identifier of the command associated with the transaction.\n *\n */\nexport type CommandId = string\n/**\n *\n * The transaction data corresponding to the command ID.\n *\n */\nexport type PreparedTransaction = string\n/**\n *\n * The hash of the prepared transaction.\n *\n */\nexport type PreparedTransactionHash = string\n/**\n *\n * Optional payload associated with the transaction.\n *\n */\nexport type Payload = string\nexport interface Transaction {\n id: TransactionId\n commandId: CommandId\n status: Status\n createdAt?: CreatedAt\n signedAt?: SignedAt\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n payload?: Payload\n origin?: Origin\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport type Transactions = Transaction[]\n/**\n *\n * Cursor for next page of results.\n *\n */\nexport type NextCursor = string\n/**\n *\n * Number of total transactions for the user.\n *\n */\nexport type Count = number\n/**\n *\n * The unique identifier of the current user.\n *\n */\nexport type UserIdentifier = string\n/**\n *\n * Whether the current user is an admin.\n *\n */\nexport type IsAdminFlag = boolean\n/**\n *\n * The generated API key.\n *\n */\nexport type ApiKeyResult = string\nexport interface ApiKey {\n id: Id\n name: Name\n createdAt: CreatedAt\n}\n/**\n *\n * The list of API keys.\n *\n */\nexport type ApiKeys = ApiKey[]\n/**\n *\n * The IDs of the available signing providers.\n *\n */\nexport type SigningProviders = SigningProviderId[]\nexport interface Key {\n id: Id\n name: Name\n publicKey: PublicKey\n}\n/**\n *\n * The list of signing provider's available keys.\n *\n */\nexport type Keys = Key[]\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface AddNetworkParams {\n network: Network\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\n}\nexport interface GetNetworkParams {\n networkId: NetworkId\n}\nexport interface SelfSignedAccessTokenParams {\n networkId: NetworkId\n clientId: ClientId\n clientSecret: ClientSecret\n}\nexport interface AddIdpParams {\n idp: Idp\n}\nexport interface RemoveIdpParams {\n identityProviderId: IdentityProviderId\n}\nexport interface CreateWalletParams {\n primary?: Primary\n partyHint: PartyHint\n signingProviderId: SigningProviderId\n keyName?: KeyName\n}\nexport interface StartSelfIssuedLoginSessionParams {\n username: Username\n networkId: NetworkId\n origin: Origin\n}\nexport interface GetSelfIssuedLoginModeParams {\n sessionId: SessionId\n}\nexport interface CreateSelfIssuedWalletParams {\n sessionId: SessionId\n partyHint: PartyHint\n signingProviderId: SigningProviderId\n}\nexport interface AllocateSelfIssuedWalletParams {\n sessionId: SessionId\n partyId: PartyId\n}\nexport interface CompleteSelfIssuedLoginParams {\n sessionId: SessionId\n partyId: PartyId\n}\nexport interface RemoveSelfIssuedLoginSessionParams {\n sessionId: SessionId\n}\nexport interface AllocatePartyForWalletParams {\n partyId: PartyId\n}\nexport interface SetPrimaryWalletParams {\n partyId: PartyId\n}\nexport interface RemoveWalletParams {\n partyId: PartyId\n}\nexport interface ListWalletsParams {\n filter?: WalletFilter\n}\nexport interface SignParams {\n transactionId: TransactionId\n partyId: PartyId\n}\nexport interface SignMessageParams {\n messageId: MessageId\n partyId?: PartyId\n}\nexport interface GetSignMessageStatusParams {\n messageId: MessageId\n}\nexport interface GetMessageToSignParams {\n messageId: MessageId\n}\nexport interface DeleteMessageToSignParams {\n messageId: MessageId\n}\nexport interface ExecuteParams {\n partyId: PartyId\n transactionId: TransactionId\n}\nexport interface AddSessionParams {\n origin: Origin\n networkId: NetworkId\n}\nexport interface GetTransactionParams {\n transactionId: TransactionId\n}\nexport interface GetTransactionStatusParams {\n transactionId: TransactionId\n partyId?: PartyId\n}\nexport interface ListTransactionsParams {\n limit?: Limit\n cursor?: Cursor\n}\nexport interface DeleteTransactionParams {\n transactionId: TransactionId\n}\nexport interface GenerateApiKeyParams {\n name: Name\n}\nexport interface RemoveApiKeyParams {\n id: Id\n}\nexport interface ListSigningProviderKeysParams {\n signingProviderId: SigningProviderId\n}\nexport interface GetWalletParams {\n partyId: PartyId\n}\nexport interface ChangeSigningProviderParams {\n signingProviderId: SigningProviderId\n partyId: PartyId\n publicKey: PublicKey\n}\nexport interface ListNetworksResult {\n networks: Networks\n}\nexport interface GetNetworkResult {\n network: Network\n}\nexport interface SelfSignedAccessTokenResult {\n accessToken: AccessToken\n}\nexport interface ListIdpsResult {\n idps: Idps\n}\nexport interface CreateWalletResult {\n wallet: Wallet\n}\nexport interface StartSelfIssuedLoginSessionResult {\n sessionId: SessionId\n}\nexport interface GetSelfIssuedLoginModeResult {\n mode: SelfIssuedLoginMode\n wallet?: Wallet\n}\nexport interface CreateSelfIssuedWalletResult {\n wallet: Wallet\n}\nexport interface AllocateSelfIssuedWalletResult {\n wallet: Wallet\n}\nexport interface CompleteSelfIssuedLoginResult {\n wallet: Wallet\n accessToken: AccessToken\n sessionId: SessionId\n}\nexport interface AllocatePartyForWalletResult {\n wallet: Wallet\n}\nexport interface RemovePartyResult {\n [key: string]: any\n}\n/**\n *\n * An array of wallets that match the filter criteria.\n *\n */\nexport type ListWalletsResult = Wallet[]\n/**\n *\n * Added, updated and disabled wallets as a result of the sync.\n *\n */\nexport interface SyncWalletsResult {\n added: SyncWalletsResultAdded\n updated: SyncWalletsResultUpdated\n disabled: SyncWalletsResultDisabled\n}\nexport interface IsWalletSyncNeededResult {\n walletSyncNeeded: WalletSyncNeeded\n}\nexport type SignResult =\n | SignResultSigned\n | SignResultPending\n | SignResultRejected\n | SignResultFailed\nexport interface SignMessageResult {\n signature?: Signature\n publicKey: PublicKey\n status: Status\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface GetSignMessageStatusResult {\n status: Status\n externalTxId?: ExternalTxId\n signature?: Signature\n failureReason?: FailureReason\n}\nexport interface GetMessageToSignResult {\n message: MessageRaw\n}\nexport interface ListMessagesToSignResult {\n messages: Messages\n}\nexport interface ExecuteResult {\n [key: string]: any\n}\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface AddSessionResult {\n id: Id\n origin?: Origin\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n rights: UserRights\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n}\nexport interface GetTransactionResult {\n id: TransactionId\n commandId: CommandId\n status: Status\n createdAt?: CreatedAt\n signedAt?: SignedAt\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n payload?: Payload\n origin?: Origin\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface GetTransactionStatusResult {\n status: Status\n externalTxId?: ExternalTxId\n failureReason?: FailureReason\n}\nexport interface ListTransactionsResult {\n transactions: Transactions\n nextCursor?: NextCursor\n count: Count\n}\nexport interface GetUserResult {\n userId: UserIdentifier\n isAdmin: IsAdminFlag\n}\nexport interface GeneratedApiKey {\n id: Id\n apiKey: ApiKeyResult\n}\nexport interface ListApiKeysResult {\n apiKeys: ApiKeys\n}\nexport interface ListSigningProvidersResult {\n signingProviders: SigningProviders\n}\nexport interface ListSigningProviderKeysResult {\n keys: Keys\n}\nexport type GetWalletResult = Wallet | Null\n/**\n *\n * Generated! Represents an alias to any of the provided schemas\n *\n */\n\nexport type AddNetwork = (params: AddNetworkParams) => Promise<Null>\nexport type RemoveNetwork = (params: RemoveNetworkParams) => Promise<Null>\nexport type ListNetworks = () => Promise<ListNetworksResult>\nexport type GetNetwork = (params: GetNetworkParams) => Promise<GetNetworkResult>\nexport type SelfSignedAccessToken = (\n params: SelfSignedAccessTokenParams\n) => Promise<SelfSignedAccessTokenResult>\nexport type AddIdp = (params: AddIdpParams) => Promise<Null>\nexport type RemoveIdp = (params: RemoveIdpParams) => Promise<Null>\nexport type ListIdps = () => Promise<ListIdpsResult>\nexport type CreateWallet = (\n params: CreateWalletParams\n) => Promise<CreateWalletResult>\nexport type StartSelfIssuedLoginSession = (\n params: StartSelfIssuedLoginSessionParams\n) => Promise<StartSelfIssuedLoginSessionResult>\nexport type GetSelfIssuedLoginMode = (\n params: GetSelfIssuedLoginModeParams\n) => Promise<GetSelfIssuedLoginModeResult>\nexport type CreateSelfIssuedWallet = (\n params: CreateSelfIssuedWalletParams\n) => Promise<CreateSelfIssuedWalletResult>\nexport type AllocateSelfIssuedWallet = (\n params: AllocateSelfIssuedWalletParams\n) => Promise<AllocateSelfIssuedWalletResult>\nexport type CompleteSelfIssuedLogin = (\n params: CompleteSelfIssuedLoginParams\n) => Promise<CompleteSelfIssuedLoginResult>\nexport type RemoveSelfIssuedLoginSession = (\n params: RemoveSelfIssuedLoginSessionParams\n) => Promise<Null>\nexport type AllocatePartyForWallet = (\n params: AllocatePartyForWalletParams\n) => Promise<AllocatePartyForWalletResult>\nexport type SetPrimaryWallet = (params: SetPrimaryWalletParams) => Promise<Null>\nexport type RemoveWallet = (\n params: RemoveWalletParams\n) => Promise<RemovePartyResult>\nexport type ListWallets = (\n params: ListWalletsParams\n) => Promise<ListWalletsResult>\nexport type SyncWallets = () => Promise<SyncWalletsResult>\nexport type IsWalletSyncNeeded = () => Promise<IsWalletSyncNeededResult>\nexport type Sign = (params: SignParams) => Promise<SignResult>\nexport type SignMessage = (\n params: SignMessageParams\n) => Promise<SignMessageResult>\nexport type GetSignMessageStatus = (\n params: GetSignMessageStatusParams\n) => Promise<GetSignMessageStatusResult>\nexport type GetMessageToSign = (\n params: GetMessageToSignParams\n) => Promise<GetMessageToSignResult>\nexport type ListMessagesToSign = () => Promise<ListMessagesToSignResult>\nexport type DeleteMessageToSign = (\n params: DeleteMessageToSignParams\n) => Promise<Null>\nexport type Execute = (params: ExecuteParams) => Promise<ExecuteResult>\nexport type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>\nexport type RemoveSession = () => Promise<Null>\nexport type ListSessions = () => Promise<ListSessionsResult>\nexport type GetTransaction = (\n params: GetTransactionParams\n) => Promise<GetTransactionResult>\nexport type GetTransactionStatus = (\n params: GetTransactionStatusParams\n) => Promise<GetTransactionStatusResult>\nexport type ListTransactions = (\n params: ListTransactionsParams\n) => Promise<ListTransactionsResult>\nexport type DeleteTransaction = (\n params: DeleteTransactionParams\n) => Promise<Null>\nexport type GetUser = () => Promise<GetUserResult>\nexport type GenerateApiKey = (\n params: GenerateApiKeyParams\n) => Promise<GeneratedApiKey>\nexport type ListApiKeys = () => Promise<ListApiKeysResult>\nexport type RemoveApiKey = (params: RemoveApiKeyParams) => Promise<Null>\nexport type ListSigningProviders = () => Promise<ListSigningProvidersResult>\nexport type ListSigningProviderKeys = (\n params: ListSigningProviderKeysParams\n) => Promise<ListSigningProviderKeysResult>\nexport type GetWallet = (params: GetWalletParams) => Promise<GetWalletResult>\nexport type ChangeSigningProvider = (\n params: ChangeSigningProviderParams\n) => Promise<Null>\n/* oxlint-enable no-unused-vars */\n\ntype Params<T> = T extends (...args: infer A) => any\n ? A extends []\n ? never\n : A[0]\n : never\ntype Result<T> = T extends (...args: any[]) => Promise<infer R> ? R : never\n\nexport type RpcTypes = {\n addNetwork: {\n params: Params<AddNetwork>\n result: Result<AddNetwork>\n }\n\n removeNetwork: {\n params: Params<RemoveNetwork>\n result: Result<RemoveNetwork>\n }\n\n listNetworks: {\n params: Params<ListNetworks>\n result: Result<ListNetworks>\n }\n\n getNetwork: {\n params: Params<GetNetwork>\n result: Result<GetNetwork>\n }\n\n selfSignedAccessToken: {\n params: Params<SelfSignedAccessToken>\n result: Result<SelfSignedAccessToken>\n }\n\n addIdp: {\n params: Params<AddIdp>\n result: Result<AddIdp>\n }\n\n removeIdp: {\n params: Params<RemoveIdp>\n result: Result<RemoveIdp>\n }\n\n listIdps: {\n params: Params<ListIdps>\n result: Result<ListIdps>\n }\n\n createWallet: {\n params: Params<CreateWallet>\n result: Result<CreateWallet>\n }\n\n startSelfIssuedLoginSession: {\n params: Params<StartSelfIssuedLoginSession>\n result: Result<StartSelfIssuedLoginSession>\n }\n\n getSelfIssuedLoginMode: {\n params: Params<GetSelfIssuedLoginMode>\n result: Result<GetSelfIssuedLoginMode>\n }\n\n createSelfIssuedWallet: {\n params: Params<CreateSelfIssuedWallet>\n result: Result<CreateSelfIssuedWallet>\n }\n\n allocateSelfIssuedWallet: {\n params: Params<AllocateSelfIssuedWallet>\n result: Result<AllocateSelfIssuedWallet>\n }\n\n completeSelfIssuedLogin: {\n params: Params<CompleteSelfIssuedLogin>\n result: Result<CompleteSelfIssuedLogin>\n }\n\n removeSelfIssuedLoginSession: {\n params: Params<RemoveSelfIssuedLoginSession>\n result: Result<RemoveSelfIssuedLoginSession>\n }\n\n allocatePartyForWallet: {\n params: Params<AllocatePartyForWallet>\n result: Result<AllocatePartyForWallet>\n }\n\n setPrimaryWallet: {\n params: Params<SetPrimaryWallet>\n result: Result<SetPrimaryWallet>\n }\n\n removeWallet: {\n params: Params<RemoveWallet>\n result: Result<RemoveWallet>\n }\n\n listWallets: {\n params: Params<ListWallets>\n result: Result<ListWallets>\n }\n\n syncWallets: {\n params: Params<SyncWallets>\n result: Result<SyncWallets>\n }\n\n isWalletSyncNeeded: {\n params: Params<IsWalletSyncNeeded>\n result: Result<IsWalletSyncNeeded>\n }\n\n sign: {\n params: Params<Sign>\n result: Result<Sign>\n }\n\n signMessage: {\n params: Params<SignMessage>\n result: Result<SignMessage>\n }\n\n getSignMessageStatus: {\n params: Params<GetSignMessageStatus>\n result: Result<GetSignMessageStatus>\n }\n\n getMessageToSign: {\n params: Params<GetMessageToSign>\n result: Result<GetMessageToSign>\n }\n\n listMessagesToSign: {\n params: Params<ListMessagesToSign>\n result: Result<ListMessagesToSign>\n }\n\n deleteMessageToSign: {\n params: Params<DeleteMessageToSign>\n result: Result<DeleteMessageToSign>\n }\n\n execute: {\n params: Params<Execute>\n result: Result<Execute>\n }\n\n addSession: {\n params: Params<AddSession>\n result: Result<AddSession>\n }\n\n removeSession: {\n params: Params<RemoveSession>\n result: Result<RemoveSession>\n }\n\n listSessions: {\n params: Params<ListSessions>\n result: Result<ListSessions>\n }\n\n getTransaction: {\n params: Params<GetTransaction>\n result: Result<GetTransaction>\n }\n\n getTransactionStatus: {\n params: Params<GetTransactionStatus>\n result: Result<GetTransactionStatus>\n }\n\n listTransactions: {\n params: Params<ListTransactions>\n result: Result<ListTransactions>\n }\n\n deleteTransaction: {\n params: Params<DeleteTransaction>\n result: Result<DeleteTransaction>\n }\n\n getUser: {\n params: Params<GetUser>\n result: Result<GetUser>\n }\n\n generateApiKey: {\n params: Params<GenerateApiKey>\n result: Result<GenerateApiKey>\n }\n\n listApiKeys: {\n params: Params<ListApiKeys>\n result: Result<ListApiKeys>\n }\n\n removeApiKey: {\n params: Params<RemoveApiKey>\n result: Result<RemoveApiKey>\n }\n\n listSigningProviders: {\n params: Params<ListSigningProviders>\n result: Result<ListSigningProviders>\n }\n\n listSigningProviderKeys: {\n params: Params<ListSigningProviderKeys>\n result: Result<ListSigningProviderKeys>\n }\n\n getWallet: {\n params: Params<GetWallet>\n result: Result<GetWallet>\n }\n\n changeSigningProvider: {\n params: Params<ChangeSigningProvider>\n result: Result<ChangeSigningProvider>\n }\n}\n\nexport class WalletJSONRPCUserAPI {\n public transport: RpcTransport\n\n constructor(transport: RpcTransport) {\n this.transport = transport\n }\n\n public async request<M extends keyof RpcTypes>(\n args: RequestArgs<RpcTypes, M>\n ): Promise<RpcTypes[M]['result']> {\n const response = await this.transport.submit(args as RequestPayload)\n return response.result as RpcTypes[M]['result']\n }\n}\nexport default WalletJSONRPCUserAPI\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgsCA,IAAa,uBAAb,MAAkC;CAG9B,YAAY,WAAyB;EAF9B,gBAAA,MAAA,aAAA,KAAA,CAAA;EAGH,KAAK,YAAY;CACrB;CAEA,MAAa,QACT,MAC8B;EAE9B,QAAO,MADgB,KAAK,UAAU,OAAO,IAAsB,EAAA,CACnD;CACpB;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canton-network/core-wallet-user-rpc-client",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript client generated by OpenRPC",
6
6
  "license": "Apache-2.0",
@@ -23,12 +23,11 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@canton-network/core-rpc-transport": "1.15.0",
27
- "@canton-network/core-types": "2.1.0"
26
+ "@canton-network/core-rpc-transport": "1.16.0",
27
+ "@canton-network/core-types": "2.2.0"
28
28
  },
29
29
  "devDependencies": {
30
- "oxfmt": "^0.74.0",
31
- "tsdown": "^0.23.1",
30
+ "tsdown": "^0.23.2",
32
31
  "typedoc": "^0.28.20",
33
32
  "typescript": "npm:@typescript/typescript6@^6.0.2"
34
33
  },