Skip to content

Commit

Permalink
WIP waas wallet adoption
Browse files Browse the repository at this point in the history
  • Loading branch information
patrislav committed Oct 11, 2024
1 parent 44fefa9 commit e79de77
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 35 deletions.
21 changes: 19 additions & 2 deletions intents/intent.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 21 additions & 4 deletions intents/intent.gen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
// sequence-waas-intents v0.1.0 1fe0a24abef81231c54c0886157c65ef738d5ed6
// sequence-waas-intents v0.1.0 cf2bdd4237ab27bbf05383773801eca35d867b7e
// --
// Code generated by [email protected] with typescript generator. DO NOT EDIT.
//
Expand All @@ -12,7 +12,7 @@ export const WebRPCVersion = "v1"
export const WebRPCSchemaVersion = "v0.1.0"

// Schema hash generated from your RIDL schema
export const WebRPCSchemaHash = "1fe0a24abef81231c54c0886157c65ef738d5ed6"
export const WebRPCSchemaHash = "cf2bdd4237ab27bbf05383773801eca35d867b7e"

//
// Types
Expand All @@ -35,7 +35,8 @@ export enum IntentName {
federateAccount = 'federateAccount',
removeAccount = 'removeAccount',
listAccounts = 'listAccounts',
getIdToken = 'getIdToken'
getIdToken = 'getIdToken',
adoptChildWallet = 'adoptChildWallet'
}

export enum TransactionType {
Expand Down Expand Up @@ -63,7 +64,8 @@ export enum IntentResponseCode {
accountList = 'accountList',
accountFederated = 'accountFederated',
accountRemoved = 'accountRemoved',
idToken = 'idToken'
idToken = 'idToken',
childwalletAdopted = 'childwalletAdopted'
}

export enum FeeTokenType {
Expand Down Expand Up @@ -188,6 +190,18 @@ export interface IntentDataRemoveAccount {
accountId: string
}

export interface IntentDataAdoptChildWallet {
network: string
wallet: string
adopter: string
adopterProof: AdopterProof
}

export interface AdopterProof {
message: string
signature: string
}

export interface IntentDataGetIdToken {
sessionId: string
wallet: string
Expand Down Expand Up @@ -350,6 +364,9 @@ export interface IntentResponseIdToken {
expiresIn: number
}

export interface IntentResponseChildWalletAdopted {
}

export interface Account {
id: string
type: IdentityType
Expand Down
14 changes: 14 additions & 0 deletions intents/intent.ridl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ enum IntentName: string
- removeAccount
- listAccounts
- getIdToken
- adoptChildWallet

struct IntentDataInitiateAuth
- sessionId: string
Expand Down Expand Up @@ -141,6 +142,16 @@ struct IntentDataRemoveAccount
- accountId: string
+ go.field.name = AccountID

struct IntentDataAdoptChildWallet
- network: string
- wallet: string
- adopter: string
- adopterProof: AdopterProof

struct AdopterProof
- message: string
- signature: string

struct IntentDataGetIdToken
- sessionId: string
+ go.field.name = SessionID
Expand Down Expand Up @@ -216,6 +227,7 @@ enum IntentResponseCode: string
- accountFederated
- accountRemoved
- idToken
- childwalletAdopted

struct IntentResponseAuthInitiated
- sessionId: string
Expand Down Expand Up @@ -318,6 +330,8 @@ struct IntentResponseIdToken
- idToken: string
- expiresIn: int

struct IntentResponseChildWalletAdopted

enum IdentityType: string
- None
- Guest
Expand Down
2 changes: 2 additions & 0 deletions intents/intent_response_typed.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ func IntentResponseTypeToCode[T any](t *T) IntentResponseCode {
return IntentResponseCode_accountFederated
case *IntentResponseAccountRemoved:
return IntentResponseCode_accountRemoved
case *IntentResponseChildWalletAdopted:
return IntentResponseCode_childwalletAdopted
case *IntentResponseIdToken:
return IntentResponseCode_idToken
default:
Expand Down
2 changes: 2 additions & 0 deletions intents/intent_typed.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ func IntentDataTypeToName[T any](t *T) IntentName {
return IntentName_federateAccount
case *IntentDataRemoveAccount:
return IntentName_removeAccount
case *IntentDataAdoptChildWallet:
return IntentName_adoptChildWallet
case *IntentDataGetIdToken:
return IntentName_getIdToken
default:
Expand Down
Loading

0 comments on commit e79de77

Please sign in to comment.