Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak notify #1

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions candid/token.did
Expand Up @@ -20,9 +20,12 @@ type TransferResult = variant {
Err: TransferError;
};

type NotificationRecipient = func (text) -> ();

type NotifyArgs = record {
canister_id: principal;
method_name: text;
callback : NotificationRecipient;
transaction_id : TransactionId;
metadata: text;
};

service : {
Expand All @@ -49,7 +52,7 @@ service : {
// The provided method on the canister will be called, see Notifiable Canisters candid, to
// see the method signature.
// Set the `from` argument if the caller is spending on behalf of someone else.
transfer: (record { from : opt principal; to: principal; amount: Nat; notify: opt NotifyArgs }) -> TransferResult;
transfer: (record { from : opt principal; to: principal; amount: Nat; notify: opt NotifyArgs }) -> (TransferResult);

// Returns the amount an spender is allowed to spend on behalf of an account.
// The result is defined as `Min(ActualAllowance, AccountBalance)`.
Expand Down