Skip to content

Commit

Permalink
Merge pull request #355 from WalletConnect/feature/auth-multi-account
Browse files Browse the repository at this point in the history
[Spec] Auth Multi Account
  • Loading branch information
flypaper0 authored Dec 6, 2022
2 parents 30a0320 + 8948d39 commit 8688f84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 7 additions & 4 deletions docs/specs/clients/auth/client-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@ abstract class Client {
// ---------- Methods ----------------------------------------------- //

// initializes the client with persisted storage and a network connection
public abstract init(params: { iss?: string }): Promise<void>;
public abstract init(): Promise<void>;

// request wallet authentication
public abstract request(params: RequestParams, topic: string ): Promise<{ uri, id }>;
public abstract request(params: RequestParams, topic: string): Promise<{ uri, id }>;

// respond wallet authentication
public abstract respond(params: RespondParams): Promise<boolean>;
public abstract respond(params: RespondParams, iss: string): Promise<boolean>;

// query all pending requests
public abstract getPendingRequests(): Promise<Record<number, PendingRequest>>;

// format payload to SIWE message string
public abstract formatMessage(payload: PayloadParams, iss: string): Promise<string>;

// ---------- Events ----------------------------------------------- //

// subscribe to auth response
public abstract on("auth_response", (id: number, response: Response) => {}): void;

// for wallet to listen on auth request
public abstract on("auth_request", (id: number, message: string) => {}): void;
public abstract on("auth_request", (id: number, payload: PayloadParams) => {}): void;
}
```
1 change: 0 additions & 1 deletion docs/specs/clients/auth/data-structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ type Response = Cacao | ErrorResponse;
interface PendingRequest {
id: number;
payloadParams: PayloadParams;
message: string;
}
```

Expand Down

1 comment on commit 8688f84

@vercel
Copy link

@vercel vercel bot commented on 8688f84 Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.