diff --git a/.dfx/local/canisters/backend/backend.did b/.dfx/local/canisters/backend/backend.did index ba4c8d14..fb518473 100644 --- a/.dfx/local/canisters/backend/backend.did +++ b/.dfx/local/canisters/backend/backend.did @@ -6,6 +6,11 @@ type User = phone_notifications: bool; phone_number: text; }; +type TransformArgs = + record { + context: blob; + response: HttpResponsePayload; + }; type Transaction__1 = record { amount: nat; @@ -90,6 +95,17 @@ type Notification = receiver: text; sender: text; }; +type HttpResponsePayload = + record { + body: vec nat8; + headers: vec HttpHeader; + status: nat; + }; +type HttpHeader = + record { + name: text; + value: text; + }; type GetTransactionSuccess = record {transaction: Transaction__1;}; type GetTransactionResult = variant { @@ -176,6 +192,12 @@ type CreateNotificationArgs = sender: text; }; type CreateEmployeeArgs = record {wallet: text;}; +type CanisterHttpResponsePayload = + record { + body: vec nat8; + headers: vec HttpHeader; + status: nat; + }; type Backend = service { accountIdentifierToBlob: (AccountIdentifier) -> @@ -217,12 +239,14 @@ type Backend = runpayroll: (vec PayrollType) -> (Response_3); save_notification: (CreateNotificationArgs) -> (CreateNotificationResult); save_transaction: (CreateTransactionArgs) -> (CreateTransactionResult); + send_notifications: (text, text, text, text, text) -> (); /// * Set the courier API key. Only the owner can set the courier API key. setCourierApiKey: (text) -> (Response_2); testRandom: () -> (opt bool); transferFromCanistertoSubAccount: () -> (Result); transferFromSubAccountToCanister: (nat) -> (Result); transferFromSubAccountToSubAccount: (text, nat) -> (Response_1); + transform: (TransformArgs) -> (CanisterHttpResponsePayload) query; /// * Update the merchant's information updateUser: (User) -> (Response); userLength: () -> (text) query; diff --git a/.dfx/local/canisters/backend/backend.wasm b/.dfx/local/canisters/backend/backend.wasm index cabb0e07..b2f89c7d 100644 Binary files a/.dfx/local/canisters/backend/backend.wasm and b/.dfx/local/canisters/backend/backend.wasm differ diff --git a/.dfx/local/canisters/backend/constructor.did b/.dfx/local/canisters/backend/constructor.did index ba4c8d14..fb518473 100644 --- a/.dfx/local/canisters/backend/constructor.did +++ b/.dfx/local/canisters/backend/constructor.did @@ -6,6 +6,11 @@ type User = phone_notifications: bool; phone_number: text; }; +type TransformArgs = + record { + context: blob; + response: HttpResponsePayload; + }; type Transaction__1 = record { amount: nat; @@ -90,6 +95,17 @@ type Notification = receiver: text; sender: text; }; +type HttpResponsePayload = + record { + body: vec nat8; + headers: vec HttpHeader; + status: nat; + }; +type HttpHeader = + record { + name: text; + value: text; + }; type GetTransactionSuccess = record {transaction: Transaction__1;}; type GetTransactionResult = variant { @@ -176,6 +192,12 @@ type CreateNotificationArgs = sender: text; }; type CreateEmployeeArgs = record {wallet: text;}; +type CanisterHttpResponsePayload = + record { + body: vec nat8; + headers: vec HttpHeader; + status: nat; + }; type Backend = service { accountIdentifierToBlob: (AccountIdentifier) -> @@ -217,12 +239,14 @@ type Backend = runpayroll: (vec PayrollType) -> (Response_3); save_notification: (CreateNotificationArgs) -> (CreateNotificationResult); save_transaction: (CreateTransactionArgs) -> (CreateTransactionResult); + send_notifications: (text, text, text, text, text) -> (); /// * Set the courier API key. Only the owner can set the courier API key. setCourierApiKey: (text) -> (Response_2); testRandom: () -> (opt bool); transferFromCanistertoSubAccount: () -> (Result); transferFromSubAccountToCanister: (nat) -> (Result); transferFromSubAccountToSubAccount: (text, nat) -> (Response_1); + transform: (TransformArgs) -> (CanisterHttpResponsePayload) query; /// * Update the merchant's information updateUser: (User) -> (Response); userLength: () -> (text) query; diff --git a/.dfx/local/canisters/backend/constructor.old.did b/.dfx/local/canisters/backend/constructor.old.did index fe736dda..de820a57 100644 --- a/.dfx/local/canisters/backend/constructor.old.did +++ b/.dfx/local/canisters/backend/constructor.old.did @@ -6,6 +6,11 @@ type User = phone_notifications: bool; phone_number: text; }; +type TransformArgs = + record { + context: blob; + response: HttpResponsePayload; + }; type Transaction__1 = record { amount: nat; @@ -90,6 +95,17 @@ type Notification = receiver: text; sender: text; }; +type HttpResponsePayload = + record { + body: vec nat8; + headers: vec HttpHeader; + status: nat; + }; +type HttpHeader = + record { + name: text; + value: text; + }; type GetTransactionSuccess = record {transaction: Transaction__1;}; type GetTransactionResult = variant { @@ -176,6 +192,12 @@ type CreateNotificationArgs = sender: text; }; type CreateEmployeeArgs = record {wallet: text;}; +type CanisterHttpResponsePayload = + record { + body: vec nat8; + headers: vec HttpHeader; + status: nat; + }; type AccountIdentifierToBlobSuccess = blob; type AccountIdentifierToBlobResult = variant { @@ -236,11 +258,13 @@ service : { runpayroll: (vec PayrollType) -> (Response_3); save_notification: (CreateNotificationArgs) -> (CreateNotificationResult); save_transaction: (CreateTransactionArgs) -> (CreateTransactionResult); + send_notifications: (text, text, text, text, text) -> (); setCourierApiKey: (text) -> (Response_2); testRandom: () -> (opt bool); transferFromCanistertoSubAccount: () -> (Result); transferFromSubAccountToCanister: (nat) -> (Result); transferFromSubAccountToSubAccount: (text, nat) -> (Response_1); + transform: (TransformArgs) -> (CanisterHttpResponsePayload) query; updateUser: (User) -> (Response); userLength: () -> (text) query; whoami: () -> (principal); diff --git a/.dfx/local/canisters/backend/service.did b/.dfx/local/canisters/backend/service.did index 101ddd11..59468221 100644 --- a/.dfx/local/canisters/backend/service.did +++ b/.dfx/local/canisters/backend/service.did @@ -47,15 +47,22 @@ type Backend = service { runpayroll : (vec PayrollType) -> (Response_3); save_notification : (CreateNotificationArgs) -> (CreateNotificationResult); save_transaction : (CreateTransactionArgs) -> (CreateTransactionResult); + send_notifications : (text, text, text, text, text) -> (); setCourierApiKey : (text) -> (Response_2); testRandom : () -> (opt bool); transferFromCanistertoSubAccount : () -> (Result); transferFromSubAccountToCanister : (nat) -> (Result); transferFromSubAccountToSubAccount : (text, nat) -> (Response_1); + transform : (TransformArgs) -> (CanisterHttpResponsePayload) query; updateUser : (User) -> (Response); userLength : () -> (text) query; whoami : () -> (principal); }; +type CanisterHttpResponsePayload = record { + status : nat; + body : vec nat8; + headers : vec HttpHeader; +}; type CreateEmployeeArgs = record { wallet : text }; type CreateNotificationArgs = record { isRead : bool; @@ -124,6 +131,12 @@ type GetTransactionResult = variant { err : GetTransactionErr; }; type GetTransactionSuccess = record { transaction : Transaction__1 }; +type HttpHeader = record { value : text; name : text }; +type HttpResponsePayload = record { + status : nat; + body : vec nat8; + headers : vec HttpHeader; +}; type Notification = record { id : nat; isRead : bool; @@ -194,6 +207,10 @@ type Transaction__1 = record { amount : nat; successful : bool; }; +type TransformArgs = record { + context : vec nat8; + response : HttpResponsePayload; +}; type User = record { email_address : text; phone_notifications : bool; diff --git a/.dfx/local/canisters/backend/service.did.d.ts b/.dfx/local/canisters/backend/service.did.d.ts index e1c20f9f..6d1cd831 100644 --- a/.dfx/local/canisters/backend/service.did.d.ts +++ b/.dfx/local/canisters/backend/service.did.d.ts @@ -61,6 +61,10 @@ export interface Backend { [CreateTransactionArgs], CreateTransactionResult >, + 'send_notifications' : ActorMethod< + [string, string, string, string, string], + undefined + >, 'setCourierApiKey' : ActorMethod<[string], Response_2>, 'testRandom' : ActorMethod<[], [] | [boolean]>, 'transferFromCanistertoSubAccount' : ActorMethod<[], Result>, @@ -69,10 +73,16 @@ export interface Backend { [string, bigint], Response_1 >, + 'transform' : ActorMethod<[TransformArgs], CanisterHttpResponsePayload>, 'updateUser' : ActorMethod<[User], Response>, 'userLength' : ActorMethod<[], string>, 'whoami' : ActorMethod<[], Principal>, } +export interface CanisterHttpResponsePayload { + 'status' : bigint, + 'body' : Uint8Array | number[], + 'headers' : Array, +} export interface CreateEmployeeArgs { 'wallet' : string } export interface CreateNotificationArgs { 'isRead' : boolean, @@ -137,6 +147,12 @@ export interface GetTransactionErr { export type GetTransactionResult = { 'ok' : GetTransactionSuccess } | { 'err' : GetTransactionErr }; export interface GetTransactionSuccess { 'transaction' : Transaction__1 } +export interface HttpHeader { 'value' : string, 'name' : string } +export interface HttpResponsePayload { + 'status' : bigint, + 'body' : Uint8Array | number[], + 'headers' : Array, +} export interface Notification { 'id' : bigint, 'isRead' : boolean, @@ -208,6 +224,10 @@ export interface Transaction__1 { 'amount' : bigint, 'successful' : boolean, } +export interface TransformArgs { + 'context' : Uint8Array | number[], + 'response' : HttpResponsePayload, +} export interface User { 'email_address' : string, 'phone_notifications' : boolean, diff --git a/.dfx/local/canisters/backend/service.did.js b/.dfx/local/canisters/backend/service.did.js index e494a7ba..42f0f9a9 100644 --- a/.dfx/local/canisters/backend/service.did.js +++ b/.dfx/local/canisters/backend/service.did.js @@ -177,6 +177,21 @@ export const idlFactory = ({ IDL }) => { 'status_text' : IDL.Text, 'error_text' : IDL.Opt(IDL.Text), }); + const HttpHeader = IDL.Record({ 'value' : IDL.Text, 'name' : IDL.Text }); + const HttpResponsePayload = IDL.Record({ + 'status' : IDL.Nat, + 'body' : IDL.Vec(IDL.Nat8), + 'headers' : IDL.Vec(HttpHeader), + }); + const TransformArgs = IDL.Record({ + 'context' : IDL.Vec(IDL.Nat8), + 'response' : HttpResponsePayload, + }); + const CanisterHttpResponsePayload = IDL.Record({ + 'status' : IDL.Nat, + 'body' : IDL.Vec(IDL.Nat8), + 'headers' : IDL.Vec(HttpHeader), + }); const Backend = IDL.Service({ 'accountIdentifierToBlob' : IDL.Func( [AccountIdentifier], @@ -231,6 +246,11 @@ export const idlFactory = ({ IDL }) => { [CreateTransactionResult], [], ), + 'send_notifications' : IDL.Func( + [IDL.Text, IDL.Text, IDL.Text, IDL.Text, IDL.Text], + [], + [], + ), 'setCourierApiKey' : IDL.Func([IDL.Text], [Response_2], []), 'testRandom' : IDL.Func([], [IDL.Opt(IDL.Bool)], []), 'transferFromCanistertoSubAccount' : IDL.Func([], [Result], []), @@ -240,6 +260,11 @@ export const idlFactory = ({ IDL }) => { [Response_1], [], ), + 'transform' : IDL.Func( + [TransformArgs], + [CanisterHttpResponsePayload], + ['query'], + ), 'updateUser' : IDL.Func([User], [Response], []), 'userLength' : IDL.Func([], [IDL.Text], ['query']), 'whoami' : IDL.Func([], [IDL.Principal], []), diff --git a/.dfx/local/lsp/bd3sg-teaaa-aaaaa-qaaba-cai.did b/.dfx/local/lsp/bd3sg-teaaa-aaaaa-qaaba-cai.did index 101ddd11..59468221 100644 --- a/.dfx/local/lsp/bd3sg-teaaa-aaaaa-qaaba-cai.did +++ b/.dfx/local/lsp/bd3sg-teaaa-aaaaa-qaaba-cai.did @@ -47,15 +47,22 @@ type Backend = service { runpayroll : (vec PayrollType) -> (Response_3); save_notification : (CreateNotificationArgs) -> (CreateNotificationResult); save_transaction : (CreateTransactionArgs) -> (CreateTransactionResult); + send_notifications : (text, text, text, text, text) -> (); setCourierApiKey : (text) -> (Response_2); testRandom : () -> (opt bool); transferFromCanistertoSubAccount : () -> (Result); transferFromSubAccountToCanister : (nat) -> (Result); transferFromSubAccountToSubAccount : (text, nat) -> (Response_1); + transform : (TransformArgs) -> (CanisterHttpResponsePayload) query; updateUser : (User) -> (Response); userLength : () -> (text) query; whoami : () -> (principal); }; +type CanisterHttpResponsePayload = record { + status : nat; + body : vec nat8; + headers : vec HttpHeader; +}; type CreateEmployeeArgs = record { wallet : text }; type CreateNotificationArgs = record { isRead : bool; @@ -124,6 +131,12 @@ type GetTransactionResult = variant { err : GetTransactionErr; }; type GetTransactionSuccess = record { transaction : Transaction__1 }; +type HttpHeader = record { value : text; name : text }; +type HttpResponsePayload = record { + status : nat; + body : vec nat8; + headers : vec HttpHeader; +}; type Notification = record { id : nat; isRead : bool; @@ -194,6 +207,10 @@ type Transaction__1 = record { amount : nat; successful : bool; }; +type TransformArgs = record { + context : vec nat8; + response : HttpResponsePayload; +}; type User = record { email_address : text; phone_notifications : bool; diff --git a/.dfx/network/local/ic-https-outcalls-adapter-pid b/.dfx/network/local/ic-https-outcalls-adapter-pid index 7c21b499..88f32446 100644 --- a/.dfx/network/local/ic-https-outcalls-adapter-pid +++ b/.dfx/network/local/ic-https-outcalls-adapter-pid @@ -1 +1 @@ -10299 \ No newline at end of file +12627 \ No newline at end of file diff --git a/.dfx/network/local/icx-proxy-pid b/.dfx/network/local/icx-proxy-pid index 653ca186..a720be9f 100644 --- a/.dfx/network/local/icx-proxy-pid +++ b/.dfx/network/local/icx-proxy-pid @@ -1 +1 @@ -10506 \ No newline at end of file +15724 \ No newline at end of file diff --git a/.dfx/network/local/replica-configuration/replica-1.port b/.dfx/network/local/replica-configuration/replica-1.port index b4932c75..3c466f31 100644 --- a/.dfx/network/local/replica-configuration/replica-1.port +++ b/.dfx/network/local/replica-configuration/replica-1.port @@ -1 +1 @@ -38589 \ No newline at end of file +37969 \ No newline at end of file diff --git a/.dfx/network/local/replica-configuration/replica-pid b/.dfx/network/local/replica-configuration/replica-pid index 451ac991..32e78000 100644 --- a/.dfx/network/local/replica-configuration/replica-pid +++ b/.dfx/network/local/replica-configuration/replica-pid @@ -1 +1 @@ -10306 \ No newline at end of file +12634 \ No newline at end of file diff --git a/.dfx/network/local/state/replicated_state/node-100/crypto/sks_data.pb b/.dfx/network/local/state/replicated_state/node-100/crypto/sks_data.pb index 26fcfb42..4363edce 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/crypto/sks_data.pb and b/.dfx/network/local/state/replicated_state/node-100/crypto/sks_data.pb differ diff --git a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/certification/data.mdb b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/certification/data.mdb index e2f4e81c..122d3fae 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/certification/data.mdb and b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/certification/data.mdb differ diff --git a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/certification/lock.mdb b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/certification/lock.mdb index 4b658bd0..4ae5075b 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/certification/lock.mdb and b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/certification/lock.mdb differ diff --git a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/consensus/data.mdb b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/consensus/data.mdb index ebd62f29..bc635093 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/consensus/data.mdb and b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/consensus/data.mdb differ diff --git a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/consensus/lock.mdb b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/consensus/lock.mdb index 518c736b..f74b6179 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/consensus/lock.mdb and b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/consensus/lock.mdb differ diff --git a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/ecdsa/lock.mdb b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/ecdsa/lock.mdb index 38e3b98c..99b3738a 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/ecdsa/lock.mdb and b/.dfx/network/local/state/replicated_state/node-100/ic_consensus_pool/ecdsa/lock.mdb differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/software.wasm deleted file mode 100644 index cabb0e07..00000000 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/software.wasm and /dev/null differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/ingress_history.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/ingress_history.pbuf deleted file mode 100644 index 78f3ea90..00000000 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/ingress_history.pbuf and /dev/null differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/canister.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/canister.pbuf similarity index 99% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/canister.pbuf rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/canister.pbuf index 6e8e160c..05850f0e 100644 --- a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/canister.pbuf +++ b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/canister.pbuf @@ -1,4 +1,4 @@ -O(: +O(:  Ъ  @@ -665,9 +665,9 @@ service : (opt InternetIdentityInit) -> { dfx{"pullable":{"wasm_url": "https://github.com/dfinity/internet-identity/releases/download/release-2024-02-02/internet_identity_dev.wasm.gz","dependencies": [],"init_guide": "Use '(null)' for sensible defaults. See the candid interface for more details."}} c #FKX|b}"Qhsl K supported_certificate_versions)1,2 Իbؗь;ZFATb'_M'&2 Bv;BT ܿ7Mpc򵻯 8Z -xP ƛ#)RDs}I1H>U!a -Z -   ܙ| UW +xX ƛ#)RDs}I1H>U!a +7ZZ +×   ܙ| UW ؄  * diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/software.wasm similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/software.wasm rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/software.wasm diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/stable_memory.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/stable_memory.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/stable_memory.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/stable_memory.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/vmemory_0.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/vmemory_0.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/vmemory_0.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/wasm_chunk_store.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/wasm_chunk_store.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/00000000000000070101/wasm_chunk_store.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/00000000000000070101/wasm_chunk_store.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/canister.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/canister.pbuf similarity index 84% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/canister.pbuf rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/canister.pbuf index 86a7beaa..0c1cffb1 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/canister.pbuf and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/canister.pbuf differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/software.wasm similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/software.wasm rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/software.wasm diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/stable_memory.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/stable_memory.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/stable_memory.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/stable_memory.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/vmemory_0.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/vmemory_0.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/vmemory_0.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/wasm_chunk_store.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/wasm_chunk_store.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000000101/wasm_chunk_store.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000000101/wasm_chunk_store.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/canister.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/canister.pbuf similarity index 97% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/canister.pbuf rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/canister.pbuf index 61c35edd..cff28d08 100644 --- a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/canister.pbuf +++ b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/canister.pbuf @@ -1,4 +1,4 @@ -R :J +T (:J R R @ @@ -6,7 +6,7 @@ icrc1_transfer!__get_candid_interface_tmp_hack archives  get_blocksget_data_certificateget_transactions http_requesticrc1_balance_oficrc1_decimals  icrc1_feeicrc1_metadataicrc1_minting_account  -icrc1_nameicrc1_supported_standards icrc1_symbolicrc1_total_supply R*F +icrc1_nameicrc1_supported_standards icrc1_symbolicrc1_total_supply T*F F candid:serviceFEtype BlockIndex = nat; type Subaccount = blob; @@ -288,12 +288,12 @@ service : (ledger_arg : LedgerArg) -> { ` git_commit_idO)b3b00ba59c366384e3e0cd53a69457e9053ec987  }o>#c,% gN]{'G\2 % C.QfL4b("ɬS28Z - xQ  ~QX'c8yHܾ]~l=^! + xY  ~QX'c8yHܾ]~l=^!Һ  -V 1Kdzu1BԃXOLOX[ - N W -֖ߪ +V 1Kdzu1BԃXOLO: +×  ܉ W +쀮  K" diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/software.wasm similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/software.wasm rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/software.wasm diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/stable_memory.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/stable_memory.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/stable_memory.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/stable_memory.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/vmemory_0.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/vmemory_0.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/vmemory_0.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/wasm_chunk_store.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/wasm_chunk_store.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000010101/wasm_chunk_store.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000010101/wasm_chunk_store.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/canister.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/canister.pbuf similarity index 87% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/canister.pbuf rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/canister.pbuf index 0b3163ef..f9c340f2 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/canister.pbuf and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/canister.pbuf differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/software.wasm new file mode 100644 index 00000000..add4539d Binary files /dev/null and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/software.wasm differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/stable_memory.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/stable_memory.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/stable_memory.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/stable_memory.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/vmemory_0.bin similarity index 87% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/vmemory_0.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/vmemory_0.bin index 53bc958a..178557d6 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/vmemory_0.bin and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/vmemory_0.bin differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/wasm_chunk_store.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/wasm_chunk_store.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000020101/wasm_chunk_store.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000020101/wasm_chunk_store.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/canister.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/canister.pbuf similarity index 81% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/canister.pbuf rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/canister.pbuf index 5b4a8f9a..f79355f2 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/canister.pbuf and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/canister.pbuf differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/software.wasm similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/software.wasm rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/software.wasm diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/stable_memory.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/stable_memory.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/stable_memory.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/stable_memory.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/vmemory_0.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/vmemory_0.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/vmemory_0.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/wasm_chunk_store.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/wasm_chunk_store.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000030101/wasm_chunk_store.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000030101/wasm_chunk_store.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/canister.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/canister.pbuf similarity index 90% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/canister.pbuf rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/canister.pbuf index 01170eae..3e69f186 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/canister.pbuf and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/canister.pbuf differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/software.wasm similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/software.wasm rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/software.wasm diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/stable_memory.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/stable_memory.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/stable_memory.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/stable_memory.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/vmemory_0.bin similarity index 93% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/vmemory_0.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/vmemory_0.bin index 3515bf78..f08d4658 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/vmemory_0.bin and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/vmemory_0.bin differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/wasm_chunk_store.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/wasm_chunk_store.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000040101/wasm_chunk_store.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000040101/wasm_chunk_store.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/canister.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/canister.pbuf similarity index 97% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/canister.pbuf rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/canister.pbuf index 786163d3..ed318769 100644 --- a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/canister.pbuf +++ b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/canister.pbuf @@ -1,4 +1,4 @@ -|;(:> +|;(:> E E @ @@ -298,11 +298,11 @@ service: (asset_canister_args: opt AssetCanisterArgs) -> {  f<8owx6k4bzX[7 K supported_certificate_versions)1,2 Իbؗь;ZFATb'_M'&2 <q3L]>Ք~l08Z -;x Q  ~btB?%y@r7V7Բ +;x Y  ~btB?%y@r7V7Բ騚  -V 1Kdzu1BԃXOLO< -<| +V 1Kdzu1BԃXOLOc +×<  񄌋 9  K" diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/software.wasm similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/software.wasm rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/software.wasm diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/stable_memory.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/stable_memory.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/stable_memory.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/stable_memory.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/vmemory_0.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/vmemory_0.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/vmemory_0.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/wasm_chunk_store.bin b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/wasm_chunk_store.bin similarity index 100% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/canister_states/80000000001000050101/wasm_chunk_store.bin rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/canister_states/80000000001000050101/wasm_chunk_store.bin diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/ingress_history.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/ingress_history.pbuf new file mode 100644 index 00000000..7727e4be Binary files /dev/null and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/ingress_history.pbuf differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/system_metadata.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/system_metadata.pbuf similarity index 68% rename from .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/system_metadata.pbuf rename to .dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/system_metadata.pbuf index c6ab5130..3752866a 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002904/system_metadata.pbuf and b/.dfx/network/local/state/replicated_state/node-100/state/checkpoints/0000000000002cec/system_metadata.pbuf differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/states_metadata.pbuf b/.dfx/network/local/state/replicated_state/node-100/state/states_metadata.pbuf index 9751211b..177e783a 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/states_metadata.pbuf and b/.dfx/network/local/state/replicated_state/node-100/state/states_metadata.pbuf differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/00000000000000070101/stable_memory.bin b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/00000000000000070101/stable_memory.bin index 02a28e55..4f1636b8 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/00000000000000070101/stable_memory.bin and b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/00000000000000070101/stable_memory.bin differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/00000000000000070101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/00000000000000070101/vmemory_0.bin index 755f4392..57eac9df 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/00000000000000070101/vmemory_0.bin and b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/00000000000000070101/vmemory_0.bin differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000010101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000010101/vmemory_0.bin index 1dfb8c66..b6b32a92 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000010101/vmemory_0.bin and b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000010101/vmemory_0.bin differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000020101/software.wasm b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000020101/software.wasm index cabb0e07..add4539d 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000020101/software.wasm and b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000020101/software.wasm differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000020101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000020101/vmemory_0.bin index e36e9e8b..2e9e7638 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000020101/vmemory_0.bin and b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000020101/vmemory_0.bin differ diff --git a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000040101/vmemory_0.bin b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000040101/vmemory_0.bin index cb251014..c4472a92 100644 Binary files a/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000040101/vmemory_0.bin and b/.dfx/network/local/state/replicated_state/node-100/state/tip/canister_states/80000000001000040101/vmemory_0.bin differ diff --git a/README.md b/README.md index 571cf894..345977f2 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ For deeper understanding of the ICP < > BTC integration, see the IC wiki article - **CRUD Users**: Users logs in with their Internet Identity and adds users they want to make payments to. - **Send tokens**: Users can send ckBTC tokens to other users. +- **Receive tokens**: Users can receive ckBTC tokens from other users. +- **Bulk transfers**: Users can make bulk transfers to multiple users. +- **Schedule payments**: Users can schedule payments to be made at a future date. - **Receive notifications**: Users can choose to receive notifications by email or SMS when a payment is received. This uses the [HTTP Outcall](https://internetcomputer.org/docs/current/developer-docs/integrations/https-outcalls/) feature of the Internet Computer. - **Transaction history**: Users can view a list of transactions made to the store. @@ -26,6 +29,8 @@ The backend is written in Motoko and consist of one canister, `backend`. It expo - `updateUser` - updates the store configuration for a given principal. - `transferFromSubAccountToCanister` - transfers funds to the canister's account. - `transferFromSubAccountToSubAccount` - transfers funds to the another user's account. +- `runpayroll` - bulk transfers to multiple users/address with various amounts. +- `send_notifications` - sends notifications to users when a payment is received. - `getFundingAddress` - returns the funding address for a particular user. - `getFundingBalance` - returns the funding balance for a particular user. - `getTradingAddress` - returns the trading address for a particular user. diff --git a/canisters/backend/main.mo b/canisters/backend/main.mo index 3f778b0c..b11a1157 100644 --- a/canisters/backend/main.mo +++ b/canisters/backend/main.mo @@ -21,7 +21,6 @@ import Nat64 "mo:base/Nat64"; import Option "mo:base/Option"; import Trie "mo:base/Trie"; import Nat32 "mo:base/Nat32"; -import HttpTypes "http/http.types"; import Cycles "mo:base/ExperimentalCycles"; import Buffer "mo:base/Buffer"; import Nat8 "mo:base/Nat8"; @@ -382,13 +381,17 @@ shared (actorContext) actor class Backend(_startBlock : Nat) = this { switch (transaction) { case (#ok(transaction)) { - // Debug.print("Created new transaction: " # debug_show(transaction)) ; - let notification = save_notification({ - amount = amount; - sender = Principal.toText(caller); - receiver = receiver; - isRead = false; - }); + + switch (Trie.get(userStore, userKey(receiver), Text.equal)) { + case (?user) { + let notification = await send_notifications(user.name, user.email_address, user.phone_number, Nat.toText(amount), Principal.toText(caller)); + Debug.print("notification sent to : " # debug_show(user.email_address)); + }; + case null { + Debug.print("User to send notification to not found"); + }; + }; + return { status = 200; @@ -526,7 +529,7 @@ shared (actorContext) actor class Backend(_startBlock : Nat) = this { let next = Nat64.fromIntWrap(Time.now()) + 20_000_000_000; // 20 seconds setGlobalTimer(next); - await notify(); + // await notify(); }; // #region get_account_identifier @@ -854,102 +857,6 @@ shared (actorContext) actor class Backend(_startBlock : Nat) = this { }; return Nat.toText(size); }; - - // public shared ({ caller }) func runpayroll(receivers : [PayrollType]) : async Types.Response<[PayrollType]> { - // var total : Nat = 0; - // let fee : Nat = 10; - // let payroll = Buffer.Buffer(50); - // for (receiver in receivers.vals()) { - // total += receiver.amount + fee; - // }; - // Debug.print("total: " # debug_show (total)); - - // //check balance - // let balance = await CkBtcLedger.icrc1_balance_of( - // { - // owner = Principal.fromActor(this); - // subaccount = ?toSubaccount(caller); - // } - // ); - // Debug.print("balance: " # debug_show (balance)); - - // if (balance < total) { - // let data : [PayrollType] = Buffer.toArray(payroll); - // return { - // status = 403; - // status_text = "Insufficient Balance"; - // data = null; - // error_text = null; - // }; - // } else { - - // for (receiver in receivers.vals()) { - // Debug.print("receiver: " # debug_show (receiver)); - - // try { - // let transferResult = await CkBtcLedger.icrc1_transfer( - // { - // amount = receiver.amount; - // from_subaccount = ?toSubaccount(caller); - // created_at_time = null; - // fee = ?10; - // memo = null; - // to = { - // owner = Principal.fromActor(this); - // subaccount = ?toSubaccount(Principal.fromText(receiver.destination)); - // }; - // } - // ); - // switch (transferResult) { - // case (#Ok(index)) { - // // payroll.add(receiver); - // // return { - // // status = 200; - // // status_text = "Accepted"; - // // data = ?Buffer.toArray(payroll); - // // error_text = ?"Funds Transferred:\n"; - // // }; - // }; - - // case (#Err(transferError)) { - // // return { - // // status = 405; - // // status_text = "Forbidden"; - // // data = ?Buffer.toArray(payroll); - // // error_text = ?"Couldn't transfer funds to account:\n"; - // // }; - - // }; - // case (_) { - // // return { - // // status = 500; - // // status_text = "Internal Server Error"; - // // data = null; - // // error_text = ?"Unexpected error occurred"; - // // }; - // }; - // }; - // } catch (error : Error) { - // // return { - // // status = 406; - // // status_text = "Rejected"; - // // data = ?Buffer.toArray(payroll); - // // error_text = ?"Payroll failed"; - // // }; - // }; - // }; - - // }; - - // { - // status = 200; - // status_text = "Transfer Successful"; - // data = null; - // error_text = null; - // }; - - // }; - public shared ({ caller }) func runpayroll(receivers : [PayrollType]) : async Types.Response<[PayrollType]> { var total : Nat = 0; let fee : Nat = 10; @@ -1032,46 +939,18 @@ shared (actorContext) actor class Backend(_startBlock : Nat) = this { //PULIC METHOD //This method sends a POST request to a URL with a free API we can test. - public func send_notifications(name:Text,email:Text,phone:Text,amount:Text,sender:Text) : async Text { - - //1. DECLARE IC MANAGEMENT CANISTER - //We need this so we can use it to make the HTTP request + public func send_notifications(name:Text,email:Text,phone:Text,amount:Text,sender:Text) : async () { let ic : Types.IC = actor ("aaaaa-aa"); - - //2. SETUP ARGUMENTS FOR HTTP GET request - - // 2.1 Setup the URL and its query parameters - //This URL is used because it allows us to inspect the HTTP request sent from the canister - // let host : Text = "putsreq.com"; - // let url = "https://putsreq.com/aL1QS5IbaQd4NTqN3a81"; //HTTP that accepts IPV6 - - //let host :Text =""; let url ="https://icpos-notifications.xyz/.netlify/functions/notify"; - - // 2.2 prepare headers for the system http_request call - - //idempotency keys should be unique so we create a function that generates them. let idempotency_key: Text = generateUUID(); let request_headers = [ { name = "Content-Type"; value = "application/json" }, ]; - - // The request body is an array of [Nat8] (see Types.mo) so we do the following: - // 1. Write a JSON string - // 2. Convert ?Text optional into a Blob, which is an intermediate reprepresentation before we cast it as an array of [Nat8] - // 3. Convert the Blob into an array [Nat8] - // let request_body_json: Text = "{ \"name\" : \"Grogu\", \"force_sensitive\" : \"true\" }"; - // let request_body_as_Blob: Blob = Text.encodeUtf8(request_body_json); - // let request_body_as_nat8: [Nat8] = Blob.toArray(request_body_as_Blob); // e.g [34, 34,12, 0] - let idempotencyKey : Text = Text.concat(name, Nat.toText(5)); let requestBodyJson : Text = "{ \"idempotencyKey\": \"" # idempotencyKey # "\", \"email\": \"" # email # "\", \"phone\": \"" # phone # "\", \"amount\": \"" # amount # "\", \"payer\": \"" # sender # "\"}"; let requestBodyAsBlob : Blob = Text.encodeUtf8(requestBodyJson); let requestBodyAsNat8 : [Nat8] = Blob.toArray(requestBodyAsBlob); - - - - // 2.2.1 Transform context + // 2.2.1 Transform context let transform_context : Types.TransformContext = { function = transform; context = Blob.fromArray([]); @@ -1088,45 +967,10 @@ shared (actorContext) actor class Backend(_startBlock : Nat) = this { transform = ?transform_context; //transform = null; }; - - //3. ADD CYCLES TO PAY FOR HTTP REQUEST - - //IC management canister will make the HTTP request so it needs cycles - //See: https://internetcomputer.org/docs/current/motoko/main/cycles - - //The way Cycles.add() works is that it adds those cycles to the next asynchronous call - //See: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request Cycles.add(70_000_000); - - //4. MAKE HTTPS REQUEST AND WAIT FOR RESPONSE - //Since the cycles were added above, we can just call the IC management canister with HTTPS outcalls below let http_response : Types.HttpResponsePayload = await ic.http_request(http_request); - - //5. DECODE THE RESPONSE - - //As per the type declarations in `Types.mo`, the BODY in the HTTP response - //comes back as [Nat8s] (e.g. [2, 5, 12, 11, 23]). Type signature: - - //public type HttpResponsePayload = { - // status : Nat; - // headers : [HttpHeader]; - // body : [Nat8]; - // }; - - //We need to decode that [Na8] array that is the body into readable text. - //To do this, we: - // 1. Convert the [Nat8] into a Blob - // 2. Use Blob.decodeUtf8() method to convert the Blob to a ?Text optional - // 3. We use Motoko syntax "Let... else" to unwrap what is returned from Text.decodeUtf8() - // let response_body: Blob = Blob.fromArray(http_response.body); - // let decoded_text: Text = switch (Text.decodeUtf8(response_body)) { - // case (null) { "No value returned" }; - // case (?y) { y }; - // }; - - // //6. RETURN RESPONSE OF THE BODY - // let result: Text = decoded_text # ". See more info of the request sent at: " # url # "/inspect"; - // result + + Debug.print("http_response: " # debug_show(http_response)); if (http_response.status > 299) { let response_body : Blob = Blob.fromArray(http_response.body); @@ -1134,9 +978,9 @@ shared (actorContext) actor class Backend(_startBlock : Nat) = this { case (null) { "No value returned" }; case (?y) { y }; }; - // log("Error sending notification: " # decoded_text); + log("Error sending notification: " # decoded_text); } else { - // log("Notification sent"); + log("Notification sent"); }; }; @@ -1145,7 +989,7 @@ shared (actorContext) actor class Backend(_startBlock : Nat) = this { //this method is used for the Idempotency Key used in the request headers of the POST request. //For the purposes of this exercise, it returns a constant, but in practice it should return unique identifiers func generateUUID() : Text { - "UUID-123456789"; + "UUID-1234567435345"; } }; diff --git a/src/declarations/backend/backend.did b/src/declarations/backend/backend.did index ba4c8d14..fb518473 100644 --- a/src/declarations/backend/backend.did +++ b/src/declarations/backend/backend.did @@ -6,6 +6,11 @@ type User = phone_notifications: bool; phone_number: text; }; +type TransformArgs = + record { + context: blob; + response: HttpResponsePayload; + }; type Transaction__1 = record { amount: nat; @@ -90,6 +95,17 @@ type Notification = receiver: text; sender: text; }; +type HttpResponsePayload = + record { + body: vec nat8; + headers: vec HttpHeader; + status: nat; + }; +type HttpHeader = + record { + name: text; + value: text; + }; type GetTransactionSuccess = record {transaction: Transaction__1;}; type GetTransactionResult = variant { @@ -176,6 +192,12 @@ type CreateNotificationArgs = sender: text; }; type CreateEmployeeArgs = record {wallet: text;}; +type CanisterHttpResponsePayload = + record { + body: vec nat8; + headers: vec HttpHeader; + status: nat; + }; type Backend = service { accountIdentifierToBlob: (AccountIdentifier) -> @@ -217,12 +239,14 @@ type Backend = runpayroll: (vec PayrollType) -> (Response_3); save_notification: (CreateNotificationArgs) -> (CreateNotificationResult); save_transaction: (CreateTransactionArgs) -> (CreateTransactionResult); + send_notifications: (text, text, text, text, text) -> (); /// * Set the courier API key. Only the owner can set the courier API key. setCourierApiKey: (text) -> (Response_2); testRandom: () -> (opt bool); transferFromCanistertoSubAccount: () -> (Result); transferFromSubAccountToCanister: (nat) -> (Result); transferFromSubAccountToSubAccount: (text, nat) -> (Response_1); + transform: (TransformArgs) -> (CanisterHttpResponsePayload) query; /// * Update the merchant's information updateUser: (User) -> (Response); userLength: () -> (text) query; diff --git a/src/declarations/backend/backend.did.d.ts b/src/declarations/backend/backend.did.d.ts index e1c20f9f..6d1cd831 100644 --- a/src/declarations/backend/backend.did.d.ts +++ b/src/declarations/backend/backend.did.d.ts @@ -61,6 +61,10 @@ export interface Backend { [CreateTransactionArgs], CreateTransactionResult >, + 'send_notifications' : ActorMethod< + [string, string, string, string, string], + undefined + >, 'setCourierApiKey' : ActorMethod<[string], Response_2>, 'testRandom' : ActorMethod<[], [] | [boolean]>, 'transferFromCanistertoSubAccount' : ActorMethod<[], Result>, @@ -69,10 +73,16 @@ export interface Backend { [string, bigint], Response_1 >, + 'transform' : ActorMethod<[TransformArgs], CanisterHttpResponsePayload>, 'updateUser' : ActorMethod<[User], Response>, 'userLength' : ActorMethod<[], string>, 'whoami' : ActorMethod<[], Principal>, } +export interface CanisterHttpResponsePayload { + 'status' : bigint, + 'body' : Uint8Array | number[], + 'headers' : Array, +} export interface CreateEmployeeArgs { 'wallet' : string } export interface CreateNotificationArgs { 'isRead' : boolean, @@ -137,6 +147,12 @@ export interface GetTransactionErr { export type GetTransactionResult = { 'ok' : GetTransactionSuccess } | { 'err' : GetTransactionErr }; export interface GetTransactionSuccess { 'transaction' : Transaction__1 } +export interface HttpHeader { 'value' : string, 'name' : string } +export interface HttpResponsePayload { + 'status' : bigint, + 'body' : Uint8Array | number[], + 'headers' : Array, +} export interface Notification { 'id' : bigint, 'isRead' : boolean, @@ -208,6 +224,10 @@ export interface Transaction__1 { 'amount' : bigint, 'successful' : boolean, } +export interface TransformArgs { + 'context' : Uint8Array | number[], + 'response' : HttpResponsePayload, +} export interface User { 'email_address' : string, 'phone_notifications' : boolean, diff --git a/src/declarations/backend/backend.did.js b/src/declarations/backend/backend.did.js index c8641055..6a58bbac 100644 --- a/src/declarations/backend/backend.did.js +++ b/src/declarations/backend/backend.did.js @@ -177,6 +177,21 @@ export const idlFactory = ({ IDL }) => { 'status_text' : IDL.Text, 'error_text' : IDL.Opt(IDL.Text), }); + const HttpHeader = IDL.Record({ 'value' : IDL.Text, 'name' : IDL.Text }); + const HttpResponsePayload = IDL.Record({ + 'status' : IDL.Nat, + 'body' : IDL.Vec(IDL.Nat8), + 'headers' : IDL.Vec(HttpHeader), + }); + const TransformArgs = IDL.Record({ + 'context' : IDL.Vec(IDL.Nat8), + 'response' : HttpResponsePayload, + }); + const CanisterHttpResponsePayload = IDL.Record({ + 'status' : IDL.Nat, + 'body' : IDL.Vec(IDL.Nat8), + 'headers' : IDL.Vec(HttpHeader), + }); const Backend = IDL.Service({ 'accountIdentifierToBlob' : IDL.Func( [AccountIdentifier], @@ -231,6 +246,11 @@ export const idlFactory = ({ IDL }) => { [CreateTransactionResult], [], ), + 'send_notifications' : IDL.Func( + [IDL.Text, IDL.Text, IDL.Text, IDL.Text, IDL.Text], + [], + [], + ), 'setCourierApiKey' : IDL.Func([IDL.Text], [Response_2], []), 'testRandom' : IDL.Func([], [IDL.Opt(IDL.Bool)], []), 'transferFromCanistertoSubAccount' : IDL.Func([], [Result], []), @@ -240,6 +260,11 @@ export const idlFactory = ({ IDL }) => { [Response_1], [], ), + 'transform' : IDL.Func( + [TransformArgs], + [CanisterHttpResponsePayload], + ['query'], + ), 'updateUser' : IDL.Func([User], [Response], []), 'userLength' : IDL.Func([], [IDL.Text], ['query']), 'whoami' : IDL.Func([], [IDL.Principal], []),