-
Notifications
You must be signed in to change notification settings - Fork 37
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
13 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/calc/src/index.did
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,7 @@ | ||
service: () -> { | ||
add: (int) -> (int); | ||
clearall: () -> (); | ||
div: (int) -> (opt int); | ||
mul: (int) -> (int); | ||
sub: (int) -> (int); | ||
} |
5 changes: 5 additions & 0 deletions
5
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/counter/src/index.did
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,5 @@ | ||
service: () -> { | ||
get: () -> (nat) query; | ||
inc: () -> (); | ||
set: (nat) -> (); | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/echo/src/index.did
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,3 @@ | ||
service: () -> { | ||
say: (text) -> (text) query; | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/hello-world/src/index.did
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,3 @@ | ||
service: () -> { | ||
main: () -> () query; | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/hello/src/hello/index.did
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,3 @@ | ||
service: () -> { | ||
greet: (text) -> (text) query; | ||
} |
5 changes: 5 additions & 0 deletions
5
...d/candid_rpc/class_syntax/motoko_examples/minimal-counter-dapp/src/minimal_dapp/index.did
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,5 @@ | ||
service: () -> { | ||
count: () -> (nat); | ||
getCount: () -> (nat) query; | ||
reset: () -> (nat); | ||
} |
6 changes: 6 additions & 0 deletions
6
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/persistent-storage/src/index.did
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,6 @@ | ||
service: () -> { | ||
get: () -> (nat) query; | ||
getRedeployed: () -> (bool) query; | ||
increment: () -> (nat); | ||
reset: () -> (nat); | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/phone-book/src/phone_book/index.did
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 @@ | ||
service: () -> { | ||
insert: (text, record {desc:text; phone:text}) -> (); | ||
lookup: (text) -> (opt record {desc:text; phone:text}) query; | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/quicksort/src/index.did
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,3 @@ | ||
service: () -> { | ||
sort: (vec int) -> (vec int) query; | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/simple-to-do/src/index.did
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,7 @@ | ||
service: () -> { | ||
addTodo: (text) -> (nat); | ||
clearCompleted: () -> (); | ||
completeTodo: (nat) -> (); | ||
getTodos: () -> (vec record {completed:bool; description:text}) query; | ||
showTodos: () -> (text) query; | ||
} |
9 changes: 9 additions & 0 deletions
9
.../end_to_end/candid_rpc/class_syntax/motoko_examples/superheroes/src/superheroes/index.did
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,9 @@ | ||
type rec_0 = record {text; opt rec_0}; | ||
type rec_1 = record {text; opt rec_1}; | ||
type rec_2 = record {text; opt rec_2}; | ||
service: () -> { | ||
create: (record {superpowers:opt rec_0; name:text}) -> (nat32); | ||
deleteHero: (nat32) -> (bool); | ||
read: (nat32) -> (opt record {superpowers:opt rec_1; name:text}) query; | ||
update: (nat32, record {superpowers:opt rec_2; name:text}) -> (bool); | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/threshold_ecdsa/src/index.did
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 @@ | ||
service: () -> { | ||
publicKey: () -> (record {publicKey:vec nat8}); | ||
sign: (vec nat8) -> (record {signature:vec nat8}); | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/end_to_end/candid_rpc/class_syntax/motoko_examples/whoami/src/index.did
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,7 @@ | ||
service: (principal) -> { | ||
argument: () -> (principal) query; | ||
id: () -> (principal); | ||
idQuick: () -> (principal) query; | ||
installer: () -> (principal) query; | ||
whoami: () -> (principal); | ||
} |