@canton-network/core-wallet-user-rpc-client 0.26.0 → 0.27.1
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.map +1 -1
- package/dist/index.d.ts +36 -35
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAymBO,IAAM,6BAAN,MAAiC;AAAA,EAGpC,YAAY,SAAA,EAAyB;AAFrC,IAAA,aAAA,CAAA,IAAA,EAAO,WAAA,CAAA;AAGH,IAAA,IAAA,CAAK,SAAA,GAAY,SAAA;AAAA,EACrB;AAAA,EAEA,MAAa,QACT,IAAA,EAC8B;AAC9B,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,SAAA,CAAU,OAAO,IAAsB,CAAA;AAEnE,IAAA,IAAI,WAAW,QAAA,EAAU;AACrB,MAAA,MAAM,IAAI,KAAA;AAAA,QACN,gBACI,QAAA,CAAS,KAAA,CAAM,IAAA,GACf,KAAA,GACA,SAAS,KAAA,CAAM;AAAA,OACvB;AAAA,IACJ,CAAA,MAAO;AACH,MAAA,OAAO,QAAA,CAAS,MAAA;AAAA,IACpB;AAAA,EACJ;AACJ;AACA,IAAO,aAAA,GAAQ","file":"index.cjs","sourcesContent":["// Code generated by @open-rpc/generator DO NOT EDIT.\nimport _ from 'lodash'\n\nimport { RequestArgs, RequestPayload } from '@canton-network/core-types'\nimport { RpcTransport } from '@canton-network/core-rpc-transport'\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n *\n * Network ID\n *\n */\nexport type NetworkId = string\n/**\n *\n * Name of network\n *\n */\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 Method = string\nexport type Scope = string\nexport type ClientId = string\nexport type ClientSecret = string\n/**\n *\n * Issuer of identity provider\n *\n */\nexport type Issuer = string\nexport type Audience = string\n/**\n *\n * Represents the type of auth for a specified network\n *\n */\nexport interface Auth {\n method: Method\n scope: Scope\n clientId: ClientId\n clientSecret?: ClientSecret\n issuer?: Issuer\n audience: Audience\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type LedgerApi = string\n/**\n *\n * Structure representing the Networks\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 ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\n/**\n *\n * ID of the identity provider\n *\n */\nexport type Id = string\n/**\n *\n * Type of identity provider (oauth / self_signed)\n *\n */\nexport type Type = any\n/**\n *\n * The configuration URL for the identity provider.\n *\n */\nexport type ConfigUrl = string\n/**\n *\n * Structure representing the Identity Providers\n *\n */\nexport interface Idp {\n id: Id\n type: Type\n issuer: Issuer\n configUrl?: ConfigUrl\n}\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\nexport type PartyId = 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 * The namespace of the party.\n *\n */\nexport type Namespace = string\n/**\n *\n * Indicates that the wallet has been created in the database but hasn't yet been allocated by the participant.\n *\n */\nexport interface SigningProviderContext {\n partyId: PartyId\n externalTxId: ExternalTxId\n topologyTransactions: TopologyTransactions\n namespace: Namespace\n}\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 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 * The unique identifier of the command associated with the transaction.\n *\n */\nexport type CommandId = string\nexport type Signature = string\nexport type SignedBy = string\nexport type Networks = Network[]\nexport type Idps = Idp[]\n/**\n *\n * The status of the wallet.\n *\n */\nexport type WalletStatus = 'initialized' | 'allocated'\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type Hint = string\n/**\n *\n * The public key of the party.\n *\n */\nexport type PublicKey = 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 * The reason for the current status.\n *\n */\nexport type Reason = string\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}\ntype AlwaysTrue = any\nexport type Added = Wallet[]\nexport type Removed = Wallet[]\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\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\n/**\n *\n * The status of the transaction.\n *\n */\nexport type Status = string\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n id: Id\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport type Sessions = Session[]\n/**\n *\n * The timestamp when the transaction was created.\n *\n */\nexport type CreatedAt = string\n/**\n *\n * The timestamp when the transaction was signed.\n *\n */\nexport type SignedAt = string\n/**\n *\n * Optional payload associated with the transaction.\n *\n */\nexport type Payload = string\n/**\n *\n * The origin (dApp URL) that initiated this transaction request.\n *\n */\nexport type Origin = string\nexport interface Transaction {\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}\nexport type Transactions = Transaction[]\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\nexport interface AddNetworkParams {\n network: Network\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\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 signingProviderContext?: SigningProviderContext\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 preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n commandId: CommandId\n partyId: PartyId\n}\nexport interface ExecuteParams {\n signature: Signature\n partyId: PartyId\n commandId: CommandId\n signedBy: SignedBy\n}\nexport interface AddSessionParams {\n networkId: NetworkId\n}\nexport interface GetTransactionParams {\n commandId: CommandId\n}\nexport interface DeleteTransactionParams {\n commandId: CommandId\n}\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface ListNetworksResult {\n networks: Networks\n}\nexport interface ListIdpsResult {\n idps: Idps\n}\nexport interface CreateWalletResult {\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 and removed wallets as a result of the sync.\n *\n */\nexport interface SyncWalletsResult {\n added: Added\n removed: Removed\n}\nexport interface IsWalletSyncNeededResult {\n walletSyncNeeded: WalletSyncNeeded\n}\nexport interface SignResult {\n signature: Signature\n partyId: PartyId\n signedBy: SignedBy\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 network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n}\nexport interface GetTransactionResult {\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}\nexport interface ListTransactionsResult {\n transactions: Transactions\n}\nexport interface GetUserResult {\n userId: UserIdentifier\n isAdmin: IsAdminFlag\n}\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 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 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 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 ListTransactions = () => Promise<ListTransactionsResult>\nexport type DeleteTransaction = (\n params: DeleteTransactionParams\n) => Promise<Null>\nexport type GetUser = () => Promise<GetUserResult>\n/* eslint-enable @typescript-eslint/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 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 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 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 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\nexport class SpliceWalletJSONRPCUserAPI {\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\n if ('error' in response) {\n throw new Error(\n 'RPC error: ' +\n response.error.code +\n ' - ' +\n response.error.message\n )\n } else {\n return response.result as RpcTypes[M]['result']\n }\n }\n}\nexport default SpliceWalletJSONRPCUserAPI\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AA6mBO,IAAM,6BAAN,MAAiC;AAAA,EAGpC,YAAY,SAAA,EAAyB;AAFrC,IAAA,aAAA,CAAA,IAAA,EAAO,WAAA,CAAA;AAGH,IAAA,IAAA,CAAK,SAAA,GAAY,SAAA;AAAA,EACrB;AAAA,EAEA,MAAa,QACT,IAAA,EAC8B;AAC9B,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,SAAA,CAAU,OAAO,IAAsB,CAAA;AAEnE,IAAA,IAAI,WAAW,QAAA,EAAU;AACrB,MAAA,MAAM,IAAI,KAAA;AAAA,QACN,gBACI,QAAA,CAAS,KAAA,CAAM,IAAA,GACf,KAAA,GACA,SAAS,KAAA,CAAM;AAAA,OACvB;AAAA,IACJ,CAAA,MAAO;AACH,MAAA,OAAO,QAAA,CAAS,MAAA;AAAA,IACpB;AAAA,EACJ;AACJ;AACA,IAAO,aAAA,GAAQ","file":"index.cjs","sourcesContent":["// Code generated by @open-rpc/generator DO NOT EDIT.\nimport _ from 'lodash'\n\nimport { RequestArgs, RequestPayload } from '@canton-network/core-types'\nimport { RpcTransport } from '@canton-network/core-rpc-transport'\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n *\n * Network ID\n *\n */\nexport type NetworkId = string\n/**\n *\n * Name of network\n *\n */\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 Method = string\nexport type Scope = string\nexport type ClientId = string\nexport type ClientSecret = string\n/**\n *\n * Issuer of identity provider\n *\n */\nexport type Issuer = string\nexport type Audience = string\n/**\n *\n * Represents the type of auth for a specified network\n *\n */\nexport interface Auth {\n method: Method\n scope: Scope\n clientId: ClientId\n clientSecret?: ClientSecret\n issuer?: Issuer\n audience: Audience\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type LedgerApi = string\n/**\n *\n * Structure representing the Networks\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 ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\n/**\n *\n * ID of the identity provider\n *\n */\nexport type Id = string\n/**\n *\n * Type of identity provider (oauth / self_signed)\n *\n */\nexport type Type = any\n/**\n *\n * The configuration URL for the identity provider.\n *\n */\nexport type ConfigUrl = string\n/**\n *\n * Structure representing the Identity Providers\n *\n */\nexport interface Idp {\n id: Id\n type: Type\n issuer: Issuer\n configUrl?: ConfigUrl\n}\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\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 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 * The unique identifier of the command associated with the transaction.\n *\n */\nexport type CommandId = string\nexport type Signature = string\nexport type SignedBy = string\nexport type Networks = Network[]\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 public key of the party.\n *\n */\nexport type PublicKey = 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 * The reason for the current status.\n *\n */\nexport type Reason = string\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}\ntype AlwaysTrue = any\nexport type SyncWalletsResultAdded = Wallet[]\nexport type SyncWalletsResultUpdated = Wallet[]\nexport type SyncWalletsResultDisabled = Wallet[]\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\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\n/**\n *\n * The status of the transaction.\n *\n */\nexport type Status = string\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n id: Id\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport type Sessions = Session[]\n/**\n *\n * The timestamp when the transaction was created.\n *\n */\nexport type CreatedAt = string\n/**\n *\n * The timestamp when the transaction was signed.\n *\n */\nexport type SignedAt = string\n/**\n *\n * Optional payload associated with the transaction.\n *\n */\nexport type Payload = string\n/**\n *\n * The origin (dApp URL) that initiated this transaction request.\n *\n */\nexport type Origin = string\nexport interface Transaction {\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}\nexport type Transactions = Transaction[]\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\nexport interface AddNetworkParams {\n network: Network\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\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}\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 preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n commandId: CommandId\n partyId: PartyId\n}\nexport interface ExecuteParams {\n signature: Signature\n partyId: PartyId\n commandId: CommandId\n signedBy: SignedBy\n}\nexport interface AddSessionParams {\n networkId: NetworkId\n}\nexport interface GetTransactionParams {\n commandId: CommandId\n}\nexport interface DeleteTransactionParams {\n commandId: CommandId\n}\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface ListNetworksResult {\n networks: Networks\n}\nexport interface ListIdpsResult {\n idps: Idps\n}\nexport interface CreateWalletResult {\n wallet: Wallet\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 and removed 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 interface SignResult {\n signature: Signature\n partyId: PartyId\n signedBy: SignedBy\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 network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n}\nexport interface GetTransactionResult {\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}\nexport interface ListTransactionsResult {\n transactions: Transactions\n}\nexport interface GetUserResult {\n userId: UserIdentifier\n isAdmin: IsAdminFlag\n}\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 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 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 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 ListTransactions = () => Promise<ListTransactionsResult>\nexport type DeleteTransaction = (\n params: DeleteTransactionParams\n) => Promise<Null>\nexport type GetUser = () => Promise<GetUserResult>\n/* eslint-enable @typescript-eslint/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 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 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 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 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\nexport class SpliceWalletJSONRPCUserAPI {\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\n if ('error' in response) {\n throw new Error(\n 'RPC error: ' +\n response.error.code +\n ' - ' +\n response.error.message\n )\n } else {\n return response.result as RpcTypes[M]['result']\n }\n }\n}\nexport default SpliceWalletJSONRPCUserAPI\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -129,35 +129,6 @@ export type PartyHint = string;
|
|
|
129
129
|
*/
|
|
130
130
|
export type SigningProviderId = string;
|
|
131
131
|
export type PartyId = string;
|
|
132
|
-
/**
|
|
133
|
-
*
|
|
134
|
-
* 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.
|
|
135
|
-
*
|
|
136
|
-
*/
|
|
137
|
-
export type ExternalTxId = string;
|
|
138
|
-
/**
|
|
139
|
-
*
|
|
140
|
-
* The topology transactions
|
|
141
|
-
*
|
|
142
|
-
*/
|
|
143
|
-
export type TopologyTransactions = string;
|
|
144
|
-
/**
|
|
145
|
-
*
|
|
146
|
-
* The namespace of the party.
|
|
147
|
-
*
|
|
148
|
-
*/
|
|
149
|
-
export type Namespace = string;
|
|
150
|
-
/**
|
|
151
|
-
*
|
|
152
|
-
* Indicates that the wallet has been created in the database but hasn't yet been allocated by the participant.
|
|
153
|
-
*
|
|
154
|
-
*/
|
|
155
|
-
export interface SigningProviderContext {
|
|
156
|
-
partyId: PartyId;
|
|
157
|
-
externalTxId: ExternalTxId;
|
|
158
|
-
topologyTransactions: TopologyTransactions;
|
|
159
|
-
namespace: Namespace;
|
|
160
|
-
}
|
|
161
132
|
/**
|
|
162
133
|
*
|
|
163
134
|
* Filter wallets by network IDs.
|
|
@@ -206,7 +177,7 @@ export type Idps = Idp[];
|
|
|
206
177
|
* The status of the wallet.
|
|
207
178
|
*
|
|
208
179
|
*/
|
|
209
|
-
export type WalletStatus = 'initialized' | 'allocated';
|
|
180
|
+
export type WalletStatus = 'initialized' | 'allocated' | 'removed';
|
|
210
181
|
/**
|
|
211
182
|
*
|
|
212
183
|
* The party hint and name of the wallet.
|
|
@@ -219,6 +190,24 @@ export type Hint = string;
|
|
|
219
190
|
*
|
|
220
191
|
*/
|
|
221
192
|
export type PublicKey = string;
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
* The namespace of the party.
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
198
|
+
export type Namespace = string;
|
|
199
|
+
/**
|
|
200
|
+
*
|
|
201
|
+
* 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.
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
204
|
+
export type ExternalTxId = string;
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* The topology transactions
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
210
|
+
export type TopologyTransactions = string;
|
|
222
211
|
/**
|
|
223
212
|
*
|
|
224
213
|
* 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.
|
|
@@ -250,8 +239,9 @@ export interface Wallet {
|
|
|
250
239
|
disabled?: Disabled;
|
|
251
240
|
reason?: Reason;
|
|
252
241
|
}
|
|
253
|
-
export type
|
|
254
|
-
export type
|
|
242
|
+
export type SyncWalletsResultAdded = Wallet[];
|
|
243
|
+
export type SyncWalletsResultUpdated = Wallet[];
|
|
244
|
+
export type SyncWalletsResultDisabled = Wallet[];
|
|
255
245
|
/**
|
|
256
246
|
*
|
|
257
247
|
* Whether wallet sync is needed. Returns true if there are disabled wallets or parties on the ledger that aren't in the store.
|
|
@@ -347,7 +337,9 @@ export interface CreateWalletParams {
|
|
|
347
337
|
primary?: Primary;
|
|
348
338
|
partyHint: PartyHint;
|
|
349
339
|
signingProviderId: SigningProviderId;
|
|
350
|
-
|
|
340
|
+
}
|
|
341
|
+
export interface AllocatePartyForWalletParams {
|
|
342
|
+
partyId: PartyId;
|
|
351
343
|
}
|
|
352
344
|
export interface SetPrimaryWalletParams {
|
|
353
345
|
partyId: PartyId;
|
|
@@ -394,6 +386,9 @@ export interface ListIdpsResult {
|
|
|
394
386
|
export interface CreateWalletResult {
|
|
395
387
|
wallet: Wallet;
|
|
396
388
|
}
|
|
389
|
+
export interface AllocatePartyForWalletResult {
|
|
390
|
+
wallet: Wallet;
|
|
391
|
+
}
|
|
397
392
|
export interface RemovePartyResult {
|
|
398
393
|
[key: string]: any;
|
|
399
394
|
}
|
|
@@ -409,8 +404,9 @@ export type ListWalletsResult = Wallet[];
|
|
|
409
404
|
*
|
|
410
405
|
*/
|
|
411
406
|
export interface SyncWalletsResult {
|
|
412
|
-
added:
|
|
413
|
-
|
|
407
|
+
added: SyncWalletsResultAdded;
|
|
408
|
+
updated: SyncWalletsResultUpdated;
|
|
409
|
+
disabled: SyncWalletsResultDisabled;
|
|
414
410
|
}
|
|
415
411
|
export interface IsWalletSyncNeededResult {
|
|
416
412
|
walletSyncNeeded: WalletSyncNeeded;
|
|
@@ -468,6 +464,7 @@ export type AddIdp = (params: AddIdpParams) => Promise<Null>;
|
|
|
468
464
|
export type RemoveIdp = (params: RemoveIdpParams) => Promise<Null>;
|
|
469
465
|
export type ListIdps = () => Promise<ListIdpsResult>;
|
|
470
466
|
export type CreateWallet = (params: CreateWalletParams) => Promise<CreateWalletResult>;
|
|
467
|
+
export type AllocatePartyForWallet = (params: AllocatePartyForWalletParams) => Promise<AllocatePartyForWalletResult>;
|
|
471
468
|
export type SetPrimaryWallet = (params: SetPrimaryWalletParams) => Promise<Null>;
|
|
472
469
|
export type RemoveWallet = (params: RemoveWalletParams) => Promise<RemovePartyResult>;
|
|
473
470
|
export type ListWallets = (params: ListWalletsParams) => Promise<ListWalletsResult>;
|
|
@@ -513,6 +510,10 @@ export type RpcTypes = {
|
|
|
513
510
|
params: Params<CreateWallet>;
|
|
514
511
|
result: Result<CreateWallet>;
|
|
515
512
|
};
|
|
513
|
+
allocatePartyForWallet: {
|
|
514
|
+
params: Params<AllocatePartyForWallet>;
|
|
515
|
+
result: Result<AllocatePartyForWallet>;
|
|
516
|
+
};
|
|
516
517
|
setPrimaryWallet: {
|
|
517
518
|
params: Params<SetPrimaryWallet>;
|
|
518
519
|
result: Result<SetPrimaryWallet>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["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B,MAAA,MAAM,IAAI,KAAA;AAAA,QACN,gBACI,QAAA,CAAS,KAAA,CAAM,IAAA,GACf,KAAA,GACA,SAAS,KAAA,CAAM;AAAA,OACvB;AAAA,IACJ,CAAA,MAAO;AACH,MAAA,OAAO,QAAA,CAAS,MAAA;AAAA,IACpB;AAAA,EACJ;AACJ;AACA,IAAO,aAAA,GAAQ","file":"index.js","sourcesContent":["// Code generated by @open-rpc/generator DO NOT EDIT.\nimport _ from 'lodash'\n\nimport { RequestArgs, RequestPayload } from '@canton-network/core-types'\nimport { RpcTransport } from '@canton-network/core-rpc-transport'\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n *\n * Network ID\n *\n */\nexport type NetworkId = string\n/**\n *\n * Name of network\n *\n */\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 Method = string\nexport type Scope = string\nexport type ClientId = string\nexport type ClientSecret = string\n/**\n *\n * Issuer of identity provider\n *\n */\nexport type Issuer = string\nexport type Audience = string\n/**\n *\n * Represents the type of auth for a specified network\n *\n */\nexport interface Auth {\n method: Method\n scope: Scope\n clientId: ClientId\n clientSecret?: ClientSecret\n issuer?: Issuer\n audience: Audience\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type LedgerApi = string\n/**\n *\n * Structure representing the Networks\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 ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\n/**\n *\n * ID of the identity provider\n *\n */\nexport type Id = string\n/**\n *\n * Type of identity provider (oauth / self_signed)\n *\n */\nexport type Type = any\n/**\n *\n * The configuration URL for the identity provider.\n *\n */\nexport type ConfigUrl = string\n/**\n *\n * Structure representing the Identity Providers\n *\n */\nexport interface Idp {\n id: Id\n type: Type\n issuer: Issuer\n configUrl?: ConfigUrl\n}\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\nexport type PartyId = 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 * The namespace of the party.\n *\n */\nexport type Namespace = string\n/**\n *\n * Indicates that the wallet has been created in the database but hasn't yet been allocated by the participant.\n *\n */\nexport interface SigningProviderContext {\n partyId: PartyId\n externalTxId: ExternalTxId\n topologyTransactions: TopologyTransactions\n namespace: Namespace\n}\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 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 * The unique identifier of the command associated with the transaction.\n *\n */\nexport type CommandId = string\nexport type Signature = string\nexport type SignedBy = string\nexport type Networks = Network[]\nexport type Idps = Idp[]\n/**\n *\n * The status of the wallet.\n *\n */\nexport type WalletStatus = 'initialized' | 'allocated'\n/**\n *\n * The party hint and name of the wallet.\n *\n */\nexport type Hint = string\n/**\n *\n * The public key of the party.\n *\n */\nexport type PublicKey = 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 * The reason for the current status.\n *\n */\nexport type Reason = string\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}\ntype AlwaysTrue = any\nexport type Added = Wallet[]\nexport type Removed = Wallet[]\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\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\n/**\n *\n * The status of the transaction.\n *\n */\nexport type Status = string\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n id: Id\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport type Sessions = Session[]\n/**\n *\n * The timestamp when the transaction was created.\n *\n */\nexport type CreatedAt = string\n/**\n *\n * The timestamp when the transaction was signed.\n *\n */\nexport type SignedAt = string\n/**\n *\n * Optional payload associated with the transaction.\n *\n */\nexport type Payload = string\n/**\n *\n * The origin (dApp URL) that initiated this transaction request.\n *\n */\nexport type Origin = string\nexport interface Transaction {\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}\nexport type Transactions = Transaction[]\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\nexport interface AddNetworkParams {\n network: Network\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\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 signingProviderContext?: SigningProviderContext\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 preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n commandId: CommandId\n partyId: PartyId\n}\nexport interface ExecuteParams {\n signature: Signature\n partyId: PartyId\n commandId: CommandId\n signedBy: SignedBy\n}\nexport interface AddSessionParams {\n networkId: NetworkId\n}\nexport interface GetTransactionParams {\n commandId: CommandId\n}\nexport interface DeleteTransactionParams {\n commandId: CommandId\n}\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface ListNetworksResult {\n networks: Networks\n}\nexport interface ListIdpsResult {\n idps: Idps\n}\nexport interface CreateWalletResult {\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 and removed wallets as a result of the sync.\n *\n */\nexport interface SyncWalletsResult {\n added: Added\n removed: Removed\n}\nexport interface IsWalletSyncNeededResult {\n walletSyncNeeded: WalletSyncNeeded\n}\nexport interface SignResult {\n signature: Signature\n partyId: PartyId\n signedBy: SignedBy\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 network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n}\nexport interface GetTransactionResult {\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}\nexport interface ListTransactionsResult {\n transactions: Transactions\n}\nexport interface GetUserResult {\n userId: UserIdentifier\n isAdmin: IsAdminFlag\n}\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 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 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 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 ListTransactions = () => Promise<ListTransactionsResult>\nexport type DeleteTransaction = (\n params: DeleteTransactionParams\n) => Promise<Null>\nexport type GetUser = () => Promise<GetUserResult>\n/* eslint-enable @typescript-eslint/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 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 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 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 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\nexport class SpliceWalletJSONRPCUserAPI {\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\n if ('error' in response) {\n throw new Error(\n 'RPC error: ' +\n response.error.code +\n ' - ' +\n response.error.message\n )\n } else {\n return response.result as RpcTypes[M]['result']\n }\n }\n}\nexport default SpliceWalletJSONRPCUserAPI\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;AA6mBO,IAAM,6BAAN,MAAiC;AAAA,EAGpC,YAAY,SAAA,EAAyB;AAFrC,IAAA,aAAA,CAAA,IAAA,EAAO,WAAA,CAAA;AAGH,IAAA,IAAA,CAAK,SAAA,GAAY,SAAA;AAAA,EACrB;AAAA,EAEA,MAAa,QACT,IAAA,EAC8B;AAC9B,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,SAAA,CAAU,OAAO,IAAsB,CAAA;AAEnE,IAAA,IAAI,WAAW,QAAA,EAAU;AACrB,MAAA,MAAM,IAAI,KAAA;AAAA,QACN,gBACI,QAAA,CAAS,KAAA,CAAM,IAAA,GACf,KAAA,GACA,SAAS,KAAA,CAAM;AAAA,OACvB;AAAA,IACJ,CAAA,MAAO;AACH,MAAA,OAAO,QAAA,CAAS,MAAA;AAAA,IACpB;AAAA,EACJ;AACJ;AACA,IAAO,aAAA,GAAQ","file":"index.js","sourcesContent":["// Code generated by @open-rpc/generator DO NOT EDIT.\nimport _ from 'lodash'\n\nimport { RequestArgs, RequestPayload } from '@canton-network/core-types'\nimport { RpcTransport } from '@canton-network/core-rpc-transport'\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n *\n * Network ID\n *\n */\nexport type NetworkId = string\n/**\n *\n * Name of network\n *\n */\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 Method = string\nexport type Scope = string\nexport type ClientId = string\nexport type ClientSecret = string\n/**\n *\n * Issuer of identity provider\n *\n */\nexport type Issuer = string\nexport type Audience = string\n/**\n *\n * Represents the type of auth for a specified network\n *\n */\nexport interface Auth {\n method: Method\n scope: Scope\n clientId: ClientId\n clientSecret?: ClientSecret\n issuer?: Issuer\n audience: Audience\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type LedgerApi = string\n/**\n *\n * Structure representing the Networks\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 ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\n/**\n *\n * ID of the identity provider\n *\n */\nexport type Id = string\n/**\n *\n * Type of identity provider (oauth / self_signed)\n *\n */\nexport type Type = any\n/**\n *\n * The configuration URL for the identity provider.\n *\n */\nexport type ConfigUrl = string\n/**\n *\n * Structure representing the Identity Providers\n *\n */\nexport interface Idp {\n id: Id\n type: Type\n issuer: Issuer\n configUrl?: ConfigUrl\n}\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\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 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 * The unique identifier of the command associated with the transaction.\n *\n */\nexport type CommandId = string\nexport type Signature = string\nexport type SignedBy = string\nexport type Networks = Network[]\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 public key of the party.\n *\n */\nexport type PublicKey = 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 * The reason for the current status.\n *\n */\nexport type Reason = string\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}\ntype AlwaysTrue = any\nexport type SyncWalletsResultAdded = Wallet[]\nexport type SyncWalletsResultUpdated = Wallet[]\nexport type SyncWalletsResultDisabled = Wallet[]\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\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\n/**\n *\n * The status of the transaction.\n *\n */\nexport type Status = string\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n id: Id\n network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport type Sessions = Session[]\n/**\n *\n * The timestamp when the transaction was created.\n *\n */\nexport type CreatedAt = string\n/**\n *\n * The timestamp when the transaction was signed.\n *\n */\nexport type SignedAt = string\n/**\n *\n * Optional payload associated with the transaction.\n *\n */\nexport type Payload = string\n/**\n *\n * The origin (dApp URL) that initiated this transaction request.\n *\n */\nexport type Origin = string\nexport interface Transaction {\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}\nexport type Transactions = Transaction[]\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\nexport interface AddNetworkParams {\n network: Network\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\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}\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 preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n commandId: CommandId\n partyId: PartyId\n}\nexport interface ExecuteParams {\n signature: Signature\n partyId: PartyId\n commandId: CommandId\n signedBy: SignedBy\n}\nexport interface AddSessionParams {\n networkId: NetworkId\n}\nexport interface GetTransactionParams {\n commandId: CommandId\n}\nexport interface DeleteTransactionParams {\n commandId: CommandId\n}\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface ListNetworksResult {\n networks: Networks\n}\nexport interface ListIdpsResult {\n idps: Idps\n}\nexport interface CreateWalletResult {\n wallet: Wallet\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 and removed 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 interface SignResult {\n signature: Signature\n partyId: PartyId\n signedBy: SignedBy\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 network: Network\n idp: Idp\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n}\nexport interface GetTransactionResult {\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}\nexport interface ListTransactionsResult {\n transactions: Transactions\n}\nexport interface GetUserResult {\n userId: UserIdentifier\n isAdmin: IsAdminFlag\n}\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 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 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 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 ListTransactions = () => Promise<ListTransactionsResult>\nexport type DeleteTransaction = (\n params: DeleteTransactionParams\n) => Promise<Null>\nexport type GetUser = () => Promise<GetUserResult>\n/* eslint-enable @typescript-eslint/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 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 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 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 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\nexport class SpliceWalletJSONRPCUserAPI {\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\n if ('error' in response) {\n throw new Error(\n 'RPC error: ' +\n response.error.code +\n ' - ' +\n response.error.message\n )\n } else {\n return response.result as RpcTypes[M]['result']\n }\n }\n}\nexport default SpliceWalletJSONRPCUserAPI\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canton-network/core-wallet-user-rpc-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript client generated by OpenRPC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@canton-network/core-rpc-transport": "^0.
|
|
33
|
-
"@canton-network/core-types": "^0.
|
|
32
|
+
"@canton-network/core-rpc-transport": "^0.8.1",
|
|
33
|
+
"@canton-network/core-types": "^0.22.1",
|
|
34
34
|
"lodash": "^4.17.23"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|