Skip to content

Commit

Permalink
copy candid files
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Jun 25, 2024
1 parent c54baa7 commit 4a3fde1
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
service: () -> {
getRandomnessDirectly: () -> (vec nat8);
getRandomnessIndirectly: () -> (vec nat8);
getRandomnessSuperIndirectly: () -> (vec nat8);
returnPromiseVoid: () -> ();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
service: () -> {
getBalance: (text) -> (nat64);
getCurrentFeePercentiles: () -> (vec nat64);
getUtxos: (text) -> (record {next_page:opt vec nat8; tip_height:nat32; tip_block_hash:vec nat8; utxos:vec record {height:nat32; value:nat64; outpoint:record {txid:vec nat8; vout:nat32}}});
sendTransaction: (vec nat8) -> (bool);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
service: () -> {
getBlob: () -> (vec nat8) query;
getBlobs: () -> (vec vec nat8) query;
}
3 changes: 3 additions & 0 deletions tests/end_to_end/candid_rpc/class_syntax/bytes/src/index.did
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
service: () -> {
getBytes: (vec nat8) -> (vec nat8);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
service: () -> {
candidDecode: (vec nat8) -> (text) query;
candidEncode: (text) -> (vec nat8) query;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type rec_0 = func () -> (record {"int":int; "nat":nat; "opt":opt nat; "vec":vec text; "service":service {query1: () -> (bool) query; update1: () -> (text);}; "principal":principal; "blob":vec nat8; "bool":bool; "func":rec_0; "int8":int8; "nat8":nat8; "null":null; "text":text; "query":text; "nat16":nat16; "nat32":nat32; "nat64":nat64; "int16":int16; "int32":int32; "int64":int64; "variant":variant {Tag1; Tag2; Tag3:int}; "float32":float32; "float64":float64; "record":record {age:nat8; lastName:text; firstName:text}}) query;
service: () -> {
candidTypes: () -> (record {"int":int; "nat":nat; "opt":opt nat; "vec":vec text; "service":service {query1: () -> (bool) query; update1: () -> (text);}; "principal":principal; "blob":vec nat8; "bool":bool; "func":rec_0; "int8":int8; "nat8":nat8; "null":null; "text":text; "query":text; "nat16":nat16; "nat32":nat32; "nat64":nat64; "int16":int16; "int32":int32; "int64":int64; "variant":variant {Tag1; Tag2; Tag3:int}; "float32":float32; "float64":float64; "record":record {age:nat8; lastName:text; firstName:text}}) query;
"opt": () -> () query;
"variant": () -> (variant {"service":text; "query":text; "nat32":text}) query;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
service: () -> {
canisterCrossCanisterCall: (service {query1: () -> (bool) query; update1: () -> (text);}) -> (text);
canisterList: (vec service {query1: () -> (bool) query; update1: () -> (text);}) -> (vec service {query1: () -> (bool) query; update1: () -> (text);});
canisterNestedReturnType: () -> (record {someCanister:service {query1: () -> (bool) query; update1: () -> (text);}});
canisterParam: (service {query1: () -> (bool) query; update1: () -> (text);}) -> (service {query1: () -> (bool) query; update1: () -> (text);}) query;
canisterReturnType: () -> (service {query1: () -> (bool) query; update1: () -> (text);}) query;
}

0 comments on commit 4a3fde1

Please sign in to comment.