@canton-network/core-wallet-user-rpc-client 0.11.0 → 0.12.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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AA+TO,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,EA8GA,MAAa,OAAA,CACT,MAAA,EACA,MAAA,EACgB;AAChB,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,SAAA,CAAU,OAAO,EAAE,MAAA,EAAQ,QAAQ,CAAA;AAE/D,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 { RequestPayload, RpcTransport } from '@canton-network/core-types'\n\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 * Network Id\n *\n */\nexport type ChainId = string\nexport type Type = string\nexport type IdentityProviderId = string\nexport type TokenUrl = string\nexport type GrantType = string\nexport type Scope = string\nexport type ClientId = string\nexport type ClientSecret = string\nexport type Issuer = string\nexport type ConfigUrl = string\nexport type Audience = string\nexport interface Admin {\n clientId: ClientId\n clientSecret: ClientSecret\n [k: string]: any\n}\n/**\n *\n * Represents the type of auth (implicit or password) for a specified network\n *\n */\nexport interface Auth {\n authType?: Type\n identityProviderId: IdentityProviderId\n tokenUrl?: TokenUrl\n grantType?: GrantType\n scope?: Scope\n clientId?: ClientId\n clientSecret?: ClientSecret\n issuer: Issuer\n configUrl: ConfigUrl\n audience?: Audience\n admin?: Admin\n [k: string]: any\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 name: Name\n description: Description\n synchronizerId: SynchronizerId\n chainId: ChainId\n auth: Auth\n ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\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 ChainIds = ChainId[]\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 chainIds?: ChainIds\n signingProviderIds?: SigningProviderIds\n [k: string]: any\n}\nexport type PreparedTransaction = string\nexport type PreparedTransactionHash = string\n/**\n *\n * The command ID of the transaction to be executed.\n *\n */\nexport type CommandId = string\nexport type Signature = string\nexport type SignedBy = string\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 * Structure representing a wallet\n *\n */\nexport interface Wallet {\n primary: Primary\n partyId: PartyId\n hint: Hint\n publicKey: PublicKey\n namespace: Namespace\n chainId: ChainId\n signingProviderId: SigningProviderId\n [k: string]: any\n}\nexport type Added = Wallet[]\nexport type Removed = Wallet[]\nexport type Networks = Network[]\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\nexport type Status = 'connected' | 'disconnected'\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n network: Network\n accessToken: AccessToken\n status: Status\n}\nexport type Sessions = Session[]\nexport interface AddNetworkParams {\n network: Network\n [k: string]: any\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\n [k: string]: any\n}\nexport interface CreateWalletParams {\n primary?: Primary\n partyHint: PartyHint\n chainId: ChainId\n signingProviderId: SigningProviderId\n [k: string]: any\n}\nexport interface SetPrimaryWalletParams {\n partyId: PartyId\n [k: string]: any\n}\nexport interface RemoveWalletParams {\n partyId: PartyId\n [k: string]: any\n}\nexport interface ListWalletsParams {\n filter?: WalletFilter\n [k: string]: any\n}\nexport interface SignParams {\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n commandId: CommandId\n partyId: PartyId\n [k: string]: any\n}\nexport interface ExecuteParams {\n signature: Signature\n partyId: PartyId\n commandId: CommandId\n signedBy: SignedBy\n [k: string]: any\n}\nexport interface AddSessionParams {\n chainId: ChainId\n [k: string]: any\n}\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface CreateWalletResult {\n wallet: Wallet\n [k: string]: any\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 [k: string]: any\n}\nexport interface SignResult {\n signature: Signature\n partyId: PartyId\n signedBy: SignedBy\n [k: string]: any\n}\nexport interface ExecuteResult {\n [key: string]: any\n}\nexport interface ListNetworksResult {\n networks: Networks\n [k: string]: any\n}\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface AddSessionResult {\n network: Network\n accessToken: AccessToken\n status: Status\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n [k: string]: any\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 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 Sign = (params: SignParams) => Promise<SignResult>\nexport type Execute = (params: ExecuteParams) => Promise<ExecuteResult>\nexport type ListNetworks = () => Promise<ListNetworksResult>\nexport type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>\nexport type ListSessions = () => Promise<ListSessionsResult>\n\nexport class SpliceWalletJSONRPCUserAPI {\n public transport: RpcTransport\n\n constructor(transport: RpcTransport) {\n this.transport = transport\n }\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'addNetwork',\n ...params: Parameters<AddNetwork>\n ): ReturnType<AddNetwork>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'removeNetwork',\n ...params: Parameters<RemoveNetwork>\n ): ReturnType<RemoveNetwork>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'createWallet',\n ...params: Parameters<CreateWallet>\n ): ReturnType<CreateWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'setPrimaryWallet',\n ...params: Parameters<SetPrimaryWallet>\n ): ReturnType<SetPrimaryWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'removeWallet',\n ...params: Parameters<RemoveWallet>\n ): ReturnType<RemoveWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listWallets',\n ...params: Parameters<ListWallets>\n ): ReturnType<ListWallets>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'syncWallets',\n ...params: Parameters<SyncWallets>\n ): ReturnType<SyncWallets>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'sign',\n ...params: Parameters<Sign>\n ): ReturnType<Sign>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'execute',\n ...params: Parameters<Execute>\n ): ReturnType<Execute>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listNetworks',\n ...params: Parameters<ListNetworks>\n ): ReturnType<ListNetworks>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'addSession',\n ...params: Parameters<AddSession>\n ): ReturnType<AddSession>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listSessions',\n ...params: Parameters<ListSessions>\n ): ReturnType<ListSessions>\n\n public async request(\n method: string,\n params?: RequestPayload['params']\n ): Promise<unknown> {\n const response = await this.transport.submit({ method, params })\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\n }\n }\n}\nexport default SpliceWalletJSONRPCUserAPI\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AA8XO,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,EAuHA,MAAa,OAAA,CACT,MAAA,EACA,MAAA,EACgB;AAChB,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,SAAA,CAAU,OAAO,EAAE,MAAA,EAAQ,QAAQ,CAAA;AAE/D,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 { RequestPayload, RpcTransport } from '@canton-network/core-types'\n\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\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 * 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 [k: string]: any\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 [k: string]: any\n}\nexport type PreparedTransaction = string\nexport type PreparedTransactionHash = string\n/**\n *\n * The command ID of the transaction to be executed.\n *\n */\nexport type CommandId = string\nexport type Signature = string\nexport type SignedBy = string\nexport type Networks = Network[]\n/**\n *\n * ID of the identity provider\n *\n */\nexport type Id = string\n/**\n *\n * Type of identity provider (OAuth2 or Self-Signed)\n *\n */\nexport type Type = string\n/**\n *\n * URL to fetch the identity provider configuration\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}\nexport type Idps = Idp[]\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 * Structure representing a wallet\n *\n */\nexport interface Wallet {\n primary: Primary\n partyId: PartyId\n hint: Hint\n publicKey: PublicKey\n namespace: Namespace\n networkId: NetworkId\n signingProviderId: SigningProviderId\n externalTxId?: ExternalTxId\n topologyTransactions?: TopologyTransactions\n [k: string]: any\n}\nexport type Added = Wallet[]\nexport type Removed = Wallet[]\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\nexport type Status = 'connected' | 'disconnected'\n/**\n *\n * The reason for the current status.\n *\n */\nexport type Reason = string\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n network: Network\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport type Sessions = Session[]\nexport interface AddNetworkParams {\n network: Network\n [k: string]: any\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\n [k: string]: any\n}\nexport interface CreateWalletParams {\n primary?: Primary\n partyHint: PartyHint\n networkId: NetworkId\n signingProviderId: SigningProviderId\n signingProviderContext?: SigningProviderContext\n [k: string]: any\n}\nexport interface SetPrimaryWalletParams {\n partyId: PartyId\n [k: string]: any\n}\nexport interface RemoveWalletParams {\n partyId: PartyId\n [k: string]: any\n}\nexport interface ListWalletsParams {\n filter?: WalletFilter\n [k: string]: any\n}\nexport interface SignParams {\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n commandId: CommandId\n partyId: PartyId\n [k: string]: any\n}\nexport interface ExecuteParams {\n signature: Signature\n partyId: PartyId\n commandId: CommandId\n signedBy: SignedBy\n [k: string]: any\n}\nexport interface AddSessionParams {\n networkId: NetworkId\n [k: string]: any\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 [k: string]: any\n}\nexport interface ListIdpsResult {\n idps: Idps\n [k: string]: any\n}\nexport interface CreateWalletResult {\n wallet: Wallet\n [k: string]: any\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 [k: string]: any\n}\nexport interface SignResult {\n signature: Signature\n partyId: PartyId\n signedBy: SignedBy\n [k: string]: any\n}\nexport interface ExecuteResult {\n [key: string]: any\n}\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface AddSessionResult {\n network: Network\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n [k: string]: any\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 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 Sign = (params: SignParams) => Promise<SignResult>\nexport type Execute = (params: ExecuteParams) => Promise<ExecuteResult>\nexport type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>\nexport type ListSessions = () => Promise<ListSessionsResult>\n\nexport class SpliceWalletJSONRPCUserAPI {\n public transport: RpcTransport\n\n constructor(transport: RpcTransport) {\n this.transport = transport\n }\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'addNetwork',\n ...params: Parameters<AddNetwork>\n ): ReturnType<AddNetwork>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'removeNetwork',\n ...params: Parameters<RemoveNetwork>\n ): ReturnType<RemoveNetwork>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listNetworks',\n ...params: Parameters<ListNetworks>\n ): ReturnType<ListNetworks>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listIdps',\n ...params: Parameters<ListIdps>\n ): ReturnType<ListIdps>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'createWallet',\n ...params: Parameters<CreateWallet>\n ): ReturnType<CreateWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'setPrimaryWallet',\n ...params: Parameters<SetPrimaryWallet>\n ): ReturnType<SetPrimaryWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'removeWallet',\n ...params: Parameters<RemoveWallet>\n ): ReturnType<RemoveWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listWallets',\n ...params: Parameters<ListWallets>\n ): ReturnType<ListWallets>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'syncWallets',\n ...params: Parameters<SyncWallets>\n ): ReturnType<SyncWallets>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'sign',\n ...params: Parameters<Sign>\n ): ReturnType<Sign>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'execute',\n ...params: Parameters<Execute>\n ): ReturnType<Execute>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'addSession',\n ...params: Parameters<AddSession>\n ): ReturnType<AddSession>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listSessions',\n ...params: Parameters<ListSessions>\n ): ReturnType<ListSessions>\n\n public async request(\n method: string,\n params?: RequestPayload['params']\n ): Promise<unknown> {\n const response = await this.transport.submit({ method, params })\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\n }\n }\n}\nexport default SpliceWalletJSONRPCUserAPI\n"]}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,10 @@
1
1
  import { RpcTransport } from '@canton-network/core-types';
2
+ /**
3
+ *
4
+ * Network ID
5
+ *
6
+ */
7
+ export type NetworkId = string;
2
8
  /**
3
9
  *
4
10
  * Name of network
@@ -19,43 +25,28 @@ export type Description = string;
19
25
  export type SynchronizerId = string;
20
26
  /**
21
27
  *
22
- * Network Id
28
+ * Identity Provider ID
23
29
  *
24
30
  */
25
- export type ChainId = string;
26
- export type Type = string;
27
31
  export type IdentityProviderId = string;
28
- export type TokenUrl = string;
29
- export type GrantType = string;
32
+ export type Method = string;
30
33
  export type Scope = string;
31
34
  export type ClientId = string;
32
35
  export type ClientSecret = string;
33
36
  export type Issuer = string;
34
- export type ConfigUrl = string;
35
37
  export type Audience = string;
36
- export interface Admin {
37
- clientId: ClientId;
38
- clientSecret: ClientSecret;
39
- [k: string]: any;
40
- }
41
38
  /**
42
39
  *
43
- * Represents the type of auth (implicit or password) for a specified network
40
+ * Represents the type of auth for a specified network
44
41
  *
45
42
  */
46
43
  export interface Auth {
47
- authType?: Type;
48
- identityProviderId: IdentityProviderId;
49
- tokenUrl?: TokenUrl;
50
- grantType?: GrantType;
51
- scope?: Scope;
52
- clientId?: ClientId;
44
+ method: Method;
45
+ scope: Scope;
46
+ clientId: ClientId;
53
47
  clientSecret?: ClientSecret;
54
- issuer: Issuer;
55
- configUrl: ConfigUrl;
56
- audience?: Audience;
57
- admin?: Admin;
58
- [k: string]: any;
48
+ issuer?: Issuer;
49
+ audience: Audience;
59
50
  }
60
51
  /**
61
52
  *
@@ -69,11 +60,13 @@ export type LedgerApi = string;
69
60
  *
70
61
  */
71
62
  export interface Network {
63
+ id: NetworkId;
72
64
  name: Name;
73
65
  description: Description;
74
66
  synchronizerId: SynchronizerId;
75
- chainId: ChainId;
67
+ identityProviderId: IdentityProviderId;
76
68
  auth: Auth;
69
+ adminAuth?: Auth;
77
70
  ledgerApi: LedgerApi;
78
71
  }
79
72
  /**
@@ -101,12 +94,42 @@ export type PartyHint = string;
101
94
  */
102
95
  export type SigningProviderId = string;
103
96
  export type PartyId = string;
97
+ /**
98
+ *
99
+ * 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.
100
+ *
101
+ */
102
+ export type ExternalTxId = string;
103
+ /**
104
+ *
105
+ * The topology transactions
106
+ *
107
+ */
108
+ export type TopologyTransactions = string;
109
+ /**
110
+ *
111
+ * The namespace of the party.
112
+ *
113
+ */
114
+ export type Namespace = string;
115
+ /**
116
+ *
117
+ * Indicates that the wallet has been created in the database but hasn't yet been allocated by the participant.
118
+ *
119
+ */
120
+ export interface SigningProviderContext {
121
+ partyId: PartyId;
122
+ externalTxId: ExternalTxId;
123
+ topologyTransactions: TopologyTransactions;
124
+ namespace: Namespace;
125
+ [k: string]: any;
126
+ }
104
127
  /**
105
128
  *
106
129
  * Filter wallets by network IDs.
107
130
  *
108
131
  */
109
- export type ChainIds = ChainId[];
132
+ export type NetworkIds = NetworkId[];
110
133
  /**
111
134
  *
112
135
  * Filter wallets by signing provider IDs.
@@ -119,7 +142,7 @@ export type SigningProviderIds = SigningProviderId[];
119
142
  *
120
143
  */
121
144
  export interface WalletFilter {
122
- chainIds?: ChainIds;
145
+ networkIds?: NetworkIds;
123
146
  signingProviderIds?: SigningProviderIds;
124
147
  [k: string]: any;
125
148
  }
@@ -133,24 +156,49 @@ export type PreparedTransactionHash = string;
133
156
  export type CommandId = string;
134
157
  export type Signature = string;
135
158
  export type SignedBy = string;
159
+ export type Networks = Network[];
136
160
  /**
137
161
  *
138
- * The party hint and name of the wallet.
162
+ * ID of the identity provider
139
163
  *
140
164
  */
141
- export type Hint = string;
165
+ export type Id = string;
142
166
  /**
143
167
  *
144
- * The public key of the party.
168
+ * Type of identity provider (OAuth2 or Self-Signed)
145
169
  *
146
170
  */
147
- export type PublicKey = string;
171
+ export type Type = string;
148
172
  /**
149
173
  *
150
- * The namespace of the party.
174
+ * URL to fetch the identity provider configuration
151
175
  *
152
176
  */
153
- export type Namespace = string;
177
+ export type ConfigUrl = string;
178
+ /**
179
+ *
180
+ * Structure representing the Identity Providers
181
+ *
182
+ */
183
+ export interface Idp {
184
+ id: Id;
185
+ type: Type;
186
+ issuer: Issuer;
187
+ configUrl?: ConfigUrl;
188
+ }
189
+ export type Idps = Idp[];
190
+ /**
191
+ *
192
+ * The party hint and name of the wallet.
193
+ *
194
+ */
195
+ export type Hint = string;
196
+ /**
197
+ *
198
+ * The public key of the party.
199
+ *
200
+ */
201
+ export type PublicKey = string;
154
202
  /**
155
203
  *
156
204
  * Structure representing a wallet
@@ -162,13 +210,14 @@ export interface Wallet {
162
210
  hint: Hint;
163
211
  publicKey: PublicKey;
164
212
  namespace: Namespace;
165
- chainId: ChainId;
213
+ networkId: NetworkId;
166
214
  signingProviderId: SigningProviderId;
215
+ externalTxId?: ExternalTxId;
216
+ topologyTransactions?: TopologyTransactions;
167
217
  [k: string]: any;
168
218
  }
169
219
  export type Added = Wallet[];
170
220
  export type Removed = Wallet[];
171
- export type Networks = Network[];
172
221
  /**
173
222
  *
174
223
  * The access token for the session.
@@ -176,6 +225,12 @@ export type Networks = Network[];
176
225
  */
177
226
  export type AccessToken = string;
178
227
  export type Status = 'connected' | 'disconnected';
228
+ /**
229
+ *
230
+ * The reason for the current status.
231
+ *
232
+ */
233
+ export type Reason = string;
179
234
  /**
180
235
  *
181
236
  * Structure representing the connected network session
@@ -185,6 +240,7 @@ export interface Session {
185
240
  network: Network;
186
241
  accessToken: AccessToken;
187
242
  status: Status;
243
+ reason?: Reason;
188
244
  }
189
245
  export type Sessions = Session[];
190
246
  export interface AddNetworkParams {
@@ -198,8 +254,9 @@ export interface RemoveNetworkParams {
198
254
  export interface CreateWalletParams {
199
255
  primary?: Primary;
200
256
  partyHint: PartyHint;
201
- chainId: ChainId;
257
+ networkId: NetworkId;
202
258
  signingProviderId: SigningProviderId;
259
+ signingProviderContext?: SigningProviderContext;
203
260
  [k: string]: any;
204
261
  }
205
262
  export interface SetPrimaryWalletParams {
@@ -229,7 +286,7 @@ export interface ExecuteParams {
229
286
  [k: string]: any;
230
287
  }
231
288
  export interface AddSessionParams {
232
- chainId: ChainId;
289
+ networkId: NetworkId;
233
290
  [k: string]: any;
234
291
  }
235
292
  /**
@@ -238,6 +295,14 @@ export interface AddSessionParams {
238
295
  *
239
296
  */
240
297
  export type Null = null;
298
+ export interface ListNetworksResult {
299
+ networks: Networks;
300
+ [k: string]: any;
301
+ }
302
+ export interface ListIdpsResult {
303
+ idps: Idps;
304
+ [k: string]: any;
305
+ }
241
306
  export interface CreateWalletResult {
242
307
  wallet: Wallet;
243
308
  [k: string]: any;
@@ -270,10 +335,6 @@ export interface SignResult {
270
335
  export interface ExecuteResult {
271
336
  [key: string]: any;
272
337
  }
273
- export interface ListNetworksResult {
274
- networks: Networks;
275
- [k: string]: any;
276
- }
277
338
  /**
278
339
  *
279
340
  * Structure representing the connected network session
@@ -283,6 +344,7 @@ export interface AddSessionResult {
283
344
  network: Network;
284
345
  accessToken: AccessToken;
285
346
  status: Status;
347
+ reason?: Reason;
286
348
  }
287
349
  export interface ListSessionsResult {
288
350
  sessions: Sessions;
@@ -295,6 +357,8 @@ export interface ListSessionsResult {
295
357
  */
296
358
  export type AddNetwork = (params: AddNetworkParams) => Promise<Null>;
297
359
  export type RemoveNetwork = (params: RemoveNetworkParams) => Promise<Null>;
360
+ export type ListNetworks = () => Promise<ListNetworksResult>;
361
+ export type ListIdps = () => Promise<ListIdpsResult>;
298
362
  export type CreateWallet = (params: CreateWalletParams) => Promise<CreateWalletResult>;
299
363
  export type SetPrimaryWallet = (params: SetPrimaryWalletParams) => Promise<Null>;
300
364
  export type RemoveWallet = (params: RemoveWalletParams) => Promise<RemovePartyResult>;
@@ -302,7 +366,6 @@ export type ListWallets = (params: ListWalletsParams) => Promise<ListWalletsResu
302
366
  export type SyncWallets = () => Promise<SyncWalletsResult>;
303
367
  export type Sign = (params: SignParams) => Promise<SignResult>;
304
368
  export type Execute = (params: ExecuteParams) => Promise<ExecuteResult>;
305
- export type ListNetworks = () => Promise<ListNetworksResult>;
306
369
  export type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>;
307
370
  export type ListSessions = () => Promise<ListSessionsResult>;
308
371
  export declare class SpliceWalletJSONRPCUserAPI {
@@ -316,6 +379,14 @@ export declare class SpliceWalletJSONRPCUserAPI {
316
379
  *
317
380
  */
318
381
  request(method: 'removeNetwork', ...params: Parameters<RemoveNetwork>): ReturnType<RemoveNetwork>;
382
+ /**
383
+ *
384
+ */
385
+ request(method: 'listNetworks', ...params: Parameters<ListNetworks>): ReturnType<ListNetworks>;
386
+ /**
387
+ *
388
+ */
389
+ request(method: 'listIdps', ...params: Parameters<ListIdps>): ReturnType<ListIdps>;
319
390
  /**
320
391
  *
321
392
  */
@@ -344,10 +415,6 @@ export declare class SpliceWalletJSONRPCUserAPI {
344
415
  *
345
416
  */
346
417
  request(method: 'execute', ...params: Parameters<Execute>): ReturnType<Execute>;
347
- /**
348
- *
349
- */
350
- request(method: 'listNetworks', ...params: Parameters<ListNetworks>): ReturnType<ListNetworks>;
351
418
  /**
352
419
  *
353
420
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzE;;;;GAIG;AACH,MAAM,MAAM,IAAI,GAAG,MAAM,CAAA;AACzB;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAChC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAA;AACnC;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAA;AAC5B,MAAM,MAAM,IAAI,GAAG,MAAM,CAAA;AACzB,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAA;AACvC,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAA;AAC7B,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAC9B,MAAM,MAAM,KAAK,GAAG,MAAM,CAAA;AAC1B,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAA;AAC7B,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AACjC,MAAM,MAAM,MAAM,GAAG,MAAM,CAAA;AAC3B,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAC9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AAA,EAGpC,YAAY,SAAA,EAAyB;AAFrC,IAAA,aAAA,CAAA,IAAA,EAAO,WAAA,CAAA;AAGH,IAAA,IAAA,CAAK,SAAA,GAAY,SAAA;AAAA,EACrB;AAAA,EA8GA,MAAa,OAAA,CACT,MAAA,EACA,MAAA,EACgB;AAChB,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,SAAA,CAAU,OAAO,EAAE,MAAA,EAAQ,QAAQ,CAAA;AAE/D,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 { RequestPayload, RpcTransport } from '@canton-network/core-types'\n\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 * Network Id\n *\n */\nexport type ChainId = string\nexport type Type = string\nexport type IdentityProviderId = string\nexport type TokenUrl = string\nexport type GrantType = string\nexport type Scope = string\nexport type ClientId = string\nexport type ClientSecret = string\nexport type Issuer = string\nexport type ConfigUrl = string\nexport type Audience = string\nexport interface Admin {\n clientId: ClientId\n clientSecret: ClientSecret\n [k: string]: any\n}\n/**\n *\n * Represents the type of auth (implicit or password) for a specified network\n *\n */\nexport interface Auth {\n authType?: Type\n identityProviderId: IdentityProviderId\n tokenUrl?: TokenUrl\n grantType?: GrantType\n scope?: Scope\n clientId?: ClientId\n clientSecret?: ClientSecret\n issuer: Issuer\n configUrl: ConfigUrl\n audience?: Audience\n admin?: Admin\n [k: string]: any\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 name: Name\n description: Description\n synchronizerId: SynchronizerId\n chainId: ChainId\n auth: Auth\n ledgerApi: LedgerApi\n}\n/**\n *\n * Ledger api url\n *\n */\nexport type NetworkName = string\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 ChainIds = ChainId[]\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 chainIds?: ChainIds\n signingProviderIds?: SigningProviderIds\n [k: string]: any\n}\nexport type PreparedTransaction = string\nexport type PreparedTransactionHash = string\n/**\n *\n * The command ID of the transaction to be executed.\n *\n */\nexport type CommandId = string\nexport type Signature = string\nexport type SignedBy = string\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 * Structure representing a wallet\n *\n */\nexport interface Wallet {\n primary: Primary\n partyId: PartyId\n hint: Hint\n publicKey: PublicKey\n namespace: Namespace\n chainId: ChainId\n signingProviderId: SigningProviderId\n [k: string]: any\n}\nexport type Added = Wallet[]\nexport type Removed = Wallet[]\nexport type Networks = Network[]\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\nexport type Status = 'connected' | 'disconnected'\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n network: Network\n accessToken: AccessToken\n status: Status\n}\nexport type Sessions = Session[]\nexport interface AddNetworkParams {\n network: Network\n [k: string]: any\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\n [k: string]: any\n}\nexport interface CreateWalletParams {\n primary?: Primary\n partyHint: PartyHint\n chainId: ChainId\n signingProviderId: SigningProviderId\n [k: string]: any\n}\nexport interface SetPrimaryWalletParams {\n partyId: PartyId\n [k: string]: any\n}\nexport interface RemoveWalletParams {\n partyId: PartyId\n [k: string]: any\n}\nexport interface ListWalletsParams {\n filter?: WalletFilter\n [k: string]: any\n}\nexport interface SignParams {\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n commandId: CommandId\n partyId: PartyId\n [k: string]: any\n}\nexport interface ExecuteParams {\n signature: Signature\n partyId: PartyId\n commandId: CommandId\n signedBy: SignedBy\n [k: string]: any\n}\nexport interface AddSessionParams {\n chainId: ChainId\n [k: string]: any\n}\n/**\n *\n * Represents a null value, used in responses where no data is returned.\n *\n */\nexport type Null = null\nexport interface CreateWalletResult {\n wallet: Wallet\n [k: string]: any\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 [k: string]: any\n}\nexport interface SignResult {\n signature: Signature\n partyId: PartyId\n signedBy: SignedBy\n [k: string]: any\n}\nexport interface ExecuteResult {\n [key: string]: any\n}\nexport interface ListNetworksResult {\n networks: Networks\n [k: string]: any\n}\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface AddSessionResult {\n network: Network\n accessToken: AccessToken\n status: Status\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n [k: string]: any\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 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 Sign = (params: SignParams) => Promise<SignResult>\nexport type Execute = (params: ExecuteParams) => Promise<ExecuteResult>\nexport type ListNetworks = () => Promise<ListNetworksResult>\nexport type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>\nexport type ListSessions = () => Promise<ListSessionsResult>\n\nexport class SpliceWalletJSONRPCUserAPI {\n public transport: RpcTransport\n\n constructor(transport: RpcTransport) {\n this.transport = transport\n }\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'addNetwork',\n ...params: Parameters<AddNetwork>\n ): ReturnType<AddNetwork>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'removeNetwork',\n ...params: Parameters<RemoveNetwork>\n ): ReturnType<RemoveNetwork>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'createWallet',\n ...params: Parameters<CreateWallet>\n ): ReturnType<CreateWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'setPrimaryWallet',\n ...params: Parameters<SetPrimaryWallet>\n ): ReturnType<SetPrimaryWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'removeWallet',\n ...params: Parameters<RemoveWallet>\n ): ReturnType<RemoveWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listWallets',\n ...params: Parameters<ListWallets>\n ): ReturnType<ListWallets>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'syncWallets',\n ...params: Parameters<SyncWallets>\n ): ReturnType<SyncWallets>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'sign',\n ...params: Parameters<Sign>\n ): ReturnType<Sign>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'execute',\n ...params: Parameters<Execute>\n ): ReturnType<Execute>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listNetworks',\n ...params: Parameters<ListNetworks>\n ): ReturnType<ListNetworks>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'addSession',\n ...params: Parameters<AddSession>\n ): ReturnType<AddSession>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listSessions',\n ...params: Parameters<ListSessions>\n ): ReturnType<ListSessions>\n\n public async request(\n method: string,\n params?: RequestPayload['params']\n ): Promise<unknown> {\n const response = await this.transport.submit({ method, params })\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\n }\n }\n}\nexport default SpliceWalletJSONRPCUserAPI\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;AA8XO,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,EAuHA,MAAa,OAAA,CACT,MAAA,EACA,MAAA,EACgB;AAChB,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,SAAA,CAAU,OAAO,EAAE,MAAA,EAAQ,QAAQ,CAAA;AAE/D,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 { RequestPayload, RpcTransport } from '@canton-network/core-types'\n\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\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 * 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 [k: string]: any\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 [k: string]: any\n}\nexport type PreparedTransaction = string\nexport type PreparedTransactionHash = string\n/**\n *\n * The command ID of the transaction to be executed.\n *\n */\nexport type CommandId = string\nexport type Signature = string\nexport type SignedBy = string\nexport type Networks = Network[]\n/**\n *\n * ID of the identity provider\n *\n */\nexport type Id = string\n/**\n *\n * Type of identity provider (OAuth2 or Self-Signed)\n *\n */\nexport type Type = string\n/**\n *\n * URL to fetch the identity provider configuration\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}\nexport type Idps = Idp[]\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 * Structure representing a wallet\n *\n */\nexport interface Wallet {\n primary: Primary\n partyId: PartyId\n hint: Hint\n publicKey: PublicKey\n namespace: Namespace\n networkId: NetworkId\n signingProviderId: SigningProviderId\n externalTxId?: ExternalTxId\n topologyTransactions?: TopologyTransactions\n [k: string]: any\n}\nexport type Added = Wallet[]\nexport type Removed = Wallet[]\n/**\n *\n * The access token for the session.\n *\n */\nexport type AccessToken = string\nexport type Status = 'connected' | 'disconnected'\n/**\n *\n * The reason for the current status.\n *\n */\nexport type Reason = string\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface Session {\n network: Network\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport type Sessions = Session[]\nexport interface AddNetworkParams {\n network: Network\n [k: string]: any\n}\nexport interface RemoveNetworkParams {\n networkName: NetworkName\n [k: string]: any\n}\nexport interface CreateWalletParams {\n primary?: Primary\n partyHint: PartyHint\n networkId: NetworkId\n signingProviderId: SigningProviderId\n signingProviderContext?: SigningProviderContext\n [k: string]: any\n}\nexport interface SetPrimaryWalletParams {\n partyId: PartyId\n [k: string]: any\n}\nexport interface RemoveWalletParams {\n partyId: PartyId\n [k: string]: any\n}\nexport interface ListWalletsParams {\n filter?: WalletFilter\n [k: string]: any\n}\nexport interface SignParams {\n preparedTransaction: PreparedTransaction\n preparedTransactionHash: PreparedTransactionHash\n commandId: CommandId\n partyId: PartyId\n [k: string]: any\n}\nexport interface ExecuteParams {\n signature: Signature\n partyId: PartyId\n commandId: CommandId\n signedBy: SignedBy\n [k: string]: any\n}\nexport interface AddSessionParams {\n networkId: NetworkId\n [k: string]: any\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 [k: string]: any\n}\nexport interface ListIdpsResult {\n idps: Idps\n [k: string]: any\n}\nexport interface CreateWalletResult {\n wallet: Wallet\n [k: string]: any\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 [k: string]: any\n}\nexport interface SignResult {\n signature: Signature\n partyId: PartyId\n signedBy: SignedBy\n [k: string]: any\n}\nexport interface ExecuteResult {\n [key: string]: any\n}\n/**\n *\n * Structure representing the connected network session\n *\n */\nexport interface AddSessionResult {\n network: Network\n accessToken: AccessToken\n status: Status\n reason?: Reason\n}\nexport interface ListSessionsResult {\n sessions: Sessions\n [k: string]: any\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 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 Sign = (params: SignParams) => Promise<SignResult>\nexport type Execute = (params: ExecuteParams) => Promise<ExecuteResult>\nexport type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>\nexport type ListSessions = () => Promise<ListSessionsResult>\n\nexport class SpliceWalletJSONRPCUserAPI {\n public transport: RpcTransport\n\n constructor(transport: RpcTransport) {\n this.transport = transport\n }\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'addNetwork',\n ...params: Parameters<AddNetwork>\n ): ReturnType<AddNetwork>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'removeNetwork',\n ...params: Parameters<RemoveNetwork>\n ): ReturnType<RemoveNetwork>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listNetworks',\n ...params: Parameters<ListNetworks>\n ): ReturnType<ListNetworks>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listIdps',\n ...params: Parameters<ListIdps>\n ): ReturnType<ListIdps>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'createWallet',\n ...params: Parameters<CreateWallet>\n ): ReturnType<CreateWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'setPrimaryWallet',\n ...params: Parameters<SetPrimaryWallet>\n ): ReturnType<SetPrimaryWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'removeWallet',\n ...params: Parameters<RemoveWallet>\n ): ReturnType<RemoveWallet>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listWallets',\n ...params: Parameters<ListWallets>\n ): ReturnType<ListWallets>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'syncWallets',\n ...params: Parameters<SyncWallets>\n ): ReturnType<SyncWallets>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'sign',\n ...params: Parameters<Sign>\n ): ReturnType<Sign>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'execute',\n ...params: Parameters<Execute>\n ): ReturnType<Execute>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'addSession',\n ...params: Parameters<AddSession>\n ): ReturnType<AddSession>\n\n /**\n *\n */\n // tslint:disable-next-line:max-line-length\n public async request(\n method: 'listSessions',\n ...params: Parameters<ListSessions>\n ): ReturnType<ListSessions>\n\n public async request(\n method: string,\n params?: RequestPayload['params']\n ): Promise<unknown> {\n const response = await this.transport.submit({ method, params })\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\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.11.0",
3
+ "version": "0.12.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript client generated by OpenRPC",
6
6
  "repository": "github:hyperledger-labs/splice-wallet-kernel",
@@ -30,7 +30,7 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "@canton-network/core-types": "^0.10.0",
33
+ "@canton-network/core-types": "^0.11.1",
34
34
  "lodash": "^4.17.15"
35
35
  },
36
36
  "devDependencies": {