1.0.0-rc.1 • Published 12 months ago
@seda-protocol/as-sdk v1.0.0-rc.1
AssemblyScript SDK
SDK for creating Oracle Programs on the SEDA chain.
For guides an examples on how to use this SDK see our documentation: <LINK_HERE>
Preview
import { Process, httpFetch, Bytes, OracleProgram, Console, JSON } from "@seda-protocol/as-sdk/assembly";
@json
class SwPlanet {
name!: string;
}
class PlanetProgram extends OracleProgram {
execute(): void {
const response = httpFetch("https://swapi.dev/api/planets/1/");
if (response.ok) {
const planet = response.bytes.toJSON<SwPlanet>();
Console.log(planet);
Process.success(Bytes.fromUtf8String(planet.name));
} else {
Process.error(Bytes.fromUtf8String("Error while fetching"));
}
}
}
new PlanetProgram().run();1.0.0-rc.1
12 months ago
0.0.17
1 year ago
0.0.18
1 year ago
0.0.16
1 year ago
0.0.11
2 years ago
0.0.12
2 years ago
0.0.13
2 years ago
0.0.14
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.15
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.1
3 years ago