@@ -46,12 +46,11 @@ export type Audience = string
4646 */
4747export interface Auth {
4848 method : Method
49- scope ? : Scope
50- clientId ? : ClientId
49+ scope : Scope
50+ clientId : ClientId
5151 clientSecret ?: ClientSecret
52- issuer : Issuer
53- audience ?: Audience
54- [ k : string ] : any
52+ issuer ?: Issuer
53+ audience : Audience
5554}
5655/**
5756 *
@@ -131,6 +130,37 @@ export type PreparedTransactionHash = string
131130export type CommandId = string
132131export type Signature = string
133132export type SignedBy = string
133+ export type Networks = Network [ ]
134+ /**
135+ *
136+ * ID of the identity provider
137+ *
138+ */
139+ export type Id = string
140+ /**
141+ *
142+ * Type of identity provider (OAuth2 or Self-Signed)
143+ *
144+ */
145+ export type Type = string
146+ /**
147+ *
148+ * URL to fetch the identity provider configuration
149+ *
150+ */
151+ export type ConfigUrl = string
152+ /**
153+ *
154+ * Structure representing the Identity Providers
155+ *
156+ */
157+ export interface Idp {
158+ id : Id
159+ type : Type
160+ issuer : Issuer
161+ configUrl ?: ConfigUrl
162+ }
163+ export type Idps = Idp [ ]
134164/**
135165 *
136166 * The party hint and name of the wallet.
@@ -166,7 +196,6 @@ export interface Wallet {
166196}
167197export type Added = Wallet [ ]
168198export type Removed = Wallet [ ]
169- export type Networks = Network [ ]
170199/**
171200 *
172201 * The access token for the session.
@@ -236,6 +265,14 @@ export interface AddSessionParams {
236265 *
237266 */
238267export type Null = null
268+ export interface ListNetworksResult {
269+ networks : Networks
270+ [ k : string ] : any
271+ }
272+ export interface ListIdpsResult {
273+ idps : Idps
274+ [ k : string ] : any
275+ }
239276export interface CreateWalletResult {
240277 wallet : Wallet
241278 [ k : string ] : any
@@ -268,10 +305,6 @@ export interface SignResult {
268305export interface ExecuteResult {
269306 [ key : string ] : any
270307}
271- export interface ListNetworksResult {
272- networks : Networks
273- [ k : string ] : any
274- }
275308/**
276309 *
277310 * Structure representing the connected network session
@@ -294,6 +327,8 @@ export interface ListSessionsResult {
294327
295328export type AddNetwork = ( params : AddNetworkParams ) => Promise < Null >
296329export type RemoveNetwork = ( params : RemoveNetworkParams ) => Promise < Null >
330+ export type ListNetworks = ( ) => Promise < ListNetworksResult >
331+ export type ListIdps = ( ) => Promise < ListIdpsResult >
297332export type CreateWallet = (
298333 params : CreateWalletParams
299334) => Promise < CreateWalletResult >
@@ -307,7 +342,6 @@ export type ListWallets = (
307342export type SyncWallets = ( ) => Promise < SyncWalletsResult >
308343export type Sign = ( params : SignParams ) => Promise < SignResult >
309344export type Execute = ( params : ExecuteParams ) => Promise < ExecuteResult >
310- export type ListNetworks = ( ) => Promise < ListNetworksResult >
311345export type AddSession = ( params : AddSessionParams ) => Promise < AddSessionResult >
312346export type ListSessions = ( ) => Promise < ListSessionsResult >
313347
@@ -336,6 +370,24 @@ export class SpliceWalletJSONRPCUserAPI {
336370 ...params : Parameters < RemoveNetwork >
337371 ) : ReturnType < RemoveNetwork >
338372
373+ /**
374+ *
375+ */
376+ // tslint:disable-next-line:max-line-length
377+ public async request (
378+ method : 'listNetworks' ,
379+ ...params : Parameters < ListNetworks >
380+ ) : ReturnType < ListNetworks >
381+
382+ /**
383+ *
384+ */
385+ // tslint:disable-next-line:max-line-length
386+ public async request (
387+ method : 'listIdps' ,
388+ ...params : Parameters < ListIdps >
389+ ) : ReturnType < ListIdps >
390+
339391 /**
340392 *
341393 */
@@ -399,15 +451,6 @@ export class SpliceWalletJSONRPCUserAPI {
399451 ...params : Parameters < Execute >
400452 ) : ReturnType < Execute >
401453
402- /**
403- *
404- */
405- // tslint:disable-next-line:max-line-length
406- public async request (
407- method : 'listNetworks' ,
408- ...params : Parameters < ListNetworks >
409- ) : ReturnType < ListNetworks >
410-
411454 /**
412455 *
413456 */
0 commit comments