-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
intents: support for the proposed auth changes
- Loading branch information
Showing
3 changed files
with
131 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* eslint-disable */ | ||
// sequence-waas-intents v0.1.0 7ab7a9ad425b7f572331c5b85eda53436264c646 | ||
// sequence-waas-intents v0.1.0 abad0ae15a75bd1b90311a0358745e4e4e311cdd | ||
// -- | ||
// Code generated by [email protected].6 with typescript generator. DO NOT EDIT. | ||
// Code generated by [email protected].7 with typescript generator. DO NOT EDIT. | ||
// | ||
// webrpc-gen -schema=intent.ridl -target=typescript -client -out=./intent.gen.ts | ||
|
||
|
@@ -12,14 +12,15 @@ export const WebRPCVersion = "v1" | |
export const WebRPCSchemaVersion = "v0.1.0" | ||
|
||
// Schema hash generated from your RIDL schema | ||
export const WebRPCSchemaHash = "7ab7a9ad425b7f572331c5b85eda53436264c646" | ||
export const WebRPCSchemaHash = "abad0ae15a75bd1b90311a0358745e4e4e311cdd" | ||
|
||
// | ||
// Types | ||
// | ||
|
||
|
||
export enum IntentName { | ||
initiateAuth = 'initiateAuth', | ||
openSession = 'openSession', | ||
closeSession = 'closeSession', | ||
validateSession = 'validateSession', | ||
|
@@ -33,7 +34,8 @@ export enum IntentName { | |
getTransactionReceipt = 'getTransactionReceipt', | ||
federateAccount = 'federateAccount', | ||
removeAccount = 'removeAccount', | ||
listAccounts = 'listAccounts' | ||
listAccounts = 'listAccounts', | ||
getIdToken = 'getIdToken' | ||
} | ||
|
||
export enum TransactionType { | ||
|
@@ -45,6 +47,7 @@ export enum TransactionType { | |
} | ||
|
||
export enum IntentResponseCode { | ||
authInitiated = 'authInitiated', | ||
sessionOpened = 'sessionOpened', | ||
sessionClosed = 'sessionClosed', | ||
sessionList = 'sessionList', | ||
|
@@ -59,7 +62,8 @@ export enum IntentResponseCode { | |
getSessionResponse = 'getSessionResponse', | ||
accountList = 'accountList', | ||
accountFederated = 'accountFederated', | ||
accountRemoved = 'accountRemoved' | ||
accountRemoved = 'accountRemoved', | ||
idToken = 'idToken' | ||
} | ||
|
||
export enum FeeTokenType { | ||
|
@@ -71,7 +75,8 @@ export enum FeeTokenType { | |
export enum IdentityType { | ||
None = 'None', | ||
Guest = 'Guest', | ||
OIDC = 'OIDC' | ||
OIDC = 'OIDC', | ||
Email = 'Email' | ||
} | ||
|
||
export interface Intent { | ||
|
@@ -88,11 +93,19 @@ export interface Signature { | |
signature: string | ||
} | ||
|
||
export interface IntentDataInitiateAuth { | ||
sessionId: string | ||
identityType: IdentityType | ||
verifier: string | ||
} | ||
|
||
export interface IntentDataOpenSession { | ||
sessionId: string | ||
verifier?: string | ||
challenge?: string | ||
forceCreateAccount?: boolean | ||
email?: string | ||
idToken?: string | ||
forceCreateAccount?: boolean | ||
} | ||
|
||
export interface IntentDataCloseSession { | ||
|
@@ -157,7 +170,8 @@ export interface IntentDataGetTransactionReceipt { | |
export interface IntentDataFederateAccount { | ||
sessionId: string | ||
wallet: string | ||
idToken: string | ||
email?: string | ||
challenge?: string | ||
} | ||
|
||
export interface IntentDataListAccounts { | ||
|
@@ -169,6 +183,12 @@ export interface IntentDataRemoveAccount { | |
accountId: string | ||
} | ||
|
||
export interface IntentDataGetIdToken { | ||
sessionId: string | ||
wallet: string | ||
nonce?: string | ||
} | ||
|
||
export interface TransactionRaw { | ||
type: string | ||
to: string | ||
|
@@ -217,6 +237,13 @@ export interface IntentResponse { | |
data: any | ||
} | ||
|
||
export interface IntentResponseAuthInitiated { | ||
sessionId: string | ||
identityType: IdentityType | ||
expiresIn: number | ||
challenge?: string | ||
} | ||
|
||
export interface IntentResponseSessionOpened { | ||
sessionId: string | ||
wallet: string | ||
|
@@ -312,10 +339,15 @@ export interface IntentResponseAccountFederated { | |
export interface IntentResponseAccountRemoved { | ||
} | ||
|
||
export interface IntentResponseIdToken { | ||
idToken: string | ||
expiresIn: number | ||
} | ||
|
||
export interface Account { | ||
id: string | ||
type: IdentityType | ||
issuer: string | ||
issuer?: string | ||
email?: string | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters