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
type Account = record { owner : principal; subaccount : opt vec nat8 }; | |
type AccountBalanceArgs = record { account : text }; | |
type ArchiveInfo = record { canister_id : principal }; | |
type ArchiveOptions = record { | |
num_blocks_to_archive : nat64; | |
max_transactions_per_response : opt nat64; | |
trigger_threshold : nat64; | |
max_message_size_bytes : opt nat64; | |
cycles_for_archive_creation : opt nat64; | |
node_max_memory_size_bytes : opt nat64; |
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
type BlockIndex = nat64; | |
type Memo = nat64; | |
type AccountIdentifier = blob; | |
type Tokens = record { e8s : nat64 }; | |
type Timestamp = record { timestamp_nanos : nat64 }; | |
type Operation = variant { | |
Mint : record { | |
to : AccountIdentifier; | |
amount : Tokens; |
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
type Value = | |
variant { | |
Bool: bool; | |
Class: vec Property; | |
Empty; | |
Float: float64; | |
Int: int; | |
Nat: nat; | |
Principal: principal; | |
Text: text; |
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
var reader = new FileReader() | |
var fileByteArray = [] | |
reader.readAsArrayBuffer(file) | |
reader.onloadend = function (evt) { | |
if (evt.target.readyState == FileReader.DONE) { | |
var arrayBuffer = evt.target.result, | |
array = new Uint8Array(arrayBuffer) | |
for (var i = 0; i < array.length; i++) { | |
fileByteArray.push(array[i]) |
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
import Blob "mo:base/Blob"; | |
import Debug "mo:base/Debug"; | |
import Text "mo:base/Text"; | |
actor { | |
type HeaderField = (Text, Text); | |
type HttpRequest = { | |
method: Text; | |
url: Text; |