Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmasken committed Feb 12, 2024
1 parent 8e2a452 commit b39da31
Show file tree
Hide file tree
Showing 103 changed files with 1,192 additions and 281 deletions.
62 changes: 59 additions & 3 deletions .dfx/local/canisters/backend/backend.did
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ type User =
phone_notifications: bool;
phone_number: text;
};
type Transaction__1 =
record {
amount: nat;
creator: principal;
destination: principal;
id: nat;
successful: bool;
};
type Transaction =
record {
amount: text;
from: text;
to: text;
amount: nat;
creator: principal;
destination: principal;
id: nat;
successful: bool;
};
type Subaccount = blob;
type Result =
Expand Down Expand Up @@ -39,6 +49,23 @@ type Response =
status: nat16;
status_text: text;
};
type GetTransactionSuccess = record {transaction: Transaction__1;};
type GetTransactionResult =
variant {
err: GetTransactionErr;
ok: GetTransactionSuccess;
};
type GetTransactionErr =
record {
kind: variant {
InvalidTransactionId;
NotAuthorized;
NotFound;
Other;
};
message: opt text;
};
type GetTransactionArgs = record {id: nat;};
type GetAccountIdentifierSuccess = record {
accountIdentifier: AccountIdentifier;};
type GetAccountIdentifierResult =
Expand All @@ -48,6 +75,33 @@ type GetAccountIdentifierResult =
};
type GetAccountIdentifierErr = record {message: opt text;};
type GetAccountIdentifierArgs = record {"principal": principal;};
type CreateTransactionSuccess = record {transaction: Transaction__1;};
type CreateTransactionResult =
variant {
err: CreateTransactionErr;
ok: CreateTransactionSuccess;
};
type CreateTransactionErr =
record {
kind:
variant {
InsufficientBalance;
InvalidAmount;
InvalidDestination;
InvalidDetails;
InvalidSender;
MaxTransactionsReached;
Other;
};
message: opt text;
};
type CreateTransactionArgs =
record {
amount: nat;
creator: principal;
destination: principal;
successful: bool;
};
type Backend =
service {
accountIdentifierToBlob: (AccountIdentifier) ->
Expand All @@ -71,6 +125,8 @@ type Backend =
}) query;
get_account_identifier: (GetAccountIdentifierArgs) ->
(GetAccountIdentifierResult) query;
get_transaction: (GetTransactionArgs) -> (GetTransactionResult) query;
save_transaction: (CreateTransactionArgs) -> (CreateTransactionResult);
/// * Set the courier API key. Only the owner can set the courier API key.
setCourierApiKey: (text) -> (Response_2);
transferFromCanistertoSubAccount: () -> (Result);
Expand Down
11 changes: 11 additions & 0 deletions .dfx/local/canisters/backend/backend.most
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ type Hash = Nat32;
type Key__1<K> = {hash : Hash; key : K};
type Leaf<K, V> = {keyvals : AssocList__1<Key__1<K>, V>; size : Nat};
type List<T> = ?(T, List<T>);
type Transaction =
{
amount : Nat;
creator : Principal;
destination : Principal;
id : Nat;
successful : Bool
};
type Transaction__2 = Transaction;
type Trie<K, V> = {#branch : Branch<K, V>; #empty; #leaf : Leaf<K, V>};
type User =
{
Expand All @@ -18,7 +27,9 @@ type User =
type User__1 = User;
actor {
stable var courierApiKey : Text;
stable var entries : [(Nat, Transaction__2)];
stable var latestTransactionIndex : Nat;
stable var transactionCounter : Nat;
stable var userStore :
{#branch : Branch<Text, User__1>; #empty; #leaf : Leaf<Text, User__1>}
};
11 changes: 11 additions & 0 deletions .dfx/local/canisters/backend/backend.old.most
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ type Hash = Nat32;
type Key__1<K> = {hash : Hash; key : K};
type Leaf<K, V> = {keyvals : AssocList__1<Key__1<K>, V>; size : Nat};
type List<T> = ?(T, List<T>);
type Transaction =
{
amount : Nat;
creator : Principal;
destination : Principal;
id : Nat;
successful : Bool
};
type Transaction__2 = Transaction;
type Trie<K, V> = {#branch : Branch<K, V>; #empty; #leaf : Leaf<K, V>};
type User =
{
Expand All @@ -18,7 +27,9 @@ type User =
type User__1 = User;
actor {
stable var courierApiKey : Text;
stable var entries : [(Nat, Transaction__2)];
stable var latestTransactionIndex : Nat;
stable var transactionCounter : Nat;
stable var userStore :
{#branch : Branch<Text, User__1>; #empty; #leaf : Leaf<Text, User__1>}
};
Binary file modified .dfx/local/canisters/backend/backend.wasm
Binary file not shown.
62 changes: 59 additions & 3 deletions .dfx/local/canisters/backend/constructor.did
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ type User =
phone_notifications: bool;
phone_number: text;
};
type Transaction__1 =
record {
amount: nat;
creator: principal;
destination: principal;
id: nat;
successful: bool;
};
type Transaction =
record {
amount: text;
from: text;
to: text;
amount: nat;
creator: principal;
destination: principal;
id: nat;
successful: bool;
};
type Subaccount = blob;
type Result =
Expand Down Expand Up @@ -39,6 +49,23 @@ type Response =
status: nat16;
status_text: text;
};
type GetTransactionSuccess = record {transaction: Transaction__1;};
type GetTransactionResult =
variant {
err: GetTransactionErr;
ok: GetTransactionSuccess;
};
type GetTransactionErr =
record {
kind: variant {
InvalidTransactionId;
NotAuthorized;
NotFound;
Other;
};
message: opt text;
};
type GetTransactionArgs = record {id: nat;};
type GetAccountIdentifierSuccess = record {
accountIdentifier: AccountIdentifier;};
type GetAccountIdentifierResult =
Expand All @@ -48,6 +75,33 @@ type GetAccountIdentifierResult =
};
type GetAccountIdentifierErr = record {message: opt text;};
type GetAccountIdentifierArgs = record {"principal": principal;};
type CreateTransactionSuccess = record {transaction: Transaction__1;};
type CreateTransactionResult =
variant {
err: CreateTransactionErr;
ok: CreateTransactionSuccess;
};
type CreateTransactionErr =
record {
kind:
variant {
InsufficientBalance;
InvalidAmount;
InvalidDestination;
InvalidDetails;
InvalidSender;
MaxTransactionsReached;
Other;
};
message: opt text;
};
type CreateTransactionArgs =
record {
amount: nat;
creator: principal;
destination: principal;
successful: bool;
};
type Backend =
service {
accountIdentifierToBlob: (AccountIdentifier) ->
Expand All @@ -71,6 +125,8 @@ type Backend =
}) query;
get_account_identifier: (GetAccountIdentifierArgs) ->
(GetAccountIdentifierResult) query;
get_transaction: (GetTransactionArgs) -> (GetTransactionResult) query;
save_transaction: (CreateTransactionArgs) -> (CreateTransactionResult);
/// * Set the courier API key. Only the owner can set the courier API key.
setCourierApiKey: (text) -> (Response_2);
transferFromCanistertoSubAccount: () -> (Result);
Expand Down
62 changes: 59 additions & 3 deletions .dfx/local/canisters/backend/constructor.old.did
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ type User =
phone_notifications: bool;
phone_number: text;
};
type Transaction__1 =
record {
amount: nat;
creator: principal;
destination: principal;
id: nat;
successful: bool;
};
type Transaction =
record {
amount: text;
from: text;
to: text;
amount: nat;
creator: principal;
destination: principal;
id: nat;
successful: bool;
};
type Subaccount = blob;
type Result =
Expand Down Expand Up @@ -39,6 +49,23 @@ type Response =
status: nat16;
status_text: text;
};
type GetTransactionSuccess = record {transaction: Transaction__1;};
type GetTransactionResult =
variant {
err: GetTransactionErr;
ok: GetTransactionSuccess;
};
type GetTransactionErr =
record {
kind: variant {
InvalidTransactionId;
NotAuthorized;
NotFound;
Other;
};
message: opt text;
};
type GetTransactionArgs = record {id: nat;};
type GetAccountIdentifierSuccess = record {
accountIdentifier: AccountIdentifier;};
type GetAccountIdentifierResult =
Expand All @@ -48,6 +75,33 @@ type GetAccountIdentifierResult =
};
type GetAccountIdentifierErr = record {message: opt text;};
type GetAccountIdentifierArgs = record {"principal": principal;};
type CreateTransactionSuccess = record {transaction: Transaction__1;};
type CreateTransactionResult =
variant {
err: CreateTransactionErr;
ok: CreateTransactionSuccess;
};
type CreateTransactionErr =
record {
kind:
variant {
InsufficientBalance;
InvalidAmount;
InvalidDestination;
InvalidDetails;
InvalidSender;
MaxTransactionsReached;
Other;
};
message: opt text;
};
type CreateTransactionArgs =
record {
amount: nat;
creator: principal;
destination: principal;
successful: bool;
};
type AccountIdentifierToBlobSuccess = blob;
type AccountIdentifierToBlobResult =
variant {
Expand Down Expand Up @@ -92,6 +146,8 @@ service : {
}) query;
get_account_identifier: (GetAccountIdentifierArgs) ->
(GetAccountIdentifierResult) query;
get_transaction: (GetTransactionArgs) -> (GetTransactionResult) query;
save_transaction: (CreateTransactionArgs) -> (CreateTransactionResult);
setCourierApiKey: (text) -> (Response_2);
transferFromCanistertoSubAccount: () -> (Result);
transferFromSubAccountToCanister: (nat) -> (Result);
Expand Down

0 comments on commit b39da31

Please sign in to comment.