-
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.
- Loading branch information
Showing
8 changed files
with
860 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Server | ||
//go:generate go run github.com/webrpc/webrpc/cmd/webrpc-gen -schema=intent.ridl -target=golang -pkg=intents -client -out=./intent.gen.go | ||
|
||
package intents |
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 |
---|---|---|
@@ -0,0 +1,103 @@ | ||
webrpc = v1 | ||
|
||
name = sequence-waas-intents | ||
version = v0.1.0 | ||
|
||
struct Signature | ||
- sessionId: string | ||
- signature: string | ||
|
||
# no way to generate string enums | ||
# enum IntentName: uint8 | ||
# - openSession | ||
# - closeSession | ||
# - validateSession | ||
# - finishValidateSession | ||
# - listSessions | ||
# - getSession | ||
# - sign | ||
# - transaction | ||
|
||
struct Intent | ||
- version: string | ||
- name: string | ||
- expires: uint64 | ||
- issued: uint64 | ||
- data: any | ||
- signatures: []Signature | ||
|
||
struct SessionPacketProof | ||
- email?: string | ||
- idToken?: string | ||
|
||
struct IntentDataOpenSession | ||
- sessionId: string | ||
- proof: SessionPacketProof | ||
|
||
struct IntentDataCloseSession | ||
- sessionId: string | ||
|
||
struct IntentDataValidateSession | ||
- sessionId: string | ||
- deviceMetadata: string | ||
|
||
struct IntentDataFinishValidateSession | ||
- sessionId: string | ||
- salt: string | ||
- challenge: string | ||
|
||
struct IntentDataListSessions | ||
|
||
struct IntentDataGetSession | ||
- sessionId: string | ||
|
||
struct IntentDataSign | ||
- network: string | ||
- message: string | ||
|
||
struct IntentDataTransaction | ||
- network: string | ||
- identifier: string | ||
- transactions: []any | ||
|
||
# no way to generate string enums | ||
#enum TransactionType: uint8 | ||
# - transaction | ||
# - erc20send | ||
# - erc721send | ||
# - erc1155send | ||
|
||
struct TransactionRaw | ||
- type: string | ||
- to: string | ||
- value: string | ||
- data: string | ||
|
||
struct TransactionERC20 | ||
- type: string | ||
- token: string | ||
- to: string | ||
- value: string | ||
|
||
struct TransactionERC721 | ||
- type: string | ||
- token: string | ||
- to: string | ||
- id: string | ||
- safe?: bool | ||
- data?: string | ||
|
||
struct TransactionERC1155Value | ||
- id: string | ||
- amount: string | ||
|
||
struct TransactionERC1155 | ||
- type: string | ||
- token: string | ||
- to: string | ||
- vals: []TransactionERC1155Value | ||
- data?: string | ||
|
||
struct IntentResponse | ||
- code: string | ||
- data: any |
Oops, something went wrong.