Motoko¶
you can directly use the Motoko language in your project. To do so, you need to add the following to your project
Installation¶
Add methods from following did in your project
type HttpResponse =
record {
body: blob;
headers: vec HeaderField;
status_code: nat16;
};
type HttpRequest =
record {
body: blob;
headers: vec HeaderField;
method: text;
url: text;
};
type HeaderField =
record {
text;
text;
};
type FiatAddressDetails =
record {
accountNumber: text;
routingNumber: opt text;
};
type CryptoAddressDetails =
record {
address: text;
tag: opt text;
};
type AddressDetailsType =
variant {
CryptoAddress;
FiatAddress;
};
type AddressDetails =
variant {
CryptoAddressDetails: CryptoAddressDetails;
FiatAddressDetails: FiatAddressDetails;
};
type Address =
record {
addressDetails: AddressDetails;
addressDetailsType: AddressDetailsType;
environment: opt text;
paymentNetwork: text;
};
service : {
add: (text, Address) -> ();
auction: (text) -> (nat32);
delete: (text, Address) -> ();
deleteAll: (text) -> ();
getPayId: (text, text, opt text) -> (vec Address) query;
getPayIdCount: () -> (nat32) query;
getPrice: (text) -> (nat) query;
http_request: (HttpRequest) -> (HttpResponse) query;
payStringExist: (text) -> (bool) query;
setPrice: (nat32, nat) -> ();
}